]> gcc.gnu.org Git - gcc.git/blob - gcc/c/ChangeLog
Daily bump.
[gcc.git] / gcc / c / ChangeLog
1 2021-02-18 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/99136
4 * c-typeck.c (c_finish_return): Don't wrap retval into
5 EXCESS_PRECISION_EXPR in functions that return void.
6
7 2021-02-11 Marek Polacek <polacek@redhat.com>
8
9 * c-parser.c (c_parser_if_statement): Use vec_free.
10
11 2021-02-04 Martin Sebor <msebor@redhat.com>
12
13 PR c/97882
14 * c-decl.c (locate_old_decl): Add type to diagnostic output.
15 (diagnose_mismatched_decls): Same.
16 (start_function): Introduce temporaries for better readability.
17 * c-typeck.c (comptypes_internal): Only consider complete enum
18 types in comparisons with integers.
19
20 2021-02-01 Martin Sebor <msebor@redhat.com>
21
22 PR middle-end/97172
23 * c-decl.c (free_attr_access_data): New function.
24 (c_parse_final_cleanups): Call free_attr_access_data.
25
26 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
27
28 * c-parser.c (c_parser_omp_clause_detach): New.
29 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
30 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
31 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
32 clause. Prevent use of detach with mergeable and overriding the
33 data sharing mode of the event handle.
34
35 2021-01-15 Jakub Jelinek <jakub@redhat.com>
36
37 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
38 unqualified element type and then call c_build_qualified_type on the
39 ARRAY_TYPE.
40
41 2021-01-07 Richard Biener <rguenther@suse.de>
42
43 * gimple-parser.c (c_parser_gimple_compound_statement): Only
44 reallocate loop array if it is too small.
45
46 2020-12-16 Martin Uecker <muecker@gwdg.de>
47
48 PR c/98047
49 * c-typeck.c (build_modify_expr): Drop qualifiers.
50
51 2020-12-16 Martin Uecker <muecker@gwdg.de>
52
53 PR c/98260
54 * c-parser.c (c_parser_expression): Look into
55 nop expression when marking expressions as read.
56
57 2020-12-14 Martin Liska <mliska@suse.cz>
58
59 PR sanitizer/98204
60 * c-typeck.c (pointer_diff): Do not emit a top-level
61 sanitization.
62 (build_binary_op): Likewise.
63
64 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
65
66 * c-parser.c (c_parser_omp_allocate): New.
67 (c_parser_omp_construct): Call it.
68
69 2020-12-09 Richard Biener <rguenther@suse.de>
70
71 PR c/98200
72 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
73 early on error.
74
75 2020-12-07 Martin Uecker <muecker@gwdg.de>
76
77 PR c/97981
78 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
79 that drops qualifiers to the end of the function.
80
81 2020-11-26 Martin Uecker <muecker@gwdg.de>
82
83 PR c/65455
84 PR c/92935
85 * c-parser.c (c_parser_declaration_or_fndef): Remove
86 redundant code to drop qualifiers of _Atomic types for __auto_type.
87 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
88 types for __typeof__.
89
90 2020-11-24 Jakub Jelinek <jakub@redhat.com>
91
92 PR c/97958
93 * c-parser.c (c_parser_binary_expression): For omp atomic binary
94 expressions, use make_node instead of build2 to avoid checking build2
95 performs.
96
97 2020-11-23 Joseph Myers <joseph@codesourcery.com>
98
99 PR c/95630
100 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
101 for comparisons of complete and incomplete pointers.
102
103 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
104
105 * c-aux-info.c (gen_type): Support opaque types.
106
107 2020-11-20 Martin Sebor <msebor@redhat.com>
108
109 PR middle-end/97879
110 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
111
112 2020-11-20 Jakub Jelinek <jakub@redhat.com>
113
114 PR other/97911
115 * Make-lang.in (c.serial): Change from goal to a variable.
116 (.PHONY): Drop c.serial.
117
118 2020-11-20 Martin Uecker <muecker@gwdg.de>
119
120 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
121
122 2020-11-19 Jakub Jelinek <jakub@redhat.com>
123
124 PR c/97860
125 * c-decl.c (get_parm_array_spec): Bail out of nelts is
126 error_operand_p.
127
128 2020-11-18 Jakub Jelinek <jakub@redhat.com>
129
130 * Make-lang.in (c.serial): New goal.
131 (.PHONY): Add c.serial c.prev.
132 (cc1$(exeext)): Call LINK_PROGRESS.
133
134 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
135
136 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
137 goto too.
138 * c-typeck.c (build_asm_expr): Remove an assert checking output
139 absence for asm goto.
140
141 2020-11-13 Jakub Jelinek <jakub@redhat.com>
142
143 * c-typeck.c (c_finish_omp_clauses): Don't clear
144 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
145
146 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
147
148 PR objc/77404
149 * c-parser.c (c_parser_objc_class_definition): Pass the
150 location of the class name to the interface declaration.
151
152 2020-11-10 Strager Neds <strager.nds@gmail.com>
153
154 * c-decl.c (merge_decls): Use new overload of
155 set_decl_section_name.
156
157 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
158
159 * c-parser.c (c_parser_omp_target_data): Add use of
160 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
161 handled map clause kind.
162 (c_parser_omp_target_enter_data): Likewise.
163 (c_parser_omp_target_exit_data): Likewise.
164 (c_parser_omp_target): Likewise.
165 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
166 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
167 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
168 same struct field access to co-exist on OpenMP construct.
169
170 2020-11-07 Martin Uecker <muecker@gwdg.de>
171
172 * c-parser.c (c_parser_label): Implement mixing of labels and code.
173 (c_parser_all_labels): Likewise.
174
175 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
176
177 * c-parser.c (c_parser_objc_at_property_declaration):
178 Improve parsing fidelity. Associate better location info
179 with @property attributes. Clean up the interface to
180 objc_add_property_declaration ().
181
182 2020-11-06 Nathan Sidwell <nathan@acm.org>
183
184 * c-decl.c (diagnose_mismatched_decls): Rename
185 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
186 (warn_if_shadowing, implicitly_declare, names_builtin_p)
187 (collect_source_refs): Likewise.
188 * c-typeck.c (inform_declaration, inform_for_arg)
189 (convert_for_assignment): Likewise.
190
191 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
192
193 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
194 OpenACC matching.
195 (c_parser_omp_construct): Update call.
196
197 2020-11-04 Jakub Jelinek <jakub@redhat.com>
198
199 PR c++/97670
200 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
201 find underlying decl to clear in the aligned_head bitmap.
202
203 2020-11-04 Joseph Myers <joseph@codesourcery.com>
204
205 * c-decl.c (handle_nodiscard_attribute): New.
206 (std_attribute_table): Add nodiscard.
207 * c-parser.c (c_parser_std_attribute): Expect argument to
208 nodiscard attribute to be a string. Do not special-case ignoring
209 nodiscard.
210 * c-typeck.c (maybe_warn_nodiscard): New.
211 (build_compound_expr, emit_side_effect_warnings): Call
212 maybe_warn_nodiscard.
213 (c_process_expr_stmt, c_finish_stmt_expr): Also call
214 emit_side_effect_warnings if warn_unused_result.
215
216 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
217
218 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
219 with XDELETE.
220 (finish_init): Likewise.
221 (pop_init_level): Likewise.
222
223 2020-10-28 Joseph Myers <joseph@codesourcery.com>
224
225 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
226 error_at for omitted parameter name.
227
228 2020-10-28 Jakub Jelinek <jakub@redhat.com>
229
230 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
231 (c_parser_omp_clause_allocate): New function.
232 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
233 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
234 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
235 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
236 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
237 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
238 PRAGMA_OMP_CLAUSE_ALLOCATE.
239 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
240
241 2020-10-27 Joseph Myers <joseph@codesourcery.com>
242
243 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
244 standard attributes.
245
246 2020-10-23 Marek Polacek <polacek@redhat.com>
247
248 PR c++/91741
249 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
250 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
251 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
252 * c-tree.h (char_type_p): Declare.
253 * c-typeck.c (char_type_p): No longer static.
254
255 2020-10-23 Martin Sebor <msebor@redhat.com>
256
257 PR middle-end/97552
258 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
259
260 2020-09-19 Martin Sebor <msebor@redhat.com>
261
262 PR c/50584
263 * c-decl.c (lookup_last_decl): Define new function.
264 (c_decl_attributes): Call it.
265 (start_decl): Add argument and use it.
266 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
267 (get_parm_array_spec): Define new function.
268 (push_parm_decl): Call get_parm_array_spec.
269 (start_function): Call warn_parm_array_mismatch. Build attribute
270 access and add it to current function.
271 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
272 in forms of array parameters.
273 * c-tree.h (start_decl): Add argument.
274
275 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
276
277 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
278 with...
279 (in_statement): New.
280 (start_function): Adjust for above change.
281 (c_push_function_context, c_pop_function_context): Likewise.
282 * c-lang.h (struct language_function): Likewise.
283 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
284 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
285 New.
286 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
287 (c_parser_switch_statement): Adjust break/switch context handling
288 and calls to renamed functions.
289 (c_parser_while_statement): Adjust break/switch context handling and
290 build a WHILE_STMT.
291 (c_parser_do_statement): Ditto, with DO_STMT respectively.
292 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
293 (c_parser_omp_for_loop): Adjust break/switch context handling.
294 * c-tree.h (c_break_label, c_cont_label): Delete.
295 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
296 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
297 (in_statement, switch_statement_break_seen_p): Declare.
298 (c_start_case, c_finish_case): Renamed to...
299 (c_start_switch, c_finish_switch).
300 (c_finish_bc_stmt): Adjust arguments.
301 * c-typeck.c (build_function_call_vec): Don't try to print
302 statements with %qE format.
303 (struct c_switch): Rename switch_expr field to switch_stmt.
304 Add break_stmt_seen_p field.
305 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
306 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
307 (do_case): Update for changes to struct c_switch.
308 (c_finish_case): Rename to c_finish_switch. Update for changes to
309 struct c_switch and change of representation from SWITCH_EXPR to
310 SWITCH_STMT.
311 (c_finish_loop): Delete.
312 (c_finish_bc_stmt): Update to reflect changes to break/continue
313 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
314 of a GOTO_EXPR except for objc foreach loops.
315
316 2020-09-01 Jakub Jelinek <jakub@redhat.com>
317
318 PR c++/96867
319 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
320 only on PARM_DECLs.
321
322 2020-08-28 Martin Sebor <msebor@redhat.com>
323
324 PR c/96596
325 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
326 argument type.
327
328 2020-08-27 Martin Liska <mliska@suse.cz>
329
330 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
331 growth function to true.
332
333 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
334
335 PR c/96678
336 * c-typeck.c (handle_omp_array_sections_1): Talk about
337 array function parameter in the error message.
338
339 2020-08-18 Jakub Jelinek <jakub@redhat.com>
340
341 PR c/96571
342 * c-parser.c (c_parser_generic_selection): Change match_found from bool
343 to int, holding index of the match. Call mark_exp_read on the selector
344 expression and on expressions other than the selected one.
345
346 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
347
348 PR c/96377
349 * c-typeck.c (process_init_element): Split test for whether to
350 recurse into a record, union or array into...
351 (initialize_elementwise_p): ...this new function. Don't recurse
352 into a vector type if the initialization value is also a vector.
353
354 2020-07-31 Richard Biener <rguenther@suse.de>
355
356 PR debug/96383
357 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
358 Define to c_common_finalize_early_debug.
359
360 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
361
362 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
363 (c_parser_omp_critical): Permit hint(0) clause without named critical.
364 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
365
366 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
367
368 PR target/95237
369 * c-decl.c (finish_decl): Call target hook
370 lower_local_decl_alignment to lower local decl alignment.
371
372 2020-07-09 Julian Brown <julian@codesourcery.com>
373 Thomas Schwinge <thomas@codesourcery.com>
374
375 PR middle-end/95270
376 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
377 for standalone attach/detach clauses.
378
379 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
380
381 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
382 set, warn for conversion between pointers that point to incompatible
383 scalar storage orders.
384
385 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
386
387 * c-parser.c (c_parser_statement_after_labels): Pass correct
388 parameters to c_parser_do_statement.
389
390 2020-06-16 Jakub Jelinek <jakub@redhat.com>
391
392 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
393 c_in_omp_for.
394 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
395 premature c_fully_fold. Defer explicit c_fully_fold calls to after
396 c_finish_omp_for.
397 * c-tree.h (c_in_omp_for): Declare.
398 * c-typeck.c (c_in_omp_for): Define.
399 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
400 (digest_init): Likewise.
401 (build_binary_op): Likewise.
402
403 2020-06-16 Jakub Jelinek <jakub@redhat.com>
404
405 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
406 from kind by comma rather than colon.
407
408 2020-06-05 Mark Wielaard <mark@klomp.org>
409
410 * c-decl.c (implicit_decl_warning): When warned and olddecl is
411 an undeclared builtin, then add a fixit header hint, if found.
412 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
413 warning_at about implicit builtin declaration type mismatch.
414
415 2020-06-03 Mark Wielaard <mark@klomp.org>
416
417 * c-parser.c (struct c_parser): Add seen_string_literal
418 bitfield.
419 (c_parser_consume_token): Reset seen_string_literal.
420 (c_parser_error_richloc): Add name_hint if seen_string_literal
421 and next token is a CPP_NAME and we have a missing header
422 suggestion for the name.
423 (c_parser_string_literal): Set seen_string_literal.
424
425 2020-06-03 Mark Wielaard <mark@klomp.org>
426
427 * c-parser.c (c_parser_postfix_expression_after_primary): Add
428 scope with matching_parens after CPP_OPEN_PAREN.
429
430 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
431
432 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
433
434 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
435
436 * Make-lang.in: Remove extra slash.
437
438 2020-05-19 Martin Liska <mliska@suse.cz>
439
440 * c-parser.c: Fix typo.
441
442 2020-05-14 Jakub Jelinek <jakub@redhat.com>
443
444 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
445
446 2020-05-07 Richard Biener <rguenther@suse.de>
447
448 PR middle-end/94703
449 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
450 DECL_GIMPLE_REG_P.
451
452 2020-04-30 Jakub Jelinek <jakub@redhat.com>
453
454 PR c/94842
455 * c-decl.c (set_labels_context_r): In addition to context-less
456 LABEL_DECLs adjust also LABEL_DECLs with context equal to
457 parent function if any.
458 (store_parm_decls): Adjust comment.
459
460 2020-04-19 Jakub Jelinek <jakub@redhat.com>
461
462 PR objc/94637
463 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
464 two CPP_COLON tokens.
465
466 2020-04-17 Jakub Jelinek <jakub@redhat.com>
467
468 PR other/94629
469 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
470 to data.clauses.
471
472 2020-04-15 Jakub Jelinek <jakub@redhat.com>
473
474 PR c/94593
475 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
476 requires directive when not at file scope.
477
478 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
479
480 PR middle-end/94120
481 * c-decl.c (c_check_in_current_scope): New function.
482 * c-tree.h (c_check_in_current_scope): Declare it.
483 * c-parser.c (c_parser_oacc_declare): Add check that variables
484 are declared in the same scope as the directive. Fix handling
485 of namespace vars.
486
487 2020-04-07 Jakub Jelinek <jakub@redhat.com>
488
489 PR c++/94512
490 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
491 if c_parser_omp_master succeeded.
492
493 2020-03-23 Jakub Jelinek <jakub@redhat.com>
494
495 PR gcov-profile/94029
496 PR c/94239
497 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
498 the function_start_locus location. Don't do that afterwards for the
499 __GIMPLE body parsing.
500
501 2020-03-19 Jakub Jelinek <jakub@redhat.com>
502
503 PR gcov-profile/94029
504 * c-tree.h (finish_function): Add location_t argument defaulted to
505 input_location.
506 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
507 set it to the locus of closing } if non-NULL.
508 (c_parser_compound_statement_nostart): Return locus of closing }.
509 (c_parser_parse_rtl_body): Likewise.
510 (c_parser_declaration_or_fndef): Propagate locus of closing } to
511 finish_function.
512 * c-decl.c (finish_function): Add end_loc argument, use it instead of
513 input_location to set function_end_locus.
514
515 2020-03-17 Jakub Jelinek <jakub@redhat.com>
516
517 PR c/94172
518 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
519 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
520 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
521 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
522 ENUMERAL_TYPEs.
523 (finish_incomplete_vars): New function, moved from finish_struct. Use
524 relayout_decl instead of layout_decl.
525 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
526 being TYPE_VFIELD. Use finish_incomplete_vars.
527 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
528 finish_incomplete_vars.
529 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
530 also on ENUMERAL_TYPEs.
531
532 2020-03-16 Jakub Jelinek <jakub@redhat.com>
533
534 PR c/94179
535 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
536
537 2020-03-13 Martin Sebor <msebor@redhat.com>
538
539 PR c/94040
540 * c-decl.c (builtin_structptr_type_count): New constant.
541 (match_builtin_function_types): Reject decls that are incompatible
542 in types pointed to by pointers.
543 (diagnose_mismatched_decls): Adjust comments.
544
545 2020-03-05 Joseph Myers <joseph@codesourcery.com>
546
547 PR c/93577
548 * c-typeck.c (pop_init_level): Do not diagnose initializers as
549 empty when initialized type is error_mark_node.
550 (set_designator, process_init_element): Ignore initializers for
551 elements of a variable-size type or of error_mark_node.
552
553 2020-03-01 Martin Sebor <msebor@redhat.com>
554
555 PR middle-end/93926
556 * c-decl.c (types_close_enough_to_match): New function.
557 (match_builtin_function_types):
558 (diagnose_mismatched_decls): Add missing inform call to a warning.
559
560 2020-03-01 Martin Sebor <msebor@redhat.com>
561
562 PR c/93812
563 * c-typeck.c (build_functype_attribute_variant): New function.
564 (composite_type): Call it.
565
566 2020-02-25 Jakub Jelinek <jakub@redhat.com>
567
568 PR other/93912
569 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
570 Rename last argument from probablity to probability.
571
572 2020-02-13 Jakub Jelinek <jakub@redhat.com>
573
574 PR c/93576
575 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
576 *expr if it has side effects.
577
578 2020-01-30 Jeff Law <law@redhat.com>
579
580 PR c/88660
581 * c-parser.c (c_parser_switch_statement): Make sure to request
582 marking the switch expr as used.
583
584 2020-01-22 Joseph Myers <joseph@codesourcery.com>
585
586 PR c/93348
587 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
588 argument with integer operands.
589
590 2020-01-16 Kerem Kat <keremkat@gmail.com>
591
592 PR c/92833
593 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
594 to support 4 available tokens.
595
596 2020-01-15 Joseph Myers <joseph@codesourcery.com>
597
598 PR c/93072
599 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
600 determine whether to set DECL_CONTEXT.
601
602 2020-01-13 Joseph Myers <joseph@codesourcery.com>
603
604 PR c/93241
605 * c-typeck.c (build_c_cast): Check for expressions with integer
606 operands that can occur in an unevaluated part of an integer
607 constant expression and call note_integer_operands as needed.
608
609 2019-01-08 Richard Biener <rguenther@suse.de>
610
611 PR middle-end/93199
612 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
613 permanently.
614
615 2020-01-01 Jakub Jelinek <jakub@redhat.com>
616
617 Update copyright years.
618
619 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
620
621 * c-decl.c (collect_source_ref_cb): Delete.
622 (for_each_global_decl): Rename into...
623 (collect_source_refs): ...this. Call collect_source_ref directly.
624 (c_parse_final_cleanups): Always call collect_source_ref on the main
625 input filename.
626
627 2019-12-19 Julian Brown <julian@codesourcery.com>
628 Cesar Philippidis <cesar@codesourcery.com>
629
630 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
631 detach clauses.
632 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
633 Allow deref (->) in variable lists if true.
634 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
635 Pass to c_parser_omp_variable_list.
636 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
637 call to c_parser_omp_variable_list.
638 (c_parser_oacc_all_clauses): Support attach and detach clauses.
639 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
640 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
641 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
642 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
643 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
644 and detach. Support deref.
645 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
646 GOMP_MAP_ALWAYS_POINTER for OpenACC.
647 (c_oacc_check_attachments): New function.
648 (c_finish_omp_clauses): Check attach/detach arguments for being
649 pointers using above. Support deref.
650
651 2019-12-19 Julian Brown <julian@codesourcery.com>
652 Maciej W. Rozycki <macro@codesourcery.com>
653 Tobias Burnus <tobias@codesourcery.com>
654 Thomas Schwinge <thomas@codesourcery.com>
655
656 * c-parser.c (c_parser_omp_clause_name): Support no_create.
657 (c_parser_oacc_data_clause): Likewise.
658 (c_parser_oacc_all_clauses): Likewise.
659 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
660 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
661 PRAGMA_OACC_CLAUSE_NO_CREATE.
662 * c-typeck.c (handle_omp_array_sections): Support
663 GOMP_MAP_NO_ALLOC.
664
665 2019-12-09 David Malcolm <dmalcolm@redhat.com>
666
667 * c-objc-common.c (range_label_for_type_mismatch::get_text):
668 Replace label_text ctor calls.
669
670 2019-12-04 Joseph Myers <joseph@codesourcery.com>
671
672 PR c/36941
673 PR c/88827
674 * c-typeck.c (convert_lvalue_to_rvalue): Call
675 require_complete_type for arguments not of void types.
676 (build_indirect_ref): Do not diagnose dereferencing pointers to
677 incomplete types.
678 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
679
680 2019-12-03 Joseph Myers <joseph@codesourcery.com>
681
682 PR c/88704
683 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
684 old-style parameter definitions.
685
686 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
687
688 PR target/92499
689
690 * c-decl.c (flexible_array_type_p): Move to common code.
691
692 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
693
694 * c-decl.c (start_decl): Allow initialization of variables whose
695 size is a POLY_INT_CST.
696 (finish_decl): Use verify_type_context to check whether the target
697 allows variables with a particular type to have static or thread-local
698 storage duration. Don't raise a second error if such variables do
699 not have a constant size.
700 (grokdeclarator): Use verify_type_context to check whether the
701 target allows fields or array elements to have a particular type.
702 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
703 the target allows pointer difference for the types involved.
704 (build_unary_op): Likewise for pointer increment and decrement.
705
706 2019-11-29 Joseph Myers <joseph@codesourcery.com>
707
708 * c-parser.c (struct c_parser): Add members raw_tokens and
709 raw_tokens_used.
710 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
711 using previously-lexed raw tokens.
712 (c_parser_peek_nth_token_raw)
713 (c_parser_check_balanced_raw_token_sequence): New functions.
714 (c_parser_nth_token_starts_std_attributes): Use
715 c_parser_check_balanced_raw_token_sequence for Objective-C.
716
717 2019-11-25 Joseph Myers <joseph@codesourcery.com>
718
719 PR c/91985
720 * c-decl.c (finish_declspecs): Use int instead of decimal
721 floating-point types if decimal floating-point not supported.
722
723 2019-11-25 Joseph Myers <joseph@codesourcery.com>
724
725 * c-tree.h (struct c_declarator): Use a structure for id member.
726 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
727 declarators at the start, not when handling individual declarators
728 later. Use u.id.id instead of u.id.
729 (grokfield): Use u.id.id instead of u.id.
730 (build_id_declarator): Set u.id.id and u.id.attrs.
731 (finish_declspecs): Handle postfix attributes in case of typedef
732 name or typeof used.
733 * c-parser.c (c_parser_direct_declarator)
734 (c_parser_direct_declarator_inner): Place declarator for
735 attributes inside that for function or array, not outside. Set
736 u.id.attrs for identifiers.
737 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
738 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
739 instead of u.id.
740
741 2019-11-22 Jakub Jelinek <jakub@redhat.com>
742
743 PR c/90677
744 * c-decl.c (identifier_global_tag): Define.
745
746 2019-11-20 Richard Biener <rguenther@suse.de>
747
748 PR c/92088
749 * c-decl.c (grokdeclarator): Prevent inlining of nested
750 function with VLA arguments.
751
752 2019-11-20 Joseph Myers <joseph@codesourcery.com>
753
754 * c-decl.c (c_warn_type_attributes): New function.
755 (groktypename, grokdeclarator, finish_declspecs): Call
756 c_warn_type_attributes before applying attributes to types.
757 * c-tree.h (c_warn_type_attributes): Declare.
758
759 2019-11-19 Joseph Myers <joseph@codesourcery.com>
760
761 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
762 standard attributes.
763 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
764 pedwarn for unknown standard attributes and return error_mark_node
765 for them.
766
767 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
768
769 * c-parser.c (c_parser_parse_rtl_body): Always call
770 run_rtl_passes, even if startwith pass is not provided.
771
772 2019-11-15 Joseph Myers <joseph@codesourcery.com>
773
774 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
775 duplicate standard attributes.
776
777 2019-11-15 Joseph Myers <joseph@codesourcery.com>
778
779 * c-decl.c (std_attribute_table): Add maybe_unused.
780
781 2019-11-15 Joseph Myers <joseph@codesourcery.com>
782
783 * c-decl.c (std_attribute_table): Add fallthrough.
784 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
785 attribute at top level.
786
787 2019-11-15 Joseph Myers <joseph@codesourcery.com>
788
789 * c-decl.c (std_attribute_table): New.
790 (c_init_decl_processing): Register attributes from
791 std_attribute_table.
792 * c-parser.c (c_parser_attribute_arguments): Add arguments
793 require_string and allow_empty_args. All callers changed.
794 (c_parser_std_attribute): Set require_string argument for
795 "deprecated" attribute.
796
797 2019-11-14 Joseph Myers <joseph@codesourcery.com>
798
799 * c-parser.c (c_parser_postfix_expression)
800 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
801 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
802
803 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
804
805 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
806 of build_same_sized_truth_vector_type.
807 (build_vec_cmp): Likewise.
808
809 2019-11-14 Jakub Jelinek <jakub@redhat.com>
810
811 * c-parser.c (c_parser_omp_context_selector): Don't require score
812 argument to fit into shwi, just to be INTEGER_CST. Diagnose
813 negative score.
814
815 * c-parser.c (c_parser_omp_context_selector): Rename
816 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
817 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
818 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
819 and string literals.
820
821 2019-11-14 Joseph Myers <joseph@codesourcery.com>
822
823 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
824 ctsk_tagfirstref_attrs.
825 (struct c_declspecs): Update description of attrs. Add
826 postfix_attrs and non_std_attrs_seen_p. Increase size of
827 typespec_kind bit-field.
828 (c_warn_unused_attributes): New declaration.
829 (parser_xref_tag): Update prototype.
830 * c-decl.c (c_warn_unused_attributes): New function.
831 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
832 ctsk_tagref_attrs. Handle attribute declarations.
833 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
834 (grokdeclarator): Handle standard attributes.
835 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
836 attributes to incomplete type reference.
837 (xref_tag): Update call to parser_xref_tag.
838 (declspecs_add_addrspace, declspecs_add_type)
839 (declspecs_add_scspec, declspecs_add_attrs): Set
840 non_std_attrs_seen_p.
841 (finish_declspecs): Apply postfix standard attributes to type.
842 * c-parser.c (c_token_starts_declspecs)
843 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
844 (c_parser_next_tokens_start_declaration): Update comments.
845 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
846 parser->tokens[2] to parser->tokens[1].
847 (c_parser_nth_token_starts_std_attributes)
848 (c_parser_std_attribute_specifier_sequence): New functions.
849 (c_parser_declaration_or_fndef): Add arguments have_attrs and
850 attrs. All callers changed. Handle standard attributes.
851 (c_parser_parms_declarator, c_parser_parms_list_declarator)
852 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
853 All callers changed.
854 (c_parser_declspecs): Add arguments start_std_attr_ok and
855 end_std_attr_ok. All callers changed. Handle standard
856 attributes.
857 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
858 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
859 (c_parser_compound_statement_nostart, c_parser_all_labels)
860 (c_parser_label, c_parser_statement, c_parser_for_statement):
861 Handle standard attributes.
862 * c-parser.h (c_parser_declspecs): Update prototype.
863 * gimple-parser.c (c_parser_gimple_declaration): Update call to
864 c_parser_declspecs.
865
866 2019-11-12 Martin Liska <mliska@suse.cz>
867
868 * gimple-parser.c: Do not include params.h.
869
870 2019-11-12 Martin Liska <mliska@suse.cz>
871
872 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
873 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
874 macro.
875
876 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
877 Frederik Harwath <frederik@codesourcery.com>
878
879 gcc/c/
880 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
881 (c_parser_oacc_kernels_parallel): Rename function to...
882 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
883 (c_parser_omp_construct): Update accordingly.
884
885
886 2019-11-11 Jakub Jelinek <jakub@redhat.com>
887
888 * c-parser.c (c_parser_translation_unit): Diagnose declare target
889 without corresponding end declare target.
890
891 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
892
893 * c-convert.c (convert): Only handle vector conversions if one of
894 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
895 allows it.
896 * c-typeck.c (build_array_ref): Only allow vector indexing if the
897 vectors satisfy gnu_vector_type_p.
898 (build_unary_op): Only allow unary operators to be applied to
899 vectors if they satisfy gnu_vector_type_p.
900 (digest_init): Only allow by-element initialization of vectors
901 if they satisfy gnu_vector_type_p.
902 (really_start_incremental_init): Likewise.
903 (push_init_level): Likewise.
904 (pop_init_level): Likewise.
905 (process_init_element): Likewise.
906 (build_binary_op): Only allow binary operators to be applied to
907 vectors if they satisfy gnu_vector_type_p.
908
909 2019-11-08 Joseph Myers <joseph@codesourcery.com>
910
911 * c-decl.c (grokparms): Convert () in a function definition to
912 (void) for C2x.
913 (store_parm_decls_oldstyle): Pedwarn for C2x.
914 (store_parm_decls): Update comment about () not generating a
915 prototype.
916
917 2019-11-07 Joseph Myers <joseph@codesourcery.com>
918
919 * c-parser.c (c_parser_attribute_arguments): New function.
920 Factored out of c_parser_gnu_attribute.
921 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
922 (c_parser_balanced_token_sequence, c_parser_std_attribute)
923 (c_parser_std_attribute_specifier): New functions.
924 (c_parser_transaction_attributes): Use
925 c_parser_std_attribute_specifier.
926
927 2019-11-07 Joseph Myers <joseph@codesourcery.com>
928
929 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
930 lex_joined_string and translate_strings_p.
931 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
932 c_lex_with_flags.
933 (c_parser_string_literal): New function.
934 (c_parser_static_assert_declaration_no_semi): Use
935 c_parser_string_literal. Do not set lex_untranslated_string.
936 (c_parser_asm_string_literal): Use c_parser_string_literal.
937 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
938 (c_parser_gnu_attributes): Set and restore translate_strings_p
939 instead of lex_untranslated_string.
940 (c_parser_asm_statement): Do not set lex_untranslated_string.
941 (c_parser_asm_operands): Likewise.
942 (c_parser_has_attribute_expression): Set and restore
943 translate_strings_p instead of lex_untranslated_string.
944 (c_parser_postfix_expression): Use c_parser_string_literal.
945 (pragma_lex): Likewise.
946 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
947 (c_parse_file): Set translate_strings_p.
948 * gimple-parser.c (c_parser_gimple_postfix_expression)
949 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
950 * c-parser.c (c_parser_string_literal): Declare function.
951
952 2019-11-02 Jakub Jelinek <jakub@redhat.com>
953
954 * c-parser.c (c_finish_omp_declare_variant): Use
955 omp_get_context_selector instead of c_omp_get_context_selector.
956
957 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
958
959 * c-tree.h (c_simulate_enum_decl): Declare.
960 * c-decl.c (c_simulate_enum_decl): New function.
961 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
962
963 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
964
965 * c-tree.h (c_simulate_builtin_function_decl): Declare.
966 * c-decl.c (c_simulate_builtin_function_decl): New function.
967 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
968 to the above.
969
970 2019-10-28 Martin Sebor <msebor@redhat.com>
971
972 PR c/66970
973 * c-decl.c (names_builtin_p): Define a new function.
974
975 2019-10-28 Richard Biener <rguenther@suse.de>
976
977 PR c/92249
978 * gimple-parser.c (c_parser_parse_gimple_body): Make
979 current_bb the entry block initially to easier recover
980 from errors.
981 (c_parser_gimple_compound_statement): Adjust.
982
983 2019-10-24 Jakub Jelinek <jakub@redhat.com>
984
985 * c-parser.c (c_finish_omp_declare_variant): Use
986 omp_context_selector_matches instead of
987 c_omp_context_selector_matches.
988 * c-decl.c (c_decl_attributes): Add "omp declare target block"
989 attribute in between declare target and end declare target
990 pragmas.
991
992 2019-10-15 Joseph Myers <joseph@codesourcery.com>
993
994 * c-parser.c (c_parser_attribute_any_word): Rename to
995 c_parser_gnu_attribute_any_word. All callers changed.
996 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
997 callers changed.
998 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
999 callers changed.
1000 (c_parser_declaration_or_fndef, c_parser_declspecs)
1001 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1002 (c_parser_struct_declaration, c_parser_declarator)
1003 (c_parser_gnu_attribute, c_parser_compound_statement)
1004 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1005 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1006 attribute-related syntax productions.
1007
1008 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1009
1010 * c-objc-common.c (useful_aka_type_p): Replace with...
1011 (get_aka_type): ...this new function. Given the original type,
1012 decide which aka type to print (if any). Only look through typedefs
1013 if user_facing_original_type_p.
1014 (print_type): Update accordingly.
1015
1016 2019-10-14 Jakub Jelinek <jakub@redhat.com>
1017
1018 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1019 into int NESTED, if it is 2, diagnose missing commas in between
1020 clauses.
1021 (c_parser_omp_context_selector): Pass 2 as last argument to
1022 c_parser_omp_all_clauses.
1023
1024 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1025
1026 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1027 For simd properties, put them directly into TREE_VALUE.
1028 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1029 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1030 add "omp declare variant base" attribute rather than
1031 "omp declare variant".
1032
1033 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1034
1035 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1036
1037 2019-10-10 Jakub Jelinek <jakub@redhat.com>
1038
1039 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1040 true, terminate processing on closing paren and don't skip to end of
1041 pragma line.
1042 (c_parser_omp_declare_simd): Handle also declare variant.
1043 (omp_construct_selectors, omp_device_selectors,
1044 omp_implementation_selectors, omp_user_selectors): New variables.
1045 (c_parser_omp_context_selector,
1046 c_parser_omp_context_selector_specification,
1047 c_finish_omp_declare_variant): New functions.
1048 (c_finish_omp_declare_simd): Handle both declare simd and
1049 declare variant.
1050 (c_parser_omp_declare): Handle declare variant.
1051
1052 2019-10-02 Joseph Myers <joseph@codesourcery.com>
1053
1054 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1055 CPP_COLON tokens.
1056
1057 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1058
1059 * c-objc-common.c (useful_aka_type_p): New function.
1060 (print_type): Use it to decide whether an aka type is worth printing.
1061
1062 2019-09-27 Jakub Jelinek <jakub@redhat.com>
1063
1064 PR c++/88203
1065 * c-parser.c (c_parser_predefined_identifier): New function.
1066 (c_parser_postfix_expression): Use it.
1067 (c_parser_omp_variable_list): Parse predefined identifiers.
1068 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1069 in shared and firstprivate clauses, even when they are predetermined
1070 shared.
1071
1072 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1073
1074 * c-typeck.c (build_function_call_vec): Take the original function
1075 decl as an optional final parameter. Pass all built-in calls to
1076 check_builtin_function_arguments.
1077
1078 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1079
1080 PR c/91815
1081 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1082 of identifiers in the external scope only for variables and functions.
1083
1084 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1085
1086 PR c/78736
1087 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1088
1089 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1090
1091 PR pch/61250
1092 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1093 after determining that the first token is not
1094 PRAGMA_GCC_PCH_PREPROCESS.
1095
1096 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1097
1098 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1099 FUNCTION_DECL to the right value in the presence of nested declarators.
1100
1101 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1102
1103 PR middle-end/91421
1104 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1105
1106 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1107
1108 PR middle-end/91421
1109 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1110 of a built_in_function.
1111 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1112
1113 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1114
1115 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1116 (c_parser_omp_clause_device_type): New function.
1117 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1118 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1119 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1120 diagnostics for declare target with clauses nested in clause-less
1121 declare target declaration-definition-seq.
1122 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1123
1124 2019-08-09 Jakub Jelinek <jakub@redhat.com>
1125
1126 * c-parser.c (check_no_duplicate_clause): Simplify using
1127 omp_find_clause.
1128 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1129 directive name modifiers.
1130 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1131
1132 PR c/91401
1133 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1134 check_no_duplicate_clause call. Comment it out, instead emit a
1135 warning for duplicate dist_schedule clauses.
1136
1137 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1138
1139 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1140
1141 2019-08-08 Jakub Jelinek <jakub@redhat.com>
1142
1143 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1144 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1145 instead of generic_head to track duplicates.
1146
1147 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1148
1149 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1150 (c_parser_omp_clause_use_device_addr): New function.
1151 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1152 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1153 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1154 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1155 map or use_device_* clauses.
1156 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1157 in OpenMP, require pointer type rather than pointer or array type.
1158 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1159
1160 2019-07-31 Jakub Jelinek <jakub@redhat.com>
1161
1162 PR c/91192
1163 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1164 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1165 case.
1166
1167 2019-07-25 Martin Liska <mliska@suse.cz>
1168 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1169
1170 PR c++/23383
1171 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1172
1173 2019-07-25 Martin Liska <mliska@suse.cz>
1174
1175 * c-decl.c (merge_decls): Use new macros
1176 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1177
1178 2019-07-23 Richard Biener <rguenther@suse.de>
1179
1180 PR tree-optimization/83518
1181 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1182 a CFG also rebuild cgraph edges.
1183
1184 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1185
1186 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1187 (c_parser_omp_clause_bind): New function.
1188 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1189 (OMP_LOOP_CLAUSE_MASK): Define.
1190 (c_parser_omp_loop): New function.
1191 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1192 loop combined with parallel or teams.
1193 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1194 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1195
1196 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1197
1198 PR c/53633
1199 * c-decl.c (finish_function): Check targetm.warn_func_return
1200 before issuing a -Wreturn-type warning.
1201
1202 2019-07-12 Alexandre Oliva <oliva@adacore.com>
1203
1204 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1205 (c_parser_compound_statement): Call it.
1206
1207 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1208
1209 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1210 (c_parser_omp_clause_order): New function.
1211 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1212 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1213 PRAGMA_OMP_CLAUSE_ORDER.
1214 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1215
1216 2019-07-10 Richard Biener <rguenther@suse.de>
1217
1218 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1219 _Literal (int *) &x for address literals.
1220
1221 2019-07-09 Martin Sebor <msebor@redhat.com>
1222
1223 PR c++/61339
1224 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1225 to class.
1226 (field_decl_cmp): Same.
1227 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1228 * c-tree.h: Same.
1229 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1230
1231 2019-07-09 Martin Sebor <msebor@redhat.com>
1232
1233 PR c++/61339
1234 * c-decl.c: Change class-key from class to struct and vice versa
1235 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1236 * gimple-parser.c: Same.
1237
1238 2019-07-01 Richard Biener <rguenther@suse.de>
1239
1240 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1241 _Literal (char *) &"foo" for address literals pointing to
1242 STRING_CSTs.
1243
1244 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1245
1246 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1247 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1248 C incompatibility if alternate "__intN__" form is used.
1249
1250 2019-06-24 Martin Sebor <msebor@redhat.com>
1251
1252 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1253
1254 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1255
1256 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1257 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1258 (c_parser_omp_scan_loop_body): New function.
1259 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1260 inscan reduction clauses.
1261 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1262 non-inscan reductions on the same construct, or inscan reductions with
1263 ordered or schedule clauses, or inscan array reductions.
1264
1265 2019-06-05 Martin Sebor <msebor@redhat.com>
1266
1267 PR c/90737
1268 * c-typeck.c (c_finish_return): Only consider functions returning
1269 pointers as candidates for -Wreturn-local-addr.
1270
1271 2019-06-05 Martin Sebor <msebor@redhat.com>
1272
1273 * c-decl.c (start_decl): Adjust quoting and hyphenation
1274 in diagnostics.
1275 (finish_decl): Same.
1276 (finish_enum): Same.
1277 (start_function): Same.
1278 (declspecs_add_type): Same.
1279 * c-parser.c (warn_for_abs): Same.
1280 * c-typeck.c (build_binary_op): Same.
1281
1282 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1283
1284 PR c/89433
1285 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1286 marked with an OpenACC 'routine' directive.
1287
1288 PR c/89433
1289 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1290 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1291
1292 PR c/89433
1293 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1294 clauses from "omp declare target" attribute.
1295
1296 2019-05-16 Martin Sebor <msebor@redhat.com>
1297
1298 * c-decl.c (start_decl): Quote keywords, operators, and
1299 types in diagnostics.
1300 (finish_decl): Same.
1301 * c-parser.c (c_parser_asm_statement): Same.
1302 (c_parser_conditional_expression): Same.
1303 (c_parser_transaction_cancel): Same.
1304 * c-typeck.c (c_common_type): Same.
1305 (build_conditional_expr): Same.
1306 (digest_init): Same.
1307 (process_init_element): Same.
1308 (build_binary_op): Same.
1309
1310 2019-05-17 Richard Biener <rguenther@suse.de>
1311
1312 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1313 (c_parser_gimple_unary_expression): Likewise.
1314 (c_parser_gimple_parentized_ternary_expression): New function.
1315
1316 2019-05-16 Richard Biener <rguenther@suse.de>
1317
1318 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1319 (c_parser_gimple_unary_expression): Likewise.
1320
1321 2019-05-15 Richard Biener <rguenther@suse.de>
1322
1323 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1324 __BIT_FIELD_REF.
1325
1326 2019-05-14 Richard Biener <rguenther@suse.de>
1327
1328 * gimple-parser.c (c_parser_gimple_statement): Remove
1329 questionable auto-promotion to VIEW_CONVERT_EXPR.
1330 (c_parser_gimple_typespec): Split out from __MEM parsing.
1331 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1332 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1333 as __VIEW_CONVERT with -gimple.
1334
1335 2019-05-09 Martin Liska <mliska@suse.cz>
1336
1337 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1338 __MAX.
1339 (c_parser_gimple_unary_expression): Parse also binary expression
1340 __MIN and __MAX.
1341 (c_parser_gimple_parentized_binary_expression): New function.
1342
1343 2019-05-09 Martin Liska <mliska@suse.cz>
1344
1345 * gimple-parser.c (struct gimple_parser): Add probability.
1346 for gimple_parser_edge.
1347 (gimple_parser::push_edge): Add new argument probability.
1348 (c_parser_gimple_parse_bb_spec): Parse also probability
1349 if present.
1350 (c_parser_parse_gimple_body): Set edge probability.
1351 (c_parser_gimple_compound_statement): Consume token
1352 before calling c_parser_gimple_goto_stmt.
1353 Parse BB counts.
1354 (c_parser_gimple_statement): Pass new argument.
1355 (c_parser_gimple_goto_stmt): Likewise.
1356 (c_parser_gimple_if_stmt): Likewise.
1357 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1358 * c-parser.c (c_parser_declaration_or_fndef): Pass
1359 hot_bb_threshold argument.
1360 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1361 field.
1362 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1363
1364 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1365
1366 PR debug/90197
1367 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1368 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1369 (c_parser_do_statement): Likewise.
1370 (c_parser_for_statement): Likewise. Formatting fixes.
1371 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1372 emit DEBUG_BEGIN_STMTs if needed.
1373
1374 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1375
1376 PR c/89888
1377 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1378 (c_start_case): Don't clear it.
1379 (do_case): Adjust c_add_case_label caller.
1380 (c_finish_case): Adjust c_do_switch_warnings caller.
1381
1382 PR c++/90108
1383 * c-decl.c (merge_decls): If remove is main variant and
1384 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1385 variant that has newdecl as TYPE_NAME if any.
1386
1387 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1388
1389 PR c/89933
1390 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1391 don't try to remove it from the variant list, but instead assert
1392 it has no variants.
1393
1394 2019-04-01 Richard Biener <rguenther@suse.de>
1395
1396 PR c/71598
1397 * c-tree.h (c_get_alias_set): Declare.
1398 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1399 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1400 as the underlying integer type.
1401
1402 2019-03-19 Martin Sebor <msebor@redhat.com>
1403
1404 PR tree-optimization/89688
1405 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1406 kinds of initializers.
1407
1408 2019-03-19 Jakub Jelinek <jakub@redhat.com>
1409
1410 PR c/89734
1411 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1412 return type even if quals_used is 0. Formatting fixes.
1413
1414 2019-03-14 Richard Biener <rguenther@suse.de>
1415
1416 * c-tree.h (enum c_declspec_il): New.
1417 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1418 enum bitfield.
1419 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1420 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1421 (c_parser_declspecs): Adjust.
1422 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1423 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1424 and bitmap.h.
1425 (struct gimple_parser): New.
1426 (gimple_parser::push_edge): New method.
1427 (c_parser_gimple_parse_bb_spec): New helper.
1428 (c_parser_parse_gimple_body): Get start pass and IL specification.
1429 Initialize SSA and CFG.
1430 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1431 Build a gimple_parser parsing state and pass it along.
1432 (c_parser_gimple_statement): Change intermittend __PHI internal
1433 function argument for the edge.
1434 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1435 (c_parser_gimple_goto_stmt): Record edges to build.
1436 (c_parser_gimple_if_stmt): Likewise.
1437 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1438 (c_parser_gimple_or_rtl_pass_list): Likewise.
1439
1440 2019-03-11 Martin Liska <mliska@suse.cz>
1441
1442 * c-decl.c (check_for_loop_decls): Wrap an option name
1443 in a string format message and fix GNU coding style.
1444 * c-parser.c (c_parser_declspecs): Likewise.
1445
1446 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1447
1448 PR tree-optimization/89550
1449 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1450 returned true.
1451 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1452 or warning returned true.
1453
1454 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1455
1456 PR c/89525
1457 * c-typeck.c (convert_arguments): Call inform_declaration only if
1458 the previous warning_at call returned true.
1459
1460 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1461
1462 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1463 parameter. Adjust all users.
1464 (c_parser_oacc_simple_clause): Replace parser with loc formal
1465 parameter. Adjust all users.
1466
1467 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1468
1469 PR c/87924
1470 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1471 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1472
1473 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR c/89340
1476 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1477 before c_decl_attributes rather than after it.
1478
1479 2019-02-06 Jakub Jelinek <jakub@redhat.com>
1480
1481 PR c/89211
1482 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1483 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1484 instead of 3 nested ifs.
1485
1486 2019-02-06 Joseph Myers <joseph@codesourcery.com>
1487
1488 PR c/88584
1489 * c-decl.c (finish_decl): Do not complete array types for arrays
1490 with external linkage not at file scope.
1491
1492 2019-02-05 Richard Biener <rguenther@suse.de>
1493
1494 PR c/88606
1495 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1496 all type variants when not supported.
1497
1498 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1499
1500 PR c/89061
1501 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1502 * c-decl.c (decl_jump_unsafe): Return false for
1503 C_DECL_COMPOUND_LITERAL_P decls.
1504 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1505
1506 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1507
1508 PR c/89045
1509 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1510 scope.
1511
1512 PR c/86125
1513 * c-decl.c (last_fileptr_type): Remove.
1514 (last_structptr_types): New variable.
1515 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1516 {old,new}rettype instead of the types themselves. Assert
1517 last_structptr_types array has the same number of elements
1518 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1519 argument oldtype and newtype. Instead of handling
1520 just fileptr_type_node specially, handle all builtin_structptr_types
1521 pointer nodes. Formatting fix.
1522
1523 2019-01-24 Martin Sebor <msebor@redhat.com>
1524
1525 PR c/86125
1526 PR c/88886
1527 PR middle-end/86308
1528 * c-decl.c (match_builtin_function_types): Add arguments.
1529 (diagnose_mismatched_decls): Diagnose mismatched declarations
1530 of built-ins more strictly.
1531
1532 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1533
1534 PR c++/88976
1535 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1536 on #pragma omp cancel with different modifiers.
1537
1538 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1539
1540 PR c/51628
1541 PR c/88664
1542 * c-typeck.c (convert_for_assignment): Upate the
1543 warn_for_address_or_pointer_of_packed_member call.
1544
1545 2019-01-16 Tom Honermann <tom@honermann.net>
1546 Jason Merrill <jason@redhat.com>
1547
1548 * c-typeck.c (digest_init): Revised the error message produced for
1549 ill-formed cases of array initialization with a string literal.
1550 (error_init): Make variadic.
1551
1552 2019-01-12 Jakub Jelinek <jakub@redhat.com>
1553
1554 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1555
1556 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1557
1558 PR c/88701
1559 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1560 if current_function_decl is non-NULL.
1561
1562 2019-01-07 Joseph Myers <joseph@codesourcery.com>
1563
1564 PR c/88720
1565 PR c/88726
1566 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1567 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1568 functions declared but never defined only for external scope, not
1569 for other scopes.
1570
1571 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1572
1573 PR c++/85052
1574 * c-parser.c (c_parser_postfix_expression): Parse
1575 __builtin_convertvector.
1576
1577 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1578
1579 Update copyright years.
1580
1581 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1582
1583 PR c/51628
1584 * c-typeck.c (convert_for_assignment): Call
1585 warn_for_address_or_pointer_of_packed_member.
1586
1587 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1588
1589 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1590 a more specific error message (instead of just falling through).
1591
1592 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1593
1594 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1595 asm qualifier is first seen; use that to give nicer "duplicate asm
1596 qualifier" messages. Delete 'quals" variable, instead pass the
1597 "is_volatile_ flag to build_asm_stmt directly.
1598 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1599 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1600
1601 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1602
1603 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1604 "done" boolean variable.
1605
1606 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1607
1608 PR c++/87504
1609 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1610 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1611 (build_binary_op): Use struct op_location_t and
1612 class binary_op_rich_location.
1613
1614 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1615
1616 PR sanitizer/88426
1617 * c-convert.c (convert): Call c_fully_fold before calling
1618 ubsan_instrument_float_cast.
1619
1620 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1621
1622 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1623 setting "quals".
1624
1625 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1626
1627 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1628 after asm. Pass a flag for it to build_asm_expr.
1629 * c-tree.h (build_asm_expr): Update declaration.
1630 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1631 set ASM_INLINE_P.
1632
1633 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1634
1635 PR inline-asm/55681
1636 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1637 combination of volatile and goto, in any order, without repetitions.
1638
1639 2018-12-04 James Norris <jnorris@codesourcery.com>
1640 Cesar Philippidis <cesar@codesourcery.com>
1641 Julian Brown <julian@codesourcery.com>
1642
1643 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1644 code.
1645
1646 2018-11-30 Richard Biener <rguenther@suse.de>
1647
1648 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1649 _Literal (type) { ... } as empty aggregate or vector constructor.
1650
1651 2018-11-29 Martin Sebor <msebor@redhat.com>
1652
1653 PR c/88091
1654 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1655 (convert_arguments): Add comments. Pass additional argument to
1656 the function above.
1657
1658 2018-11-29 Martin Sebor <msebor@redhat.com>
1659
1660 PR c/88172
1661 PR testsuite/88208
1662 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1663
1664 2018-11-23 Martin Sebor <msebor@redhat.com>
1665
1666 PR testsuite/88098
1667 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1668 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1669
1670 2018-11-20 Martin Sebor <msebor@redhat.com>
1671
1672 * c-parser.c (c_parser_has_attribute_expression): New function.
1673 (c_parser_attribute): New function.
1674 (c_parser_attributes): Move code into c_parser_attribute.
1675 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1676
1677 2018-11-15 Martin Sebor <msebor@redhat.com>
1678
1679 PR c/83656
1680 * c-decl.c (header_for_builtin_fn): Declare.
1681 (diagnose_mismatched_decls): Diagnose declarations of built-in
1682 functions without a prototype.
1683 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1684 (convert_argument): Same.
1685 (convert_arguments): Factor code out into convert_argument.
1686 Detect mismatches between built-in formal arguments in calls
1687 to built-in without prototype.
1688 (build_conditional_expr): Same.
1689 (type_or_builtin_type): New function.
1690 (convert_for_assignment): Add argument. Conditionally issue
1691 warnings instead of errors for mismatches.
1692
1693 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1694
1695 * c-decl.c: Replace "source_location" with "location_t".
1696 * c-tree.h: Likewise.
1697 * c-typeck.c: Likewise.
1698 * gimple-parser.c: Likewise.
1699
1700 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1701
1702 * c-parser.c (c_parser_omp_clause_final): Use
1703 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1704 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1705 parsing instead of c_parser_paren_condition.
1706 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1707 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1708 c_fully_fold instead of c_parser_condition.
1709 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1710 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1711 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1712 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1713 c_parser_expr_no_commas instead of c_parser_expression.
1714
1715 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1716 reduction clause with inscan modifier.
1717
1718 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1719 clauses other than atomic_default_mem_order.
1720
1721 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1722
1723 * c-parser.c: Include memmode.h.
1724 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1725 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1726 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1727 task_reduction clauses.
1728 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1729 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1730 section, or lvalue assignment expression.
1731 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1732 (c_parser_omp_clause_lastprivate): Parse optional
1733 conditional: modifier.
1734 (c_parser_omp_clause_hint): Require constant integer expression rather
1735 than just integer expression.
1736 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1737 clause.
1738 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1739 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1740 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1741 functions.
1742 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1743 iterators. Parse mutexinoutset and depobj kinds.
1744 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1745 callers.
1746 (c_parser_omp_all_clauses): Likewise. Handle
1747 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1748 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1749 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1750 default memory order from requires directive if any. Adjust
1751 c_finish_omp_atomic caller.
1752 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1753 (c_parser_omp_flush): Parse flush with memory-order-clause.
1754 (c_parser_omp_for_loop): Allow NE_EXPR even in
1755 OpenMP loops, adjust c_finish_omp_for caller.
1756 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1757 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1758 Allow to be called while parsing combined parallel master.
1759 Parse combined master taskloop{, simd}.
1760 (c_parser_omp_parallel): Parse combined
1761 parallel master{, taskloop{, simd}} constructs.
1762 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1763 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1764 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1765 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1766 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1767 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1768 around teams body. Use SET_EXPR_LOCATION.
1769 (c_parser_omp_target_data): Allow target data
1770 with only use_device_ptr clauses.
1771 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1772 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1773 (c_parser_omp_requires): New function.
1774 (c_finish_taskloop_clauses): New function.
1775 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1776 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1777 declaration. Disallow in_reduction clause when combined with parallel
1778 master.
1779 (c_parser_omp_construct): Adjust c_parser_omp_master and
1780 c_parser_omp_taskgroup callers.
1781 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1782 other than cancel.
1783 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1784 like OMP_CLAUSE_REDUCTION.
1785 (handle_omp_array_sections): Likewise. Call save_expr on array
1786 reductions before calling build_index_type. Handle depend clauses
1787 with iterators.
1788 (struct c_find_omp_var_s): New type.
1789 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1790 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1791 with static, runtime or auto schedule kinds. Call save_expr for whole
1792 array reduction sizes. Diagnose reductions with zero sized elements
1793 or variable length structures. Diagnose nogroup clause used with
1794 reduction clause(s). Handle depend clause with
1795 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1796 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1797 some different type for other kinds. Use build_unary_op with
1798 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1799 Handle depend clauses with iterators. Remove no longer needed special
1800 case that predetermined const qualified vars may be specified in
1801 firstprivate clause. Complain if const qualified vars are mentioned
1802 in data-sharing clauses other than firstprivate or shared. Use
1803 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1804 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1805 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1806 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1807
1808 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1809
1810 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1811 logic for change to name_hint::operator bool.
1812 (undeclared_variable): Likewise.
1813 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1814 (c_parser_parameter_declaration): Likewise.
1815
1816 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1817
1818 * c-errors.c (pedwarn_c11): New function.
1819 * c-parser.c (disable_extension_diagnostics): Save
1820 warn_c11_c2x_compat and set it to 0.
1821 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1822 (c_parser_static_assert_declaration_no_semi): Handle
1823 _Static_assert without string constant.
1824 * c-tree.h (pedwarn_c11): New prototype.
1825
1826 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1827
1828 * Make-lang.in (selftest-c): New.
1829 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1830 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1831 from gcc/Makefile.in.
1832
1833 2018-10-02 Richard Biener <rguenther@suse.de>
1834
1835 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1836
1837 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1838
1839 PR c/87390
1840 * c-typeck.c (build_binary_op): Use excess precision for
1841 comparisons of integers and floating-point for C11 and later.
1842
1843 2018-09-26 Martin Jambor <mjambor@suse.cz>
1844
1845 PR c/87347
1846 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1847 comment.
1848
1849 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1850
1851 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1852 Update for new param.
1853 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1854 Likewise.
1855
1856 2018-09-17 Martin Jambor <mjambor@suse.cz>
1857
1858 PR c/63886
1859 * c-parser.c: (warn_for_abs): New function.
1860 (c_parser_postfix_expression_after_primary): Call it.
1861
1862 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1863
1864 * c-typeck.c (digest_init): Shorten overlength strings.
1865
1866 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1867
1868 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1869
1870 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1871
1872 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1873 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1874
1875 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1876
1877 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1878 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1879
1880 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1881
1882 PR 87091
1883 * c-decl.c (implicitly_declare): Update call to
1884 maybe_add_include_fixit to suggest overriding the location, as it
1885 is for a note.
1886 * c-objc-common.c (c_tree_printer): Update for conversion of
1887 show_caret_p to a tri-state.
1888
1889 2018-08-27 Martin Liska <mliska@suse.cz>
1890
1891 * c-decl.c (locate_old_decl): Use new function
1892 fndecl_built_in_p and remove check for FUNCTION_DECL if
1893 possible.
1894 (diagnose_mismatched_decls): Likewise.
1895 (merge_decls): Likewise.
1896 (warn_if_shadowing): Likewise.
1897 (pushdecl): Likewise.
1898 (implicitly_declare): Likewise.
1899 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1900 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1901 * c-typeck.c (build_function_call_vec): Likewise.
1902 (convert_arguments): Likewise.
1903
1904 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1905
1906 PR other/84889
1907 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1908 (diagnose_mismatched_decls): Likewise, in various places.
1909 (warn_if_shadowing): Likewise.
1910 (implicit_decl_warning): Likewise.
1911 (implicitly_declare): Likewise.
1912 (undeclared_variable): Likewise.
1913 (declare_label): Likewise.
1914 (grokdeclarator): Likewise.
1915 (start_function): Likewise.
1916 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1917 (c_parser_parameter_declaration): Likewise.
1918 (c_parser_binary_expression): Likewise.
1919 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1920 (parser_build_binary_op): Likewise.
1921 (build_unary_op): Likewise.
1922 (error_init): Likewise.
1923 (pedwarn_init): Likewise.
1924 (warning_init): Likewise.
1925 (convert_for_assignment): Likewise.
1926
1927 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1928
1929 * c-objc-common.c: Include "gcc-rich-location.h".
1930 (c_tree_printer): Move implemenation of '%T' to...
1931 (print_type): ...this new function.
1932 (range_label_for_type_mismatch::get_text): New function.
1933 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1934 range for the various ic_argpass cases.
1935 (class maybe_range_label_for_tree_type_mismatch): New class.
1936 (build_binary_op): Use it when calling binary_op_error.
1937
1938 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1939
1940 * c-decl.c (start_decl): Do not warn if variables is named as main
1941 and is a local variable.
1942
1943 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1944
1945 PR c/19315
1946 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1947 objects of unknown size.
1948
1949 2018-08-13 Martin Sebor <msebor@redhat.com>
1950
1951 PR tree-optimization/71625
1952 * c-parser.c (c_parser_declaration_or_fndef): Call
1953 braced_list_to_string.
1954
1955 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1956
1957 PR c/86690
1958 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1959 errors.
1960
1961 2018-08-01 Martin Sebor <msebor@redhat.com>
1962
1963 PR tree-optimization/86650
1964 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1965 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1966
1967 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1968
1969 PR c/85704
1970 * c-typeck.c (init_field_decl_cmp): New function.
1971 (output_pending_init_elements): Use it for field comparisons
1972 instead of pure bit_position comparisons.
1973
1974 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1975
1976 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1977 type here, instead add "omp declare target implicit" attribute.
1978 (finish_decl): Diagnose vars without mappable type here.
1979
1980 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1981 Thomas Schwinge <thomas@codesourcery.com>
1982 Cesar Philippidis <cesar@codesourcery.com>
1983
1984 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1985 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1986 to their non-present_or_* counterparts. Make 'self' an alias to
1987 PRAGMA_OACC_CLAUSE_HOST.
1988 (c_parser_oacc_data_clause): Update GOMP mappings for
1989 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1990 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1991 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1992 Remove support for present_or_* clauses.
1993 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1994 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1995 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1996 (OACC_DATA_CLAUSE_MASK): Likewise.
1997 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1998 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1999 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2000 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2001 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2002
2003 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2004
2005 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2006 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2007 (c_parser_gimple_unary_expression): Likewise.
2008
2009 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2010
2011 PR c/86093
2012 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2013 before doing POINTER_DIFF_EXPR.
2014
2015 2018-06-07 Marek Polacek <polacek@redhat.com>
2016
2017 PR c/85318
2018 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2019 for loop initial declarations.
2020
2021 2018-05-30 David Pagan <dave.pagan@oracle.com>
2022
2023 PR c/55976
2024 * c-decl.c (grokdeclarator): Update check for return type warnings.
2025 (start_function): Likewise.
2026 (finish_function): Likewise.
2027 * c-typeck.c (c_finish_return): Update check for return type warnings.
2028 Pass OPT_Wreturn_type to pedwarn when appropriate.
2029
2030 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2031
2032 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2033 __FMA_EXPR handlng.
2034
2035 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2036
2037 * gimple-parser.c: Include internal-fn.h.
2038 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2039 (c_parser_gimple_call_internal): New function.
2040 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2041 Fix typos in comment.
2042
2043 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2044
2045 PR c++/85662
2046 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2047 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2048 fold_convert_loc.
2049 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2050 fold_offsetof_1, pass argtype as TYPE to it and drop the
2051 fold_convert_loc.
2052
2053 2018-05-02 David Pagan <dave.pagan@oracle.com>
2054
2055 PR c/30552
2056 * c-decl.c (old_style_parameter_scope): New function.
2057 * c-parser.c (c_parser_postfix_expression): Check for statement
2058 expressions in old-style function parameter list declarations.
2059 * c-parser.h (old_style_parameter_scope): New extern declaration.
2060
2061 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2062
2063 PR sanitizer/84307
2064 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2065 it is not TREE_STATIC.
2066 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2067 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2068 its COMPOUND_LITERAL_EXPR_DECL.
2069
2070 2018-03-21 Joseph Myers <joseph@codesourcery.com>
2071
2072 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2073 where all functions return the same _FloatN or _FloatNx type,
2074 treat integer types as _Float64 instead of double.
2075
2076 2018-03-21 Jakub Jelinek <jakub@redhat.com>
2077
2078 PR c/84999
2079 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2080 building vector comparison, diagnose it and return error_mark_node.
2081
2082 2018-03-15 Jakub Jelinek <jakub@redhat.com>
2083
2084 PR c/84853
2085 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2086 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2087 INTEGER_TYPE element type.
2088
2089 2018-03-13 David Pagan <dave.pagan@oracle.com>
2090
2091 PR c/46921
2092 * c-typeck.c (output_init_element): Ensure field initializer
2093 expression is always evaluated if there are side effects.
2094
2095 2018-03-06 Jakub Jelinek <jakub@redhat.com>
2096
2097 PR c/84721
2098 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2099 !building_stmt_list_p ().
2100
2101 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2102
2103 PR c/84305
2104 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2105 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2106 and include the BIND_EXPR in the list of things that need to be
2107 pre-evaluated.
2108
2109 2018-02-09 Nathan Sidwell <nathan@acm.org>
2110
2111 PR c/84293
2112 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2113 to strict_aliasing_warning.
2114
2115 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2116
2117 * c-typeck.c (really_start_incremental_init, push_init_level,
2118 set_nonincremental_init, output_init_element, process_init_element):
2119 Use DECL_UNNAMED_BIT_FIELD.
2120
2121 2018-01-31 Marek Polacek <polacek@redhat.com>
2122
2123 PR c/81779
2124 * c-parser.c (c_parser_compound_statement_nostart): Call
2125 expansion_point_location_if_in_system_header.
2126
2127 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2128
2129 PR c++/83814
2130 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2131 the C part.
2132
2133 2018-01-13 Jakub Jelinek <jakub@redhat.com>
2134
2135 PR c/83801
2136 * c-tree.h (decl_constant_value_1): Add a bool argument.
2137 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2138 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2139 (decl_constant_value): Adjust caller.
2140 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2141 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2142 decl_constant_value returns initializer that has BLKmode or
2143 array type.
2144 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2145
2146 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2147 Alan Hayward <alan.hayward@arm.com>
2148 David Sherwood <david.sherwood@arm.com>
2149
2150 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2151 TYPE_VECTOR_SUBPARTS.
2152
2153 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2154
2155 Update copyright years.
2156
2157 2018-01-01 Jakub Jelinek <jakub@redhat.com>
2158
2159 PR c/83595
2160 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2161 c_parser_conditional_expression, c_parser_cast_expression,
2162 c_parser_sizeof_expression, c_parser_alignof_expression,
2163 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2164 c_parser_transaction_expression): Use set_error () method instead
2165 of setting value member to error_mark_node.
2166
2167 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2168
2169 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2170 and _Float<N>X built-in functions.
2171
2172 2017-12-22 Jakub Jelinek <jakub@redhat.com>
2173
2174 PR debug/83550
2175 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2176 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2177 incomplete vars rather than after it.
2178
2179 PR debug/83547
2180 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2181 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2182 and consider empty ones if there are no other stmts. For
2183 -Wunused-value walk all statements before the one only followed by
2184 DEBUG_BEGIN_STMTs.
2185
2186 2017-12-22 Mike Stump <mikestump@comcast.net>
2187 Eric Botcazou <ebotcazou@adacore.com>
2188
2189 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2190 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2191 (c_parser_do_statement): Likewise.
2192 (c_parser_for_statement): Likewise.
2193 (c_parser_statement_after_labels): Adjust calls to above.
2194 (c_parse_pragma_ivdep): New static function.
2195 (c_parser_pragma_unroll): Likewise.
2196 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2197 <PRAGMA_UNROLL>: New case.
2198
2199 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2200
2201 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2202 perform_integral_promotions, digest_init): Replace Yoda conditions
2203 with typical order conditions.
2204 * c-decl.c (check_bitfield_type_and_width): Likewise.
2205
2206 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2207
2208 * c-typeck.c (c_safe_arg_type_equiv_p,
2209 c_safe_function_type_cast_p): New function.
2210 (build_c_cast): Implement -Wcast-function-type.
2211
2212 2017-12-14 Richard Biener <rguenther@suse.de>
2213
2214 PR c/83415
2215 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2216 like REALPART_EXPR for the behavior of whether its operand
2217 is an lvalue.
2218
2219 2017-12-12 Marek Polacek <polacek@redhat.com>
2220
2221 PR c/82679
2222 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2223
2224 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2225
2226 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2227 * c-parser.c (add_debug_begin_stmt): New.
2228 (c_parser_declaration_or_fndef): Call it.
2229 (c_parser_compound_statement_nostart): Likewise.
2230 (c_parser_statement_after_labels): Likewise.
2231 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2232
2233 2017-12-07 Joseph Myers <joseph@codesourcery.com>
2234
2235 * c-decl.c (build_compound_literal): Add parameter alignas_align
2236 and set alignment of decl if nonzero.
2237 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2238 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2239 qualifier.
2240 (c_parser_struct_declaration): Update syntax comment.
2241 (c_parser_type_name): Add alignas_ok argument and pass it to
2242 c_parser_declspecs.
2243 (c_parser_cast_expression): Pass true to c_parser_type_name and
2244 give error if a cast used an _Alignas specifier.
2245 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2246 give error if sizeof (type-name) used an _Alignas specifier.
2247 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2248 give error if _Alignof (type-name) used an _Alignas specifier.
2249 (c_parser_postfix_expression_after_paren_type): Check specified
2250 alignment for a compound literal and pass it to
2251 build_compound_literal.
2252 * c-parser.h (c_parser_type_name): Update prototype.
2253 * c-tree.h (build_compound_literal): Update prototype.
2254
2255 2017-12-07 Martin Sebor <msebor@redhat.com>
2256
2257 PR c/81544
2258 * c-decl.c (c_decl_attributes): Look up existing declaration and
2259 pass it to decl_attributes.
2260
2261 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2262
2263 PR c/83236
2264 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2265 reserved for use by the implementation.
2266
2267 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2268
2269 * c-decl.c: Include "c-family/c-spellcheck.h".
2270
2271 2017-12-05 Martin Liska <mliska@suse.cz>
2272 Jakub Jelinek <jakub@redhat.com>
2273
2274 * c-typeck.c (pointer_diff): Add new argument and instrument
2275 pointer subtraction.
2276 (build_binary_op): Similar for pointer comparison.
2277
2278 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2279
2280 PR c/79153
2281 * c-parser.c: Include tree-iterator.h.
2282 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2283 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2284 on it.
2285
2286 PR c/83222
2287 * c-tree.h (decl_constant_value_1): Declare.
2288 * c-typeck.c (decl_constant_value_1): New function.
2289 (decl_constant_value): Use it.
2290 * c-fold.c (c_fully_fold_internal): If in_init, use
2291 decl_constant_value_1 instead of decl_constant_value.
2292
2293 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2294
2295 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2296
2297 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2298
2299 PR sanitizer/81275
2300 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2301 c_switch_covers_all_cases_p returns true.
2302
2303 2017-11-28 Julia Koval <julia.koval@intel.com>
2304 Sebastian Peryt <sebastian.peryt@intel.com>
2305
2306 * Make-lang.in (c/c-array-notation.o): Remove.
2307 * c-array-notation.c: Delete.
2308 * c-decl.c: Remove cilkplus condition.
2309 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2310 c_parser_cilk_verify_simd, c_parser_array_notation,
2311 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2312 c_parser_cilk_simd_fn_vector_attrs,
2313 c_finish_cilk_simd_fn_tokens): Delete.
2314 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2315 (c_parser_direct_declarator_inner): Ditto.
2316 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2317 (c_parser_attributes, c_parser_compound_statement,
2318 c_parser_statement_after_labels, c_parser_if_statement,
2319 c_parser_switch_statement, c_parser_while_statement,
2320 c_parser_do_statement, c_parser_for_statement,
2321 c_parser_unary_expression, c_parser_postfix_expression,
2322 c_parser_postfix_expression_after_primary,
2323 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2324 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2325 support.
2326 * c-typeck.c (build_array_ref, build_function_call_vec,
2327 convert_arguments,
2328 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2329 c_finish_loop, build_binary_op): Remove cilkplus support.
2330
2331 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2332
2333 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2334 of build3.
2335
2336 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
2337
2338 * Make-lang.in (c.install-plugin): Install backend import library.
2339
2340 2017-11-23 Jakub Jelinek <jakub@redhat.com>
2341
2342 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2343 pragma_stmt context.
2344
2345 2017-11-23 Mike Stump <mikestump@comcast.net>
2346 Eric Botcazou <ebotcazou@adacore.com>
2347
2348 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2349 ANNOTATE_EXPR.
2350 (c_parser_do_statement): Likewise.
2351 (c_parser_for_statement): Likewise.
2352
2353 2017-11-22 David Malcolm <dmalcolm@redhat.com>
2354
2355 PR c++/62170
2356 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2357 bool to bool *. Within '%T' handling, if showing an "aka", use
2358 "quoted" param to add appropriate quoting.
2359
2360 2017-11-22 Marek Polacek <polacek@redhat.com>
2361
2362 PR c++/60336
2363 PR middle-end/67239
2364 PR target/68355
2365 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2366
2367 2017-11-21 David Malcolm <dmalcolm@redhat.com>
2368
2369 PR c/83056
2370 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2371 earlier failed lookups.
2372
2373 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2374
2375 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2376 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2377
2378 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2379
2380 PR c/81404
2381 * c-decl.c: Include "c-family/known-headers.h".
2382 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2383 to known-headers.cc.
2384 (class suggest_missing_header): Move to known-header.h.
2385 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2386 than get_c_name_hint.
2387
2388 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2389
2390 * c-decl.c (get_c_name_hint): New function.
2391 (class suggest_missing_header): New class.
2392 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2393 suggest missing headers to the user.
2394
2395 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2396
2397 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2398 Include "c-family/name-hint.h"
2399 (implicit_decl_warning): Convert "hint" from
2400 const char * to name_hint. Pass location to
2401 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2402 warning was not printed.
2403 (undeclared_variable): Likewise for "guessed_id".
2404 (lookup_name_fuzzy): Convert return type from const char *
2405 to name_hint. Add location_t param.
2406 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2407 Include "c-family/name-hint.h"
2408 (c_parser_declaration_or_fndef): Convert "hint" from
2409 const char * to name_hint. Pass location to lookup_name_fuzzy.
2410 (c_parser_parameter_declaration): Likewise.
2411
2412 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR c/66618
2415 PR c/69960
2416 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2417 where needed.
2418 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2419 handle_omp_array_sections): Likewise.
2420 (digest_init): Don't call decl_constant_value_for_optimization.
2421 * c-tree.h (decl_constant_value_for_optimization): Removed.
2422 * c-fold.c (c_fold_array_ref): New function.
2423 (c_fully_fold_internal): Add LVAL argument, propagate it through
2424 recursive calls. For VAR_P call decl_constant_value and
2425 unshare if not LVAL and either optimizing or IN_INIT. Remove
2426 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2427 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2428 (c_fully_fold): Add LVAL argument, pass it through to
2429 c_fully_fold_internal.
2430 (decl_constant_value_for_optimization): Removed.
2431
2432 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2433
2434 PR c/81156
2435 * c-parser.c (check_tgmath_function): New function.
2436 (enum tgmath_parm_kind): New enum.
2437 (c_parser_postfix_expression): Handle __builtin_tgmath.
2438
2439 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2440
2441 * c-decl.c (implicit_decl_warning): Update for renaming of
2442 pedwarn_at_rich_loc and warning_at_rich_loc.
2443 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2444 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2445 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2446 (c_parser_struct_or_union_specifier): Likewise for renaming of
2447 pedwarn_at_rich_loc.
2448 (c_parser_parameter_declaration): Likewise for renaming of
2449 error_at_rich_loc.
2450 * c-typeck.c (build_component_ref): Likewise.
2451 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2452 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2453 (set_init_label): Likewise for renaming of error_at_rich_loc.
2454
2455 2017-10-30 Richard Biener <rguenther@suse.de>
2456
2457 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2458 stmts.
2459
2460 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2461
2462 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2463 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2464
2465 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2466
2467 PR c/7356
2468 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2469 semicolons.
2470
2471 2017-10-25 Jakub Jelinek <jakub@redhat.com>
2472
2473 PR libstdc++/81706
2474 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2475 newdecl to corresponding __builtin_ if any.
2476
2477 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2478
2479 PR c++/82466
2480 * c-decl.c (diagnose_mismatched_decls): Use
2481 OPT_Wbuiltin_declaration_mismatch.
2482
2483 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2484
2485 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2486 use it to guard calls to maybe_suggest_missing_token_insertion.
2487 (c_parser_parms_list_declarator): Override default value of new
2488 "type_is_unique" param to c_parser_require.
2489 (c_parser_asm_statement): Likewise.
2490 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2491 defaulting to true.
2492
2493 2017-10-11 Nathan Sidwell <nathan@acm.org>
2494
2495 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2496
2497 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2498
2499 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2500 operating on trees as wide_ints.
2501 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2502 (c_tree_equal): Likewise.
2503
2504 2017-10-04 David Malcolm <dmalcolm@redhat.com>
2505
2506 * c-decl.c (push_parm_decl): Store c_parm's location into the
2507 PARAM_DECL.
2508 (build_c_parm): Add "loc" param and store it within the c_parm.
2509 * c-parser.c (struct c_parser): Add "last_token_location" field.
2510 (c_parser_consume_token): Store location of the token into the
2511 new field.
2512 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2513 when handling a FUNCTION_DECL, if it doesn't already have them.
2514 (c_parser_parameter_declaration): Generate a location for the
2515 parameter, and pass it to the call to build_c_parm.
2516 * c-tree.h (struct c_parm): Add field "loc".
2517 (build_c_parm): Add location_t param.
2518 * c-typeck.c (get_fndecl_argument_location): New function.
2519 (inform_for_arg): New function.
2520 (convert_for_assignment): Use inform_for_arg when dealing with
2521 ic_argpass.
2522
2523 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2524
2525 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2526 width is non-NULL.
2527 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2528 don't SET_DECL_C_BIT_FIELD here.
2529
2530 PR c/82340
2531 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2532 instead of trying to set just TREE_READONLY manually.
2533
2534 2017-09-16 Tom de Vries <tom@codesourcery.com>
2535
2536 PR c/81875
2537 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2538 cond itself.
2539
2540 2017-09-15 Joseph Myers <joseph@codesourcery.com>
2541
2542 PR c/82071
2543 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2544 for C11.
2545 (build_conditional_expr): For C11, generate result with excess
2546 precision when one argument is an integer and the other is of a
2547 type using excess precision.
2548
2549 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2550
2551 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2552
2553 2017-09-13 Marek Polacek <polacek@redhat.com>
2554
2555 PR c/82167
2556 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2557 than expr.original_type.
2558
2559 2017-09-12 Nathan Sidwell <nathan@acm.org>
2560
2561 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2562 resort_sorted_fields): Moved from c-family/c-common.c.
2563 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2564
2565 2017-09-01 Joseph Myers <joseph@codesourcery.com>
2566
2567 PR c/82071
2568 * c-typeck.c (build_atomic_assign): Handle argument with excess
2569 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2570 argument passed to build_binary_op and convert_for_assignment but
2571 not for call to c_fully_fold.
2572 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2573 Ensure build_binary_op is called with argument with original
2574 semantic type. Avoid calling c_fully_fold with an
2575 EXCESS_PRECISION_EXPR from build_binary_op.
2576
2577 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2578
2579 PR c/81887
2580 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2581
2582 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2583 Alan Hayward <alan.hayward@arm.com>
2584 David Sherwood <david.sherwood@arm.com>
2585
2586 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2587 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2588 m1 and m2 to the signed equivalent of a fixed-point
2589 SCALAR_TYPE_MODE.
2590
2591 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2592
2593 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2594 than CAN_HAVE_LOCATION_P when determining whether to use the
2595 location_t value within "value".
2596
2597 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2598
2599 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2600 rather than peeking the location of the first token.
2601 * c-tree.h (c_expr::get_location): New method.
2602
2603 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2604
2605 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2606 to check_function_arguments.
2607
2608 2017-08-18 Marek Polacek <polacek@redhat.com>
2609
2610 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2611 commentary.
2612
2613 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2614
2615 PR c/53037
2616 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2617 (check_bitfield_type_and_width): Don't allow bit-field with
2618 warn_if_not_aligned type.
2619
2620 2017-08-14 Martin Sebor <msebor@redhat.com>
2621
2622 PR c/81117
2623 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2624
2625 2017-08-11 Marek Polacek <polacek@redhat.com>
2626
2627 PR c/81795
2628 * c-decl.c (pushtag): Only print inform if the warning was printed.
2629 (grokdeclarator): Likewise.
2630
2631 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2632
2633 * c-parser.c (c_parser_error): Rename to...
2634 (c_parser_error_richloc): ...this, making static, and adding
2635 "richloc" parameter, passing it to the c_parse_error call,
2636 rather than calling c_parser_set_source_position_from_token.
2637 (c_parser_error): Reintroduce, reimplementing in terms of the
2638 above, converting return type from void to bool.
2639 (class token_pair): New class.
2640 (struct matching_paren_traits): New struct.
2641 (matching_parens): New typedef.
2642 (struct matching_brace_traits): New struct.
2643 (matching_braces): New typedef.
2644 (get_matching_symbol): New function.
2645 (c_parser_require): Add param MATCHING_LOCATION, using it to
2646 highlight matching "opening" tokens for missing "closing" tokens.
2647 (c_parser_skip_until_found): Likewise.
2648 (c_parser_static_assert_declaration_no_semi): Convert explicit
2649 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2650 class matching_parens, so that the pertinent open parenthesis is
2651 highlighted when there are problems locating the close
2652 parenthesis.
2653 (c_parser_struct_or_union_specifier): Likewise.
2654 (c_parser_typeof_specifier): Likewise.
2655 (c_parser_alignas_specifier): Likewise.
2656 (c_parser_simple_asm_expr): Likewise.
2657 (c_parser_braced_init): Likewise, for matching_braces.
2658 (c_parser_paren_condition): Likewise, for matching_parens.
2659 (c_parser_switch_statement): Likewise.
2660 (c_parser_for_statement): Likewise.
2661 (c_parser_asm_statement): Likewise.
2662 (c_parser_asm_operands): Likewise.
2663 (c_parser_cast_expression): Likewise.
2664 (c_parser_sizeof_expression): Likewise.
2665 (c_parser_alignof_expression): Likewise.
2666 (c_parser_generic_selection): Likewise.
2667 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2668 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2669 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2670 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2671 c_parser_skip_until_found call.
2672 (c_parser_objc_class_definition): Use class matching_parens as
2673 above.
2674 (c_parser_objc_method_decl): Likewise.
2675 (c_parser_objc_try_catch_finally_statement): Likewise.
2676 (c_parser_objc_synchronized_statement): Likewise.
2677 (c_parser_objc_at_property_declaration): Likewise.
2678 (c_parser_oacc_wait_list): Likewise.
2679 (c_parser_omp_var_list_parens): Likewise.
2680 (c_parser_omp_clause_collapse): Likewise.
2681 (c_parser_omp_clause_default): Likewise.
2682 (c_parser_omp_clause_if): Likewise.
2683 (c_parser_omp_clause_num_threads): Likewise.
2684 (c_parser_omp_clause_num_tasks): Likewise.
2685 (c_parser_omp_clause_grainsize): Likewise.
2686 (c_parser_omp_clause_priority): Likewise.
2687 (c_parser_omp_clause_hint): Likewise.
2688 (c_parser_omp_clause_defaultmap): Likewise.
2689 (c_parser_oacc_single_int_clause): Likewise.
2690 (c_parser_omp_clause_ordered): Likewise.
2691 (c_parser_omp_clause_reduction): Likewise.
2692 (c_parser_omp_clause_schedule): Likewise.
2693 (c_parser_omp_clause_num_teams): Likewise.
2694 (c_parser_omp_clause_thread_limit): Likewise.
2695 (c_parser_omp_clause_aligned): Likewise.
2696 (c_parser_omp_clause_linear): Likewise.
2697 (c_parser_omp_clause_safelen): Likewise.
2698 (c_parser_omp_clause_simdlen): Likewise.
2699 (c_parser_omp_clause_depend): Likewise.
2700 (c_parser_omp_clause_map): Likewise.
2701 (c_parser_omp_clause_device): Likewise.
2702 (c_parser_omp_clause_dist_schedule): Likewise.
2703 (c_parser_omp_clause_proc_bind): Likewise.
2704 (c_parser_omp_clause_uniform): Likewise.
2705 (c_parser_omp_for_loop): Likewise.
2706 (c_parser_cilk_clause_vectorlength): Likewise.
2707 (c_parser_cilk_clause_linear): Likewise.
2708 (c_parser_transaction_expression): Likewise.
2709 * c-parser.h (c_parser_require): Add param matching_location with
2710 default UNKNOWN_LOCATION.
2711 (c_parser_error): Convert return type from void to bool.
2712 (c_parser_skip_until_found): Add param matching_location with
2713 default UNKNOWN_LOCATION.
2714
2715 2017-08-09 Marek Polacek <polacek@redhat.com>
2716
2717 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2718 * c-tree.h (build_external_ref): Update declaration.
2719 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2720 (build_external_ref): Change the type of a parameter to bool.
2721 (parser_build_binary_op): Use true/false instead of 1/0.
2722 (pointer_diff): Likewise.
2723 (build_modify_expr): Likewise.
2724 (set_designator): Change the type of a parameter to bool.
2725 (set_init_index): Use true/false instead of 1/0.
2726 (set_init_label): Likewise.
2727 (output_init_element): Change the type of a parameter to bool.
2728 (output_pending_init_elements): Use true/false instead of 1/0.
2729 (process_init_element): Likewise.
2730 (build_binary_op): Change the type of a parameter to bool.
2731
2732 2017-08-09 Marek Polacek <polacek@redhat.com>
2733
2734 PR c/81233
2735 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2736 Call emit_diagnostic_valist instead of pedwarn.
2737 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2738 Print the relevant types in diagnostics.
2739
2740 2017-08-09 Marek Polacek <polacek@redhat.com>
2741
2742 PR c/81417
2743 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2744 build_conditional_expr.
2745 * c-parser.c (c_parser_conditional_expression): Create locations for
2746 EXP1 and EXP2 from their source ranges. Pass the locations down to
2747 build_conditional_expr.
2748 * c-tree.h (build_conditional_expr): Update declaration.
2749 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2750 For -Wsign-compare, also print the types.
2751
2752 2017-08-08 Martin Liska <mliska@suse.cz>
2753
2754 * c-convert.c: Include header files.
2755 * c-typeck.c: Likewise.
2756
2757 2017-08-07 Martin Liska <mliska@suse.cz>
2758
2759 * c-parser.c (c_parser_attributes): Canonicalize name of an
2760 attribute.
2761
2762 2017-08-02 Marek Polacek <polacek@redhat.com>
2763
2764 PR c/81289
2765 * c-parser.c (c_parser_unary_expression): Use set_error.
2766
2767 PR c/81448
2768 PR c/81306
2769 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2770 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2771
2772 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2773 Martin Liska <mliska@suse.cz>
2774
2775 * c-typeck.c (c_finish_goto_label): Build gimple predict
2776 statement.
2777
2778 2017-07-31 Martin Liska <mliska@suse.cz>
2779
2780 PR sanitize/81530
2781 * c-convert.c (convert): Guard condition with flag_sanitize_p
2782 also with current_function_decl non-null equality.
2783 * c-decl.c (grokdeclarator): Likewise.
2784 * c-typeck.c (build_binary_op): Likewise.
2785
2786 2017-07-25 Marek Polacek <polacek@redhat.com>
2787
2788 * c-decl.c (grokfield): Remove local variable.
2789
2790 2017-07-25 Marek Polacek <polacek@redhat.com>
2791
2792 PR c/81364
2793 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2794 macro expansion if the body is in { }.
2795 (c_parser_while_statement): Likewise.
2796 (c_parser_for_statement): Likewise.
2797
2798 2017-07-18 Nathan Sidwell <nathan@acm.org>
2799
2800 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2801
2802 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2803
2804 * c-decl.c (implicitly_declare): When suggesting a missing
2805 #include, provide a fix-it hint.
2806
2807 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2808
2809 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2810 and call that instead.
2811 * c-tree.h (selftest::run_c_tests): New decl.
2812
2813 2017-06-26 Marek Polacek <polacek@redhat.com>
2814
2815 PR c/80116
2816 * c-parser.c (c_parser_if_body): Set the location of the
2817 body of the conditional after parsing all the labels. Call
2818 warn_for_multistatement_macros.
2819 (c_parser_else_body): Likewise.
2820 (c_parser_switch_statement): Likewise.
2821 (c_parser_while_statement): Likewise.
2822 (c_parser_for_statement): Likewise.
2823 (c_parser_statement): Add a default argument. Save the location
2824 after labels have been parsed.
2825 (c_parser_c99_block_statement): Likewise.
2826
2827 2017-06-19 Richard Biener <rguenther@suse.de>
2828
2829 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2830 negated _Literals to parse _Literal (int) -1.
2831
2832 2017-06-13 Martin Liska <mliska@suse.cz>
2833
2834 PR sanitize/78204
2835 * c-convert.c (convert): Use sanitize_flags_p.
2836 * c-decl.c (grokdeclarator): Likewise.
2837 * c-typeck.c (convert_for_assignment): Likewise.
2838 (c_finish_return): Likewise.
2839 (build_binary_op): Likewise.
2840
2841 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2842
2843 PR c/81006
2844 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2845 to sizetype before size_binop.
2846
2847 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2848
2849 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2850 of TDI_generic.
2851
2852 2017-06-06 Marek Polacek <polacek@redhat.com>
2853
2854 PR c/79983
2855 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2856 ref.
2857 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2858
2859 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2860
2861 * c-parser.c (c_parser_binary_expression): Implement the
2862 -Wsizeof_pointer_div warning.
2863 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2864 from a parenthesized expression.
2865 (c_parser_expr_list): Use c_last_sizeof_loc.
2866 * c-tree.h (c_last_sizeof_loc): New external.
2867 * c-typeck.c (c_last_sizeof_loc): New variable.
2868 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2869
2870 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2871
2872 PR testsuite/80580
2873 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2874
2875 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2876
2877 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2878 parameters.
2879
2880 2017-05-24 Martin Sebor <msebor@redhat.com>
2881
2882 PR c/80731
2883 * c-fold.c (c_fully_fold_internal): Adjust.
2884 * c-typeck.c (parser_build_unary_op): Adjust.
2885
2886 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2887
2888 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2889 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2890 "VECTOR_LENGTH".
2891
2892 2017-05-23 Marek Polacek <polacek@redhat.com>
2893
2894 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2895 quotes.
2896
2897 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2898
2899 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2900 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2901 it returned invariant. Call tree_invariant_p unconditionally
2902 afterwards to decide whether to return expr or op0.
2903
2904 2017-05-22 Nathan Sidwell <nathan@acm.org>
2905
2906 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2907
2908 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2909
2910 * c-parser.c (c_parser_omp_clause_default): Handle
2911 "OMP_CLAUSE_DEFAULT_PRESENT".
2912
2913 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2914
2915 * config-lang.in (gtfiles): Add c-family/c-format.c.
2916
2917 2017-05-18 Nathan Sidwell <nathan@acm.org>
2918
2919 * c-decl.c (pushdecl_top_level): Delete unused function.
2920
2921 2017-05-18 Marek Polacek <polacek@redhat.com>
2922
2923 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2924 (check_earlier_gotos): Likewise.
2925 (define_label): Likewise.
2926 (pending_xref_error): Likewise.
2927 (smallest_type_quals_location): Likewise.
2928 (grokdeclarator): Likewise.
2929 (grokparms): Likewise.
2930 (identifier_global_value): Likewise.
2931 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2932 (find_init_member): Likewise.
2933
2934 2017-05-18 Marek Polacek <polacek@redhat.com>
2935
2936 * c-decl.c (start_decl): Use false/true instead of 0/1.
2937 (grokdeclarator): Likewise.
2938 (finish_struct): Likewise.
2939 (start_function): Change the return type to bool. Use false/true
2940 instead of 0/1.
2941 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2942 * c-tree.h (start_function): Update.
2943 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2944 (set_designator): Change the return type to bool. Use false/true
2945 instead of 0/1.
2946
2947 2017-05-17 Marek Polacek <polacek@redhat.com>
2948
2949 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2950 * c-typeck.c: Likewise.
2951
2952 2017-05-17 Marek Polacek <polacek@redhat.com>
2953
2954 PR sanitizer/80659
2955 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2956 DECL_IGNORED_P even for non-static compound literals.
2957
2958 2017-05-17 Martin Liska <mliska@suse.cz>
2959
2960 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2961 use it instead of int type.
2962
2963 2017-05-17 Marek Polacek <polacek@redhat.com>
2964
2965 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2966 call c_fully_fold.
2967 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2968 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2969 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2970 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2971 save_expr.
2972 (c_parser_conditional_expression): Likewise.
2973 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2974 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2975 (process_init_element): Likewise.
2976 (build_binary_op): Likewise.
2977 (handle_omp_array_sections_1): Likewise.
2978
2979 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2980
2981 * c-parser.c (c_parser_omp_clause_num_gangs)
2982 (c_parser_omp_clause_num_workers)
2983 (c_parser_omp_clause_vector_length): Merge functions into...
2984 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2985 all users.
2986
2987 2017-05-11 Nathan Sidwell <nathan@acm.org>
2988
2989 * gimple-parser.c: Don't #include tree-dump.h.
2990
2991 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2992
2993 PR testsuite/80580
2994 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2995
2996 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2997
2998 PR testsuite/80580
2999 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3000 incorrect __MEM syntax.
3001
3002 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3003
3004 PR testsuite/80580
3005 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3006 type of unary '*'.
3007
3008 2017-05-09 Nathan Sidwell <nathan@acm.org>
3009
3010 * c-tree.h (pushdecl): Declare.
3011
3012 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3013
3014 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3015 with diagnostic_report_diagnostic.
3016 * c-errors.c (pedwarn_c99): Likewise.
3017 (pedwarn_c90): Likewise.
3018
3019 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3020
3021 PR c++/80038
3022 * c-gimplify.c (c_gimplify_expr): Remove calls to
3023 cilk_gimplifY_call_params_in_spawned_fn.
3024
3025 2017-04-25 David Malcolm <dmalcolm@redhat.com>
3026
3027 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3028 hint for removing extra semicolon.
3029
3030 2017-04-21 Jakub Jelinek <jakub@redhat.com>
3031
3032 PR c/80468
3033 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3034 enabled, set specs->type to integer_type_node.
3035
3036 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3037
3038 * c-array-notation.c: Fix typo in comment.
3039
3040 2017-03-29 Marek Polacek <polacek@redhat.com>
3041
3042 PR c/79730
3043 * c-decl.c (finish_decl): Check VAR_P.
3044
3045 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3046
3047 PR middle-end/80162
3048 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3049 * c-typeck.c (c_mark_addressable): Likewise. Look through
3050 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3051 to ARRAY_TYPE.
3052 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3053
3054 2017-03-23 Marek Polacek <polacek@redhat.com>
3055
3056 * c-tree.h: Remove a C_RID_YYCODE reference.
3057
3058 2017-03-21 Jakub Jelinek <jakub@redhat.com>
3059
3060 PR c/80097
3061 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3062 optional COMPOUND_EXPR with ubsan instrumentation.
3063
3064 2017-03-17 Marek Polacek <polacek@redhat.com>
3065
3066 * c-parser.c: Add C11 references.
3067
3068 2017-03-15 Marek Polacek <polacek@redhat.com>
3069
3070 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3071
3072 2017-03-11 Marek Polacek <polacek@redhat.com>
3073
3074 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3075
3076 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3077
3078 PR translation/79848
3079 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3080 "%qs".
3081 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3082
3083 2017-03-09 Marek Polacek <polacek@redhat.com>
3084
3085 PR sanitizer/79757
3086 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3087 parameter declarations with initializers.
3088
3089 2017-03-09 Jakub Jelinek <jakub@redhat.com>
3090
3091 PR c/79969
3092 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3093 TYPE_STUB_DECL.
3094
3095 2017-03-07 Jakub Jelinek <jakub@redhat.com>
3096
3097 PR c/79834
3098 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3099 for "may only be used in compound statements" diagnostics, change it
3100 such that the same translatable string is used for all pragmas. For
3101 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3102 diagnostics.
3103 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3104 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3105 "may only be used in compound statements" diagnostics, such that the
3106 same translatable string is used for all pragmas.
3107
3108 2017-03-04 Marek Polacek <polacek@redhat.com>
3109
3110 PR c/79847
3111 * c-decl.c (implicit_decl_warning): Add missing space.
3112
3113 2017-03-03 Marek Polacek <polacek@redhat.com>
3114
3115 PR c/79758
3116 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3117 current_function_prototype_arg_types is error_mark_node. Fix
3118 formatting. Use TREE_VALUE instead of TREE_TYPE.
3119
3120 2017-03-03 Jakub Jelinek <jakub@redhat.com>
3121
3122 PR c/79837
3123 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3124 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3125 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3126 diagnostics.
3127
3128 PR c/79836
3129 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3130 instead of %<_Generic>.
3131 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3132 (c_parser_omp_target_exit_data): Use %<release%> instead of
3133 %<release>.
3134
3135 2017-02-28 Jakub Jelinek <jakub@redhat.com>
3136
3137 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3138 instead of just cond ? "..." : "...".
3139 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3140 for "enter"/"exit" keyword.
3141 (c_finish_oacc_routine): Don't use %s to supply portions of the
3142 message.
3143
3144 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3145
3146 PR c++/79588
3147 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3148 handle -Wrestrict here.
3149 * c-typeck.c (build_function_call_vec): Adjust
3150 check_function_arguments caller.
3151
3152 2017-02-23 Richard Biener <rguenther@suse.de>
3153
3154 PR c/79684
3155 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3156 to initialize c_exprs to return.
3157 (c_parser_gimple_binary_expression): Likewise.
3158 (c_parser_gimple_unary_expression): Likewise.
3159 (c_parser_gimple_postfix_expression): Likewise.
3160
3161 2017-02-22 Marek Polacek <polacek@redhat.com>
3162
3163 PR c/79662
3164 * c-typeck.c (convert_arguments): Handle error_mark_node.
3165
3166 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3167
3168 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3169 value of c_parser_parse_ssa_name against error_mark_node and emit
3170 error if ssa name is anonymous and written as default definition.
3171
3172 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3173
3174 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3175 FMA_EXPR.
3176
3177 2017-02-16 Jakub Jelinek <jakub@redhat.com>
3178
3179 PR c++/79512
3180 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3181 ignore #pragma omp target even when not followed by identifier.
3182
3183 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3184
3185 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3186 (c_parser_gimple_unary_expression): Likewise.
3187
3188 2017-02-13 Jakub Jelinek <jakub@redhat.com>
3189
3190 * c-parser.c (c_parser_oacc_declare): Add missing space in
3191 diagnostics.
3192
3193 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3194
3195 PR c/79478
3196 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3197 set_c_expr_source_range when parsing ssa-name.
3198
3199 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
3200 Richard Biener <rguenther@suse.de>
3201
3202 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3203 building IL when arguments are error_mark_node.
3204 (c_parser_gimple_unary_expression): Likewise.
3205 (c_parser_gimple_if_stmt): Likewise.
3206 (c_parser_gimple_switch_stmt): Likewise.
3207 (c_parser_gimple_return_stmt): Likewise.
3208 (c_parser_parse_ssa_name): When name lookup fails do not build
3209 an SSA name. Use undeclared rather than not declared in error
3210 reporting.
3211
3212 2017-02-09 Marek Polacek <polacek@redhat.com>
3213
3214 PR c/79428
3215 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3216 instead of c_parser_skip_until_found.
3217
3218 2017-02-09 Jakub Jelinek <jakub@redhat.com>
3219
3220 PR c/79431
3221 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3222 symtab_node::get on automatic variables.
3223
3224 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3225 Chung-Lin Tang <cltang@codesourcery.com>
3226
3227 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3228 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3229 semantic checking.
3230 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3231
3232 2017-02-07 Richard Biener <rguenther@suse.de>
3233
3234 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3235 (c_parser_gimple_postfix_expression_after_primary):
3236 Do not use c_build_function_call_vec to avoid folding and promotion.
3237 Simplify.
3238
3239 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3240
3241 PR lto/79061
3242 * c-decl.c (pop_scope): Pass main_input_filename to
3243 build_translation_unit_decl.
3244
3245 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3246
3247 * c-parser.c: Include "read-rtl-function.h" and
3248 "run-rtl-passes.h".
3249 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3250 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3251 production. Update for renaming of field "gimple_pass" to
3252 "gimple_or_rtl_pass". If __RTL was seen, call
3253 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3254 to an auto_timevar, to cope with early exit.
3255 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3256 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3257 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3258 Handle RID_RTL.
3259 (c_parser_parse_rtl_body): New function.
3260 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3261 (struct c_declspecs): Rename field "gimple_pass" to
3262 "gimple_or_rtl_pass". Add field "rtl_p".
3263 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3264 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3265 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3266 (c_parser_gimple_or_rtl_pass_list): ...this.
3267
3268 2017-01-20 Marek Polacek <polacek@redhat.com>
3269
3270 PR c/64279
3271 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3272
3273 2017-01-13 Richard Biener <rguenther@suse.de>
3274
3275 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3276 nops.
3277
3278 2017-01-13 Richard Biener <rguenther@suse.de>
3279
3280 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3281 _Literal ( type-name ) number.
3282
3283 2017-01-12 Richard Biener <rguenther@suse.de>
3284
3285 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3286 __MEM.
3287
3288 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3289
3290 PR c++/72813
3291 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3292 PCH file.
3293
3294 2017-01-11 Richard Biener <rguenther@suse.de>
3295
3296 PR bootstrap/79052
3297 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3298 returns on parse errors.
3299
3300 2017-01-04 Marek Polacek <polacek@redhat.com>
3301
3302 PR c++/64767
3303 * c-parser.c (c_parser_postfix_expression): Mark zero character
3304 constants by setting original_type in c_expr.
3305 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3306 with a zero character constant.
3307 (char_type_p): New function.
3308
3309 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3310
3311 * c-parser.c (c_parser_declaration_or_fndef): Create a
3312 rich_location at init_loc and parse it to start_init.
3313 (last_init_list_comma): New global.
3314 (c_parser_braced_init): Update last_init_list_comma when parsing
3315 commas. Pass it to pop_init_level. Pass location of closing
3316 brace to pop_init_level.
3317 (c_parser_postfix_expression_after_paren_type): Create a
3318 rich_location at type_loc and parse it to start_init.
3319 (c_parser_omp_declare_reduction): Likewise for loc.
3320 * c-tree.h (start_init): Add rich_location * param.
3321 (pop_init_level): Add location_t param.
3322 * c-typeck.c (struct initializer_stack): Add field
3323 "missing_brace_richloc".
3324 (start_init): Add richloc param, use it to initialize
3325 the stack node's missing_brace_richloc.
3326 (last_init_list_comma): New decl.
3327 (finish_implicit_inits): Pass last_init_list_comma to
3328 pop_init_level.
3329 (push_init_level): When finding missing open braces, add fix-it
3330 hints to the richloc.
3331 (pop_init_level): Add "insert_before" param and pass it
3332 when calling pop_init_level. Add fixits about missing
3333 close braces to any richloc. Use the richloc for the
3334 -Wmissing-braces warning.
3335 (set_designator): Pass last_init_list_comma to pop_init_level.
3336 (process_init_element): Likewise.
3337
3338 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3339
3340 Update copyright years.
3341
3342 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3343
3344 PR bootstrap/78817
3345 * c-typeck.c (build_function_call_vec): If check_function_arguments
3346 returns true, set TREE_NO_WARNING on CALL_EXPR.
3347
3348 PR c/77767
3349 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3350 to *expr instead of overwriting it.
3351
3352 2016-12-20 Richard Biener <rguenther@suse.de>
3353
3354 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3355 error recovery.
3356 (c_parser_gimple_statement): Only build assigns for non-error
3357 stmts.
3358 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3359
3360 2016-12-14 Martin Jambor <mjambor@suse.cz>
3361
3362 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3363 omp-low.h.
3364 (c_finish_oacc_routine): Adjusted call to
3365 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3366 to use their new names.
3367 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3368 use its new name.
3369 (c_parser_oacc_update): Likewise.
3370 (c_parser_omp_simd): Likewise.
3371 (c_parser_omp_target_update): Likewise.
3372 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3373 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3374 name.
3375 (c_finish_omp_cancellation_point): Likewise.
3376 * gimple-parser.c: Do not include omp-low.h
3377
3378 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3379 James Norris <jnorris@codesourcery.com>
3380
3381 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3382 EXIT_DATA,WAIT} are not used in compound statements.
3383 (c_parser_oacc_enter_exit_data): Update diagnostics.
3384
3385 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3386
3387 PR c++/71973
3388 * c-decl.c (diagnose_mismatched_decls): Use
3389 OPT_Wbuiltin_declaration_mismatch here too.
3390
3391 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
3392 Alan Hayward <alan.hayward@arm.com>
3393 David Sherwood <david.sherwood@arm.com>
3394
3395 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3396 (make_label, finish_struct): Likewise.
3397
3398 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3399 Richard Biener <rguenther@suse.de>
3400
3401 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3402 * config-lang.in (gtfiles): Add c/c-parser.h.
3403 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3404 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3405 * c-parser.c (enum c_id_kind, struct c_token,
3406 c_parser_next_token_is, c_parser_next_token_is_not,
3407 c_parser_next_token_is_keyword,
3408 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3409 Split out to ...
3410 * c-parser.h: ... new header.
3411 * c-parser.c: Include c-parser.h and gimple-parser.h.
3412 (c_parser_peek_token, c_parser_peek_2nd_token,
3413 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3414 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3415 c_parser_error, c_parser_require, c_parser_skip_until_found,
3416 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3417 c_parser_type_name): Export.
3418 (c_parser_tokens_buf): New function.
3419 (c_parser_error): Likewise.
3420 (c_parser_set_error): Likewise.
3421 (c_parser_declspecs): Handle RID_GIMPLE.
3422 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3423 via c_parser_parse_gimple_body.
3424 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3425 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3426 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3427 c_parser_error, c_parser_require, c_parser_skip_until_found,
3428 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3429 c_parser_type_name): Declare.
3430 (struct c_parser): Declare forward.
3431 (c_parser_tokens_buf): Declare.
3432 (c_parser_error): Likewise.
3433 (c_parser_set_error): Likewise.
3434 * gimple-parser.c: New file.
3435 * gimple-parser.h: Likewise.
3436
3437 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3438
3439 PR c/35503
3440 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3441 warn_for_restrict.
3442
3443 2016-09-11 Le-Chun Wu <lcwu@google.com>
3444 Mark Wielaard <mjw@redhat.com>
3445
3446 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3447 to the given -Wshadow= variant.
3448
3449 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3450
3451 * c-typeck.c: Include memmodel.h.
3452
3453 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3454
3455 PR target/77957
3456 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3457 instead of lhd_return_null_tree_v.
3458
3459 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3460
3461 PR c++/69733
3462 * c-decl.c (smallest_type_quals_location): New static function.
3463 (grokdeclarator): Try to find the correct location for an ignored
3464 qualifier.
3465
3466 2016-09-26 Marek Polacek <polacek@redhat.com>
3467
3468 PR c/7652
3469 * c-decl.c (pop_scope): Add gcc_fallthrough.
3470
3471 2016-09-26 Marek Polacek <polacek@redhat.com>
3472
3473 PR c/7652
3474 * c-parser.c (struct c_token): Add flags field.
3475 (c_lex_one_token): Pass it to c_lex_with_flags.
3476 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3477 into IFN_FALLTHROUGH.
3478 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3479 attribute fallthrough after a case label or default label.
3480 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3481
3482 2016-09-24 Marek Polacek <polacek@redhat.com>
3483
3484 PR c/77490
3485 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3486 have boolean value. Warn about ++/-- on booleans.
3487
3488 2016-09-23 Jakub Jelinek <jakub@redhat.com>
3489
3490 * c-parser.c (incomplete_record_decls): Remove unnecessary
3491 = vNULL initialization of file scope vec.
3492
3493 2016-09-16 Marek Polacek <polacek@redhat.com>
3494
3495 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3496
3497 2016-09-14 Marek Polacek <polacek@redhat.com>
3498
3499 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3500 (fix_array_notation_expr): Likewise.
3501 * c-decl.c (finish_decl): Likewise.
3502 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3503 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3504 (function_to_pointer_conversion): Use false instead of 0.
3505 (convert_lvalue_to_rvalue): Likewise.
3506 (parser_build_unary_op): Likewise.
3507 (build_atomic_assign): Likewise.
3508 (build_unary_op): Change nonconvert parameter type to bool, use
3509 true/false instead of 1/0.
3510 (build_binary_op): Use true instead of 1.
3511
3512 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3513
3514 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3515 of add_fixit_insert to add_fixit_insert_before.
3516
3517 2016-09-13 Marek Polacek <polacek@redhat.com>
3518
3519 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3520 it.
3521
3522 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3523
3524 PR c++/77496
3525 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3526 COMPOUND_EXPR to warn_for_omitted_condop.
3527
3528 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3529
3530 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3531 c_get_substring_location for this new langhook.
3532
3533 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3534
3535 PR c/65467
3536 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3537 flag_openmp.
3538 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3539 instead of mark_exp_read on low_bound/length expression.
3540 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3541 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3542 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3543 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3544 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3545 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3546 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3547 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3548 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3549 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3550 instead of mark_expr_read.
3551 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3552 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3553 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3554 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3555 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3556 array section bases outside of depend clause, for depend clause
3557 use convert_lvalue_to_rvalue on the base.
3558 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3559 linear, aligned, map, to and from clauses.
3560 (c_omp_clause_copy_ctor): New function.
3561
3562 2016-09-01 Marek Polacek <polacek@redhat.com>
3563
3564 PR c/7652
3565 * c-typeck.c (composite_type): Add FALLTHRU comment.
3566
3567 2016-08-31 David Malcolm <dmalcolm@redhat.com>
3568
3569 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3570 to the insertion fixits for "struct", "union", and "enum".
3571
3572 2016-08-30 David Malcolm <dmalcolm@redhat.com>
3573
3574 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3575 rather than add_fixit_misspelled_id.
3576 (undeclared_variable): Likewise.
3577 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3578 now-redundant "here" params from add_fixit_insert method calls.
3579 (c_parser_parameter_declaration): Likewise.
3580 * c-typeck.c (build_component_ref): Remove now-redundant range
3581 param from add_fixit_replace method calls.
3582
3583 2016-08-25 Marek Polacek <polacek@redhat.com>
3584
3585 * c-typeck.c (parser_build_binary_op): Pass LHS to
3586 warn_logical_not_parentheses.
3587
3588 2016-08-25 Marek Polacek <polacek@redhat.com>
3589
3590 PR c/77323
3591 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3592 or _FloatN or _FloatNx is not supported.
3593 (finish_declspecs): Set type to integer_type_node when _FloatN or
3594 _FloatNx is not supported.
3595
3596 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3597
3598 PR c/32187
3599 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3600 (struct c_declspecs): Add field floatn_nx_idx.
3601 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3602 and _FloatNx type specifiers.
3603 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3604 (c_parser_declspecs, c_parser_attribute_any_word)
3605 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3606 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3607 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3608 narrower than double.
3609
3610 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3611 Martin Liska <mliska@suse.cz>
3612
3613 PR c/67410
3614 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3615 % to determine val element to change. Assert that
3616 wchar_bytes * charwidth fits into val array.
3617
3618 2016-08-12 Marek Polacek <polacek@redhat.com>
3619
3620 PR c/7652
3621 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3622 (c_parser_postfix_expression): Likewise.
3623 * c-typeck.c (build_unary_op): Adjust fall through comment.
3624 (c_mark_addressable): Likewise.
3625
3626 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3627
3628 PR c/72816
3629 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3630 array member through typedef, for orig_qual_indirect == 0 clear
3631 orig_qual_type.
3632
3633 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3634
3635 PR c/64955
3636 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3637 this up to selftest::run_c_tests.
3638 (selftest::run_c_tests): New function.
3639
3640 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3641
3642 * c-parser.c (struct oacc_routine_data): Add error_seen and
3643 fndecl_seen members.
3644 (c_finish_oacc_routine): Use these.
3645 (c_parser_declaration_or_fndef): Adjust.
3646 (c_parser_oacc_routine): Likewise. Support more C language
3647 constructs, and improve diagnostics. Move pragma context
3648 checking...
3649 (c_parser_pragma): ... here.
3650
3651 * c-parser.c (struct oacc_routine_data): New.
3652 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3653 Simplify code.
3654 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3655 declare target" attribute.
3656
3657 2016-08-01 Jan Beulich <jbeulich@suse.com>
3658
3659 * c-fold.c (c_fully_fold_internal): Also emit shift count
3660 warnings for vector types.
3661 * c-typeck.c (build_binary_op): Likewise.
3662
3663 2016-07-29 Marek Polacek <polacek@redhat.com>
3664
3665 PR c/71742
3666 * c-decl.c (finish_struct): Rephrase an error message.
3667
3668 PR c/71853
3669 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3670 to error node for invalid code.
3671
3672 PR c/71573
3673 * c-decl.c (implicitly_declare): Return decl early not only for
3674 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3675
3676 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3677
3678 PR c/71969
3679 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3680 on GNU extern inline functions.
3681
3682 2016-07-29 Marek Polacek <polacek@redhat.com>
3683
3684 PR c/71583
3685 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3686 check expr.value.
3687
3688 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3689
3690 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3691
3692 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3693
3694 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3695 spellcheck-tree.h
3696 (best_macro_match): Likewise, converting from a typedef to a
3697 subclass.
3698 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3699 (lookup_name_fuzzy): Update for change of best_macro_match to a
3700 subclass with a ctor that calls cpp_forall_identifiers.
3701
3702 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3703
3704 * c-decl.c (implicit_decl_warning): Update for conversion of
3705 return type of lookup_name_fuzzy to const char *.
3706 (undeclared_variable): Likewise.
3707 (lookup_name_fuzzy): Convert return type from tree to
3708 const char *.
3709 * c-parser.c (c_parser_declaration_or_fndef): Update for
3710 conversion of return type of lookup_name_fuzzy to const char *.
3711 (c_parser_parameter_declaration): Likewise.
3712
3713 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3714
3715 * c-parser.c (c_parser_oacc_declare): Don't scan for
3716 GOMP_MAP_POINTER.
3717 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3718 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3719 zero-length subarrays.
3720
3721 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3722
3723 PR c/71858
3724 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3725 instead of FUZZY_LOOKUP_NAME.
3726 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3727 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3728
3729 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3730
3731 PR c/71858
3732 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3733
3734 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3735
3736 * c-parser.c (c_parser_generic_selection): Make type of variable
3737 auto_vec.
3738 (c_parser_omp_declare_simd): Likewise.
3739
3740 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3741
3742 * c-decl.c (struct c_struct_parse_info): Change member types
3743 from vec to auto_vec.
3744 (start_struct): Adjust.
3745 (finish_struct): Likewise.
3746
3747 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3748
3749 PR c/71719
3750 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3751
3752 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3753
3754 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3755 Move pragma context checking into...
3756 (c_parser_omp_cancellation_point): ... here, and improve
3757 diagnostic messages.
3758 * c-typeck.c (c_finish_omp_cancel)
3759 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3760
3761 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3762
3763 PR c/71685
3764 * c-typeck.c (c_build_qualified_type): Don't clear
3765 C_TYPE_INCOMPLETE_VARS for the main variant.
3766
3767 2016-06-28 Martin Sebor <msebor@redhat.com>
3768
3769 PR c/71552
3770 * c-typeck.c (output_init_element): Diagnose incompatible types
3771 before non-constant initializers.
3772
3773 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3774
3775 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3776
3777 2016-06-23 Andi Kleen <ak@linux.intel.com>
3778
3779 * Make-lang.in: Add support for autofdo.
3780
3781 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3782
3783 PR c/70339
3784 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3785 (implicit_decl_warning): When issuing warnings for implicit
3786 declarations, attempt to provide a suggestion via
3787 lookup_name_fuzzy.
3788 (undeclared_variable): Likewise when issuing errors.
3789 (lookup_name_in_scope): Likewise.
3790 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3791 (best_macro_match): New typedef.
3792 (find_closest_macro_cpp_cb): New function.
3793 (lookup_name_fuzzy): New function.
3794 * c-parser.c: Include gcc-rich-location.h.
3795 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3796 (c_keyword_starts_typename): ...this new function.
3797 (c_parser_declaration_or_fndef): When issuing errors about
3798 missing "struct" etc, add a fixit. For other kinds of errors,
3799 attempt to provide a suggestion via lookup_name_fuzzy.
3800 (c_parser_parms_declarator): When looking ahead to detect typos in
3801 type names, also reject CPP_KEYWORD.
3802 (c_parser_parameter_declaration): When issuing errors about
3803 unknown type names, attempt to provide a suggestion via
3804 lookup_name_fuzzy.
3805 * c-tree.h (c_keyword_starts_typename): New prototype.
3806
3807 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3808
3809 PR c/71601
3810 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3811 c_common_type returns error_mark_node.
3812
3813 2016-06-19 Martin Sebor <msebor@redhat.com>
3814
3815 PR c/69507
3816 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3817 __alignof__ (expression).
3818
3819 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3820
3821 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3822
3823 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3824
3825 * c-typeck.c (build_component_ref): Simplify fixit code by
3826 using gcc_rich_location::add_fixit_misspelled_id.
3827 (set_init_label): Likewise.
3828
3829 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3830
3831 * c-parser.c (c_parser_initelt): Provide location of name for new
3832 location_t param of set_init_label.
3833 * c-tree.h (set_init_label): Add location_t param.
3834 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3835 param and use it when issuing error messages about unrecognized
3836 field names. Attempt to provide a fixit hint if appropriate,
3837 otherwise update the error message to provide the type name.
3838
3839 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3840
3841 PR c/71381
3842 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3843 Loosen checking.
3844
3845 2016-06-08 Martin Sebor <msebor@redhat.com>
3846 Jakub Jelinek <jakub@redhat.com>
3847
3848 PR c++/70507
3849 PR c/68120
3850 * c-typeck.c (convert_arguments): Don't promote last argument
3851 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3852
3853 2016-06-08 Marek Polacek <polacek@redhat.com>
3854
3855 PR c/71418
3856 * c-decl.c (grokdeclarator): Check TYPE_P.
3857
3858 PR c/71426
3859 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3860 code.
3861
3862 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3863
3864 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3865 and structure element reference, capture the location of the
3866 element name token and pass it to build_component_ref.
3867 (c_parser_postfix_expression_after_primary): Likewise for
3868 structure element dereference.
3869 (c_parser_omp_variable_list): Likewise for
3870 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3871 * c-tree.h (build_component_ref): Add location_t param.
3872 * c-typeck.c (build_component_ref): Add location_t param
3873 COMPONENT_LOC. Use it, if available, when issuing hints about
3874 mispelled member names to provide a fixit replacement hint.
3875
3876 2016-06-06 Marek Polacek <polacek@redhat.com>
3877
3878 PR c/71362
3879 * c-parser.c (c_parser_direct_declarator): Set location.
3880
3881 2016-06-06 Marek Polacek <polacek@redhat.com>
3882
3883 * c-typeck.c (comptypes_internal): Handle comparisons of
3884 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3885 TYPE_REF_CAN_ALIAS_ALL.
3886
3887 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3888
3889 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3890 arguments as addressable when async clause exists.
3891
3892 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3893
3894 PR c++/71349
3895 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3896 when combined with target construct.
3897
3898 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3899
3900 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3901 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3902
3903 2016-05-25 Marek Polacek <polacek@redhat.com>
3904
3905 PR c/71265
3906 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3907
3908 PR c/71266
3909 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3910
3911 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3912
3913 * c-parser.c (c_parser_oacc_declare): Add support for
3914 GOMP_MAP_FIRSTPRIVATE_POINTER.
3915 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3916 argument with enum c_omp_region_type ort.
3917 (handle_omp_array_sections): Likewise. Update call to
3918 handle_omp_array_sections_1.
3919 (c_finish_omp_clauses): Add specific errors and warning messages for
3920 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3921 call to handle_omp_array_sections.
3922
3923 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3924
3925 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3926
3927 2016-05-24 Richard Biener <rguenther@suse.de>
3928
3929 PR middle-end/70434
3930 PR c/69504
3931 * c-typeck.c (build_array_ref): Do not complain about indexing
3932 non-lvalue vectors. Adjust for function name change.
3933
3934 2016-05-20 Martin Sebor <msebor@redhat.com>
3935
3936 PR c/71115
3937 * c-typeck.c (error_init): Use
3938 expansion_point_location_if_in_system_header.
3939 (warning_init): Same.
3940
3941 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3942
3943 PR c/71171
3944 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3945 in error-handling.
3946 (c_parser_postfix_expression): Likewise.
3947 * c-tree.h (c_expr::set_error): New method.
3948 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3949 that result's range is initialized.
3950
3951 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3952
3953 * c-typeck.c (parser_build_unary_op): Fix formatting.
3954
3955 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3956
3957 * c-decl.c (grokdeclarator): Remove errmsg and use of
3958 targetm.invalid_return_type.
3959 (grokparms): Remove errmsg and use of
3960 targetm.invalid_parameter_type.
3961
3962 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3963
3964 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3965 function return type.
3966
3967 2016-05-12 Marek Polacek <polacek@redhat.com>
3968
3969 PR c/70756
3970 * c-decl.c (build_compound_literal): Pass LOC down to
3971 c_incomplete_type_error.
3972 * c-tree.h (require_complete_type): Adjust declaration.
3973 (c_incomplete_type_error): Likewise.
3974 * c-typeck.c (require_complete_type): Add location parameter, pass it
3975 down to c_incomplete_type_error.
3976 (c_incomplete_type_error): Add location parameter, pass it down to
3977 error_at.
3978 (build_component_ref): Pass location down to c_incomplete_type_error.
3979 (default_conversion): Pass location down to require_complete_type.
3980 (build_array_ref): Likewise.
3981 (build_function_call_vec): Likewise.
3982 (convert_arguments): Likewise.
3983 (build_unary_op): Likewise.
3984 (build_c_cast): Likewise.
3985 (build_modify_expr): Likewise.
3986 (convert_for_assignment): Likewise.
3987 (c_finish_omp_clauses): Likewise.
3988
3989 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3990
3991 PR c/43651
3992 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3993 is enabled.
3994 * c-errors.c (pedwarn_c90): Return true if warned.
3995 * c-tree.h (pedwarn_c90): Change return type to bool.
3996 (enum c_declspec_word): Add new enumerator cdw_atomic.
3997
3998 2016-05-11 Marek Polacek <polacek@redhat.com>
3999
4000 PR c++/71024
4001 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4002 diagnose_mismatched_attributes and call it.
4003
4004 2016-05-10 Marek Polacek <polacek@redhat.com>
4005
4006 PR c/70255
4007 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4008 on a declaration following the definition.
4009
4010 2016-05-05 Jakub Jelinek <jakub@redhat.com>
4011
4012 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4013 parse it through to c_parser_c99_block_statement.
4014 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4015 caller.
4016
4017 2016-05-04 Marek Polacek <polacek@redhat.com>
4018
4019 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4020 OPT_Wdangling_else.
4021
4022 2016-05-04 Marek Polacek <polacek@redhat.com>
4023
4024 PR c/48778
4025 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4026 for macro expansions.
4027
4028 2016-05-03 Marek Polacek <polacek@redhat.com>
4029
4030 PR c/70859
4031 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4032 check_builtin_function_arguments.
4033
4034 2016-05-03 Richard Biener <rguenther@suse.de>
4035
4036 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4037 the checksum from the previous stage.
4038
4039 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4040
4041 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4042 c_finish_omp_clauses.
4043 (c_parser_omp_all_clauses): Likewise.
4044 (c_parser_oacc_cache): Likewise.
4045 (c_parser_oacc_loop): Likewise.
4046 (omp_split_clauses): Likewise.
4047 (c_parser_omp_declare_target): Likewise.
4048 (c_parser_cilk_all_clauses): Likewise.
4049 (c_parser_cilk_for): Likewise.
4050 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4051 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4052
4053 2016-05-02 Marek Polacek <polacek@redhat.com>
4054
4055 PR c/70851
4056 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4057 incomplete type.
4058
4059 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4060
4061 PR middle-end/70626
4062 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4063 OACC_LOOP_CLAUSE_MASK.
4064 (c_parser_oacc_kernels_parallel): Update call to
4065 c_oacc_split_loop_clauses.
4066
4067 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
4068
4069 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4070 argument to build_modify_expr in two cases.
4071
4072 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4073
4074 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4075 warn_for_memset instead of warning directly here.
4076
4077 2016-04-26 Marek Polacek <polacek@redhat.com>
4078
4079 PR c/67784
4080 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4081 out of ...
4082 (c_parser_for_statement): ... here.
4083 (c_parser_if_statement): Use it.
4084 (c_parser_switch_statement): Use it.
4085 (c_parser_while_statement): Use it.
4086
4087 PR c/70791
4088 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4089
4090 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4091
4092 PR c++/69363
4093 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4094 instead of c_finish_cilk_clauses.
4095 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4096 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4097 floating-point variables in the linear clause for Cilk Plus.
4098
4099 2016-04-18 Michael Matz <matz@suse.de>
4100
4101 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4102 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4103
4104 2016-04-15 Marek Polacek <polacek@redhat.com>
4105
4106 PR c/70671
4107 * c-typeck.c (build_unary_op): Pass location down to error and
4108 warning call.
4109
4110 2016-04-15 Jakub Jelinek <jakub@redhat.com>
4111
4112 PR c/70436
4113 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4114 where needed.
4115 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4116 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4117 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4118 Adjust c_parser_pragma callers.
4119 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4120 caller.
4121 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4122 c_parser_statement.
4123 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4124 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4125 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4126 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4127 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4128 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4129 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4130 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4131 down where needed.
4132 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4133 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4134 calls.
4135
4136 2016-04-13 Marek Polacek <polacek@redhat.com>
4137
4138 PR c/70436
4139 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4140 adjust callers.
4141 (c_parser_statement): Likewise.
4142 (c_parser_c99_block_statement): Likewise.
4143 (c_parser_while_statement): Likewise.
4144 (c_parser_for_statement): Likewise.
4145 (c_parser_if_body): Don't set IF_P here.
4146 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4147 about dangling else here.
4148 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4149 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4150 warn about dangling else here.
4151
4152 2016-04-04 Marek Polacek <polacek@redhat.com>
4153
4154 PR c/70307
4155 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4156
4157 2016-03-31 Marek Polacek <polacek@redhat.com>
4158
4159 PR c/70297
4160 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4161
4162 2016-03-18 David Malcolm <dmalcolm@redhat.com>
4163
4164 PR c/70281
4165 * c-parser.c (c_parser_postfix_expression): Set the source range
4166 for uses of "__builtin_types_compatible_p".
4167
4168 2016-03-17 Jakub Jelinek <jakub@redhat.com>
4169
4170 PR c/70280
4171 * c-typeck.c (composite_type): Don't count void_list_node
4172 into len, if the list is terminated by void_list_node, start
4173 with void_list_node instead of NULL for newargs. Stop
4174 at void_list_node.
4175
4176 2016-03-16 Marek Polacek <polacek@redhat.com>
4177
4178 PR c/70093
4179 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4180 nested functions returning VM types.
4181
4182 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4183
4184 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4185 when calling c_finish_omp_clauses.
4186
4187 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4188
4189 PR c/69824
4190 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4191 for later.
4192
4193 2016-03-04 Marek Polacek <polacek@redhat.com>
4194
4195 PR c/69798
4196 * c-parser.c (c_parser_postfix_expression): Call
4197 c_parser_cast_expression rather than c_parser_postfix_expression.
4198
4199 2016-03-01 Jakub Jelinek <jakub@redhat.com>
4200
4201 PR c/69796
4202 PR c/69974
4203 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4204 of incomplete decls to error_mark_node.
4205
4206 2016-02-24 Marek Polacek <polacek@redhat.com>
4207
4208 PR c/69819
4209 * c-decl.c (finish_decl): Don't update the copy of the type of a
4210 different decl type.
4211
4212 2016-02-23 Jakub Jelinek <jakub@redhat.com>
4213
4214 PR objc/69844
4215 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4216 in id_kind reclassification.
4217
4218 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4219
4220 PR c/69835
4221 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4222
4223 2016-02-16 James Norris <jnorris@codesourcery.com>
4224
4225 PR c/64748
4226 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4227
4228 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4229
4230 * c-decl.c (build_null_declspecs): Zero the entire struct.
4231
4232 PR c/69522
4233 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4234 callers changed. If nested_p is true, use it to call
4235 finish_implicit_inits.
4236 * c-tree.h (finish_implicit_inits): Declare.
4237 * c-typeck.c (finish_implicit_inits): New function. Move code
4238 from ...
4239 (push_init_level): ... here.
4240 (set_designator, process_init_element): Call finish_implicit_inits.
4241
4242 2016-02-11 Jakub Jelinek <jakub@redhat.com>
4243
4244 PR c/69768
4245 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4246 arguments for -Waddress warning.
4247
4248 2016-02-04 Jakub Jelinek <jakub@redhat.com>
4249
4250 PR c/69669
4251 * c-decl.c (finish_enum): When honoring mode attribute,
4252 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4253
4254 2016-01-29 Jakub Jelinek <jakub@redhat.com>
4255
4256 PR debug/69518
4257 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4258 all type variants, not just TYPE_MAIN_VARIANT.
4259
4260 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4261
4262 PR debug/66869
4263 * c-decl.c (c_write_global_declarations_1): Warn with
4264 warn_unused_function if static prototype without definition
4265 is not C_DECL_USED.
4266
4267 2016-01-27 Marek Polacek <polacek@redhat.com>
4268
4269 PR c/68062
4270 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4271 to unsigned, if needed. Add -Wsign-compare warning.
4272
4273 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4274
4275 PR tree-optimization/69483
4276 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4277
4278 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4279
4280 PR c/24293
4281 * c-tree.h (incomplete_record_decls): Declare.
4282 * c-parser.c (incomplete_record_decls): Define.
4283 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4284 report error if any decl has zero size.
4285 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4286 or enum type to incomplete_record_decls.
4287
4288 2016-01-14 Tom de Vries <tom@codesourcery.com>
4289
4290 PR tree-optimization/68773
4291 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4292 set force_output.
4293
4294 2016-01-14 Marek Polacek <polacek@redhat.com>
4295
4296 PR c/69262
4297 * c-decl.c (grokdeclarator): Provide more information for invalid
4298 array declarations.
4299
4300 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4301
4302 * c-parser.c (c_parser_unary_expression): For dereferences, build
4303 a combined location before calling build_indirect_ref, so that
4304 error reports cover the full range, manually updating the c_expr
4305 src_range.
4306
4307 2016-01-06 Marek Polacek <polacek@redhat.com>
4308
4309 PR sanitizer/69099
4310 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4311 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4312 NULL.
4313
4314 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4315
4316 Update copyright years.
4317
4318 2016-01-04 Marek Polacek <polacek@redhat.com>
4319
4320 PR c/68908
4321 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4322 optimization to use __atomic_fetch_* built-in if possible.
4323
4324 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4325
4326 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4327 into...
4328 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4329 all users.
4330
4331 2015-12-22 Marek Polacek <polacek@redhat.com>
4332
4333 PR c/69002
4334 * c-typeck.c (build_component_ref): Warn when acessing elements of
4335 atomic structures or unions.
4336
4337 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4338
4339 * c-typeck.c: Include "gcc-rich-location.h".
4340 (build_binary_op): In the two places that call binary_op_error,
4341 create a gcc_rich_location and populate it with the location of
4342 the binary op and its two operands.
4343
4344 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4345
4346 * c-parser.c (c_parser_statement_after_labels): When calling
4347 c_finish_return, Use the return expression's location if it has
4348 one, falling back to the location of the first token within it.
4349 * c-typeck.c (c_finish_return): When issuing warnings about
4350 the incorrect presence/absence of a return value, issue a note
4351 showing the declaration of the function.
4352
4353 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4354
4355 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4356 to 4.
4357 (c_parser_peek_nth_token): New function.
4358 (c_parser_peek_conflict_marker): New function.
4359 (c_parser_error): Detect conflict markers and report them as such.
4360
4361 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4362
4363 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4364 to preserve range information for the primary expression
4365 in the call to c_parser_postfix_expression_after_primary.
4366
4367 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4368
4369 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4370 expression location, falling back on the first token location,
4371 rather than always using the latter.
4372
4373 2015-12-16 Marek Polacek <polacek@redhat.com>
4374
4375 PR c/64637
4376 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4377 available.
4378
4379 2015-12-15 Marek Polacek <polacek@redhat.com>
4380
4381 PR c/68907
4382 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4383 artificial decl.
4384
4385 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4386
4387 * c-parser.c (c_parser_alignof_expression): Capture location of
4388 closing parenthesis (if any), or of end of unary expression, and
4389 use it to build a src_range for the expression.
4390
4391 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4392
4393 PR c/68757
4394 * c-parser.c (c_parser_get_builtin_args): Add
4395 "out_close_paren_loc" param, and write back to it.
4396 (c_parser_postfix_expression): Capture the closing
4397 parenthesis location for RID_CHOOSE_EXPR,
4398 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4399 RID_BUILTIN_SHUFFLE and use it to set the source range
4400 for such expressions; within RID_BUILTIN_COMPLEX set
4401 the underlying location.
4402
4403 2015-12-07 Marek Polacek <polacek@redhat.com>
4404
4405 PR c/68668
4406 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4407 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4408
4409 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4410
4411 * c-tree.h (c_build_va_arg): Adjust prototype.
4412 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4413 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4414 parameter, adjust throughout and issue an error if EXPR is a component
4415 with reverse storage order.
4416
4417 2015-12-02 Jason Merrill <jason@redhat.com>
4418
4419 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4420 (c_fully_fold_internal, decl_constant_value_for_optimization):
4421 Move from c-common.c.
4422 * c-tree.h: Declare decl_constant_value_for_optimization.
4423 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4424
4425 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4426
4427 PR c/68162
4428 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4429 following link from declarator to next declarator. Track original
4430 qualified type and pass it to c_build_qualified_type.
4431 * c-typeck.c (c_build_qualified_type): Add arguments
4432 orig_qual_type and orig_qual_indirect.
4433
4434 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4435
4436 * c-parser.c (c_parser_omp_clause_name)
4437 (c_parser_oacc_all_clauses): Alphabetical sorting.
4438
4439 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4440
4441 PR c/68533
4442 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4443 for diagnostics.
4444
4445 2015-12-01 Julian Brown <julian@codesourcery.com>
4446 Cesar Philippidis <cesar@codesourcery.com>
4447 James Norris <James_Norris@mentor.com>
4448
4449 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4450 (c_parser_oacc_clause_use_device): New function.
4451 (c_parser_oacc_all_clauses): Add use_device support.
4452 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4453 (c_parser_oacc_host_data): New function.
4454 (c_parser_omp_construct): Add host_data support.
4455 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4456 * c-typeck.c (c_finish_oacc_host_data): New function.
4457 (c_finish_omp_clauses): Add use_device support.
4458
4459 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4460
4461 PR c/67106
4462 * c-decl.c: Set TYPE_PACKED in variants.
4463
4464 2015-11-27 Martin Liska <mliska@suse.cz>
4465
4466 PR c++/68312
4467 * c-array-notation.c (fix_builtin_array_notation_fn):
4468 Use release_vec_vec instead of vec::release.
4469 (build_array_notation_expr): Likewise.
4470 (fix_conditional_array_notations_1): Likewise.
4471 (fix_array_notation_expr): Likewise.
4472 (fix_array_notation_call_expr): Likewise.
4473
4474 2015-11-27 Jakub Jelinek <jakub@redhat.com>
4475
4476 PR c/63326
4477 * c-parser.c (c_parser_compound_statement_nostart): If
4478 last_label is true, use pragma_stmt instead of pragma_compound
4479 as second c_parser_pragma argument.
4480 (c_parser_omp_ordered, c_parser_omp_target_update,
4481 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4482 false as second argument to c_parser_skip_to_pragma_eol after
4483 diagnosing standalone directives used in pragma_stmt context.
4484
4485 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4486
4487 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4488 with "if (ENABLE_OFFLOADING)".
4489
4490 2015-11-23 David Malcolm <dmalcolm@redhat.com>
4491
4492 PR objc/68438
4493 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4494 for various Objective-C constructs: Class.name syntax,
4495 @selector(), @protocol(), @encode(), and [] message syntax.
4496
4497 2015-11-20 David Malcolm <dmalcolm@redhat.com>
4498
4499 PR 62314
4500 * c-typeck.c (should_suggest_deref_p): New function.
4501 (build_component_ref): Special-case POINTER_TYPE when
4502 generating a "not a structure of union" error message, and
4503 suggest a "->" rather than a ".", providing a fix-it hint.
4504
4505 2015-11-19 David Malcolm <dmalcolm@redhat.com>
4506
4507 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4508 candidate into a new function, find_closest_identifier.
4509
4510 2015-11-19 Marek Polacek <polacek@redhat.com>
4511
4512 PR c/68412
4513 * c-typeck.c (parser_build_binary_op): Properly handle
4514 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4515
4516 2015-11-17 David Malcolm <dmalcolm@redhat.com>
4517
4518 * c-parser.c (set_c_expr_source_range): Bulletproof both
4519 overloaded implementations against NULL expr->value.
4520 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4521 values.
4522 (c_parser_unary_expression): Likewise when handling addresses of
4523 labels.
4524 (c_parser_postfix_expression): Likewise for statement expressions,
4525 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4526 __builtin_va_arg, and for __builtin_offset_of.
4527 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4528 src_range using the range of the braced initializer.
4529 (c_parser_transaction_expression): Set src_range for "ret" to a
4530 sane pair of values.
4531
4532 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4533
4534 * c-parser.c (c_finish_omp_declare_simd): Look for
4535 "simd" attribute as well. Update error message.
4536
4537 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4538
4539 * c-parser.c (c_parser_omp_declare_target): Adjust.
4540
4541 2015-11-14 Jakub Jelinek <jakub@redhat.com>
4542
4543 * c-typeck.c (c_finish_omp_clauses): Don't mark
4544 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4545
4546 2015-11-14 Marek Polacek <polacek@redhat.com>
4547
4548 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4549 * c-typeck.c: Likewise.
4550
4551 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4552
4553 * c-decl.c (warn_defaults_to): Pass line_table to
4554 rich_location ctor.
4555 * c-errors.c (pedwarn_c99): Likewise.
4556 (pedwarn_c90): Likewise.
4557 * c-parser.c (set_c_expr_source_range): New functions.
4558 (c_token::get_range): New method.
4559 (c_token::get_finish): New method.
4560 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4561 based on the range from the start of the LHS to the end of the
4562 RHS.
4563 (c_parser_conditional_expression): Likewise, based on the range
4564 from the start of the cond.value to the end of exp2.value.
4565 (c_parser_binary_expression): Call set_c_expr_source_range on
4566 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4567 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4568 based on the cast_loc through to the end of the expr.
4569 (c_parser_unary_expression): Likewise, based on the
4570 op_loc through to the end of op.
4571 (c_parser_sizeof_expression) Likewise, based on the start of the
4572 sizeof token through to either the closing paren or the end of
4573 expr.
4574 (c_parser_postfix_expression): Likewise, using the token range,
4575 or from the open paren through to the close paren for
4576 parenthesized expressions.
4577 (c_parser_postfix_expression_after_primary): Likewise, for
4578 various kinds of expression.
4579 * c-tree.h (struct c_expr): Add field "src_range".
4580 (c_expr::get_start): New method.
4581 (c_expr::get_finish): New method.
4582 (set_c_expr_source_range): New decls.
4583 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4584 on ret for prefix unary ops.
4585 (parser_build_binary_op): Likewise, running from the start of
4586 arg1.value through to the end of arg2.value.
4587
4588 2015-11-13 Marek Polacek <polacek@redhat.com>
4589
4590 PR c/68320
4591 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4592
4593 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4594
4595 * c-typeck.c: Include spellcheck.h.
4596 (lookup_field_fuzzy_find_candidates): New function.
4597 (lookup_field_fuzzy): New function.
4598 (build_component_ref): If the field was not found, try using
4599 lookup_field_fuzzy and potentially offer a suggestion.
4600
4601 2015-11-12 James Norris <jnorris@codesourcery.com>
4602 Joseph Myers <joseph@codesourcery.com>
4603
4604 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4605 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4606 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4607 and PRAGMA_OMP_CLAUSE_LINK.
4608 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4609 and PRAGMA_OACC_CLAUSE_LINK.
4610 (OACC_DECLARE_CLAUSE_MASK): New definition.
4611 (c_parser_oacc_declare): New function.
4612
4613 2015-11-12 Marek Polacek <polacek@redhat.com>
4614
4615 PR c/67784
4616 * c-parser.c (c_parser_for_statement): Reclassify the token in
4617 a correct scope.
4618
4619 2015-11-11 Marek Polacek <polacek@redhat.com>
4620
4621 PR c/68107
4622 PR c++/68266
4623 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4624 checking the size of an array.
4625
4626 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4627
4628 * c-array-notation.c: Remove unused header files.
4629 * c-aux-info.c: Likewise.
4630 * c-convert.c: Likewise.
4631 * c-decl.c: Likewise.
4632 * c-errors.c: Likewise.
4633 * c-lang.c: Likewise.
4634 * c-objc-common.c: Likewise.
4635 * c-parser.c: Likewise.
4636 * c-typeck.c: Likewise.
4637 * gccspec.c: Likewise.
4638
4639 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4640 Cesar Philippidis <cesar@codesourcery.com>
4641 James Norris <jnorris@codesourcery.com>
4642 Julian Brown <julian@codesourcery.com>
4643 Nathan Sidwell <nathan@codesourcery.com>
4644
4645 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4646 routine arg.
4647 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4648 (c_parser_pragma): Parse 'acc routine'.
4649 (OACC_ROUTINE_CLAUSE_MARK): Define.
4650 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4651
4652 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4653
4654 PR debug/67192
4655 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4656 location of the backward-goto to the start of the loop body.
4657
4658 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4659
4660 PR debug/67192
4661 * c-parser.c (c_parser_while_statement): Finish the loop before
4662 parsing ahead for misleading indentation.
4663 (c_parser_for_statement): Likewise.
4664
4665 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4666
4667 * c-decl.c (finish_struct): If the structure has reverse storage
4668 order, rewrite the type of array fields with scalar component. Call
4669 maybe_apply_pragma_scalar_storage_order on entry.
4670 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4671 errors on bit-fields and reverse SSO here and not...
4672 (c_mark_addressable): ...here.
4673 (output_init_element): Adjust call to initializer_constant_valid_p.
4674 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4675
4676 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4677
4678 * c-decl.c (warn_defaults_to): Update for change in signature
4679 of diagnostic_set_info.
4680 * c-errors.c (pedwarn_c99): Likewise.
4681 (pedwarn_c90): Likewise.
4682 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4683 for textinfo::set_location.
4684
4685 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4686 Thomas Schwinge <thomas@codesourcery.com>
4687 James Norris <jnorris@codesourcery.com>
4688
4689 * c-parser.c (c_parser_omp_clause_name): Add support for
4690 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4691 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4692 default(none) in OpenACC.
4693 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4694 arguments.
4695 (c_parser_oacc_clause_tile): New function.
4696 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4697 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4698 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4699 TILE}.
4700 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4701 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4702 FIRSTPRIVATE}.
4703 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4704 (c_parser_oacc_update): Update the error message for missing clauses.
4705 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4706 and OMP_CLAUSE_INDEPENDENT.
4707
4708 2015-11-05 Marek Polacek <polacek@redhat.com>
4709
4710 PR c/68090
4711 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4712 deal with pre-evaluation on invalid types.
4713
4714 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4715 Ilya Verbin <ilya.verbin@intel.com>
4716
4717 * c-parser.c: Include context.h and gimple-expr.h.
4718 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4719 monotonic together with nonmonotonic.
4720 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4721 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4722 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4723 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4724 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4725 expressions on combined target teams before the target.
4726 (c_parser_omp_declare_target): If decl has "omp declare target" or
4727 "omp declare target link" attribute, and cgraph or varpool node already
4728 exists, then set corresponding flags. Call c_finish_omp_clauses
4729 in the parenthesized extended-list syntax case.
4730 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4731 declare target.
4732 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4733 on OMP_CLAUSE_REDUCTION array sections.
4734 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4735 into the constant offset, or for variable low-bound using
4736 POINTER_PLUS_EXPR. For structure element based array sections use
4737 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4738 (c_finish_omp_clauses): Drop generic_field_head, structure
4739 elements are now always mapped even as array section bases,
4740 diagnose same var in data sharing and mapping clauses. Diagnose if
4741 linear step on declare simd is neither a constant nor a uniform
4742 parameter. Look through POINTER_PLUS_EXPR for array section
4743 reductions. Diagnose the same var or function appearing multiple
4744 times on the same directive. Fix up wording for the to clause if t
4745 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4746 modifier on kinds other than dynamic or guided or nonmonotonic
4747 modifier together with ordered clause.
4748
4749 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4750 Chung-Lin Tang <cltang@codesourcery.com>
4751
4752 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4753
4754 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4755
4756 * c-array-notation.c: Reorder #include's and remove duplicates.
4757 * c-aux-info.c: Likewise.
4758 * c-convert.c: Likewise.
4759 * c-decl.c: Likewise.
4760 * c-errors.c: Likewise.
4761 * c-lang.c: Likewise.
4762 * c-objc-common.c: Likewise.
4763 * c-parser.c: Likewise.
4764 * c-typeck.c: Likewise.
4765
4766 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4767
4768 PR debug/66068
4769 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4770 after calling build_qualified_type.
4771
4772 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4773 Thomas Schwinge <thomas@codesourcery.com>
4774 James Norris <jnorris@codesourcery.com>
4775 Joseph Myers <joseph@codesourcery.com>
4776 Julian Brown <julian@codesourcery.com>
4777 Bernd Schmidt <bschmidt@redhat.com>
4778
4779 * c-parser.c (c_parser_oacc_shape_clause): New.
4780 (c_parser_oacc_simple_clause): New.
4781 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4782 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4783
4784 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4785 James Norris <jnorris@codesourcery.com>
4786 Cesar Philippidis <cesar@codesourcery.com>
4787
4788 PR c/64765
4789 PR c/64880
4790 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4791 parameters, and handle these. Adjust all users.
4792 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4793 into...
4794 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4795 all users.
4796 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4797 declare functions.
4798 (c_finish_omp_construct): Declare function.
4799 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4800 Merge functions into...
4801 (c_finish_omp_construct): ... this new function.
4802
4803 2015-10-22 Richard Biener <rguenther@suse.de>
4804
4805 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4806 before folding a MINUS_EXPR.
4807
4808 2015-10-21 Marek Polacek <polacek@redhat.com>
4809
4810 PR c/68024
4811 * c-decl.c (start_function): Warn about vararg functions without
4812 a prototype.
4813
4814 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4815
4816 * c-typeck.c (build_conditional_expr): Use boolean vector
4817 type for vector comparison.
4818 (build_vec_cmp): New.
4819 (build_binary_op): Use build_vec_cmp for comparison.
4820
4821 2015-10-20 Marek Polacek <polacek@redhat.com>
4822
4823 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4824
4825 2015-10-20 Marek Polacek <polacek@redhat.com>
4826
4827 PR c/67964
4828 * c-parser.c (c_parser_attributes): Break out of the loop if the
4829 token after an attribute isn't a comma.
4830
4831 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4832 Aldy Hernandez <aldyh@redhat.com>
4833
4834 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4835 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4836 (c_parser_omp_variable_list): Handle structure elements for
4837 map, to and from clauses. Handle array sections in reduction
4838 clause. Formatting fixes.
4839 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4840 if clause modifiers.
4841 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4842 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4843 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4844 c_parser_omp_clause_is_device_ptr): New functions.
4845 (c_parser_omp_clause_ordered): Parse optional parameter.
4846 (c_parser_omp_clause_reduction): Handle array reductions.
4847 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4848 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4849 functions.
4850 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4851 (c_parser_omp_clause_depend_sink): New function.
4852 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4853 (c_parser_omp_clause_map): Parse release/delete map kinds and
4854 optional always modifier.
4855 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4856 and c_finish_omp_clauses callers.
4857 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4858 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4859 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4860 (OMP_CRITICAL_CLAUSE_MASK): Define.
4861 (c_parser_omp_critical): Parse critical clauses.
4862 (c_parser_omp_for_loop): Handle doacross loops, adjust
4863 c_finish_omp_for and c_finish_omp_clauses callers.
4864 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4865 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4866 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4867 (c_parser_omp_for): Disallow ordered clause when combined with
4868 distribute. Disallow linear clause when combined with distribute
4869 and not combined with simd.
4870 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4871 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4872 parse clauses and if depend clause is found, don't parse a body.
4873 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4874 Allow target parallel without for after it.
4875 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4876 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4877 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4878 invalid kinds.
4879 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4880 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4881 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4882 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4883 functions.
4884 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4885 defaultmap and is_device_ptr clauses.
4886 (c_parser_omp_target): Parse target parallel and target simd. Set
4887 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4888 and target exit data. Diagnose invalid map kinds.
4889 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4890 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4891 construct.
4892 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4893 &omp_priv.
4894 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4895 (c_parser_omp_taskloop): New function.
4896 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4897 handle PRAGMA_OMP_TASKLOOP.
4898 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4899 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4900 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4901 Add IS_OMP argument, handle structure element bases, diagnose
4902 bitfields, pass IS_OMP recursively, diagnose known zero length
4903 array sections in depend clauses, handle array sections in reduction
4904 clause, diagnose negative length even for pointers.
4905 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4906 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4907 array sections in reduction clause, set
4908 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4909 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4910 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4911 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4912
4913 2015-10-06 Marek Polacek <polacek@redhat.com>
4914
4915 * c-parser.c (c_parser_statement_after_labels): Use
4916 protected_set_expr_location.
4917 (c_parser_omp_clause_num_gangs): Likewise.
4918 (c_parser_omp_clause_num_threads): Likewise.
4919 (c_parser_omp_clause_num_workers): Likewise.
4920 (c_parser_omp_clause_vector_length): Likewise.
4921 (c_parser_omp_clause_num_teams): Likewise.
4922 (c_parser_omp_clause_thread_limit): Likewise.
4923 * c-typeck.c (build_c_cast): Likewise.
4924 (c_cast_expr): Likewise.
4925
4926 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4927
4928 * c-typeck.c (c_tree_equal): Use real_equal instead of
4929 REAL_VALUES_EQUAL.
4930
4931 2015-10-04 Jason Merrill <jason@redhat.com>
4932
4933 * c-parser.c (c_lex_one_token): Handle @synchronized.
4934 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4935 can change whether the function is transaction_safe.
4936
4937 2015-10-02 Marek Polacek <polacek@redhat.com>
4938
4939 PR c/67730
4940 * c-typeck.c (convert_for_assignment): Use the expansion point
4941 location throughout.
4942
4943 2015-10-02 Marek Polacek <polacek@redhat.com>
4944
4945 PR c/64249
4946 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4947 and pass it down to c_parser_if_statement.
4948 (c_parser_else_body): Add CHAIN parameter and pass it down to
4949 c_parser_statement_after_labels.
4950 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4951 duplicated if-else-if conditions.
4952
4953 2015-10-01 Marek Polacek <polacek@redhat.com>
4954
4955 * c-typeck.c (convert_for_assignment): Improve commentary.
4956
4957 2015-09-30 Marek Polacek <polacek@redhat.com>
4958
4959 PR c/67730
4960 * c-typeck.c (c_finish_return): Use the expansion point location for
4961 certain "return with value" warnings.
4962
4963 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4964
4965 * c-parser.c (pragma_lex): Add loc argument.
4966
4967 2015-09-15 Marek Polacek <polacek@redhat.com>
4968
4969 PR c/67580
4970 * c-decl.c (tag_exists_p): New function.
4971 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4972 struct/union/enum keywords are missing.
4973 * c-tree.h (tag_exists_p): Declare.
4974
4975 2015-09-15 Marek Polacek <polacek@redhat.com>
4976
4977 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4978 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4979 Return NULL_TREE instead of 0.
4980 (lookup_name): Return NULL_TREE instead of 0.
4981 (lookup_name_in_scope): Likewise.
4982 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4983 (parser_xref_tag): Use false instead of 0.
4984 (start_struct): Use true instead of 1.
4985 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4986
4987 2015-09-14 Marek Polacek <polacek@redhat.com>
4988
4989 * c-typeck.c (set_nonincremental_init_from_string): Use
4990 HOST_WIDE_INT_M1U when shifting a negative value.
4991
4992 2015-09-09 Mark Wielaard <mjw@redhat.com>
4993
4994 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4995 parm against NULL.
4996
4997 2015-09-10 Jakub Jelinek <jakub@redhat.com>
4998
4999 PR c/67502
5000 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5001 into OMP_FOR_PRE_BODY rather than before the loop.
5002
5003 2015-09-09 Jakub Jelinek <jakub@redhat.com>
5004
5005 PR c/67501
5006 * c-parser.c (c_parser_oacc_all_clauses,
5007 c_parser_omp_all_clauses): Remove invalid clause from
5008 list of clauses even if parser->error is set.
5009
5010 PR c/67500
5011 * c-parser.c (c_parser_omp_clause_aligned,
5012 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5013 test for errors.
5014 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5015 error_mark_node.
5016
5017 PR c/67495
5018 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5019 instead of c_parser_unary_expression. If the result is !lvalue_p,
5020 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5021
5022 2015-09-04 Marek Polacek <polacek@redhat.com>
5023
5024 PR sanitizer/67279
5025 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5026
5027 2015-09-03 Martin Sebor <msebor@redhat.com>
5028
5029 PR c/66516
5030 * c-typeck.c (convert_arguments, parser_build_unary_op,
5031 build_conditional_expr, c_cast_expr, convert_for_assignment,
5032 build_binary_op, _objc_common_truthvalue_conversion): Call
5033 reject_gcc_builtin.
5034 (c_decl_implicit): Define.
5035
5036 2015-09-02 Marek Polacek <polacek@redhat.com>
5037
5038 PR c/67432
5039 * c-parser.c (c_parser_enum_specifier): Give a better error for
5040 an empty enum.
5041
5042 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5043
5044 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5045
5046 2015-08-12 Marek Polacek <polacek@redhat.com>
5047
5048 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5049 LOC to it.
5050
5051 2015-08-03 Marek Polacek <polacek@redhat.com>
5052
5053 PR c/67088
5054 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5055 Use it.
5056 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5057
5058 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5059
5060 * c-parser.c (c_parser_if_body): Take token_indent_info
5061 argument. Call warn_for_misleading_indentation even when the
5062 body is a semicolon. Extract token_indent_infos corresponding
5063 to the guard, body and next tokens. Adjust call to
5064 warn_for_misleading_indentation accordingly.
5065 (c_parser_else_body): Likewise.
5066 (c_parser_if_statement): Likewise.
5067 (c_parser_while_statement): Likewise.
5068 (c_parser_for_statement): Likewise.
5069
5070 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5071 Manuel López-Ibáñez <manu@gcc.gnu.org>
5072
5073 * c-decl.c (get_parm_info): Remove static var. Update warning
5074 message.
5075
5076 2015-07-27 Marek Polacek <polacek@redhat.com>
5077
5078 PR c++/66555
5079 PR c/54979
5080 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5081
5082 2015-07-20 Marek Polacek <polacek@redhat.com>
5083
5084 PR c++/55095
5085 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5086 (build_binary_op): Warn about left shift overflows.
5087
5088 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5089
5090 * c-array-notation.c: Adjust includes for flags.h changes.
5091 * c-objc-common.c: Likewise.
5092
5093 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5094
5095 * c-array-notation.c: Adjust includes.
5096 * c-aux-info.c: Likewise.
5097 * c-convert.c: Likewise.
5098 * c-decl.c: Likewise.
5099 * c-errors.c: Likewise.
5100 * c-lang.c: Likewise.
5101 * c-objc-common.c: Likewise.
5102 * c-parser.c: Likewise.
5103 * c-typeck.c: Likewise.
5104
5105 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5106
5107 PR fortran/66605
5108 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5109
5110 2015-06-29 Marek Polacek <polacek@redhat.com>
5111
5112 PR c/66322
5113 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5114 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5115 about -Wswitch-bool here.
5116 (do_case): Update c_add_case_label call.
5117 (c_finish_case): Update c_do_switch_warnings call.
5118
5119 2015-06-27 Marek Polacek <polacek@redhat.com>
5120
5121 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5122
5123 2015-06-26 Marek Polacek <polacek@redhat.com>
5124
5125 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5126 INDIRECT_REF_P.
5127 * c-typeck.c (array_to_pointer_conversion): Likewise.
5128 (build_unary_op): Likewise.
5129 (c_finish_return): Likewise.
5130
5131 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5132
5133 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5134 * c-parser.c: Likewise.
5135
5136 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5137
5138 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5139 instead of pointer_hash.
5140 (detect_field_duplicates): Likewise.
5141
5142 2015-06-25 Marek Polacek <polacek@redhat.com>
5143
5144 * c-array-notation.c: Use VAR_P throughout.
5145 * c-decl.c: Likewise.
5146 * c-objc-common.c: Likewise.
5147 * c-parser.c: Likewise.
5148 * c-typeck.c: Likewise.
5149
5150 2015-06-25 Marek Polacek <polacek@redhat.com>
5151
5152 * c-decl.c: Use is_global_var throughout.
5153 * c-parser.c: Likewise.
5154 * c-typeck.c: Likewise.
5155
5156 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5157
5158 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5159 * c-aux-info.c: Likewise.
5160 * c-convert.c: Likewise.
5161 * c-decl.c: Likewise.
5162 * c-errors.c: Likewise.
5163 * c-lang.c: Likewise.
5164 * c-objc-common.c: Likewise.
5165 * c-parser.c: Likewise.
5166 * c-typeck.c: Likewise.
5167
5168 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
5169
5170 PR middle-end/66325
5171 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5172 variants.
5173
5174 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5175
5176 * c-decl.c (pop_scope): Register the main translation unit
5177 through the new debug hook.
5178
5179 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5180
5181 * c-array-notation.c : Adjust include files.
5182 * c-aux-info.c : Likewise.
5183 * c-convert.c : Likewise.
5184 * c-decl.c : Likewise.
5185 * c-errors.c : Likewise.
5186 * c-lang.c : Likewise.
5187 * c-lang.h : Likewise.
5188 * c-objc-common.c : Likewise.
5189 * c-parser.c : Likewise.
5190 * c-typeck.c : Likewise.
5191
5192 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5193
5194 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5195 immediately clobber it.
5196 (c_write_global_declarations_1): Remove call to
5197 check_global_declaration_1.
5198 (c_write_global_declarations_2): Remove.
5199 (c_write_final_cleanups): Rename from c_write_global_declarations.
5200 Remove call to finalize_compilation_unit.
5201 Remove calls to debugging hooks.
5202 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5203 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5204 * c-tree.h: Remove c_write_global_declarations.
5205
5206 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5207
5208 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5209 * c-aux-info.c: Likewise.
5210 * c-convert.c: Likewise.
5211 * c-decl.c: Likewise.
5212 * c-errors.c: Likewise.
5213 * c-lang.c: Likewise.
5214 * c-objc-common.c: Likewise.
5215 * c-parser.c: Likewise.
5216 * c-typeck.c: Likewise.
5217
5218 2015-06-04 Marek Polacek <polacek@redhat.com>
5219
5220 PR c/66341
5221 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5222 it is a lvalue.
5223
5224 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5225
5226 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5227 Warn for empty struct.
5228 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5229
5230 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5231
5232 * c-decl.c (start_function): Call plugin before parsing.
5233 (finish_function): Call plugin after parsing.
5234
5235 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5236
5237 PR c/49551
5238 * c-decl.c (merge_decls): Merge DECL_COMMON.
5239
5240 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
5241
5242 * Make-lang.in (check_gcc_pallelize): Define.
5243
5244 2015-05-22 Marek Polacek <polacek@redhat.com>
5245
5246 PR c/47043
5247 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5248 attributes.
5249
5250 2015-05-21 Marek Polacek <polacek@redhat.com>
5251
5252 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5253 DECL_BUILT_IN.
5254
5255 2015-05-20 Marek Polacek <polacek@redhat.com>
5256
5257 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5258 * c-typeck.c: Likewise.
5259
5260 2015-05-19 Marek Polacek <polacek@redhat.com>
5261
5262 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5263
5264 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5265
5266 PR middle-end/66199
5267 * c-parser.c (c_parser_omp_for_loop): Don't add
5268 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5269 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5270 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5271 constructs.
5272
5273 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5274
5275 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5276 swaps.
5277
5278 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5279
5280 PR fortran/44054
5281 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5282 accessor function.
5283
5284 2015-05-14 Marek Polacek <polacek@redhat.com>
5285
5286 PR c/66066
5287 PR c/66127
5288 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5289 rather than with 0.
5290
5291 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5292
5293 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5294 to add a call to warn_for_misleading_indentation.
5295 (c_parser_else_body): Likewise, adding param "else_loc".
5296 (c_parser_if_statement): Check for misleading indentation.
5297 (c_parser_while_statement): Likewise.
5298 (c_parser_for_statement): Likewise.
5299
5300 2015-05-08 Marek Polacek <polacek@redhat.com>
5301
5302 PR c/64918
5303 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5304 (output_init_element): Likewise.
5305
5306 2015-05-07 Marek Polacek <polacek@redhat.com>
5307
5308 PR c/65179
5309 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5310 value.
5311
5312 2015-04-30 Marek Polacek <polacek@redhat.com>
5313
5314 * c-typeck.c (set_init_label): Call error_at instead of error and
5315 pass LOC to it.
5316
5317 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5318 the type of a decl.
5319
5320 * c-typeck.c (c_build_va_arg): Clarify the error message.
5321
5322 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5323
5324 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5325 OMP_STANDALONE_CLAUSES.
5326
5327 2015-04-28 Marek Polacek <polacek@redhat.com>
5328
5329 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5330
5331 2015-04-28 Marek Polacek <polacek@redhat.com>
5332
5333 PR c/65901
5334 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5335
5336 2015-04-25 Marek Polacek <polacek@redhat.com>
5337
5338 PR c/52085
5339 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5340 attribute.
5341
5342 2015-04-23 Marek Polacek <polacek@redhat.com>
5343
5344 PR c/65345
5345 * c-decl.c (set_labels_context_r): New function.
5346 (store_parm_decls): Call it via walk_tree_without_duplicates.
5347 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5348 instead of create_tmp_var. Build TARGET_EXPR instead of
5349 COMPOUND_EXPR.
5350 (build_atomic_assign): Use create_tmp_var_raw instead of
5351 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5352
5353 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5354
5355 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5356 (c_parser_omp_target_update): Add missed %> to error_at ().
5357
5358 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5359
5360 PR target/55143
5361 * c-decl.c (c_default_pointer_mode): Remove definition.
5362 * c-tree.h (c_default_pointer_mode): Remove declaration.
5363
5364 2015-03-27 Tobias Burnus <burnus@net-b.de>
5365
5366 PR c/65586
5367 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5368 error out.
5369 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5370 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5371 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5372
5373 2015-03-19 Jakub Jelinek <jakub@redhat.com>
5374
5375 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5376 attribute for DECL_EXTERNAL VAR_DECLs.
5377
5378 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5379
5380 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5381 argument.
5382
5383 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5384
5385 PR c/65120
5386 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5387 before preparing arguments to warn_logical_not_parentheses.
5388
5389 2015-03-09 Jakub Jelinek <jakub@redhat.com>
5390
5391 PR c/65120
5392 * c-typeck.c (parser_build_binary_op): Don't warn for
5393 !!x == y or !b == y where b is _Bool.
5394
5395 2015-03-09 Marek Polacek <polacek@redhat.com>
5396
5397 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5398 * c-decl.c (grokdeclarator): Likewise.
5399 * c-typeck.c (build_binary_op): Likewise.
5400
5401 2015-02-27 Marek Polacek <polacek@redhat.com>
5402
5403 PR c/65228
5404 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5405
5406 2015-02-14 Marek Polacek <polacek@redhat.com>
5407
5408 PR c/64768
5409 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5410 declared through a typedef name.
5411
5412 2015-02-13 Marek Polacek <polacek@redhat.com>
5413
5414 PR c/65050
5415 * c-decl.c (grokdeclarator): Print also the type when giving
5416 the error message about array's incomplete element type.
5417
5418 2015-02-11 Jakub Jelinek <jakub@redhat.com>
5419
5420 PR c/64824
5421 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5422 check in the POP macro.
5423
5424 2015-02-09 Marek Polacek <polacek@redhat.com>
5425
5426 PR c/64856
5427 * c-typeck.c (process_init_element): Don't always wrap
5428 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5429 initializing a range of elements.
5430
5431 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5432
5433 PR c/64824
5434 PR c/64868
5435 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5436
5437 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5438
5439 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5440 processing enum declaration.
5441
5442 2015-01-29 Marek Polacek <polacek@redhat.com>
5443
5444 PR c/64709
5445 * c-typeck.c (pop_init_level): If constructor_elements has
5446 exactly one element with integer_zerop value, set constructor_zeroinit
5447 to 1. Remove braces around warning_init call.
5448
5449 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5450
5451 PR c/64766
5452 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5453 of FUNCTION_DECLs with error_mark_node.
5454
5455 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5456
5457 PR c/64778
5458 * c-typeck.c (convert_arguments): Return -1 if there are
5459 error_args, even if we've diagnosed too many arguments.
5460
5461 2015-01-21 Richard Biener <rguenther@suse.de>
5462
5463 PR middle-end/64313
5464 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5465 for builtins the user declared correctly.
5466
5467 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5468 Bernd Schmidt <bernds@codesourcery.com>
5469 Cesar Philippidis <cesar@codesourcery.com>
5470 James Norris <jnorris@codesourcery.com>
5471 Jakub Jelinek <jakub@redhat.com>
5472 Ilmir Usmanov <i.usmanov@samsung.com>
5473
5474 * c-parser.c: Include "gomp-constants.h".
5475 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5476 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5477 Use OMP_CLAUSE_SET_MAP_KIND.
5478 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5479 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5480 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5481 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5482 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5483 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5484 "copyout", "create", "delete", "deviceptr", "gang", "host",
5485 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5486 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5487 "present_or_create", "pcreate", "seq", "self", "vector",
5488 "vector_length", "wait", "worker".
5489 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5490 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5491 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5492 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5493 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5494 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5495 (c_parser_oacc_data_clause_deviceptr)
5496 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5497 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5498 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5499 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5500 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5501 (c_parser_oacc_parallel, c_parser_oacc_update)
5502 (c_parser_oacc_wait): New functions.
5503 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5504 (c_finish_oacc_data): New prototypes.
5505 * c-typeck.c: Include "gomp-constants.h".
5506 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5507 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5508 OMP_CLAUSE_SET_MAP_KIND.
5509 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5510 (c_finish_oacc_data): New functions.
5511 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5512 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5513 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5514 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5515 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5516 GOMP_MAP_FORCE_DEVICEPTR.
5517
5518 2015-01-09 Michael Collison <michael.collison@linaro.org>
5519
5520 * c-array-notation.c: Include hash-set.h, machmode.h,
5521 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5522 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5523 * c-aux-info.c: Ditto.
5524 * c-convert.c: Ditto.
5525 * c-decl.c: Ditto.
5526 * c-errors.c: Ditto.
5527 * c-lang.c: Dittoxs.
5528 * c-objc-common.c: Ditto.
5529 * c-parser.c: Ditto.
5530 * c-typeck.c: Include hash-set.h, machmode.h,
5531 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5532 fold-const.h, wide-int.h, inchash.h, real.h and
5533 fixed-value.h due to flattening of tree.h.
5534
5535 2015-01-07 Marek Polacek <polacek@redhat.com>
5536
5537 PR c/64417
5538 * c-typeck.c (process_init_element): Disallow initialization of
5539 a flexible array member with a string constant if the structure
5540 is in an array.
5541
5542 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5543
5544 PR sanitizer/64344
5545 * c-typeck.c (convert_for_assignment, c_finish_return): For
5546 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5547 types also set in_late_binary_op around convert call.
5548 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5549 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5550 result on expr as last argument to ubsan_instrument_float_cast,
5551 if in_late_binary_op, don't use c_save_expr but save_expr.
5552
5553 Update copyright years.
5554
5555 2015-01-05 Marek Polacek <polacek@redhat.com>
5556
5557 PR c/64423
5558 * c-typeck.c (build_array_ref): Pass loc down to
5559 warn_array_subscript_with_type_char.
5560
5561 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5562
5563 * c-typeck.c: New behavious for pointers to arrays with qualifiers
5564 (common-pointer-type): For pointers to arrays take qualifiers from
5565 element type.
5566 (build_conditional_expr): Add warnings for lost qualifiers.
5567 (comp-target-types): Allow pointers to arrays with different qualifiers.
5568 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5569 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5570 to PEDWARN_FOR_QUALIFIERS.
5571
5572 2014-12-17 Jakub Jelinek <jakub@redhat.com>
5573
5574 PR sanitizer/64289
5575 * c-convert.c: Include ubsan.h.
5576 (convert): For real -> integral casts and
5577 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5578 instead instrument the float cast directly.
5579
5580 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5581
5582 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5583 c_finish_stmt_expr): Remove NULL last argument from
5584 create_tmp_var_raw and create_tmp_var calls.
5585 * c-array-notation.c (fix_builtin_array_notation_fn,
5586 build_array_notation_expr, fix_conditional_array_notations_1,
5587 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5588
5589 2014-11-28 Marek Polacek <polacek@redhat.com>
5590
5591 PR c/63862
5592 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5593 convert the right operand to integer type.
5594
5595 2014-11-25 Marek Polacek <polacek@redhat.com>
5596
5597 PR c/63877
5598 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5599 for inline functions.
5600
5601 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5602
5603 PR target/63764
5604 * c-typeck.c (build_array_ref): Adjust
5605 convert_vector_to_pointer_for_subscript caller. If it returns true,
5606 call non_lvalue_loc on the result.
5607
5608 2014-11-11 Richard Biener <rguenther@suse.de>
5609
5610 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5611 to true.
5612
5613 2014-11-10 Andi Kleen <ak@linux.intel.com>
5614
5615 PR c/60804
5616 * c-parser.c (c_parser_statement_after_labels): Call
5617 check_no_cilk.
5618 (c_parser_if_statement): Dito.
5619 (c_parser_switch_statement): Dito.
5620 (c_parser_while_statement): Dito.
5621 (c_parser_do_statement): Dito.
5622 (c_parser_for_statement): Dito.
5623 * c-typeck.c (c_finish_loop): Dito.
5624
5625 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5626
5627 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5628 OPT_Wshift_count_overflow in the warnings.
5629
5630 2014-10-30 Marek Polacek <polacek@redhat.com>
5631
5632 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5633 print the stripped version as well, if they're not the same.
5634
5635 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5636
5637 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5638 machine_mode.
5639
5640 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5641
5642 * c-decl.c: Adjust include files.
5643 * c-parser.c: Ditto.
5644
5645 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5646 Tom Tromey <tromey@redhat.com>
5647
5648 * c-tree.h (enum c_oracle_request): New.
5649 (c_binding_oracle_function): New typedef.
5650 (c_binding_oracle, c_pushtag, c_bind): Declare.
5651 * c-decl.c (c_binding_oracle): New global.
5652 (I_SYMBOL_CHECKED): New macro.
5653 (i_symbol_binding): New function.
5654 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5655 (I_TAG_CHECKED): New macro.
5656 (i_tag_binding): New function.
5657 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5658 (I_LABEL_CHECKED): New macro.
5659 (i_label_binding): New function.
5660 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5661 (c_print_identifier): Save and restore c_binding_oracle.
5662 (c_pushtag, c_bind): New functions.
5663
5664 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5665
5666 * c-typeck.c: Adjust include files.
5667
5668 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5669
5670 PR c++/53061
5671 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5672 initialization here...
5673 (c_initialize_diagnostics): ... but here. Set defaults after
5674 building pretty-printer.
5675
5676 2014-10-23 Marek Polacek <polacek@redhat.com>
5677
5678 PR c/63626
5679 * c-decl.c (pop_scope): Don't print warning in external_scope.
5680
5681 2014-10-19 Marek Polacek <polacek@redhat.com>
5682
5683 PR c/63567
5684 * c-typeck.c (output_init_element): Allow initializing objects with
5685 static storage duration with compound literals even in C99 and add
5686 pedwarn for it.
5687
5688 2014-10-17 Marek Polacek <polacek@redhat.com>
5689
5690 PR c/63567
5691 * c-typeck.c (digest_init): Allow initializing objects with static
5692 storage duration with compound literals even in C99 and add pedwarn
5693 for it.
5694
5695 2014-10-17 Marek Polacek <polacek@redhat.com>
5696
5697 PR c/63543
5698 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5699 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5700 error multiple times. Print the type.
5701
5702 2014-10-17 Marek Polacek <polacek@redhat.com>
5703
5704 PR c/63549
5705 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5706 type.
5707
5708 2014-10-17 Marek Polacek <polacek@redhat.com>
5709
5710 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5711 (start_function): Use OPT_Wimplicit_int instead of 0.
5712 (store_parm_decls_oldstyle): Likewise.
5713
5714 2014-10-17 Alan Modra <amodra@gmail.com>
5715
5716 PR middle-end/61848
5717 * c-decl.c (merge_decls): Don't merge section name or tls model
5718 to newdecl symtab node, instead merge to olddecl. Override
5719 existing olddecl section name. Set tls_model for all thread-local
5720 vars, not just OMP thread-private ones. Remove incorrect comment.
5721
5722 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5723
5724 * c-decl.c: Adjust include files.
5725
5726 2014-10-14 DJ Delorie <dj@redhat.com>
5727
5728 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5729 (c_token_starts_typename): Check all __intN, not just __int128.
5730 (c_token_starts_declspecs): Likewise.
5731 (c_parser_declspecs): Likewise.
5732 (c_parser_attribute_any_word): Likewise.
5733 (c_parser_objc_selector): Likewise.
5734 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5735 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5736 is specified.
5737 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5738 __int128.
5739 (finish_declspecs): Likewise.
5740
5741 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5742
5743 * c-parser.c (c_parser_all_labels): New function to replace
5744 the duplicate code.
5745 (c_parser_statement): Call the new function.
5746
5747 2014-10-09 Marek Polacek <polacek@redhat.com>
5748
5749 PR c/63480
5750 * c-typeck.c (pop_init_level): Don't warn about initializing
5751 with { }.
5752
5753 2014-10-07 Marek Polacek <polacek@redhat.com>
5754
5755 PR c/59717
5756 * c-decl.c (header_for_builtin_fn): New function.
5757 (implicitly_declare): Suggest which header to include.
5758
5759 2014-10-07 Marek Polacek <polacek@redhat.com>
5760
5761 * c-convert.c (convert): Use error_operand_p.
5762 * c-typeck.c (require_complete_type): Likewise.
5763 (really_atomic_lvalue): Likewise.
5764 (digest_init): Likewise.
5765 (handle_omp_array_sections_1): Likewise.
5766
5767 2014-10-03 Marek Polacek <polacek@redhat.com>
5768
5769 PR c/63453
5770 * c-decl.c (pop_scope): Don't warn about "inline function declared
5771 but never defined" for functions marked with gnu_inline attribute.
5772
5773 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5774
5775 PR c++/63249
5776 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5777 on low_bound and length.
5778
5779 2014-09-24 Marek Polacek <polacek@redhat.com>
5780
5781 PR c/61405
5782 PR c/53874
5783 * c-parser.c: Don't define CPP_KEYWORD.
5784 (c_parser_switch_statement): Pass original type to c_finish_case.
5785 * c-tree.h (c_finish_case): Update declaration.
5786 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5787 conditionally to c_do_switch_warnings.
5788
5789 2014-09-03 Marek Polacek <polacek@redhat.com>
5790
5791 PR c/62024
5792 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5793 conversions.
5794
5795 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5796 Balaji V. Iyer <balaji.v.iyer@intel.com>
5797 Igor Zamyatin <igor.zamyatin@intel.com>
5798
5799 * c-parser.c (c_parser_cilk_for): New function.
5800 (c_parser_cilk_grainsize): Likewise.
5801 (c_get_temp_regvar): Likewise.
5802 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5803 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5804 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5805 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5806 case.
5807
5808 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5809
5810 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5811 with using HOST_WIDE_INT without truncation to 'int'
5812
5813 2014-08-22 Marek Polacek <polacek@redhat.com>
5814
5815 PR c++/62199
5816 * c-typeck.c (parser_build_binary_op): Adjust call to
5817 warn_logical_not_parentheses.
5818
5819 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5820
5821 PR other/62008
5822 * c-parser.c (c_parser_array_notation): Check for correct
5823 type of an array added.
5824
5825 2014-08-19 Marek Polacek <polacek@redhat.com>
5826
5827 PR c++/62153
5828 * c-typeck.c (build_binary_op): If either operand of a comparison
5829 is a boolean expression, call maybe_warn_bool_compare.
5830
5831 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5832
5833 PR c/45584
5834 * c-typeck.c (build_c_cast): Do a conversion even when the
5835 TYPE_MAIN_VARIANTs are the same.
5836
5837 2014-08-19 Marek Polacek <polacek@redhat.com>
5838
5839 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5840 pedwarn_c99 instead of pedwarn.
5841 (grokfield): Likewise.
5842 (warn_defaults_to): New function.
5843 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5844 Unconditionally call pedwarn_c99 instead of pedwarn.
5845 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5846 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5847 check flag_isoc11 before.
5848 * c-errors.c (pedwarn_c99): Change the return type to bool.
5849 Handle -Wc99-c11-compat.
5850 * c-parser.c (disable_extension_diagnostics): Handle
5851 warn_c99_c11_compat.
5852 (restore_extension_diagnostics): Likewise.
5853 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5854 instead of pedwarn, don't check flag_isoc11 before.
5855 (c_parser_declspecs): Likewise.
5856 (c_parser_alignas_specifier): Likewise.
5857 (c_parser_alignof_expression): Likewise.
5858 (c_parser_generic_selection): Likewise.
5859 * c-tree.h (pedwarn_c99): Update declaration.
5860 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5861 of pedwarn_c99.
5862
5863 2014-08-19 Marek Polacek <polacek@redhat.com>
5864
5865 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5866 to pedwarn_c90.
5867 * c-errors.c: Include "opts.h".
5868 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5869 * c-parser.c (disable_extension_diagnostics): Handle negative value
5870 of warn_c90_c99_compat, too.
5871 (restore_extension_diagnostics): Likewise.
5872 (c_parser_compound_statement_nostart): Pass
5873 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5874
5875 2014-08-12 Marek Polacek <polacek@redhat.com>
5876
5877 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5878 Add pedwarn.
5879 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5880 Likewise.
5881 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5882
5883 2014-08-10 Marek Polacek <polacek@redhat.com>
5884
5885 PR c/51849
5886 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5887 Call pedwarn_c90 instead of pedwarn.
5888 (check_bitfield_type_and_width): Likewise.
5889 (declspecs_add_qual): Likewise.
5890 (declspecs_add_type): Likewise.
5891 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5892 Adjust to only call pedwarn_c90.
5893 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5894 pedwarn_c90 instead of pedwarn.
5895 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5896 * c-parser.c (disable_extension_diagnostics): Handle
5897 warn_c90_c99_compat.
5898 (restore_extension_diagnostics): Likewise.
5899 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5900 pedwarn_c90 instead of pedwarn.
5901 (c_parser_initelt): Likewise.
5902 (c_parser_postfix_expression): Likewise.
5903 (c_parser_postfix_expression_after_paren_type): Likewise.
5904 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5905 * c-tree.h: Fix formatting.
5906 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5907 pedwarn_c90 instead of pedwarn.
5908
5909 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5910
5911 * c-typeck.c: Remove include of pointer-set.h.
5912
5913 2014-08-07 Marek Polacek <polacek@redhat.com>
5914
5915 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5916
5917 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5918
5919 * c-typeck.c: Use hash_map instead of pointer_map.
5920
5921 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5922
5923 * c-decl.c: Use hash_set instead of pointer_set.
5924
5925 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5926
5927 PR middle-end/61455
5928 * c-array-notation.c (expand_array_notations): Handling
5929 of DECL_EXPR added.
5930
5931 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5932
5933 PR c++/60517
5934 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5935 a local variable.
5936
5937 2014-07-30 Tom Tromey <tromey@redhat.com>
5938
5939 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5940 field.
5941 (really_start_incremental_init, push_init_level): Initialize
5942 designator_depth.
5943 (pop_init_level): Set global designator_depth.
5944 (process_init_element): Check for designated_init attribute.
5945
5946 2014-07-20 Marek Polacek <polacek@redhat.com>
5947
5948 PR c/61852
5949 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5950 (implicitly_declare): Pass location to implicit_decl_warning.
5951
5952 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5953
5954 PR middle-end/61294
5955 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5956 If non-NULL, call c_parser_check_literal_zero.
5957 (c_parser_check_literal_zero): New function.
5958 (c_parser_postfix_expression_after_primary): Adjust
5959 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5960
5961 2014-07-06 Marek Polacek <polacek@redhat.com>
5962
5963 PR c/6940
5964 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5965 * c-tree.h (C_ARRAY_PARAMETER): Define.
5966 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5967 function parameter.
5968
5969 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5970 Chen Gang <gang.chen.5i5j@gmail.com>
5971
5972 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5973 releasing symbol.
5974
5975 2014-07-01 Marek Polacek <polacek@redhat.com>
5976
5977 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5978 instead of 0 to WARN_FOR_ASSIGNMENT.
5979
5980 2014-07-01 Marek Polacek <polacek@redhat.com>
5981
5982 PR c/58286
5983 * c-typeck.c (convert_for_assignment): Pass
5984 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5985
5986 2014-06-30 Marek Polacek <polacek@redhat.com>
5987
5988 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5989 has no_sanitize_undefined attribute.
5990
5991 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5992
5993 PR middle-end/57541
5994 * c-array-notation.c (fix_builtin_array_notation_fn):
5995 Check for 0 arguments in builtin call. Check that bultin argument is
5996 correct.
5997 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5998 index.
5999
6000 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6001
6002 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6003 qualifiers in __auto_type for atomic types.
6004 (c_parser_typeof_specifier): Discard all type qualifiers in
6005 __typeof__ for atomic types.
6006
6007 2014-06-25 Marek Polacek <polacek@redhat.com>
6008
6009 PR c/61162
6010 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6011 the return expression to c_finish_return.
6012
6013 2014-06-25 Jakub Jelinek <jakub@redhat.com>
6014
6015 * c-typeck.c (c_finish_omp_clauses): Make sure
6016 OMP_CLAUSE_LINEAR_STEP has correct type.
6017
6018 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6019
6020 * c-decl.c: Adjust.
6021
6022 2014-06-24 Jakub Jelinek <jakub@redhat.com>
6023
6024 * c-parser.c (c_parser_omp_for_loop): For
6025 #pragma omp parallel for simd move lastprivate clause from parallel
6026 to for rather than simd.
6027
6028 2014-06-23 Marek Polacek <polacek@redhat.com>
6029
6030 * c-typeck.c (parser_build_binary_op): Don't call
6031 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6032
6033 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6034
6035 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6036 * c-decl.c (merge_decls): Likewise.
6037
6038 2014-06-09 Marek Polacek <polacek@redhat.com>
6039
6040 PR c/36446
6041 * c-typeck.c (error_init): Call inform instead of error_at.
6042 (pedwarn_init): Call inform instead of pedwarn.
6043 (warning_init): Call inform instead of warning_at.
6044
6045 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
6046
6047 * c-decl.c (merge_decls): Use set_decl_section_name.
6048 (duplicate_decls): Remove node if it exists.
6049
6050 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6051
6052 PR c/53119
6053 * c-typeck.c (push_init_level, process_init_element,
6054 pop_init_level): Correct check for zero initialization, move
6055 missing brace warning to respect zero initialization.
6056
6057 2014-06-05 Marek Polacek <polacek@redhat.com>
6058
6059 PR c/56724
6060 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6061
6062 2014-06-05 Marek Polacek <polacek@redhat.com>
6063
6064 PR c/49706
6065 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6066 on the left hand side operand of a comparison.
6067
6068 2014-06-05 Marek Polacek <polacek@redhat.com>
6069
6070 PR c/48062
6071 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6072 Print note only if the warning was printed.
6073
6074 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6075
6076 PR c/58942
6077 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6078 with a pointer.
6079
6080 2014-06-03 Marek Polacek <polacek@redhat.com>
6081
6082 PR c/60439
6083 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6084 c_start_case.
6085 * c-tree.h (c_start_case): Update.
6086 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6087 switch condition has boolean value.
6088
6089 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
6090
6091 * c-decl.c: Include builtins.h.
6092 * c-parser.c: Likewise.
6093
6094 2014-05-27 Marek Polacek <polacek@redhat.com>
6095
6096 PR c/56724
6097 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6098 error and warning calls to error_at and warning_at. Pass location of
6099 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6100 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6101 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6102
6103 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6104
6105 PR c/61191
6106 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6107 function parameters.
6108
6109 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
6110
6111 * c-decl.c (merge_decls): Preserve symtab node pointers.
6112 (duplicate_decls): Free new decl.
6113
6114 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6115
6116 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6117 initialization.
6118
6119 * c-parser.c (c_parser_omp_target): Return bool values.
6120
6121 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6122
6123 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6124 num_teams_loc variable to num_thread_limit_loc.
6125
6126 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6127
6128 * c-array-notation.c (expand_array_notations): Use void_node
6129 instead of void_zero_node.
6130
6131 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6132
6133 * c-decl.c (finish_struct): Adjust.
6134 (finish_enum): Likewise.
6135 (bind): Adjust.
6136 (record_inline_static): Likewise.
6137 (push_scope): Likewise.
6138 (make_label): Likewise.
6139 (lookup_label_for_goto): Likewise.
6140 (finish_struct): Likewise.
6141 (finish_enum): Likewise.
6142 (store_parm_decls): Likewise.
6143 (c_push_function_context): Likewise.
6144 * c-lang.h: Remove usage of variable_size gty attribute.
6145 * c-parser.c (c_parse_init): Adjust.
6146 (c_parse_file): Likewise.
6147
6148 2014-05-13 Marek Polacek <polacek@redhat.com>
6149
6150 PR c/61162
6151 * c-typeck.c (convert_for_assignment): Pass location to
6152 WARN_FOR_ASSIGNMENT instead of input_location.
6153
6154 2014-05-10 Marek Polacek <polacek@redhat.com>
6155
6156 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6157 maybe_warn_string_init.
6158 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6159 maybe_warn_string_init.
6160 * c-tree.h (maybe_warn_string_init): Update declaration.
6161 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6162 Call pedwarn_init with loc instead of with input_location.
6163 (digest_init): Pass init_loc to maybe_warn_string_init.
6164 (pop_init_level): Call pedwarn_init with loc instead of with
6165 input_location.
6166 (set_init_index): Likewise.
6167 (process_init_element): Likewise.
6168
6169 2014-05-09 Marek Polacek <polacek@redhat.com>
6170
6171 PR c/61096
6172 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6173 (c_parser_initelt): Pass location to set_init_label. Pass array index
6174 location to set_init_index.
6175 * c-tree.h (push_init_level): Update declaration.
6176 (pop_init_level): Likewise.
6177 (set_init_index): Likewise.
6178 (set_init_label): Likewise.
6179 * c-typeck.c (error_init): Add location parameter. Call error_at
6180 instead of error.
6181 (digest_init): Pass init_loc to error_init.
6182 (really_start_incremental_init):
6183 (push_init_level): Add location parameter. Pass loc to pop_init_level
6184 and error_init.
6185 (pop_init_level): Likewise.
6186 (set_designator): Add location parameter. Pass loc to pop_init_level,
6187 push_init_level, and error_init.
6188 (set_init_index): Add location parameter. Pass loc to error_init and
6189 set_designator.
6190 (set_init_label): Likewise.
6191 (output_init_element): Pass loc to error_init.
6192 (process_init_element): Pass loc to error_init, pop_init_level,
6193 pedwarn_init, and push_init_level.
6194
6195 2014-05-09 Marek Polacek <polacek@redhat.com>
6196
6197 PR c/50459
6198 * c-parser.c (c_parser_attributes): Parse the arguments as an
6199 expression-list if the attribute takes identifier.
6200
6201 2014-05-08 Marek Polacek <polacek@redhat.com>
6202
6203 PR c/61053
6204 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6205 TYPE_ALIGN_UNIT.
6206
6207 2014-05-08 Marek Polacek <polacek@redhat.com>
6208
6209 PR c/61077
6210 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6211 of main.
6212
6213 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6214 Mike Stump <mikestump@comcast.net>
6215 Richard Sandiford <rdsandiford@googlemail.com>
6216
6217 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6218 (finish_enum): Use wide-int interfaces.
6219 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6220 * c-typeck.c (build_c_cast): Likewise.
6221 (set_nonincremental_init_from_string): Likewise.
6222 (c_tree_equal): Likewise.
6223
6224 2014-05-02 Marek Polacek <polacek@redhat.com>
6225
6226 PR c/25801
6227 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6228 Return size_one_node when the type is not complete.
6229 (pointer_diff): Remove comment.
6230 (build_unary_op): Improve error messages.
6231
6232 2014-05-02 Marek Polacek <polacek@redhat.com>
6233
6234 * c-typeck.c (c_finish_return): Separate warning_at calls.
6235
6236 2014-05-02 Marek Polacek <polacek@redhat.com>
6237
6238 * c-tree.h (error_init): Remove declaration.
6239 (pedwarn_init): Likewise.
6240 * c-typeck.c (error_init): Make static and move above.
6241 (pedwarn_init): Likewise.
6242 (warning_init): Move above.
6243 (maybe_warn_string_init): Likewise.
6244
6245 2014-05-01 Jeff Law <law@redhat.com>
6246
6247 Revert:
6248
6249 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6250 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6251 avoid goto.
6252
6253 2014-05-02 Marek Polacek <polacek@redhat.com>
6254
6255 PR c/60784
6256 * c-typeck.c (push_init_level): Set constructor_designated to
6257 p->designated for structures.
6258
6259 2014-05-01 Marek Polacek <polacek@redhat.com>
6260
6261 PR c/60915
6262 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6263 function-definition has an attribute after the declarator.
6264
6265 2014-05-01 Marek Polacek <polacek@redhat.com>
6266
6267 PR c/60257
6268 * c-typeck.c (warning_init): Add location_t parameter. Call
6269 warning_at instead of warning.
6270 (push_init_level): Pass input_location to warning_init.
6271 (add_pending_init): Add location_t parameter. Pass loc to
6272 warning_init.
6273 (set_nonincremental_init): Pass input_location to add_pending_init.
6274 (set_nonincremental_init_from_string): Likewise.
6275 (output_init_element): Pass loc to warning_init and to
6276 add_pending_init.
6277
6278 2014-05-01 Marek Polacek <polacek@redhat.com>
6279
6280 PR c/43395
6281 * c-typeck.c (c_finish_return): Distinguish between label and variable
6282 when warning about returning local address.
6283
6284 2014-05-01 Marek Polacek <polacek@redhat.com>
6285
6286 PR c/29467
6287 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6288 in C89 mode.
6289
6290 2014-05-01 Marek Polacek <polacek@redhat.com>
6291
6292 PR c/43245
6293 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6294 instead of 0 to WARN_FOR_QUALIFIERS.
6295
6296 2014-05-01 Marek Polacek <polacek@redhat.com>
6297
6298 PR c/56989
6299 * c-typeck.c (default_conversion): Use better location for
6300 error call.
6301
6302 2014-04-30 Marek Polacek <polacek@redhat.com>
6303
6304 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6305 also when SANITIZE_FLOAT_DIVIDE is on.
6306
6307 2014-04-30 Marek Polacek <polacek@redhat.com>
6308
6309 PR c/60139
6310 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6311 and pedwarn_init. Use loc insted of input_location.
6312
6313 2014-04-30 Marek Polacek <polacek@redhat.com>
6314
6315 PR c/60351
6316 * c-typeck.c (build_binary_op): Use location when warning about
6317 shift count.
6318
6319 2014-04-25 Marek Polacek <polacek@redhat.com>
6320
6321 PR c/18079
6322 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6323 always_inline/noinline and hot/cold attributes.
6324
6325 2014-04-25 Marek Polacek <polacek@redhat.com>
6326
6327 PR c/60114
6328 * c-parser.c (c_parser_initelt): Pass input_location to
6329 process_init_element.
6330 (c_parser_initval): Pass loc to process_init_element.
6331 * c-tree.h (process_init_element): Adjust declaration.
6332 * c-typeck.c (push_init_level): Pass input_location to
6333 process_init_element.
6334 (pop_init_level): Likewise.
6335 (set_designator): Likewise.
6336 (output_init_element): Add location_t parameter. Pass loc to
6337 digest_init.
6338 (output_pending_init_elements): Pass input_location to
6339 output_init_element.
6340 (process_init_element): Add location_t parameter. Pass loc to
6341 output_init_element.
6342
6343 2014-04-24 Jakub Jelinek <jakub@redhat.com>
6344
6345 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6346 atomic-clause, allow comma in between atomic-clause and
6347 seq_cst.
6348
6349 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6350
6351 PR c/59073
6352 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6353 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6354
6355 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6356
6357 PR middle-end/60469
6358 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6359 create_tmp_var instead build_decl for creating temps.
6360 (build_array_notation_expr): Likewise.
6361 (fix_conditional_array_notations_1): Likewise.
6362 (fix_array_notation_expr): Likewise.
6363 (fix_array_notation_call_expr): Likewise.
6364
6365 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6366
6367 PR c++/60689
6368 * c-tree.h (c_build_function_call_vec): New prototype.
6369 * c-typeck.c (build_function_call_vec): Don't call
6370 resolve_overloaded_builtin here.
6371 (c_build_function_call_vec): New wrapper function around
6372 build_function_call_vec. Call resolve_overloaded_builtin here.
6373 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6374 Call c_build_function_call_vec instead of build_function_call_vec.
6375 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6376 * c-decl.c (finish_decl): Likewise.
6377
6378 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6379
6380 PR c/55383
6381 * c-typeck.c: Use correct format string in cast-qual warning
6382
6383 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6384
6385 * c-decl.c (c_decl_attributes): Use
6386 lang_hooks.types.omp_mappable_type.
6387 * c-typeck.c (c_finish_omp_clauses): Likewise.
6388
6389 2014-03-06 Marek Polacek <polacek@redhat.com>
6390
6391 PR c/60197
6392 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6393 of checking tree code.
6394
6395 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6396
6397 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6398 (c_parser_parameter_declaration): Likewise.
6399
6400 2014-02-19 Marek Polacek <polacek@redhat.com>
6401
6402 PR c/60195
6403 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6404 Call mark_exp_read on exp.value.
6405 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6406 TREE_ADDRESSABLE on old instead of val.
6407 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6408
6409 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6410
6411 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6412 C_EXPR_APPEND by vec_safe_push.
6413 * c-tree.h (C_EXPR_APPEND): Remove.
6414
6415 2014-01-31 Marek Polacek <polacek@redhat.com>
6416
6417 PR c/59963
6418 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6419 build_function_call_vec.
6420 (build_function_call): Likewise.
6421 (build_atomic_assign): Likewise.
6422 (build_function_call_vec): Add arg_loc parameter. Use it.
6423 (convert_arguments): Likewise.
6424 (convert_for_assignment): Rename rhs_loc to expr_loc.
6425 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6426 (c_parser_objc_keywordexpr): Likewise.
6427 (c_parser_postfix_expression_after_primary): Call
6428 build_function_call_vec with expr_loc rather than op_loc.
6429 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6430 build_function_call_vec.
6431 (c_parser_expr_list): Add locations parameter. Fill it with locations
6432 of function arguments.
6433 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6434
6435 2014-01-30 Marek Polacek <polacek@redhat.com>
6436
6437 PR c/59940
6438 * c-typeck.c (build_function_call_vec): Use loc parameter.
6439 (convert_arguments): Add location parameter. Use it.
6440 (ep_convert_and_check): Likewise.
6441 (build_atomic_assign): Adjust convert_for_assignment call.
6442 (build_modify_expr): Likewise.
6443 (digest_init): Likewise.
6444 (c_finish_return): Likewise.
6445 (build_conditional_expr): Adjust ep_convert_and_check calls.
6446 (convert_for_assignment): Add rhs_loc parameter. Use it.
6447 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6448 calls.
6449
6450 2014-01-30 Richard Biener <rguenther@suse.de>
6451
6452 PR c/59905
6453 * c-typeck.c (build_function_call_vec): Do not replace calls
6454 to a function via an incompatible type with a runtime abort.
6455
6456 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6457
6458 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6459 flag_enable_cilkplus with flag_cilkplus.
6460 (c_parser_direct_declarator_inner): Likewise.
6461 (c_parser_attribute_any_word): Likewise.
6462 (c_parser_attributes): Likewise.
6463 (c_parser_compound_statement): Likewise.
6464 (c_parser_statement_after_labels): Likewise.
6465 (c_parser_if_statement): Likewise.
6466 (c_parser_switch_statement): Likewise.
6467 (c_parser_do_statement): Likewise.
6468 (c_parser_for_statement): Likewise.
6469 (c_parser_unary_expression): Likewise.
6470 (c_parser_postfix_expression): Likewise.
6471 (c_parser_postfix_expression_after_primary): Likewise.
6472 (c_parser_postfix_expression_after_primary): Likewise.
6473 (c_parser_omp_clause_name): Likewise.
6474 (c_finish_omp_declare_simd): Likewise.
6475 (c_parser_cilk_verify_simd): Likewise.
6476 * c-typeck.c (build_array_ref): Likewise.
6477 (build_function_call_vec): Likewise.
6478 (convert_arguments): Likewise.
6479 (build_compound_expr): Likewise.
6480 (c_finish_return): Likewise.
6481 (c_finish_if_stmt): Likewise.
6482 (c_finish_loop): Likewise.
6483 (build_binary_op): Likewise.
6484
6485 2014-01-23 Marek Polacek <polacek@redhat.com>
6486
6487 PR c/59846
6488 * c-typeck.c (parser_build_binary_op): Use location instead of
6489 input_location.
6490 (build_binary_op): Pass location to shorten_compare.
6491
6492 2014-01-23 Marek Polacek <polacek@redhat.com>
6493
6494 PR c/58346
6495 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6496 an empty aggregate.
6497
6498 2014-01-23 Marek Polacek <polacek@redhat.com>
6499
6500 PR c/59871
6501 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6502 of a comma expression.
6503 (emit_side_effect_warnings): Likewise.
6504
6505 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6506
6507 PR c/59825
6508 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6509 function to use walk_tree and moved a lot of its functionality to
6510 expand_array_notations.
6511 (expand_array_notations): New function.
6512
6513 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6514
6515 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6516 attribute an attribute without value.
6517
6518 2014-01-23 Jakub Jelinek <jakub@redhat.com>
6519
6520 PR middle-end/58809
6521 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6522 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6523
6524 2014-01-22 Marek Polacek <polacek@redhat.com>
6525
6526 PR c/59891
6527 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6528 of remove_c_maybe_const_expr on op1 and op2.
6529
6530 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6531
6532 PR c/58943
6533 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6534 effects, preevaluate rhs using SAVE_EXPR first.
6535
6536 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6537
6538 PR c++/59631
6539 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6540 statements with if-elseif statements.
6541
6542 2014-01-06 Marek Polacek <polacek@redhat.com>
6543
6544 PR c/57773
6545 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6546 defined bit-field types only in ISO C.
6547
6548 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6549
6550 Update copyright years
6551
6552 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6553
6554 * c-array-notation.c: Use the standard form for the copyright notice.
6555
6556 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6557
6558 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6559 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6560 field in parser is not empty. If not-empty, call the function
6561 c_parser_finish_omp_declare_simd.
6562 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6563 between SIMD-enabled functions and #pragma simd. Added new parameter.
6564 (c_parser_cilk_all_clauses): Modified the usage of the function
6565 c_parser_cilk_clause_vectorlength as mentioned above.
6566 (c_parser_cilk_simd_fn_vector_attrs): New function.
6567 (c_finish_cilk_simd_fn_tokens): Likewise.
6568 (is_cilkplus_vector_p): Likewise.
6569 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6570 "nomask," and "mask" strings in clause name.
6571 (c_parser_omp_all_clauses): Added 3 new case statements:
6572 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6573 PRAGMA_CILK_CLAUSE_NOMASK.
6574 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6575 check for vector attribute and if so call the function
6576 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6577 called the function c_finish_cilk_simd_fn_tokens.
6578 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6579 parser field is non-empty. If so, parse them as you would parse
6580 the omp declare simd pragma.
6581 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6582 Added a check when step is a parameter and flag it as error.
6583 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6584 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6585 pragma_omp_clause.
6586
6587 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6588
6589 * c-parser.c (c_parser_omp_parallel): Fix description.
6590
6591 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6592
6593 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6594 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6595 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6596 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6597
6598 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6599
6600 PR c/52023
6601 * c-parser.c (c_parser_alignas_specifier): Use
6602 c_sizeof_or_alignof_type instead of c_alignof.
6603 (c_parser_alignof_expression): Likewise, with min_alignof
6604 parameter depending on alignof spelling used.
6605
6606 2013-12-04 Marek Polacek <polacek@redhat.com>
6607
6608 PR c/54113
6609 * c-decl.c (start_function): Don't warn for missing prototype for
6610 inline functions.
6611
6612 2013-12-03 Marek Polacek <polacek@redhat.com>
6613
6614 PR c/59351
6615 * c-decl.c (build_compound_literal): Allow compound literals with
6616 empty initial value.
6617
6618 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6619
6620 PR c/58235
6621 * c-typeck.c (build_modify_expr): Diagnose assignment to
6622 expression with array type.
6623
6624 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6625
6626 PR c/42262
6627 * c-typeck.c (process_init_element): Do not treat a string as
6628 initializing a whole array when used with a designator for an
6629 individual element.
6630
6631 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6632
6633 PR c/57574
6634 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6635 an inline function following a static declaration.
6636
6637 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6638
6639 PR c/59310
6640 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6641 to p_name before calling c_parser_omp_teams instead of after.
6642 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6643 argument. Remove unused p_name variable.
6644
6645 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6646 Jakub Jelinek <jakub@redhat.com>
6647
6648 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6649 external_scope is NULL.
6650
6651 2013-11-27 Tom de Vries <tom@codesourcery.com>
6652 Marc Glisse <marc.glisse@inria.fr>
6653
6654 PR c++/59032
6655 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6656
6657 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6658
6659 * c-typeck.c: Add required include files from gimple.h.
6660
6661 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6662
6663 * c-decl.c (define_label, shadow_tag_warned)
6664 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6665 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6666 (declspecs_add_type): Remove use of in_system_header macro.
6667 * c-parser.c (c_parser_unary_expression): Likewise.
6668 * c-typeck.c (store_init_value, process_init_element)
6669 (c_start_case): Likewise.
6670
6671 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6672 macro.
6673
6674 * c-parser.c (c_parser_set_source_position_from_token): Remove
6675 reference to in_system_header from comment.
6676
6677 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6678
6679 * c-decl.c (grokdeclarator): Update comment to refer to
6680 tree_to_[su]hwi rather than tree_low_cst.
6681
6682 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6683
6684 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6685 tree_to_uhwi throughout.
6686
6687 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6688
6689 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6690 throughout.
6691
6692 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6693
6694 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6695 throughout.
6696
6697 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6698
6699 * c-parser.c (c_parser_cilk_simd): New.
6700 (c_parser_cilk_verify_simd): New.
6701 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6702 (c_parser_omp_for_loop): Add case for NE_EXPR.
6703 Set c_break_label for CILK_SIMD.
6704 (c_parser_cilk_clause_vectorlength): New.
6705 (c_parser_cilk_clause_linear): New.
6706 (c_parser_cilk_clause_name): New.
6707 (c_parser_cilk_all_clauses): New.
6708 * c-typeck.c (build_unary_op): Pass location argument to
6709 readonly_error.
6710 (build_modify_expr): Same.
6711 (build_asm_expr): Same.
6712 (c_finish_bc_stmt): Error on break/continue in loops.
6713
6714 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6715
6716 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6717
6718 2013-11-14 Diego Novillo <dnovillo@google.com>
6719
6720 * c-decl.c: Include print-tree.h.
6721 Include stor-layout.h.
6722 Include varasm.h.
6723 Include attribs.h.
6724 Include stringpool.h.
6725 * c-lang.c: Include fold-const.h.
6726 * c-parser.c: Include stringpool.h.
6727 Include attribs.h.
6728 Include stor-layout.h.
6729 Include varasm.h.
6730 Include trans-mem.h.
6731 * c-typeck.c: Include stor-layout.h.
6732 Include trans-mem.h.
6733 Include varasm.h.
6734 Include stmt.h.
6735
6736 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6737
6738 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6739 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6740 __auto_type.
6741 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6742 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6743 RID_AUTO_TYPE.
6744 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6745 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6746 (c_parser_declarator, c_parser_direct_declarator_inner)
6747 (c_parser_parameter_declaration, c_parser_type_name): All callers
6748 changed.
6749 (c_parser_declaration_or_fndef): Handle declarations with type
6750 determined from the initializer.
6751
6752 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6753
6754 * c-typeck.c: Include gimplify.h.
6755
6756 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6757
6758 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6759 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6760 comment.
6761 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6762 or _Thread_local as appropriate in diagnostics.
6763 (build_null_declspecs): Initialize ret->thread_gnu_p.
6764 (declspecs_add_scspec): Handle either __thread or _Thread_local
6765 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6766 pedantic. Do not disallow _Thread_local extern and _Thread_local
6767 static.
6768
6769 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6770 Andrew MacLeod <amacleod@redhat.com>
6771
6772 * c-aux-info.c (gen_type): Handle atomic qualifier.
6773 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6774 qualifiers when compating types.
6775 (shadow_tag_warned): Handle atomic_p in declspecs.
6776 (quals_from_declspecs): Likewise.
6777 (start_decl): Use c_type_promotes_to when promoting argument
6778 types.
6779 (grokdeclarator): Handle _Atomic.
6780 (get_parm_info): Diagnose any qualifier on "void" as only
6781 parameter.
6782 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6783 comparing types. Use c_type_promotes_to when promoting argument
6784 types.
6785 (finish_function): Use c_type_promotes_to when promoting argument
6786 types.
6787 (build_null_declspecs): Handle atomic_p in declspecs.
6788 (declspecs_add_qual): Handle RID_ATOMIC.
6789 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6790 (c_token_starts_declspecs): Handle RID_ATOMIC.
6791 (c_parser_declspecs): Handle atomic type specifiers and
6792 qualifiers.
6793 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6794 from types of expressions with atomic type.
6795 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6796 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6797 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6798 (c_parser_statement_after_labels, c_parser_switch_statement)
6799 (c_parser_for_statement, c_parser_expr_no_commas)
6800 (c_parser_conditional_expression, c_parser_binary_expression)
6801 (c_parser_cast_expression, c_parser_unary_expression)
6802 (c_parser_postfix_expression)
6803 (c_parser_postfix_expression_after_primary, c_parser_expression):
6804 Use convert_lvalue_to_rvalue.
6805 (c_parser_expression_conv, c_parser_expr_list): Document
6806 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6807 (c_parser_objc_synchronized_statement): Use
6808 convert_lvalue_to_rvalue.
6809 (c_parser_objc_selector): Handle RID_ATOMIC.
6810 (c_parser_objc_receiver, c_parser_array_notation): Use
6811 convert_lvalue_to_rvalue.
6812 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6813 _Atomic (type-name).
6814 (struct c_declspecs): Add atomic_p field.
6815 (convert_lvalue_to_rvalue): Declare.
6816 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6817 corresponding atomic types.
6818 (qualify_type): Don't add _Atomic qualifiers from second argument.
6819 (comp_target_types): Do not allow _Atomic mismatches.
6820 (type_lists_compatible_p): Do not remove atomic qualifiers when
6821 comparing types.
6822 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6823 (build_atomic_assign): New functions.
6824 (build_unary_op): Use build_atomic_assign for atomic increment and
6825 decrement.
6826 (build_conditional_expr): Do not treat _Atomic void as a qualified
6827 version of void.
6828 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6829 (find_anonymous_field_with_type, convert_to_anonymous_field)
6830 (convert_for_assignment): Do not remove atomic qualifiers when
6831 comparing types.
6832 (digest_init): Do not accept initialization of arrays of atomic
6833 elements by string constants.
6834 (build_asm_expr): Use convert_lvalue_to_rvalue.
6835 (build_binary_op): Do not treat _Atomic void as a qualified
6836 version of void.
6837
6838 2013-11-06 DJ Delorie <dj@redhat.com>
6839
6840 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6841 both explicit and builtin, print the location of the explicit one.
6842
6843 2013-11-05 Tobias Burnus <burnus@net-b.de>
6844
6845 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6846 c_parser_omp_distribute, c_parser_omp_teams,
6847 c_parser_omp_target, c_parser_omp_declare): Handle
6848 -fopenmp-simd.
6849
6850 2013-11-03 Marek Polacek <polacek@redhat.com>
6851
6852 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6853
6854 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6855
6856 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6857 check_dup_generic at the end, unless remove is true.
6858 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6859 remove = true;.
6860 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6861
6862 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6863
6864 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6865 with decl that is not pointer nor array.
6866
6867 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6868
6869 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6870 a spawning function is found.
6871 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6872 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6873 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6874 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6875 case.
6876 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6877 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6878 expr.
6879 (c_finish_return): Added a check to reject _Cilk_spawn in return
6880 expression.
6881 (build_cilk_spawn): New function.
6882 (build_cilk_sync): Likewise.
6883 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6884
6885 2013-10-27 Tobias Burnus <burnus@net-b.de>
6886
6887 PR other/33426
6888 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6889 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6890 (c_parser_statement_after_labels): Update calls.
6891
6892 2013-10-24 Tobias Burnus <burnus@net-b.de>
6893
6894 PR other/33426
6895 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6896 Handle PRAGMA_IVDEP.
6897 (c_parser_statement_after_labels): Update call.
6898
6899 2013-10-24 Marek Polacek <polacek@redhat.com>
6900
6901 * c-parser.c (c_parser_struct_declaration): Add a comment.
6902 (c_parser_declarator): Don't allow _Alignas here.
6903
6904 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6905
6906 * c-parser.c: Include omp-low.h.
6907 * c-typeck.c: Likewise.
6908
6909 2013-10-17 Marek Polacek <polacek@redhat.com>
6910
6911 PR c/58267
6912 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6913 Document syntax of the array-declarator.
6914 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6915 are not permitted.
6916 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6917 (c_parser_struct_declaration): Likewise.
6918 (c_parser_declarator): Likewise.
6919 (c_parser_direct_declarator_inner): Likewise.
6920 (c_parser_parameter_declaration): Likewise.
6921 (c_parser_type_name): Likewise.
6922
6923 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6924
6925 * c-lang.h (current_omp_declare_target_attribute): New extern
6926 decl.
6927 * c-parser.c: Include c-lang.h.
6928 (struct c_parser): Change tokens to c_token *.
6929 Add tokens_buf field. Change tokens_avail type to unsigned int.
6930 (c_parser_consume_token): If parser->tokens isn't
6931 &parser->tokens_buf[0], increment parser->tokens.
6932 (c_parser_consume_pragma): Likewise.
6933 (enum pragma_context): Add pragma_struct and pragma_param.
6934 (c_parser_external_declaration): Adjust
6935 c_parser_declaration_or_fndef caller.
6936 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6937 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6938 Adjust recursive call.
6939 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6940 of pragma_external.
6941 (c_parser_parameter_declaration): Use pragma_param instead of
6942 pragma_external.
6943 (c_parser_compound_statement_nostart, c_parser_label,
6944 c_parser_for_statement): Adjust
6945 c_parser_declaration_or_fndef callers.
6946 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6947 it through to c_parser_conditional_expression.
6948 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6949 pass it through to c_parser_binary_expression. Adjust recursive
6950 call.
6951 (c_parser_binary_expression): Remove prec argument, add
6952 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6953 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6954 binop matches it, use build2 instead of parser_build_binary_op.
6955 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6956 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6957 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6958 Handle pragma_struct and pragma_param the same as pragma_external.
6959 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6960 (c_parser_omp_variable_list): Parse array sections for
6961 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6962 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6963 (c_parser_omp_clause_reduction): Handle user defined reductions.
6964 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6965 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6966 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6967 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6968 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6969 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6970 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6971 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6972 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6973 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6974 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6975 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6976 (c_parser_omp_for_loop): Add CODE argument, pass it through
6977 to c_finish_omp_for. Change last argument to cclauses,
6978 and adjust uses to grab parallel clauses from the array of all
6979 the split clauses. Adjust c_parser_binary_expression,
6980 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6981 (omp_split_clauses): New function.
6982 (c_parser_omp_simd): New function.
6983 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6984 Allow the function to be called also when parsing combined constructs,
6985 and call c_parser_omp_simd when parsing for simd.
6986 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6987 #pragma omp section, require exactly one structured-block instead of
6988 sequence of statements.
6989 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6990 Allow the function to be called also when parsing combined constructs.
6991 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6992 Allow the function to be called also when parsing combined
6993 constructs.
6994 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6995 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6996 c_parser_omp_teams, c_parser_omp_target_data,
6997 c_parser_omp_target_update, c_parser_omp_target,
6998 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6999 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7000 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7001 (c_parser_omp_construct): Add p_name and mask vars. Handle
7002 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7003 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7004 and c_parser_omp_sections callers.
7005 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7006 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7007 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7008 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7009 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7010 OMP_CLAUSE_DEPEND.
7011 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7012 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7013 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7014 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7015 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7016 * c-typeck.c: Include tree-inline.h.
7017 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7018 handle_omp_array_sections_1, handle_omp_array_sections,
7019 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7020 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7021 user defined reductions.
7022 (c_tree_equal): New function.
7023 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7024 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7025 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7026 c_check_omp_declare_reduction_r): New prototypes.
7027 * c-decl.c (current_omp_declare_target_attribute): New variable.
7028 (c_decl_attributes): New function.
7029 (start_decl, start_function): Use it instead of decl_attributes.
7030 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7031 c_omp_reduction_decl, c_omp_reduction_lookup,
7032 c_check_omp_declare_reduction_r): New functions.
7033
7034 2013-09-25 Tom Tromey <tromey@redhat.com>
7035
7036 * Make-lang.in (c/gccspec.o): Remove.
7037 (CFLAGS-c/gccspec.o): New variable.
7038 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7039 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7040 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7041
7042 2013-09-25 Tom Tromey <tromey@redhat.com>
7043
7044 * Make-lang.in (c/gccspec.o): Don't use subshell.
7045
7046 2013-09-18 Marek Polacek <polacek@redhat.com>
7047
7048 PR sanitize/58443
7049 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7050 Remove unnecessary check.
7051
7052 2013-09-18 Marek Polacek <polacek@redhat.com>
7053
7054 PR sanitizer/58411
7055 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7056 no_sanitize_undefined attribute.
7057
7058 2013-09-13 Kai Tietz <ktietz@redhat.com>
7059
7060 PR target/57848
7061 * c-decl.c (c_builtin_function_ext_scope): Remove
7062 wrong assumption that it is never called on prexisting
7063 symbol.
7064
7065 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7066
7067 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7068
7069 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7070
7071 * c-objc-common.c (c_tree_printer): Tidy.
7072
7073 2013-08-30 Marek Polacek <polacek@redhat.com>
7074
7075 * c-typeck.c (build_binary_op): Add division by zero and shift
7076 instrumentation.
7077
7078 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
7079 Joseph Myers <joseph@codesourcery.com>
7080
7081 PR c/35649
7082 * c-typeck.c (c_common_type): Prefer double_type_node over
7083 other REAL_TYPE types with the same precision.
7084 (convert_arguments): Likewise.
7085
7086 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7087
7088 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7089 (c_initialize_diagnostics): Call a destructor for the early printer.
7090
7091 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7092
7093 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7094 printer initialization.
7095
7096 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
7097
7098 PR c/57490
7099 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7100 check for truth values.
7101 (expand_array_notation_exprs): Added truth values case. Removed an
7102 unwanted else. Added for-loop to walk through subtrees in default
7103 case.
7104
7105 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7106
7107 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7108
7109 2013-07-23 Joseph Myers <joseph@codesourcery.com>
7110
7111 * c-parser.c (struct c_generic_association): Fix typo.
7112
7113 2013-07-23 Tom Tromey <tromey@redhat.com>
7114 Joseph Myers <joseph@codesourcery.com>
7115
7116 * c-parser.c (struct c_generic_association): New.
7117 (c_generic_association_d): New typedef.
7118 (c_parser_generic_selection): New function.
7119 (c_parser_postfix_expression): Handle RID_GENERIC.
7120
7121 2013-07-13 Jason Merrill <jason@redhat.com>
7122
7123 PR c++/57793
7124 * c-decl.c (finish_struct): Check for too-large class.
7125
7126 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7127
7128 PR c/57821
7129 * c-typeck.c (set_init_index): When folding, check for index overflow.
7130
7131 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7132
7133 * c-parser.c (c_parser_array_notation): Removed rejection of array
7134 notations in an array of function pointers.
7135
7136 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7137
7138 * c-array-notation.c (make_triplet_val_inv): New function.
7139 (create_cmp_incr): Likewise.
7140 (create_array_refs): Likewise.
7141 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7142 Also modularized common parts between functions and called the function.
7143 (build_array_notation_expr): Likewise.
7144 (fix_conditional_array_notations_1): Likewise.
7145 (fix_array_notation_expr): Likewise.
7146 (fix_array_notation_call_expr): Likewise.
7147
7148 2013-06-18 Marek Polacek <polacek@redhat.com>
7149
7150 PR c/57630
7151 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7152
7153 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7154
7155 * c-array-notation.c (build_array_notation_expr): Reject array notation
7156 mismatch between LHS and RHS even inside a call_expr. Also, removed
7157 a couple while statements that were dead code.
7158
7159 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7160
7161 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7162 excessive precision expressions in function parameters. Also removed
7163 couple unwanted while statements.
7164
7165 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7166
7167 * c-array-notation.c (expand_array_notation_exprs): Added
7168 ARRAY_NOTATION_REF case.
7169
7170 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7171
7172 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7173 function to c-family/array-notation-common.c.
7174 (is_cilkplus_reduce_builtin): Likewise.
7175 (find_rank): Likewise.
7176 (extract_array_notation_exprs): Likewise.
7177 (replace_array_notations): Likewise.
7178 (find_inv_trees): Likewise.
7179 (replace_inv_trees): Likewise.
7180 (contains_array_notation_expr): Likewise.
7181 (find_correct_array_notation_type): Likewise.
7182 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7183 (struct inv_list): Moved this to c-family/array-notation-common.c.
7184 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7185
7186 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7187
7188 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7189 reduction functions outside the for-loop. Added a check if the fundecl
7190 is non-NULL. Finally, removed an unwanted if-statement, and made the
7191 body unconditional.
7192
7193 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7194
7195 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7196 condition of the if-statement matches the rank of else-block and then-
7197 block when array notations are used.
7198 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7199 expression after the entire function body is parsed.
7200 (c_parser_expr_no_commas): Delayed creating array notation expressions
7201 to the end of function parsing.
7202 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7203 whole if-statement instead of just the condition.
7204 (expand_array_notation_exprs): Added MODIFY_EXPR case.
7205
7206 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7207
7208 PR c/57474
7209 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7210 array to NULL_TREE if they are unused. Also added a check for the
7211 field to be NULL before its fields are used in future.
7212
7213 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7214
7215 PR bootstrap/57450
7216 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7217 (build_array_notation_expr): Likewise.
7218
7219 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7220
7221 * c-typeck.c (build_array_ref): Added a check to see if array's
7222 index is greater than one. If true, then emit an error.
7223 (build_function_call_vec): Exclude error reporting and checking
7224 for builtin array-notation functions.
7225 (convert_arguments): Likewise.
7226 (c_finish_return): Added a check for array notations as a return
7227 expression. If true, then emit an error.
7228 (c_finish_loop): Added a check for array notations in a loop
7229 condition. If true then emit an error.
7230 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7231 (build_binary_op): Added a check for array notation expr inside
7232 op1 and op0. If present, we call another function to find correct
7233 type.
7234 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7235 * c-parser.c (c_parser_compound_statement): Check if array
7236 notation code is used in tree, if so, then transform them into
7237 appropriate C code.
7238 (c_parser_expr_no_commas): Check if array notation is used in LHS
7239 or RHS, if so, then build array notation expression instead of
7240 regular modify.
7241 (c_parser_postfix_expression_after_primary): Added a check for
7242 colon(s) after square braces, if so then handle it like an array
7243 notation. Also, break up array notations in unary op if found.
7244 (c_parser_direct_declarator_inner): Added a check for array
7245 notation.
7246 (c_parser_compound_statement): Added a check for array notation in
7247 a stmt. If one is present, then expand array notation expr.
7248 (c_parser_if_statement): Likewise.
7249 (c_parser_switch_statement): Added a check for array notations in
7250 a switch statement's condition. If true, then output an error.
7251 (c_parser_while_statement): Similarly, but for a while.
7252 (c_parser_do_statement): Similarly, but for a do-while.
7253 (c_parser_for_statement): Similarly, but for a for-loop.
7254 (c_parser_unary_expression): Check if array notation is used in a
7255 pre-increment or pre-decrement expression. If true, then expand
7256 them.
7257 (c_parser_array_notation): New function.
7258 * c-array-notation.c: New file.
7259 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7260
7261 2013-05-23 Mike Stump <mikestump@comcast.net>
7262
7263 * c-typeck.c (convert_for_assignment): Handle references to memory
7264 spaces better.
7265
7266 2013-05-16 Jason Merrill <jason@redhat.com>
7267
7268 * Make-lang.in (cc1$(exeext)): Use link mutex.
7269
7270 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7271
7272 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7273 to simply use OPT_Wpointer_arith.
7274 (build_unary_op): Likewise.
7275
7276 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7277
7278 PR c/19449
7279 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7280 argument. If set, or it temporarily for parsing of the first
7281 argument into force_folding_builtin_constant_p.
7282 (c_parser_postfix_expression): Adjust callers.
7283
7284 2013-03-21 Richard Biener <rguenther@suse.de>
7285
7286 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7287 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7288
7289 2013-02-12 Marek Polacek <polacek@redhat.com>
7290
7291 PR c/44938
7292 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7293 origtypes to NULL.
7294
7295 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7296
7297 PR c/56078
7298 * c-typeck.c (set_nonincremental_init_from_string): If
7299 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7300 returned false.
7301 (process_init_element): Likewise.
7302
7303 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7304
7305 PR c++/55619
7306 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7307 argument, don't call default_function_array_conversion
7308 nor c_fully_fold here.
7309 (c_parser_asm_statement): Adjust callers.
7310 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7311 and outputs here, and call default_function_array_conversion
7312 on inputs that don't need to be addressable.
7313
7314 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7315
7316 PR c/39464
7317 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7318 warning require that both c_common_unsigned_type as well as
7319 c_common_signed_type is the same for both mvl and mvr types.
7320
7321 2012-11-16 Diego Novillo <dnovillo@google.com>
7322
7323 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7324
7325 * c-common.c: Use new vec API in vec.h.
7326 * c-common.h: Likewise.
7327 * c-gimplify.c: Likewise.
7328 * c-pragma.c: Likewise.
7329 * c-pretty-print.c: Likewise.
7330 * c-pretty-print.h: Likewise.
7331 * c-semantics.c: Likewise.
7332 * c-decl.c: Likewise.
7333 * c-parser.c: Likewise.
7334 * c-tree.h: Likewise.
7335 * c-typeck.c: Likewise.
7336
7337 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7338
7339 PR c++/54930
7340 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7341
7342 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7343
7344 PR c/53066
7345 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7346 shadows a function, unless the variable is a function or a
7347 pointer-to-function.
7348
7349 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7350
7351 PR c/54381
7352 * c-parser.c (struct c_tree_loc_pair): Removed.
7353 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7354 add location_t * and tree * arguments, fill in array of 3
7355 sizeof_arg trees and corresponding locs.
7356 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7357 c_parser_expr_list callers.
7358 (c_parser_postfix_expression_after_primary): Likewise. Pass
7359 array of 3 sizeof_arg trees and locs (corresponding to first
7360 3 arguments) to sizeof_pointer_memaccess_warning.
7361
7362 2012-10-09 Lawrence Crowl <crowl@google.com>
7363
7364 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7365 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7366 hash table.
7367
7368 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7369
7370 PR c++/54194
7371 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7372 call.
7373
7374 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7375
7376 PR c++/54427
7377 * c-typeck.c: Include c-common.h.
7378 (enum stv_conv): Moved to c-common.h.
7379 (scalar_to_vector): Moved to c-common.c.
7380 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7381 * Make-lang.in: c-typeck.c depends on c-common.h.
7382
7383 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7384
7385 * c-decl.c (c_write_global_declarations): Fix handling of
7386 -fdump-ada-spec*.
7387
7388 2012-09-30 Sharad Singhai <singhai@google.com>
7389
7390 * c-decl.c (c_write_global_declarations): Use a different method
7391 to determine if the dump has ben initialized.
7392
7393 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7394
7395 PR c/54552
7396 * c-typeck.c (c_cast_expr): When casting to a type requiring
7397 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7398 c_fully_fold first.
7399
7400 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7401
7402 PR c/54103
7403 * c-typeck.c (build_unary_op): Pass original argument of
7404 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7405 any C_MAYBE_CONST_EXPR, if it has integer operands.
7406 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7407 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7408 to c_objc_common_truthvalue_conversion, then remove any
7409 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7410 c_objc_common_truthvalue_conversion not
7411 c_common_truthvalue_conversion.
7412 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7413 call note_integer_operands for arguments with integer operands
7414 that are not integer constants.
7415
7416 2012-09-13 Jakub Jelinek <jakub@redhat.com>
7417
7418 PR c/54559
7419 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7420 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7421
7422 2012-08-31 Jakub Jelinek <jakub@redhat.com>
7423
7424 PR c/54428
7425 * c-convert.c (convert): Don't call fold_convert_loc if
7426 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7427 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7428 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7429
7430 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7431
7432 PR c/54355
7433 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7434 for nested and empty_ok arguments in the call to
7435 c_parser_declaration_or_fndef.
7436
7437 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7438
7439 * c-tree.h (c_last_sizeof_arg): Declare.
7440 * c-parser.c (struct c_tree_loc_pair): New type.
7441 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7442 non-NULL.
7443 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7444 (c_parser_postfix_expression_after_primary): Likewise. Call
7445 sizeof_pointer_memaccess_warning if needed.
7446 (sizeof_ptr_memacc_comptypes): New function.
7447 * c-typeck.c (c_last_sizeof_arg): New global variable.
7448 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7449
7450 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7451
7452 * c-lang.h (lang_decl): Add variable_size GTY option.
7453
7454 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7455
7456 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7457 * Make-lang.in: Fix dependencies.
7458
7459 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7460
7461 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7462 and add language Makefile hooks.
7463 * config-lang.in: New file.
7464 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7465 add the required "normal" config-lang.in rules.
7466 * c-lang.h: Moved from gcc/ to here.
7467 * c-tree.h: Likewise.
7468 * c-objc-common.c: Likewise.
7469 * c-objc-common.h: Likewise.
7470 * c-typeck.c: Likewise.
7471 * c-convert.c: Likewise.
7472 * c-lang.c: Likewise.
7473 * c-aux-info.c: Likewise.
7474 * c-errors.c: Likewise.
7475 * gccspec.c: Likewise.
7476 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7477 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7478 \f
7479 Copyright (C) 2012-2021 Free Software Foundation, Inc.
7480
7481 Copying and distribution of this file, with or without modification,
7482 are permitted in any medium without royalty provided the copyright
7483 notice and this notice are preserved.
This page took 0.330166 seconds and 6 git commands to generate.