1 2021-09-28 Andrew Pinski <apinski@marvell.com>
4 * c-parser.c (c_parser_statement_after_labels): Pass
5 the c_expr instead of the tree to c_finish_goto_ptr.
6 * c-typeck.c (c_finish_goto_ptr): Change the second
7 argument type to c_expr.
8 * c-tree.h (c_finish_goto_ptr): Likewise.
9 Error out if the expression was not of a pointer type.
11 2021-09-22 Jakub Jelinek <jakub@redhat.com>
13 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
16 2021-09-18 Jakub Jelinek <jakub@redhat.com>
18 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
19 and reproducible modifiers.
20 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
22 2021-09-18 Jakub Jelinek <jakub@redhat.com>
24 * c-parser.c (c_parser_omp_clause_default): Handle private and
25 firstprivate arguments, adjust diagnostics on unknown argument.
27 2021-09-17 Jakub Jelinek <jakub@redhat.com>
29 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
32 2021-09-10 Jakub Jelinek <jakub@redhat.com>
34 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
35 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
36 don't call build_conditional_expr, instead build a COND_EXPR directly.
37 (c_parser_binary_expression): Avoid calling parser_build_binary_op
38 if omp_atomic_lhs even in more cases for >, < or ==.
39 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
40 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
41 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
42 * c-typeck.c (build_binary_op): For flag_openmp only handle
45 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
47 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
50 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
52 * c-decl.c (enum deprecated_states): Add unavailable state.
53 (merge_decls): Copy unavailability.
54 (quals_from_declspecs): Handle unavailable case.
55 (start_decl): Amend the logic handling suppression of nested
56 deprecation states to include unavailability.
57 (smallest_type_quals_location): Amend comment.
58 (grokdeclarator): Handle the unavailable deprecation state.
59 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
60 * c-tree.h (struct c_declspecs): Add unavailable_p.
61 * c-typeck.c (build_component_ref): Handle unavailability.
62 (build_external_ref): Likewise.
64 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
65 Joseph Myers <joseph@codesourcery.com>
68 * c-decl.c (duplicate_decls): On significant mismatches, mark the
69 types of both (non-function) decls as error_mark_node, so that the
70 middle-end can see the code is malformed.
71 (free_attr_access_data): Don't process if the type has been set to
74 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
76 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
77 and 'ancestor' in 'target device' clauses.
79 2021-08-23 Jakub Jelinek <jakub@redhat.com>
81 * c-parser.c (c_parser_omp_clause_num_tasks,
82 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
84 2021-08-22 Martin Uecker <muecker@gwdg.de>
87 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
88 for pointers to arrays with qualifiers.
89 (build_conditional_expr): For C23 don't lose qualifiers for pointers
90 to arrays when the other pointer is a void pointer. Update warnings.
91 (convert_for_assignment): Update warnings for C2X when converting from
92 void* with qualifiers to a pointer to array with the same qualifiers.
94 2021-08-20 Jakub Jelinek <jakub@redhat.com>
96 * c-parser.c (c_parser_omp_error): New function.
97 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
99 2021-08-20 Jakub Jelinek <jakub@redhat.com>
101 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
102 comma at the end of list.
103 (c_parser_omp_requires): Likewise.
105 2021-08-19 Jakub Jelinek <jakub@redhat.com>
107 * c-parser.c (c_parser_omp_requires): Don't call
108 c_parser_peek_2nd_token and optionally consume token if current
109 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
111 2021-08-18 Jakub Jelinek <jakub@redhat.com>
113 * c-parser.c (c_parser_omp_nothing): New function.
114 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
116 2021-08-18 Jakub Jelinek <jakub@redhat.com>
118 * c-parser.c (c_parser_statement_after_labels): Add restart label
119 near the start of the function. If c_parser_pragma returns false,
121 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
122 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
123 return what c_parser_omp_declare returned. Return true instead of
124 false after emitting errors that the directive is not allowed in
126 (c_parser_omp_ordered): Return true instead of
127 false after emitting errors that the directive is not allowed in
129 (c_parser_omp_target_update): Likewise.
130 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
131 Change return type from tree to bool, return false if the
132 directive should be ignored in pragma_stmt contexts.
133 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
134 return their result directly.
135 (c_parser_omp_cancellation_point): Change return type from void to
136 bool, return false if the directive should be ignored in pragma_stmt
138 (c_parser_omp_declare): Likewise.
140 2021-08-17 Jakub Jelinek <jakub@redhat.com>
142 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
143 (c_parser_omp_scope): New function.
144 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
146 2021-08-12 Jakub Jelinek <jakub@redhat.com>
148 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
149 (c_parser_omp_clause_filter): New function.
150 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
151 (OMP_MASKED_CLAUSE_MASK): Define.
152 (c_parser_omp_masked): New function.
153 (c_parser_omp_parallel): Handle parallel masked.
154 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
155 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
157 2021-08-12 Martin Uecker <muecker@gwdg.de>
161 * c-typeck.c (c_expr_sizeof_type): Evaluate
162 size expressions for structs of variable size.
164 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
166 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
167 'primary' as alias for 'master'.
169 2021-08-10 Martin Uecker <muecker@gwdg.de>
172 * c-typeck.c (c_expr_sizeof_expr): Evaluate
173 size expressions for structs of variable size.
175 2021-08-06 Tamar Christina <tamar.christina@arm.com>
177 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
178 * c-tree.h (c_simulate_enum_decl): Likewise.
180 2021-08-06 Martin Sebor <msebor@redhat.com>
182 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
183 vec arguments to by-reference.
184 (c_finish_omp_declare_simd): Same.
185 (c_parser_compound_statement_nostart): Same.
186 (c_parser_for_statement): Same.
187 (c_parser_objc_methodprotolist): Same.
188 (c_parser_oacc_routine): Same.
189 (c_parser_omp_for_loop): Same.
190 (c_parser_omp_declare_simd): Same.
192 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
193 Joseph Myers <joseph@codesourcery.com>
194 Cesar Philippidis <cesar@codesourcery.com>
196 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
197 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
198 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
199 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
201 2021-07-20 Martin Sebor <msebor@redhat.com>
203 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
205 * c-typeck.c (c_build_function_call_vec): Same.
207 2021-07-15 Martin Sebor <msebor@redhat.com>
211 * c-decl.c (get_parm_array_spec): Strip nops.
213 2021-07-06 Martin Sebor <msebor@redhat.com>
215 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
217 2021-07-02 Jakub Jelinek <jakub@redhat.com>
220 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
221 appears before a CPP_NAME.
223 2021-06-25 Martin Sebor <msebor@redhat.com>
225 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
226 warning_suppressed_p, suppress_warning, and copy_no_warning.
227 (diagnose_mismatched_decls): Same.
228 (duplicate_decls): Same.
229 (grokdeclarator): Same.
230 (finish_function): Same.
231 (c_write_global_declarations_1): Same.
232 * c-fold.c (c_fully_fold_internal): Same.
233 * c-parser.c (c_parser_expr_no_commas): Same.
234 (c_parser_postfix_expression): Same.
235 * c-typeck.c (array_to_pointer_conversion): Same.
236 (function_to_pointer_conversion): Same.
237 (default_function_array_conversion): Same.
238 (convert_lvalue_to_rvalue): Same.
239 (default_conversion): Same.
240 (build_indirect_ref): Same.
241 (build_function_call_vec): Same.
242 (build_atomic_assign): Same.
243 (build_unary_op): Same.
244 (c_finish_return): Same.
245 (emit_side_effect_warnings): Same.
246 (c_finish_stmt_expr): Same.
247 (c_omp_clause_copy_ctor): Same.
249 2021-06-24 Jakub Jelinek <jakub@redhat.com>
252 * c-parser.c (c_parser_has_attribute_expression): Set source range for
255 2021-06-24 Jakub Jelinek <jakub@redhat.com>
258 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
261 2021-06-24 Jakub Jelinek <jakub@redhat.com>
263 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
264 C_ORT_OMP for clauses on target construct.
265 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
266 (c_parser_omp_target): For non-combined target add
267 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
268 C_ORT_OMP_TARGET to c_finish_omp_clauses.
269 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
270 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
271 never present on C_ORT_*DECLARE_SIMD.
272 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
273 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
274 corresponding map clauses.
276 2021-06-21 Jakub Jelinek <jakub@redhat.com>
279 * c-typeck.c (c_mark_addressable): Diagnose trying to make
280 bit-fields addressable.
282 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
284 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
287 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
290 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
291 var in the error case.
293 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
296 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
297 spot built-in functions.
299 2021-06-06 Jakub Jelinek <jakub@redhat.com>
302 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
303 even when target is combined with other constructs.
305 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
308 * c-decl.c (finish_struct): Fix thinko in previous change.
309 * c-typeck.c (convert_for_assignment): Do not warn on pointer
310 assignment and initialization for storage order purposes if the
311 RHS is a call to a DECL_IS_MALLOC function.
313 2021-06-04 Martin Sebor <msebor@redhat.com>
316 * c-objc-common.c (print_type): Handle erroneous types.
318 2021-06-03 Jakub Jelinek <jakub@redhat.com>
321 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
322 after depend only cases.
324 2021-05-31 Richard Biener <rguenther@suse.de>
327 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
328 * c-parser.c (c_parser_postfix_expression): Likewise.
330 2021-05-28 Richard Biener <rguenther@suse.de>
333 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
334 invalid if conditions.
336 2021-05-28 Jakub Jelinek <jakub@redhat.com>
339 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
340 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
341 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
342 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
343 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
344 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
345 if present in map_head, map_field_head or map_firstprivate_head
348 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
350 * c-parser.c (c_parser_omp_clause_affinity): New.
351 (c_parser_omp_clause_name, c_parser_omp_variable_list,
352 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
353 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
354 c_finish_omp_clauses): Likewise.
356 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
359 * c-decl.c (finish_struct): Warn for a union containing an aggregate
360 field with a differing scalar storage order.
362 2021-05-21 Jakub Jelinek <jakub@redhat.com>
365 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
366 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
367 if a decl is mentioned both in map clause and in such firstprivate
368 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
370 2021-05-19 Jakub Jelinek <jakub@redhat.com>
373 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
374 master when combined with taskloop.
375 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
376 parallel master when not combined with taskloop.
378 2021-05-18 Richard Biener <rguenther@suse.de>
381 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
382 Diagnose calls to non-functions.
383 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
385 2021-05-17 Richard Biener <rguenther@suse.de>
388 * gimple-parser.c (c_parser_gimple_label): Avoid building
389 a GIMPLE label with NULL label decl.
391 2021-05-13 Martin Sebor <msebor@redhat.com>
394 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
396 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
398 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
401 2021-05-10 Martin Liska <mliska@suse.cz>
403 * c-aux-info.c (affix_data_type): Use startswith
404 function instead of strncmp.
405 * c-typeck.c (build_function_call_vec): Likewise.
406 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
408 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
410 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
411 on the address of a pointer field in a record with reverse SSO.
413 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
415 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
416 for || and && reductions.
418 2021-04-29 Joseph Myers <joseph@codesourcery.com>
420 * c-typeck.c (function_types_compatible_p): For C2X, treat
421 unprototyped function as compatible with non-variadic prototyped
422 function even if some argument types are changed by the default
425 2021-04-15 Martin Sebor <msebor@redhat.com>
429 * c-decl.c (pushdecl): Always propagate type attribute.
431 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
434 * c-typeck.c (c_common_type): Do not drop attributes that
435 affect type identity.
437 2021-04-10 Jakub Jelinek <jakub@redhat.com>
440 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
443 2021-03-25 Jakub Jelinek <jakub@redhat.com>
446 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
449 2021-03-19 Jakub Jelinek <jakub@redhat.com>
452 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
453 with modifycode NOP_EXPR produces and mark the _Atomic var as read
455 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
456 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
457 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
459 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
462 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
463 ensure that the varpool node is marked as offloadable.
465 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
468 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
470 2021-02-24 Martin Sebor <msebor@redhat.com>
473 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
475 2021-02-18 Jakub Jelinek <jakub@redhat.com>
478 * c-typeck.c (c_finish_return): Don't wrap retval into
479 EXCESS_PRECISION_EXPR in functions that return void.
481 2021-02-11 Marek Polacek <polacek@redhat.com>
483 * c-parser.c (c_parser_if_statement): Use vec_free.
485 2021-02-04 Martin Sebor <msebor@redhat.com>
488 * c-decl.c (locate_old_decl): Add type to diagnostic output.
489 (diagnose_mismatched_decls): Same.
490 (start_function): Introduce temporaries for better readability.
491 * c-typeck.c (comptypes_internal): Only consider complete enum
492 types in comparisons with integers.
494 2021-02-01 Martin Sebor <msebor@redhat.com>
497 * c-decl.c (free_attr_access_data): New function.
498 (c_parse_final_cleanups): Call free_attr_access_data.
500 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
502 * c-parser.c (c_parser_omp_clause_detach): New.
503 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
504 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
505 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
506 clause. Prevent use of detach with mergeable and overriding the
507 data sharing mode of the event handle.
509 2021-01-15 Jakub Jelinek <jakub@redhat.com>
511 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
512 unqualified element type and then call c_build_qualified_type on the
515 2021-01-07 Richard Biener <rguenther@suse.de>
517 * gimple-parser.c (c_parser_gimple_compound_statement): Only
518 reallocate loop array if it is too small.
520 2020-12-16 Martin Uecker <muecker@gwdg.de>
523 * c-typeck.c (build_modify_expr): Drop qualifiers.
525 2020-12-16 Martin Uecker <muecker@gwdg.de>
528 * c-parser.c (c_parser_expression): Look into
529 nop expression when marking expressions as read.
531 2020-12-14 Martin Liska <mliska@suse.cz>
534 * c-typeck.c (pointer_diff): Do not emit a top-level
536 (build_binary_op): Likewise.
538 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
540 * c-parser.c (c_parser_omp_allocate): New.
541 (c_parser_omp_construct): Call it.
543 2020-12-09 Richard Biener <rguenther@suse.de>
546 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
549 2020-12-07 Martin Uecker <muecker@gwdg.de>
552 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
553 that drops qualifiers to the end of the function.
555 2020-11-26 Martin Uecker <muecker@gwdg.de>
559 * c-parser.c (c_parser_declaration_or_fndef): Remove
560 redundant code to drop qualifiers of _Atomic types for __auto_type.
561 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
562 types for __typeof__.
564 2020-11-24 Jakub Jelinek <jakub@redhat.com>
567 * c-parser.c (c_parser_binary_expression): For omp atomic binary
568 expressions, use make_node instead of build2 to avoid checking build2
571 2020-11-23 Joseph Myers <joseph@codesourcery.com>
574 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
575 for comparisons of complete and incomplete pointers.
577 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
579 * c-aux-info.c (gen_type): Support opaque types.
581 2020-11-20 Martin Sebor <msebor@redhat.com>
584 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
586 2020-11-20 Jakub Jelinek <jakub@redhat.com>
589 * Make-lang.in (c.serial): Change from goal to a variable.
590 (.PHONY): Drop c.serial.
592 2020-11-20 Martin Uecker <muecker@gwdg.de>
594 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
596 2020-11-19 Jakub Jelinek <jakub@redhat.com>
599 * c-decl.c (get_parm_array_spec): Bail out of nelts is
602 2020-11-18 Jakub Jelinek <jakub@redhat.com>
604 * Make-lang.in (c.serial): New goal.
605 (.PHONY): Add c.serial c.prev.
606 (cc1$(exeext)): Call LINK_PROGRESS.
608 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
610 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
612 * c-typeck.c (build_asm_expr): Remove an assert checking output
613 absence for asm goto.
615 2020-11-13 Jakub Jelinek <jakub@redhat.com>
617 * c-typeck.c (c_finish_omp_clauses): Don't clear
618 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
620 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
623 * c-parser.c (c_parser_objc_class_definition): Pass the
624 location of the class name to the interface declaration.
626 2020-11-10 Strager Neds <strager.nds@gmail.com>
628 * c-decl.c (merge_decls): Use new overload of
629 set_decl_section_name.
631 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
633 * c-parser.c (c_parser_omp_target_data): Add use of
634 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
635 handled map clause kind.
636 (c_parser_omp_target_enter_data): Likewise.
637 (c_parser_omp_target_exit_data): Likewise.
638 (c_parser_omp_target): Likewise.
639 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
640 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
641 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
642 same struct field access to co-exist on OpenMP construct.
644 2020-11-07 Martin Uecker <muecker@gwdg.de>
646 * c-parser.c (c_parser_label): Implement mixing of labels and code.
647 (c_parser_all_labels): Likewise.
649 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
651 * c-parser.c (c_parser_objc_at_property_declaration):
652 Improve parsing fidelity. Associate better location info
653 with @property attributes. Clean up the interface to
654 objc_add_property_declaration ().
656 2020-11-06 Nathan Sidwell <nathan@acm.org>
658 * c-decl.c (diagnose_mismatched_decls): Rename
659 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
660 (warn_if_shadowing, implicitly_declare, names_builtin_p)
661 (collect_source_refs): Likewise.
662 * c-typeck.c (inform_declaration, inform_for_arg)
663 (convert_for_assignment): Likewise.
665 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
667 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
669 (c_parser_omp_construct): Update call.
671 2020-11-04 Jakub Jelinek <jakub@redhat.com>
674 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
675 find underlying decl to clear in the aligned_head bitmap.
677 2020-11-04 Joseph Myers <joseph@codesourcery.com>
679 * c-decl.c (handle_nodiscard_attribute): New.
680 (std_attribute_table): Add nodiscard.
681 * c-parser.c (c_parser_std_attribute): Expect argument to
682 nodiscard attribute to be a string. Do not special-case ignoring
684 * c-typeck.c (maybe_warn_nodiscard): New.
685 (build_compound_expr, emit_side_effect_warnings): Call
686 maybe_warn_nodiscard.
687 (c_process_expr_stmt, c_finish_stmt_expr): Also call
688 emit_side_effect_warnings if warn_unused_result.
690 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
692 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
694 (finish_init): Likewise.
695 (pop_init_level): Likewise.
697 2020-10-28 Joseph Myers <joseph@codesourcery.com>
699 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
700 error_at for omitted parameter name.
702 2020-10-28 Jakub Jelinek <jakub@redhat.com>
704 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
705 (c_parser_omp_clause_allocate): New function.
706 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
707 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
708 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
709 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
710 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
711 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
712 PRAGMA_OMP_CLAUSE_ALLOCATE.
713 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
715 2020-10-27 Joseph Myers <joseph@codesourcery.com>
717 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
720 2020-10-23 Marek Polacek <polacek@redhat.com>
723 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
724 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
725 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
726 * c-tree.h (char_type_p): Declare.
727 * c-typeck.c (char_type_p): No longer static.
729 2020-10-23 Martin Sebor <msebor@redhat.com>
732 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
734 2020-09-19 Martin Sebor <msebor@redhat.com>
737 * c-decl.c (lookup_last_decl): Define new function.
738 (c_decl_attributes): Call it.
739 (start_decl): Add argument and use it.
740 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
741 (get_parm_array_spec): Define new function.
742 (push_parm_decl): Call get_parm_array_spec.
743 (start_function): Call warn_parm_array_mismatch. Build attribute
744 access and add it to current function.
745 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
746 in forms of array parameters.
747 * c-tree.h (start_decl): Add argument.
749 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
751 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
754 (start_function): Adjust for above change.
755 (c_push_function_context, c_pop_function_context): Likewise.
756 * c-lang.h (struct language_function): Likewise.
757 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
758 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
760 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
761 (c_parser_switch_statement): Adjust break/switch context handling
762 and calls to renamed functions.
763 (c_parser_while_statement): Adjust break/switch context handling and
765 (c_parser_do_statement): Ditto, with DO_STMT respectively.
766 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
767 (c_parser_omp_for_loop): Adjust break/switch context handling.
768 * c-tree.h (c_break_label, c_cont_label): Delete.
769 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
770 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
771 (in_statement, switch_statement_break_seen_p): Declare.
772 (c_start_case, c_finish_case): Renamed to...
773 (c_start_switch, c_finish_switch).
774 (c_finish_bc_stmt): Adjust arguments.
775 * c-typeck.c (build_function_call_vec): Don't try to print
776 statements with %qE format.
777 (struct c_switch): Rename switch_expr field to switch_stmt.
778 Add break_stmt_seen_p field.
779 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
780 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
781 (do_case): Update for changes to struct c_switch.
782 (c_finish_case): Rename to c_finish_switch. Update for changes to
783 struct c_switch and change of representation from SWITCH_EXPR to
785 (c_finish_loop): Delete.
786 (c_finish_bc_stmt): Update to reflect changes to break/continue
787 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
788 of a GOTO_EXPR except for objc foreach loops.
790 2020-09-01 Jakub Jelinek <jakub@redhat.com>
793 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
796 2020-08-28 Martin Sebor <msebor@redhat.com>
799 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
802 2020-08-27 Martin Liska <mliska@suse.cz>
804 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
805 growth function to true.
807 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
810 * c-typeck.c (handle_omp_array_sections_1): Talk about
811 array function parameter in the error message.
813 2020-08-18 Jakub Jelinek <jakub@redhat.com>
816 * c-parser.c (c_parser_generic_selection): Change match_found from bool
817 to int, holding index of the match. Call mark_exp_read on the selector
818 expression and on expressions other than the selected one.
820 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
823 * c-typeck.c (process_init_element): Split test for whether to
824 recurse into a record, union or array into...
825 (initialize_elementwise_p): ...this new function. Don't recurse
826 into a vector type if the initialization value is also a vector.
828 2020-07-31 Richard Biener <rguenther@suse.de>
831 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
832 Define to c_common_finalize_early_debug.
834 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
836 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
837 (c_parser_omp_critical): Permit hint(0) clause without named critical.
838 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
840 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
843 * c-decl.c (finish_decl): Call target hook
844 lower_local_decl_alignment to lower local decl alignment.
846 2020-07-09 Julian Brown <julian@codesourcery.com>
847 Thomas Schwinge <thomas@codesourcery.com>
850 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
851 for standalone attach/detach clauses.
853 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
855 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
856 set, warn for conversion between pointers that point to incompatible
857 scalar storage orders.
859 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
861 * c-parser.c (c_parser_statement_after_labels): Pass correct
862 parameters to c_parser_do_statement.
864 2020-06-16 Jakub Jelinek <jakub@redhat.com>
866 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
868 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
869 premature c_fully_fold. Defer explicit c_fully_fold calls to after
871 * c-tree.h (c_in_omp_for): Declare.
872 * c-typeck.c (c_in_omp_for): Define.
873 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
874 (digest_init): Likewise.
875 (build_binary_op): Likewise.
877 2020-06-16 Jakub Jelinek <jakub@redhat.com>
879 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
880 from kind by comma rather than colon.
882 2020-06-05 Mark Wielaard <mark@klomp.org>
884 * c-decl.c (implicit_decl_warning): When warned and olddecl is
885 an undeclared builtin, then add a fixit header hint, if found.
886 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
887 warning_at about implicit builtin declaration type mismatch.
889 2020-06-03 Mark Wielaard <mark@klomp.org>
891 * c-parser.c (struct c_parser): Add seen_string_literal
893 (c_parser_consume_token): Reset seen_string_literal.
894 (c_parser_error_richloc): Add name_hint if seen_string_literal
895 and next token is a CPP_NAME and we have a missing header
896 suggestion for the name.
897 (c_parser_string_literal): Set seen_string_literal.
899 2020-06-03 Mark Wielaard <mark@klomp.org>
901 * c-parser.c (c_parser_postfix_expression_after_primary): Add
902 scope with matching_parens after CPP_OPEN_PAREN.
904 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
906 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
908 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
910 * Make-lang.in: Remove extra slash.
912 2020-05-19 Martin Liska <mliska@suse.cz>
914 * c-parser.c: Fix typo.
916 2020-05-14 Jakub Jelinek <jakub@redhat.com>
918 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
920 2020-05-07 Richard Biener <rguenther@suse.de>
923 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
926 2020-04-30 Jakub Jelinek <jakub@redhat.com>
929 * c-decl.c (set_labels_context_r): In addition to context-less
930 LABEL_DECLs adjust also LABEL_DECLs with context equal to
931 parent function if any.
932 (store_parm_decls): Adjust comment.
934 2020-04-19 Jakub Jelinek <jakub@redhat.com>
937 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
938 two CPP_COLON tokens.
940 2020-04-17 Jakub Jelinek <jakub@redhat.com>
943 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
946 2020-04-15 Jakub Jelinek <jakub@redhat.com>
949 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
950 requires directive when not at file scope.
952 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
955 * c-decl.c (c_check_in_current_scope): New function.
956 * c-tree.h (c_check_in_current_scope): Declare it.
957 * c-parser.c (c_parser_oacc_declare): Add check that variables
958 are declared in the same scope as the directive. Fix handling
961 2020-04-07 Jakub Jelinek <jakub@redhat.com>
964 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
965 if c_parser_omp_master succeeded.
967 2020-03-23 Jakub Jelinek <jakub@redhat.com>
969 PR gcov-profile/94029
971 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
972 the function_start_locus location. Don't do that afterwards for the
973 __GIMPLE body parsing.
975 2020-03-19 Jakub Jelinek <jakub@redhat.com>
977 PR gcov-profile/94029
978 * c-tree.h (finish_function): Add location_t argument defaulted to
980 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
981 set it to the locus of closing } if non-NULL.
982 (c_parser_compound_statement_nostart): Return locus of closing }.
983 (c_parser_parse_rtl_body): Likewise.
984 (c_parser_declaration_or_fndef): Propagate locus of closing } to
986 * c-decl.c (finish_function): Add end_loc argument, use it instead of
987 input_location to set function_end_locus.
989 2020-03-17 Jakub Jelinek <jakub@redhat.com>
992 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
993 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
994 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
995 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
997 (finish_incomplete_vars): New function, moved from finish_struct. Use
998 relayout_decl instead of layout_decl.
999 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1000 being TYPE_VFIELD. Use finish_incomplete_vars.
1001 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1002 finish_incomplete_vars.
1003 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1004 also on ENUMERAL_TYPEs.
1006 2020-03-16 Jakub Jelinek <jakub@redhat.com>
1009 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1011 2020-03-13 Martin Sebor <msebor@redhat.com>
1014 * c-decl.c (builtin_structptr_type_count): New constant.
1015 (match_builtin_function_types): Reject decls that are incompatible
1016 in types pointed to by pointers.
1017 (diagnose_mismatched_decls): Adjust comments.
1019 2020-03-05 Joseph Myers <joseph@codesourcery.com>
1022 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1023 empty when initialized type is error_mark_node.
1024 (set_designator, process_init_element): Ignore initializers for
1025 elements of a variable-size type or of error_mark_node.
1027 2020-03-01 Martin Sebor <msebor@redhat.com>
1030 * c-decl.c (types_close_enough_to_match): New function.
1031 (match_builtin_function_types):
1032 (diagnose_mismatched_decls): Add missing inform call to a warning.
1034 2020-03-01 Martin Sebor <msebor@redhat.com>
1037 * c-typeck.c (build_functype_attribute_variant): New function.
1038 (composite_type): Call it.
1040 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1043 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1044 Rename last argument from probablity to probability.
1046 2020-02-13 Jakub Jelinek <jakub@redhat.com>
1049 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1050 *expr if it has side effects.
1052 2020-01-30 Jeff Law <law@redhat.com>
1055 * c-parser.c (c_parser_switch_statement): Make sure to request
1056 marking the switch expr as used.
1058 2020-01-22 Joseph Myers <joseph@codesourcery.com>
1061 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1062 argument with integer operands.
1064 2020-01-16 Kerem Kat <keremkat@gmail.com>
1067 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1068 to support 4 available tokens.
1070 2020-01-15 Joseph Myers <joseph@codesourcery.com>
1073 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1074 determine whether to set DECL_CONTEXT.
1076 2020-01-13 Joseph Myers <joseph@codesourcery.com>
1079 * c-typeck.c (build_c_cast): Check for expressions with integer
1080 operands that can occur in an unevaluated part of an integer
1081 constant expression and call note_integer_operands as needed.
1083 2019-01-08 Richard Biener <rguenther@suse.de>
1086 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1089 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1091 Update copyright years.
1093 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1095 * c-decl.c (collect_source_ref_cb): Delete.
1096 (for_each_global_decl): Rename into...
1097 (collect_source_refs): ...this. Call collect_source_ref directly.
1098 (c_parse_final_cleanups): Always call collect_source_ref on the main
1101 2019-12-19 Julian Brown <julian@codesourcery.com>
1102 Cesar Philippidis <cesar@codesourcery.com>
1104 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1106 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1107 Allow deref (->) in variable lists if true.
1108 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1109 Pass to c_parser_omp_variable_list.
1110 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1111 call to c_parser_omp_variable_list.
1112 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1113 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1114 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1115 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1116 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1117 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1118 and detach. Support deref.
1119 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1120 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1121 (c_oacc_check_attachments): New function.
1122 (c_finish_omp_clauses): Check attach/detach arguments for being
1123 pointers using above. Support deref.
1125 2019-12-19 Julian Brown <julian@codesourcery.com>
1126 Maciej W. Rozycki <macro@codesourcery.com>
1127 Tobias Burnus <tobias@codesourcery.com>
1128 Thomas Schwinge <thomas@codesourcery.com>
1130 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1131 (c_parser_oacc_data_clause): Likewise.
1132 (c_parser_oacc_all_clauses): Likewise.
1133 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1134 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1135 PRAGMA_OACC_CLAUSE_NO_CREATE.
1136 * c-typeck.c (handle_omp_array_sections): Support
1139 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1141 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1142 Replace label_text ctor calls.
1144 2019-12-04 Joseph Myers <joseph@codesourcery.com>
1148 * c-typeck.c (convert_lvalue_to_rvalue): Call
1149 require_complete_type for arguments not of void types.
1150 (build_indirect_ref): Do not diagnose dereferencing pointers to
1152 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1154 2019-12-03 Joseph Myers <joseph@codesourcery.com>
1157 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1158 old-style parameter definitions.
1160 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1164 * c-decl.c (flexible_array_type_p): Move to common code.
1166 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1168 * c-decl.c (start_decl): Allow initialization of variables whose
1169 size is a POLY_INT_CST.
1170 (finish_decl): Use verify_type_context to check whether the target
1171 allows variables with a particular type to have static or thread-local
1172 storage duration. Don't raise a second error if such variables do
1173 not have a constant size.
1174 (grokdeclarator): Use verify_type_context to check whether the
1175 target allows fields or array elements to have a particular type.
1176 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1177 the target allows pointer difference for the types involved.
1178 (build_unary_op): Likewise for pointer increment and decrement.
1180 2019-11-29 Joseph Myers <joseph@codesourcery.com>
1182 * c-parser.c (struct c_parser): Add members raw_tokens and
1184 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1185 using previously-lexed raw tokens.
1186 (c_parser_peek_nth_token_raw)
1187 (c_parser_check_balanced_raw_token_sequence): New functions.
1188 (c_parser_nth_token_starts_std_attributes): Use
1189 c_parser_check_balanced_raw_token_sequence for Objective-C.
1191 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1194 * c-decl.c (finish_declspecs): Use int instead of decimal
1195 floating-point types if decimal floating-point not supported.
1197 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1199 * c-tree.h (struct c_declarator): Use a structure for id member.
1200 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1201 declarators at the start, not when handling individual declarators
1202 later. Use u.id.id instead of u.id.
1203 (grokfield): Use u.id.id instead of u.id.
1204 (build_id_declarator): Set u.id.id and u.id.attrs.
1205 (finish_declspecs): Handle postfix attributes in case of typedef
1206 name or typeof used.
1207 * c-parser.c (c_parser_direct_declarator)
1208 (c_parser_direct_declarator_inner): Place declarator for
1209 attributes inside that for function or array, not outside. Set
1210 u.id.attrs for identifiers.
1211 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1212 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1215 2019-11-22 Jakub Jelinek <jakub@redhat.com>
1218 * c-decl.c (identifier_global_tag): Define.
1220 2019-11-20 Richard Biener <rguenther@suse.de>
1223 * c-decl.c (grokdeclarator): Prevent inlining of nested
1224 function with VLA arguments.
1226 2019-11-20 Joseph Myers <joseph@codesourcery.com>
1228 * c-decl.c (c_warn_type_attributes): New function.
1229 (groktypename, grokdeclarator, finish_declspecs): Call
1230 c_warn_type_attributes before applying attributes to types.
1231 * c-tree.h (c_warn_type_attributes): Declare.
1233 2019-11-19 Joseph Myers <joseph@codesourcery.com>
1235 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1236 standard attributes.
1237 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1238 pedwarn for unknown standard attributes and return error_mark_node
1241 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1243 * c-parser.c (c_parser_parse_rtl_body): Always call
1244 run_rtl_passes, even if startwith pass is not provided.
1246 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1248 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1249 duplicate standard attributes.
1251 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1253 * c-decl.c (std_attribute_table): Add maybe_unused.
1255 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1257 * c-decl.c (std_attribute_table): Add fallthrough.
1258 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1259 attribute at top level.
1261 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1263 * c-decl.c (std_attribute_table): New.
1264 (c_init_decl_processing): Register attributes from
1265 std_attribute_table.
1266 * c-parser.c (c_parser_attribute_arguments): Add arguments
1267 require_string and allow_empty_args. All callers changed.
1268 (c_parser_std_attribute): Set require_string argument for
1269 "deprecated" attribute.
1271 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1273 * c-parser.c (c_parser_postfix_expression)
1274 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1275 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1277 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1279 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1280 of build_same_sized_truth_vector_type.
1281 (build_vec_cmp): Likewise.
1283 2019-11-14 Jakub Jelinek <jakub@redhat.com>
1285 * c-parser.c (c_parser_omp_context_selector): Don't require score
1286 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1289 * c-parser.c (c_parser_omp_context_selector): Rename
1290 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1291 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1292 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1293 and string literals.
1295 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1297 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1298 ctsk_tagfirstref_attrs.
1299 (struct c_declspecs): Update description of attrs. Add
1300 postfix_attrs and non_std_attrs_seen_p. Increase size of
1301 typespec_kind bit-field.
1302 (c_warn_unused_attributes): New declaration.
1303 (parser_xref_tag): Update prototype.
1304 * c-decl.c (c_warn_unused_attributes): New function.
1305 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1306 ctsk_tagref_attrs. Handle attribute declarations.
1307 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1308 (grokdeclarator): Handle standard attributes.
1309 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1310 attributes to incomplete type reference.
1311 (xref_tag): Update call to parser_xref_tag.
1312 (declspecs_add_addrspace, declspecs_add_type)
1313 (declspecs_add_scspec, declspecs_add_attrs): Set
1314 non_std_attrs_seen_p.
1315 (finish_declspecs): Apply postfix standard attributes to type.
1316 * c-parser.c (c_token_starts_declspecs)
1317 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1318 (c_parser_next_tokens_start_declaration): Update comments.
1319 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1320 parser->tokens[2] to parser->tokens[1].
1321 (c_parser_nth_token_starts_std_attributes)
1322 (c_parser_std_attribute_specifier_sequence): New functions.
1323 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1324 attrs. All callers changed. Handle standard attributes.
1325 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1326 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1327 All callers changed.
1328 (c_parser_declspecs): Add arguments start_std_attr_ok and
1329 end_std_attr_ok. All callers changed. Handle standard
1331 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1332 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1333 (c_parser_compound_statement_nostart, c_parser_all_labels)
1334 (c_parser_label, c_parser_statement, c_parser_for_statement):
1335 Handle standard attributes.
1336 * c-parser.h (c_parser_declspecs): Update prototype.
1337 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1340 2019-11-12 Martin Liska <mliska@suse.cz>
1342 * gimple-parser.c: Do not include params.h.
1344 2019-11-12 Martin Liska <mliska@suse.cz>
1346 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1347 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1350 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1351 Frederik Harwath <frederik@codesourcery.com>
1354 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1355 (c_parser_oacc_kernels_parallel): Rename function to...
1356 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1357 (c_parser_omp_construct): Update accordingly.
1360 2019-11-11 Jakub Jelinek <jakub@redhat.com>
1362 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1363 without corresponding end declare target.
1365 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1367 * c-convert.c (convert): Only handle vector conversions if one of
1368 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1370 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1371 vectors satisfy gnu_vector_type_p.
1372 (build_unary_op): Only allow unary operators to be applied to
1373 vectors if they satisfy gnu_vector_type_p.
1374 (digest_init): Only allow by-element initialization of vectors
1375 if they satisfy gnu_vector_type_p.
1376 (really_start_incremental_init): Likewise.
1377 (push_init_level): Likewise.
1378 (pop_init_level): Likewise.
1379 (process_init_element): Likewise.
1380 (build_binary_op): Only allow binary operators to be applied to
1381 vectors if they satisfy gnu_vector_type_p.
1383 2019-11-08 Joseph Myers <joseph@codesourcery.com>
1385 * c-decl.c (grokparms): Convert () in a function definition to
1387 (store_parm_decls_oldstyle): Pedwarn for C2x.
1388 (store_parm_decls): Update comment about () not generating a
1391 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1393 * c-parser.c (c_parser_attribute_arguments): New function.
1394 Factored out of c_parser_gnu_attribute.
1395 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1396 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1397 (c_parser_std_attribute_specifier): New functions.
1398 (c_parser_transaction_attributes): Use
1399 c_parser_std_attribute_specifier.
1401 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1403 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1404 lex_joined_string and translate_strings_p.
1405 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1407 (c_parser_string_literal): New function.
1408 (c_parser_static_assert_declaration_no_semi): Use
1409 c_parser_string_literal. Do not set lex_untranslated_string.
1410 (c_parser_asm_string_literal): Use c_parser_string_literal.
1411 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1412 (c_parser_gnu_attributes): Set and restore translate_strings_p
1413 instead of lex_untranslated_string.
1414 (c_parser_asm_statement): Do not set lex_untranslated_string.
1415 (c_parser_asm_operands): Likewise.
1416 (c_parser_has_attribute_expression): Set and restore
1417 translate_strings_p instead of lex_untranslated_string.
1418 (c_parser_postfix_expression): Use c_parser_string_literal.
1419 (pragma_lex): Likewise.
1420 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1421 (c_parse_file): Set translate_strings_p.
1422 * gimple-parser.c (c_parser_gimple_postfix_expression)
1423 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1424 * c-parser.c (c_parser_string_literal): Declare function.
1426 2019-11-02 Jakub Jelinek <jakub@redhat.com>
1428 * c-parser.c (c_finish_omp_declare_variant): Use
1429 omp_get_context_selector instead of c_omp_get_context_selector.
1431 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1433 * c-tree.h (c_simulate_enum_decl): Declare.
1434 * c-decl.c (c_simulate_enum_decl): New function.
1435 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1437 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1439 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1440 * c-decl.c (c_simulate_builtin_function_decl): New function.
1441 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1444 2019-10-28 Martin Sebor <msebor@redhat.com>
1447 * c-decl.c (names_builtin_p): Define a new function.
1449 2019-10-28 Richard Biener <rguenther@suse.de>
1452 * gimple-parser.c (c_parser_parse_gimple_body): Make
1453 current_bb the entry block initially to easier recover
1455 (c_parser_gimple_compound_statement): Adjust.
1457 2019-10-24 Jakub Jelinek <jakub@redhat.com>
1459 * c-parser.c (c_finish_omp_declare_variant): Use
1460 omp_context_selector_matches instead of
1461 c_omp_context_selector_matches.
1462 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1463 attribute in between declare target and end declare target
1466 2019-10-15 Joseph Myers <joseph@codesourcery.com>
1468 * c-parser.c (c_parser_attribute_any_word): Rename to
1469 c_parser_gnu_attribute_any_word. All callers changed.
1470 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1472 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1474 (c_parser_declaration_or_fndef, c_parser_declspecs)
1475 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1476 (c_parser_struct_declaration, c_parser_declarator)
1477 (c_parser_gnu_attribute, c_parser_compound_statement)
1478 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1479 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1480 attribute-related syntax productions.
1482 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1484 * c-objc-common.c (useful_aka_type_p): Replace with...
1485 (get_aka_type): ...this new function. Given the original type,
1486 decide which aka type to print (if any). Only look through typedefs
1487 if user_facing_original_type_p.
1488 (print_type): Update accordingly.
1490 2019-10-14 Jakub Jelinek <jakub@redhat.com>
1492 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1493 into int NESTED, if it is 2, diagnose missing commas in between
1495 (c_parser_omp_context_selector): Pass 2 as last argument to
1496 c_parser_omp_all_clauses.
1498 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1500 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1501 For simd properties, put them directly into TREE_VALUE.
1502 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1503 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1504 add "omp declare variant base" attribute rather than
1505 "omp declare variant".
1507 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1509 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1511 2019-10-10 Jakub Jelinek <jakub@redhat.com>
1513 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1514 true, terminate processing on closing paren and don't skip to end of
1516 (c_parser_omp_declare_simd): Handle also declare variant.
1517 (omp_construct_selectors, omp_device_selectors,
1518 omp_implementation_selectors, omp_user_selectors): New variables.
1519 (c_parser_omp_context_selector,
1520 c_parser_omp_context_selector_specification,
1521 c_finish_omp_declare_variant): New functions.
1522 (c_finish_omp_declare_simd): Handle both declare simd and
1524 (c_parser_omp_declare): Handle declare variant.
1526 2019-10-02 Joseph Myers <joseph@codesourcery.com>
1528 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1531 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1533 * c-objc-common.c (useful_aka_type_p): New function.
1534 (print_type): Use it to decide whether an aka type is worth printing.
1536 2019-09-27 Jakub Jelinek <jakub@redhat.com>
1539 * c-parser.c (c_parser_predefined_identifier): New function.
1540 (c_parser_postfix_expression): Use it.
1541 (c_parser_omp_variable_list): Parse predefined identifiers.
1542 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1543 in shared and firstprivate clauses, even when they are predetermined
1546 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1548 * c-typeck.c (build_function_call_vec): Take the original function
1549 decl as an optional final parameter. Pass all built-in calls to
1550 check_builtin_function_arguments.
1552 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1555 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1556 of identifiers in the external scope only for variables and functions.
1558 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1561 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1563 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1566 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1567 after determining that the first token is not
1568 PRAGMA_GCC_PCH_PREPROCESS.
1570 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1572 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1573 FUNCTION_DECL to the right value in the presence of nested declarators.
1575 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1578 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1580 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1583 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1584 of a built_in_function.
1585 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1587 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1589 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1590 (c_parser_omp_clause_device_type): New function.
1591 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1592 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1593 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1594 diagnostics for declare target with clauses nested in clause-less
1595 declare target declaration-definition-seq.
1596 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1598 2019-08-09 Jakub Jelinek <jakub@redhat.com>
1600 * c-parser.c (check_no_duplicate_clause): Simplify using
1602 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1603 directive name modifiers.
1604 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1607 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1608 check_no_duplicate_clause call. Comment it out, instead emit a
1609 warning for duplicate dist_schedule clauses.
1611 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1613 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1615 2019-08-08 Jakub Jelinek <jakub@redhat.com>
1617 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1618 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1619 instead of generic_head to track duplicates.
1621 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1623 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1624 (c_parser_omp_clause_use_device_addr): New function.
1625 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1626 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1627 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1628 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1629 map or use_device_* clauses.
1630 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1631 in OpenMP, require pointer type rather than pointer or array type.
1632 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1634 2019-07-31 Jakub Jelinek <jakub@redhat.com>
1637 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1638 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1641 2019-07-25 Martin Liska <mliska@suse.cz>
1642 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1645 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1647 2019-07-25 Martin Liska <mliska@suse.cz>
1649 * c-decl.c (merge_decls): Use new macros
1650 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1652 2019-07-23 Richard Biener <rguenther@suse.de>
1654 PR tree-optimization/83518
1655 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1656 a CFG also rebuild cgraph edges.
1658 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1660 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1661 (c_parser_omp_clause_bind): New function.
1662 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1663 (OMP_LOOP_CLAUSE_MASK): Define.
1664 (c_parser_omp_loop): New function.
1665 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1666 loop combined with parallel or teams.
1667 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1668 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1670 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1673 * c-decl.c (finish_function): Check targetm.warn_func_return
1674 before issuing a -Wreturn-type warning.
1676 2019-07-12 Alexandre Oliva <oliva@adacore.com>
1678 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1679 (c_parser_compound_statement): Call it.
1681 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1683 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1684 (c_parser_omp_clause_order): New function.
1685 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1686 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1687 PRAGMA_OMP_CLAUSE_ORDER.
1688 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1690 2019-07-10 Richard Biener <rguenther@suse.de>
1692 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1693 _Literal (int *) &x for address literals.
1695 2019-07-09 Martin Sebor <msebor@redhat.com>
1698 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1700 (field_decl_cmp): Same.
1701 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1703 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1705 2019-07-09 Martin Sebor <msebor@redhat.com>
1708 * c-decl.c: Change class-key from class to struct and vice versa
1709 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1710 * gimple-parser.c: Same.
1712 2019-07-01 Richard Biener <rguenther@suse.de>
1714 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1715 _Literal (char *) &"foo" for address literals pointing to
1718 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1720 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1721 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1722 C incompatibility if alternate "__intN__" form is used.
1724 2019-06-24 Martin Sebor <msebor@redhat.com>
1726 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1728 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1730 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1731 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1732 (c_parser_omp_scan_loop_body): New function.
1733 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1734 inscan reduction clauses.
1735 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1736 non-inscan reductions on the same construct, or inscan reductions with
1737 ordered or schedule clauses, or inscan array reductions.
1739 2019-06-05 Martin Sebor <msebor@redhat.com>
1742 * c-typeck.c (c_finish_return): Only consider functions returning
1743 pointers as candidates for -Wreturn-local-addr.
1745 2019-06-05 Martin Sebor <msebor@redhat.com>
1747 * c-decl.c (start_decl): Adjust quoting and hyphenation
1749 (finish_decl): Same.
1750 (finish_enum): Same.
1751 (start_function): Same.
1752 (declspecs_add_type): Same.
1753 * c-parser.c (warn_for_abs): Same.
1754 * c-typeck.c (build_binary_op): Same.
1756 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1759 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1760 marked with an OpenACC 'routine' directive.
1763 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1764 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1767 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1768 clauses from "omp declare target" attribute.
1770 2019-05-16 Martin Sebor <msebor@redhat.com>
1772 * c-decl.c (start_decl): Quote keywords, operators, and
1773 types in diagnostics.
1774 (finish_decl): Same.
1775 * c-parser.c (c_parser_asm_statement): Same.
1776 (c_parser_conditional_expression): Same.
1777 (c_parser_transaction_cancel): Same.
1778 * c-typeck.c (c_common_type): Same.
1779 (build_conditional_expr): Same.
1780 (digest_init): Same.
1781 (process_init_element): Same.
1782 (build_binary_op): Same.
1784 2019-05-17 Richard Biener <rguenther@suse.de>
1786 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1787 (c_parser_gimple_unary_expression): Likewise.
1788 (c_parser_gimple_parentized_ternary_expression): New function.
1790 2019-05-16 Richard Biener <rguenther@suse.de>
1792 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1793 (c_parser_gimple_unary_expression): Likewise.
1795 2019-05-15 Richard Biener <rguenther@suse.de>
1797 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1800 2019-05-14 Richard Biener <rguenther@suse.de>
1802 * gimple-parser.c (c_parser_gimple_statement): Remove
1803 questionable auto-promotion to VIEW_CONVERT_EXPR.
1804 (c_parser_gimple_typespec): Split out from __MEM parsing.
1805 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1806 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1807 as __VIEW_CONVERT with -gimple.
1809 2019-05-09 Martin Liska <mliska@suse.cz>
1811 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1813 (c_parser_gimple_unary_expression): Parse also binary expression
1815 (c_parser_gimple_parentized_binary_expression): New function.
1817 2019-05-09 Martin Liska <mliska@suse.cz>
1819 * gimple-parser.c (struct gimple_parser): Add probability.
1820 for gimple_parser_edge.
1821 (gimple_parser::push_edge): Add new argument probability.
1822 (c_parser_gimple_parse_bb_spec): Parse also probability
1824 (c_parser_parse_gimple_body): Set edge probability.
1825 (c_parser_gimple_compound_statement): Consume token
1826 before calling c_parser_gimple_goto_stmt.
1828 (c_parser_gimple_statement): Pass new argument.
1829 (c_parser_gimple_goto_stmt): Likewise.
1830 (c_parser_gimple_if_stmt): Likewise.
1831 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1832 * c-parser.c (c_parser_declaration_or_fndef): Pass
1833 hot_bb_threshold argument.
1834 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1836 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1838 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1841 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1842 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1843 (c_parser_do_statement): Likewise.
1844 (c_parser_for_statement): Likewise. Formatting fixes.
1845 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1846 emit DEBUG_BEGIN_STMTs if needed.
1848 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1851 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1852 (c_start_case): Don't clear it.
1853 (do_case): Adjust c_add_case_label caller.
1854 (c_finish_case): Adjust c_do_switch_warnings caller.
1857 * c-decl.c (merge_decls): If remove is main variant and
1858 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1859 variant that has newdecl as TYPE_NAME if any.
1861 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1864 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1865 don't try to remove it from the variant list, but instead assert
1868 2019-04-01 Richard Biener <rguenther@suse.de>
1871 * c-tree.h (c_get_alias_set): Declare.
1872 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1873 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1874 as the underlying integer type.
1876 2019-03-19 Martin Sebor <msebor@redhat.com>
1878 PR tree-optimization/89688
1879 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1880 kinds of initializers.
1882 2019-03-19 Jakub Jelinek <jakub@redhat.com>
1885 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1886 return type even if quals_used is 0. Formatting fixes.
1888 2019-03-14 Richard Biener <rguenther@suse.de>
1890 * c-tree.h (enum c_declspec_il): New.
1891 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1893 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1894 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1895 (c_parser_declspecs): Adjust.
1896 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1897 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1899 (struct gimple_parser): New.
1900 (gimple_parser::push_edge): New method.
1901 (c_parser_gimple_parse_bb_spec): New helper.
1902 (c_parser_parse_gimple_body): Get start pass and IL specification.
1903 Initialize SSA and CFG.
1904 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1905 Build a gimple_parser parsing state and pass it along.
1906 (c_parser_gimple_statement): Change intermittend __PHI internal
1907 function argument for the edge.
1908 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1909 (c_parser_gimple_goto_stmt): Record edges to build.
1910 (c_parser_gimple_if_stmt): Likewise.
1911 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1912 (c_parser_gimple_or_rtl_pass_list): Likewise.
1914 2019-03-11 Martin Liska <mliska@suse.cz>
1916 * c-decl.c (check_for_loop_decls): Wrap an option name
1917 in a string format message and fix GNU coding style.
1918 * c-parser.c (c_parser_declspecs): Likewise.
1920 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1922 PR tree-optimization/89550
1923 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1925 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1926 or warning returned true.
1928 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1931 * c-typeck.c (convert_arguments): Call inform_declaration only if
1932 the previous warning_at call returned true.
1934 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1936 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1937 parameter. Adjust all users.
1938 (c_parser_oacc_simple_clause): Replace parser with loc formal
1939 parameter. Adjust all users.
1941 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1944 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1945 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1947 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1950 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1951 before c_decl_attributes rather than after it.
1953 2019-02-06 Jakub Jelinek <jakub@redhat.com>
1956 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1957 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1958 instead of 3 nested ifs.
1960 2019-02-06 Joseph Myers <joseph@codesourcery.com>
1963 * c-decl.c (finish_decl): Do not complete array types for arrays
1964 with external linkage not at file scope.
1966 2019-02-05 Richard Biener <rguenther@suse.de>
1969 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1970 all type variants when not supported.
1972 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1975 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1976 * c-decl.c (decl_jump_unsafe): Return false for
1977 C_DECL_COMPOUND_LITERAL_P decls.
1978 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1980 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1983 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1987 * c-decl.c (last_fileptr_type): Remove.
1988 (last_structptr_types): New variable.
1989 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1990 {old,new}rettype instead of the types themselves. Assert
1991 last_structptr_types array has the same number of elements
1992 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1993 argument oldtype and newtype. Instead of handling
1994 just fileptr_type_node specially, handle all builtin_structptr_types
1995 pointer nodes. Formatting fix.
1997 2019-01-24 Martin Sebor <msebor@redhat.com>
2002 * c-decl.c (match_builtin_function_types): Add arguments.
2003 (diagnose_mismatched_decls): Diagnose mismatched declarations
2004 of built-ins more strictly.
2006 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2009 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2010 on #pragma omp cancel with different modifiers.
2012 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2016 * c-typeck.c (convert_for_assignment): Upate the
2017 warn_for_address_or_pointer_of_packed_member call.
2019 2019-01-16 Tom Honermann <tom@honermann.net>
2020 Jason Merrill <jason@redhat.com>
2022 * c-typeck.c (digest_init): Revised the error message produced for
2023 ill-formed cases of array initialization with a string literal.
2024 (error_init): Make variadic.
2026 2019-01-12 Jakub Jelinek <jakub@redhat.com>
2028 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2030 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2033 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2034 if current_function_decl is non-NULL.
2036 2019-01-07 Joseph Myers <joseph@codesourcery.com>
2040 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2041 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2042 functions declared but never defined only for external scope, not
2045 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2048 * c-parser.c (c_parser_postfix_expression): Parse
2049 __builtin_convertvector.
2051 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2053 Update copyright years.
2055 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2058 * c-typeck.c (convert_for_assignment): Call
2059 warn_for_address_or_pointer_of_packed_member.
2061 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2063 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2064 a more specific error message (instead of just falling through).
2066 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2068 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2069 asm qualifier is first seen; use that to give nicer "duplicate asm
2070 qualifier" messages. Delete 'quals" variable, instead pass the
2071 "is_volatile_ flag to build_asm_stmt directly.
2072 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2073 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2075 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2077 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2078 "done" boolean variable.
2080 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2083 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2084 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2085 (build_binary_op): Use struct op_location_t and
2086 class binary_op_rich_location.
2088 2018-12-11 Jakub Jelinek <jakub@redhat.com>
2091 * c-convert.c (convert): Call c_fully_fold before calling
2092 ubsan_instrument_float_cast.
2094 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2096 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2099 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2101 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2102 after asm. Pass a flag for it to build_asm_expr.
2103 * c-tree.h (build_asm_expr): Update declaration.
2104 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2107 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2110 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2111 combination of volatile and goto, in any order, without repetitions.
2113 2018-12-04 James Norris <jnorris@codesourcery.com>
2114 Cesar Philippidis <cesar@codesourcery.com>
2115 Julian Brown <julian@codesourcery.com>
2117 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2120 2018-11-30 Richard Biener <rguenther@suse.de>
2122 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2123 _Literal (type) { ... } as empty aggregate or vector constructor.
2125 2018-11-29 Martin Sebor <msebor@redhat.com>
2128 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2129 (convert_arguments): Add comments. Pass additional argument to
2132 2018-11-29 Martin Sebor <msebor@redhat.com>
2136 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2138 2018-11-23 Martin Sebor <msebor@redhat.com>
2141 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2142 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2144 2018-11-20 Martin Sebor <msebor@redhat.com>
2146 * c-parser.c (c_parser_has_attribute_expression): New function.
2147 (c_parser_attribute): New function.
2148 (c_parser_attributes): Move code into c_parser_attribute.
2149 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2151 2018-11-15 Martin Sebor <msebor@redhat.com>
2154 * c-decl.c (header_for_builtin_fn): Declare.
2155 (diagnose_mismatched_decls): Diagnose declarations of built-in
2156 functions without a prototype.
2157 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2158 (convert_argument): Same.
2159 (convert_arguments): Factor code out into convert_argument.
2160 Detect mismatches between built-in formal arguments in calls
2161 to built-in without prototype.
2162 (build_conditional_expr): Same.
2163 (type_or_builtin_type): New function.
2164 (convert_for_assignment): Add argument. Conditionally issue
2165 warnings instead of errors for mismatches.
2167 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2169 * c-decl.c: Replace "source_location" with "location_t".
2170 * c-tree.h: Likewise.
2171 * c-typeck.c: Likewise.
2172 * gimple-parser.c: Likewise.
2174 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2176 * c-parser.c (c_parser_omp_clause_final): Use
2177 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2178 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2179 parsing instead of c_parser_paren_condition.
2180 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2181 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2182 c_fully_fold instead of c_parser_condition.
2183 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2184 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2185 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2186 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2187 c_parser_expr_no_commas instead of c_parser_expression.
2189 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2190 reduction clause with inscan modifier.
2192 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2193 clauses other than atomic_default_mem_order.
2195 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2197 * c-parser.c: Include memmode.h.
2198 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2199 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2200 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2201 task_reduction clauses.
2202 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2203 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2204 section, or lvalue assignment expression.
2205 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2206 (c_parser_omp_clause_lastprivate): Parse optional
2207 conditional: modifier.
2208 (c_parser_omp_clause_hint): Require constant integer expression rather
2209 than just integer expression.
2210 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2212 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2213 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2214 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2216 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2217 iterators. Parse mutexinoutset and depobj kinds.
2218 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2220 (c_parser_omp_all_clauses): Likewise. Handle
2221 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2222 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2223 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2224 default memory order from requires directive if any. Adjust
2225 c_finish_omp_atomic caller.
2226 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2227 (c_parser_omp_flush): Parse flush with memory-order-clause.
2228 (c_parser_omp_for_loop): Allow NE_EXPR even in
2229 OpenMP loops, adjust c_finish_omp_for caller.
2230 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2231 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2232 Allow to be called while parsing combined parallel master.
2233 Parse combined master taskloop{, simd}.
2234 (c_parser_omp_parallel): Parse combined
2235 parallel master{, taskloop{, simd}} constructs.
2236 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2237 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2238 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2239 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2240 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2241 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2242 around teams body. Use SET_EXPR_LOCATION.
2243 (c_parser_omp_target_data): Allow target data
2244 with only use_device_ptr clauses.
2245 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2246 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2247 (c_parser_omp_requires): New function.
2248 (c_finish_taskloop_clauses): New function.
2249 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2250 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2251 declaration. Disallow in_reduction clause when combined with parallel
2253 (c_parser_omp_construct): Adjust c_parser_omp_master and
2254 c_parser_omp_taskgroup callers.
2255 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2257 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2258 like OMP_CLAUSE_REDUCTION.
2259 (handle_omp_array_sections): Likewise. Call save_expr on array
2260 reductions before calling build_index_type. Handle depend clauses
2262 (struct c_find_omp_var_s): New type.
2263 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2264 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2265 with static, runtime or auto schedule kinds. Call save_expr for whole
2266 array reduction sizes. Diagnose reductions with zero sized elements
2267 or variable length structures. Diagnose nogroup clause used with
2268 reduction clause(s). Handle depend clause with
2269 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2270 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2271 some different type for other kinds. Use build_unary_op with
2272 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2273 Handle depend clauses with iterators. Remove no longer needed special
2274 case that predetermined const qualified vars may be specified in
2275 firstprivate clause. Complain if const qualified vars are mentioned
2276 in data-sharing clauses other than firstprivate or shared. Use
2277 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2278 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2279 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2280 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2282 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2284 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2285 logic for change to name_hint::operator bool.
2286 (undeclared_variable): Likewise.
2287 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2288 (c_parser_parameter_declaration): Likewise.
2290 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2292 * c-errors.c (pedwarn_c11): New function.
2293 * c-parser.c (disable_extension_diagnostics): Save
2294 warn_c11_c2x_compat and set it to 0.
2295 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2296 (c_parser_static_assert_declaration_no_semi): Handle
2297 _Static_assert without string constant.
2298 * c-tree.h (pedwarn_c11): New prototype.
2300 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2302 * Make-lang.in (selftest-c): New.
2303 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2304 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2305 from gcc/Makefile.in.
2307 2018-10-02 Richard Biener <rguenther@suse.de>
2309 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2311 2018-09-26 Joseph Myers <joseph@codesourcery.com>
2314 * c-typeck.c (build_binary_op): Use excess precision for
2315 comparisons of integers and floating-point for C11 and later.
2317 2018-09-26 Martin Jambor <mjambor@suse.cz>
2320 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
2323 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2325 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2326 Update for new param.
2327 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2330 2018-09-17 Martin Jambor <mjambor@suse.cz>
2333 * c-parser.c: (warn_for_abs): New function.
2334 (c_parser_postfix_expression_after_primary): Call it.
2336 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2338 * c-typeck.c (digest_init): Shorten overlength strings.
2340 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2342 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2344 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2346 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2347 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2349 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
2351 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2352 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2354 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2357 * c-decl.c (implicitly_declare): Update call to
2358 maybe_add_include_fixit to suggest overriding the location, as it
2360 * c-objc-common.c (c_tree_printer): Update for conversion of
2361 show_caret_p to a tri-state.
2363 2018-08-27 Martin Liska <mliska@suse.cz>
2365 * c-decl.c (locate_old_decl): Use new function
2366 fndecl_built_in_p and remove check for FUNCTION_DECL if
2368 (diagnose_mismatched_decls): Likewise.
2369 (merge_decls): Likewise.
2370 (warn_if_shadowing): Likewise.
2371 (pushdecl): Likewise.
2372 (implicitly_declare): Likewise.
2373 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2374 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2375 * c-typeck.c (build_function_call_vec): Likewise.
2376 (convert_arguments): Likewise.
2378 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2381 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2382 (diagnose_mismatched_decls): Likewise, in various places.
2383 (warn_if_shadowing): Likewise.
2384 (implicit_decl_warning): Likewise.
2385 (implicitly_declare): Likewise.
2386 (undeclared_variable): Likewise.
2387 (declare_label): Likewise.
2388 (grokdeclarator): Likewise.
2389 (start_function): Likewise.
2390 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2391 (c_parser_parameter_declaration): Likewise.
2392 (c_parser_binary_expression): Likewise.
2393 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2394 (parser_build_binary_op): Likewise.
2395 (build_unary_op): Likewise.
2396 (error_init): Likewise.
2397 (pedwarn_init): Likewise.
2398 (warning_init): Likewise.
2399 (convert_for_assignment): Likewise.
2401 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2403 * c-objc-common.c: Include "gcc-rich-location.h".
2404 (c_tree_printer): Move implemenation of '%T' to...
2405 (print_type): ...this new function.
2406 (range_label_for_type_mismatch::get_text): New function.
2407 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2408 range for the various ic_argpass cases.
2409 (class maybe_range_label_for_tree_type_mismatch): New class.
2410 (build_binary_op): Use it when calling binary_op_error.
2412 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2414 * c-decl.c (start_decl): Do not warn if variables is named as main
2415 and is a local variable.
2417 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2420 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2421 objects of unknown size.
2423 2018-08-13 Martin Sebor <msebor@redhat.com>
2425 PR tree-optimization/71625
2426 * c-parser.c (c_parser_declaration_or_fndef): Call
2427 braced_list_to_string.
2429 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2432 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2435 2018-08-01 Martin Sebor <msebor@redhat.com>
2437 PR tree-optimization/86650
2438 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2439 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2441 2018-08-01 Jakub Jelinek <jakub@redhat.com>
2444 * c-typeck.c (init_field_decl_cmp): New function.
2445 (output_pending_init_elements): Use it for field comparisons
2446 instead of pure bit_position comparisons.
2448 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2450 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2451 type here, instead add "omp declare target implicit" attribute.
2452 (finish_decl): Diagnose vars without mappable type here.
2454 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2455 Thomas Schwinge <thomas@codesourcery.com>
2456 Cesar Philippidis <cesar@codesourcery.com>
2458 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2459 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2460 to their non-present_or_* counterparts. Make 'self' an alias to
2461 PRAGMA_OACC_CLAUSE_HOST.
2462 (c_parser_oacc_data_clause): Update GOMP mappings for
2463 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2464 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2465 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2466 Remove support for present_or_* clauses.
2467 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2468 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2469 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2470 (OACC_DATA_CLAUSE_MASK): Likewise.
2471 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2472 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2473 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2474 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2475 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2477 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2479 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2480 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2481 (c_parser_gimple_unary_expression): Likewise.
2483 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2486 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2487 before doing POINTER_DIFF_EXPR.
2489 2018-06-07 Marek Polacek <polacek@redhat.com>
2492 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2493 for loop initial declarations.
2495 2018-05-30 David Pagan <dave.pagan@oracle.com>
2498 * c-decl.c (grokdeclarator): Update check for return type warnings.
2499 (start_function): Likewise.
2500 (finish_function): Likewise.
2501 * c-typeck.c (c_finish_return): Update check for return type warnings.
2502 Pass OPT_Wreturn_type to pedwarn when appropriate.
2504 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2506 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2509 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2511 * gimple-parser.c: Include internal-fn.h.
2512 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2513 (c_parser_gimple_call_internal): New function.
2514 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2515 Fix typos in comment.
2517 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2520 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2521 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2523 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2524 fold_offsetof_1, pass argtype as TYPE to it and drop the
2527 2018-05-02 David Pagan <dave.pagan@oracle.com>
2530 * c-decl.c (old_style_parameter_scope): New function.
2531 * c-parser.c (c_parser_postfix_expression): Check for statement
2532 expressions in old-style function parameter list declarations.
2533 * c-parser.h (old_style_parameter_scope): New extern declaration.
2535 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2538 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2539 it is not TREE_STATIC.
2540 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2541 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2542 its COMPOUND_LITERAL_EXPR_DECL.
2544 2018-03-21 Joseph Myers <joseph@codesourcery.com>
2546 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2547 where all functions return the same _FloatN or _FloatNx type,
2548 treat integer types as _Float64 instead of double.
2550 2018-03-21 Jakub Jelinek <jakub@redhat.com>
2553 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2554 building vector comparison, diagnose it and return error_mark_node.
2556 2018-03-15 Jakub Jelinek <jakub@redhat.com>
2559 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2560 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2561 INTEGER_TYPE element type.
2563 2018-03-13 David Pagan <dave.pagan@oracle.com>
2566 * c-typeck.c (output_init_element): Ensure field initializer
2567 expression is always evaluated if there are side effects.
2569 2018-03-06 Jakub Jelinek <jakub@redhat.com>
2572 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2573 !building_stmt_list_p ().
2575 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2578 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2579 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2580 and include the BIND_EXPR in the list of things that need to be
2583 2018-02-09 Nathan Sidwell <nathan@acm.org>
2586 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2587 to strict_aliasing_warning.
2589 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2591 * c-typeck.c (really_start_incremental_init, push_init_level,
2592 set_nonincremental_init, output_init_element, process_init_element):
2593 Use DECL_UNNAMED_BIT_FIELD.
2595 2018-01-31 Marek Polacek <polacek@redhat.com>
2598 * c-parser.c (c_parser_compound_statement_nostart): Call
2599 expansion_point_location_if_in_system_header.
2601 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2604 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2607 2018-01-13 Jakub Jelinek <jakub@redhat.com>
2610 * c-tree.h (decl_constant_value_1): Add a bool argument.
2611 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2612 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2613 (decl_constant_value): Adjust caller.
2614 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2615 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2616 decl_constant_value returns initializer that has BLKmode or
2618 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2621 Alan Hayward <alan.hayward@arm.com>
2622 David Sherwood <david.sherwood@arm.com>
2624 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2625 TYPE_VECTOR_SUBPARTS.
2627 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2629 Update copyright years.
2631 2018-01-01 Jakub Jelinek <jakub@redhat.com>
2634 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2635 c_parser_conditional_expression, c_parser_cast_expression,
2636 c_parser_sizeof_expression, c_parser_alignof_expression,
2637 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2638 c_parser_transaction_expression): Use set_error () method instead
2639 of setting value member to error_mark_node.
2641 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2643 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2644 and _Float<N>X built-in functions.
2646 2017-12-22 Jakub Jelinek <jakub@redhat.com>
2649 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2650 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2651 incomplete vars rather than after it.
2654 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2655 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2656 and consider empty ones if there are no other stmts. For
2657 -Wunused-value walk all statements before the one only followed by
2660 2017-12-22 Mike Stump <mikestump@comcast.net>
2661 Eric Botcazou <ebotcazou@adacore.com>
2663 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2664 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2665 (c_parser_do_statement): Likewise.
2666 (c_parser_for_statement): Likewise.
2667 (c_parser_statement_after_labels): Adjust calls to above.
2668 (c_parse_pragma_ivdep): New static function.
2669 (c_parser_pragma_unroll): Likewise.
2670 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2671 <PRAGMA_UNROLL>: New case.
2673 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2675 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2676 perform_integral_promotions, digest_init): Replace Yoda conditions
2677 with typical order conditions.
2678 * c-decl.c (check_bitfield_type_and_width): Likewise.
2680 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2682 * c-typeck.c (c_safe_arg_type_equiv_p,
2683 c_safe_function_type_cast_p): New function.
2684 (build_c_cast): Implement -Wcast-function-type.
2686 2017-12-14 Richard Biener <rguenther@suse.de>
2689 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2690 like REALPART_EXPR for the behavior of whether its operand
2693 2017-12-12 Marek Polacek <polacek@redhat.com>
2696 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2698 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2700 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2701 * c-parser.c (add_debug_begin_stmt): New.
2702 (c_parser_declaration_or_fndef): Call it.
2703 (c_parser_compound_statement_nostart): Likewise.
2704 (c_parser_statement_after_labels): Likewise.
2705 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2707 2017-12-07 Joseph Myers <joseph@codesourcery.com>
2709 * c-decl.c (build_compound_literal): Add parameter alignas_align
2710 and set alignment of decl if nonzero.
2711 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2712 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2714 (c_parser_struct_declaration): Update syntax comment.
2715 (c_parser_type_name): Add alignas_ok argument and pass it to
2717 (c_parser_cast_expression): Pass true to c_parser_type_name and
2718 give error if a cast used an _Alignas specifier.
2719 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2720 give error if sizeof (type-name) used an _Alignas specifier.
2721 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2722 give error if _Alignof (type-name) used an _Alignas specifier.
2723 (c_parser_postfix_expression_after_paren_type): Check specified
2724 alignment for a compound literal and pass it to
2725 build_compound_literal.
2726 * c-parser.h (c_parser_type_name): Update prototype.
2727 * c-tree.h (build_compound_literal): Update prototype.
2729 2017-12-07 Martin Sebor <msebor@redhat.com>
2732 * c-decl.c (c_decl_attributes): Look up existing declaration and
2733 pass it to decl_attributes.
2735 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2738 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2739 reserved for use by the implementation.
2741 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2743 * c-decl.c: Include "c-family/c-spellcheck.h".
2745 2017-12-05 Martin Liska <mliska@suse.cz>
2746 Jakub Jelinek <jakub@redhat.com>
2748 * c-typeck.c (pointer_diff): Add new argument and instrument
2749 pointer subtraction.
2750 (build_binary_op): Similar for pointer comparison.
2752 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2755 * c-parser.c: Include tree-iterator.h.
2756 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2757 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2761 * c-tree.h (decl_constant_value_1): Declare.
2762 * c-typeck.c (decl_constant_value_1): New function.
2763 (decl_constant_value): Use it.
2764 * c-fold.c (c_fully_fold_internal): If in_init, use
2765 decl_constant_value_1 instead of decl_constant_value.
2767 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2769 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2771 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2774 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2775 c_switch_covers_all_cases_p returns true.
2777 2017-11-28 Julia Koval <julia.koval@intel.com>
2778 Sebastian Peryt <sebastian.peryt@intel.com>
2780 * Make-lang.in (c/c-array-notation.o): Remove.
2781 * c-array-notation.c: Delete.
2782 * c-decl.c: Remove cilkplus condition.
2783 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2784 c_parser_cilk_verify_simd, c_parser_array_notation,
2785 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2786 c_parser_cilk_simd_fn_vector_attrs,
2787 c_finish_cilk_simd_fn_tokens): Delete.
2788 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2789 (c_parser_direct_declarator_inner): Ditto.
2790 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2791 (c_parser_attributes, c_parser_compound_statement,
2792 c_parser_statement_after_labels, c_parser_if_statement,
2793 c_parser_switch_statement, c_parser_while_statement,
2794 c_parser_do_statement, c_parser_for_statement,
2795 c_parser_unary_expression, c_parser_postfix_expression,
2796 c_parser_postfix_expression_after_primary,
2797 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2798 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2800 * c-typeck.c (build_array_ref, build_function_call_vec,
2802 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2803 c_finish_loop, build_binary_op): Remove cilkplus support.
2805 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2807 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2810 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
2812 * Make-lang.in (c.install-plugin): Install backend import library.
2814 2017-11-23 Jakub Jelinek <jakub@redhat.com>
2816 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2817 pragma_stmt context.
2819 2017-11-23 Mike Stump <mikestump@comcast.net>
2820 Eric Botcazou <ebotcazou@adacore.com>
2822 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2824 (c_parser_do_statement): Likewise.
2825 (c_parser_for_statement): Likewise.
2827 2017-11-22 David Malcolm <dmalcolm@redhat.com>
2830 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2831 bool to bool *. Within '%T' handling, if showing an "aka", use
2832 "quoted" param to add appropriate quoting.
2834 2017-11-22 Marek Polacek <polacek@redhat.com>
2839 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2841 2017-11-21 David Malcolm <dmalcolm@redhat.com>
2844 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2845 earlier failed lookups.
2847 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2849 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2850 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2852 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2855 * c-decl.c: Include "c-family/known-headers.h".
2856 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2857 to known-headers.cc.
2858 (class suggest_missing_header): Move to known-header.h.
2859 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2860 than get_c_name_hint.
2862 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2864 * c-decl.c (get_c_name_hint): New function.
2865 (class suggest_missing_header): New class.
2866 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2867 suggest missing headers to the user.
2869 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2871 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2872 Include "c-family/name-hint.h"
2873 (implicit_decl_warning): Convert "hint" from
2874 const char * to name_hint. Pass location to
2875 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2876 warning was not printed.
2877 (undeclared_variable): Likewise for "guessed_id".
2878 (lookup_name_fuzzy): Convert return type from const char *
2879 to name_hint. Add location_t param.
2880 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2881 Include "c-family/name-hint.h"
2882 (c_parser_declaration_or_fndef): Convert "hint" from
2883 const char * to name_hint. Pass location to lookup_name_fuzzy.
2884 (c_parser_parameter_declaration): Likewise.
2886 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2890 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2892 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2893 handle_omp_array_sections): Likewise.
2894 (digest_init): Don't call decl_constant_value_for_optimization.
2895 * c-tree.h (decl_constant_value_for_optimization): Removed.
2896 * c-fold.c (c_fold_array_ref): New function.
2897 (c_fully_fold_internal): Add LVAL argument, propagate it through
2898 recursive calls. For VAR_P call decl_constant_value and
2899 unshare if not LVAL and either optimizing or IN_INIT. Remove
2900 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2901 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2902 (c_fully_fold): Add LVAL argument, pass it through to
2903 c_fully_fold_internal.
2904 (decl_constant_value_for_optimization): Removed.
2906 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2909 * c-parser.c (check_tgmath_function): New function.
2910 (enum tgmath_parm_kind): New enum.
2911 (c_parser_postfix_expression): Handle __builtin_tgmath.
2913 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2915 * c-decl.c (implicit_decl_warning): Update for renaming of
2916 pedwarn_at_rich_loc and warning_at_rich_loc.
2917 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2918 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2919 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2920 (c_parser_struct_or_union_specifier): Likewise for renaming of
2921 pedwarn_at_rich_loc.
2922 (c_parser_parameter_declaration): Likewise for renaming of
2924 * c-typeck.c (build_component_ref): Likewise.
2925 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2926 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2927 (set_init_label): Likewise for renaming of error_at_rich_loc.
2929 2017-10-30 Richard Biener <rguenther@suse.de>
2931 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2934 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2936 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2937 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2939 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2942 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2945 2017-10-25 Jakub Jelinek <jakub@redhat.com>
2948 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2949 newdecl to corresponding __builtin_ if any.
2951 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2954 * c-decl.c (diagnose_mismatched_decls): Use
2955 OPT_Wbuiltin_declaration_mismatch.
2957 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2959 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2960 use it to guard calls to maybe_suggest_missing_token_insertion.
2961 (c_parser_parms_list_declarator): Override default value of new
2962 "type_is_unique" param to c_parser_require.
2963 (c_parser_asm_statement): Likewise.
2964 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2967 2017-10-11 Nathan Sidwell <nathan@acm.org>
2969 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2971 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2973 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2974 operating on trees as wide_ints.
2975 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2976 (c_tree_equal): Likewise.
2978 2017-10-04 David Malcolm <dmalcolm@redhat.com>
2980 * c-decl.c (push_parm_decl): Store c_parm's location into the
2982 (build_c_parm): Add "loc" param and store it within the c_parm.
2983 * c-parser.c (struct c_parser): Add "last_token_location" field.
2984 (c_parser_consume_token): Store location of the token into the
2986 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2987 when handling a FUNCTION_DECL, if it doesn't already have them.
2988 (c_parser_parameter_declaration): Generate a location for the
2989 parameter, and pass it to the call to build_c_parm.
2990 * c-tree.h (struct c_parm): Add field "loc".
2991 (build_c_parm): Add location_t param.
2992 * c-typeck.c (get_fndecl_argument_location): New function.
2993 (inform_for_arg): New function.
2994 (convert_for_assignment): Use inform_for_arg when dealing with
2997 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2999 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3001 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3002 don't SET_DECL_C_BIT_FIELD here.
3005 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3006 instead of trying to set just TREE_READONLY manually.
3008 2017-09-16 Tom de Vries <tom@codesourcery.com>
3011 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3014 2017-09-15 Joseph Myers <joseph@codesourcery.com>
3017 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3019 (build_conditional_expr): For C11, generate result with excess
3020 precision when one argument is an integer and the other is of a
3021 type using excess precision.
3023 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3025 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3027 2017-09-13 Marek Polacek <polacek@redhat.com>
3030 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3031 than expr.original_type.
3033 2017-09-12 Nathan Sidwell <nathan@acm.org>
3035 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3036 resort_sorted_fields): Moved from c-family/c-common.c.
3037 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3039 2017-09-01 Joseph Myers <joseph@codesourcery.com>
3042 * c-typeck.c (build_atomic_assign): Handle argument with excess
3043 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3044 argument passed to build_binary_op and convert_for_assignment but
3045 not for call to c_fully_fold.
3046 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3047 Ensure build_binary_op is called with argument with original
3048 semantic type. Avoid calling c_fully_fold with an
3049 EXCESS_PRECISION_EXPR from build_binary_op.
3051 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3054 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3056 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3057 Alan Hayward <alan.hayward@arm.com>
3058 David Sherwood <david.sherwood@arm.com>
3060 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3061 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3062 m1 and m2 to the signed equivalent of a fixed-point
3065 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3067 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3068 than CAN_HAVE_LOCATION_P when determining whether to use the
3069 location_t value within "value".
3071 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3073 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3074 rather than peeking the location of the first token.
3075 * c-tree.h (c_expr::get_location): New method.
3077 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3079 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3080 to check_function_arguments.
3082 2017-08-18 Marek Polacek <polacek@redhat.com>
3084 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3087 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3090 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3091 (check_bitfield_type_and_width): Don't allow bit-field with
3092 warn_if_not_aligned type.
3094 2017-08-14 Martin Sebor <msebor@redhat.com>
3097 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3099 2017-08-11 Marek Polacek <polacek@redhat.com>
3102 * c-decl.c (pushtag): Only print inform if the warning was printed.
3103 (grokdeclarator): Likewise.
3105 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3107 * c-parser.c (c_parser_error): Rename to...
3108 (c_parser_error_richloc): ...this, making static, and adding
3109 "richloc" parameter, passing it to the c_parse_error call,
3110 rather than calling c_parser_set_source_position_from_token.
3111 (c_parser_error): Reintroduce, reimplementing in terms of the
3112 above, converting return type from void to bool.
3113 (class token_pair): New class.
3114 (struct matching_paren_traits): New struct.
3115 (matching_parens): New typedef.
3116 (struct matching_brace_traits): New struct.
3117 (matching_braces): New typedef.
3118 (get_matching_symbol): New function.
3119 (c_parser_require): Add param MATCHING_LOCATION, using it to
3120 highlight matching "opening" tokens for missing "closing" tokens.
3121 (c_parser_skip_until_found): Likewise.
3122 (c_parser_static_assert_declaration_no_semi): Convert explicit
3123 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3124 class matching_parens, so that the pertinent open parenthesis is
3125 highlighted when there are problems locating the close
3127 (c_parser_struct_or_union_specifier): Likewise.
3128 (c_parser_typeof_specifier): Likewise.
3129 (c_parser_alignas_specifier): Likewise.
3130 (c_parser_simple_asm_expr): Likewise.
3131 (c_parser_braced_init): Likewise, for matching_braces.
3132 (c_parser_paren_condition): Likewise, for matching_parens.
3133 (c_parser_switch_statement): Likewise.
3134 (c_parser_for_statement): Likewise.
3135 (c_parser_asm_statement): Likewise.
3136 (c_parser_asm_operands): Likewise.
3137 (c_parser_cast_expression): Likewise.
3138 (c_parser_sizeof_expression): Likewise.
3139 (c_parser_alignof_expression): Likewise.
3140 (c_parser_generic_selection): Likewise.
3141 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3142 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3143 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3144 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3145 c_parser_skip_until_found call.
3146 (c_parser_objc_class_definition): Use class matching_parens as
3148 (c_parser_objc_method_decl): Likewise.
3149 (c_parser_objc_try_catch_finally_statement): Likewise.
3150 (c_parser_objc_synchronized_statement): Likewise.
3151 (c_parser_objc_at_property_declaration): Likewise.
3152 (c_parser_oacc_wait_list): Likewise.
3153 (c_parser_omp_var_list_parens): Likewise.
3154 (c_parser_omp_clause_collapse): Likewise.
3155 (c_parser_omp_clause_default): Likewise.
3156 (c_parser_omp_clause_if): Likewise.
3157 (c_parser_omp_clause_num_threads): Likewise.
3158 (c_parser_omp_clause_num_tasks): Likewise.
3159 (c_parser_omp_clause_grainsize): Likewise.
3160 (c_parser_omp_clause_priority): Likewise.
3161 (c_parser_omp_clause_hint): Likewise.
3162 (c_parser_omp_clause_defaultmap): Likewise.
3163 (c_parser_oacc_single_int_clause): Likewise.
3164 (c_parser_omp_clause_ordered): Likewise.
3165 (c_parser_omp_clause_reduction): Likewise.
3166 (c_parser_omp_clause_schedule): Likewise.
3167 (c_parser_omp_clause_num_teams): Likewise.
3168 (c_parser_omp_clause_thread_limit): Likewise.
3169 (c_parser_omp_clause_aligned): Likewise.
3170 (c_parser_omp_clause_linear): Likewise.
3171 (c_parser_omp_clause_safelen): Likewise.
3172 (c_parser_omp_clause_simdlen): Likewise.
3173 (c_parser_omp_clause_depend): Likewise.
3174 (c_parser_omp_clause_map): Likewise.
3175 (c_parser_omp_clause_device): Likewise.
3176 (c_parser_omp_clause_dist_schedule): Likewise.
3177 (c_parser_omp_clause_proc_bind): Likewise.
3178 (c_parser_omp_clause_uniform): Likewise.
3179 (c_parser_omp_for_loop): Likewise.
3180 (c_parser_cilk_clause_vectorlength): Likewise.
3181 (c_parser_cilk_clause_linear): Likewise.
3182 (c_parser_transaction_expression): Likewise.
3183 * c-parser.h (c_parser_require): Add param matching_location with
3184 default UNKNOWN_LOCATION.
3185 (c_parser_error): Convert return type from void to bool.
3186 (c_parser_skip_until_found): Add param matching_location with
3187 default UNKNOWN_LOCATION.
3189 2017-08-09 Marek Polacek <polacek@redhat.com>
3191 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3192 * c-tree.h (build_external_ref): Update declaration.
3193 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3194 (build_external_ref): Change the type of a parameter to bool.
3195 (parser_build_binary_op): Use true/false instead of 1/0.
3196 (pointer_diff): Likewise.
3197 (build_modify_expr): Likewise.
3198 (set_designator): Change the type of a parameter to bool.
3199 (set_init_index): Use true/false instead of 1/0.
3200 (set_init_label): Likewise.
3201 (output_init_element): Change the type of a parameter to bool.
3202 (output_pending_init_elements): Use true/false instead of 1/0.
3203 (process_init_element): Likewise.
3204 (build_binary_op): Change the type of a parameter to bool.
3206 2017-08-09 Marek Polacek <polacek@redhat.com>
3209 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3210 Call emit_diagnostic_valist instead of pedwarn.
3211 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3212 Print the relevant types in diagnostics.
3214 2017-08-09 Marek Polacek <polacek@redhat.com>
3217 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
3218 build_conditional_expr.
3219 * c-parser.c (c_parser_conditional_expression): Create locations for
3220 EXP1 and EXP2 from their source ranges. Pass the locations down to
3221 build_conditional_expr.
3222 * c-tree.h (build_conditional_expr): Update declaration.
3223 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3224 For -Wsign-compare, also print the types.
3226 2017-08-08 Martin Liska <mliska@suse.cz>
3228 * c-convert.c: Include header files.
3229 * c-typeck.c: Likewise.
3231 2017-08-07 Martin Liska <mliska@suse.cz>
3233 * c-parser.c (c_parser_attributes): Canonicalize name of an
3236 2017-08-02 Marek Polacek <polacek@redhat.com>
3239 * c-parser.c (c_parser_unary_expression): Use set_error.
3243 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3244 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3246 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
3247 Martin Liska <mliska@suse.cz>
3249 * c-typeck.c (c_finish_goto_label): Build gimple predict
3252 2017-07-31 Martin Liska <mliska@suse.cz>
3255 * c-convert.c (convert): Guard condition with flag_sanitize_p
3256 also with current_function_decl non-null equality.
3257 * c-decl.c (grokdeclarator): Likewise.
3258 * c-typeck.c (build_binary_op): Likewise.
3260 2017-07-25 Marek Polacek <polacek@redhat.com>
3262 * c-decl.c (grokfield): Remove local variable.
3264 2017-07-25 Marek Polacek <polacek@redhat.com>
3267 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3268 macro expansion if the body is in { }.
3269 (c_parser_while_statement): Likewise.
3270 (c_parser_for_statement): Likewise.
3272 2017-07-18 Nathan Sidwell <nathan@acm.org>
3274 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3276 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3278 * c-decl.c (implicitly_declare): When suggesting a missing
3279 #include, provide a fix-it hint.
3281 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3283 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3284 and call that instead.
3285 * c-tree.h (selftest::run_c_tests): New decl.
3287 2017-06-26 Marek Polacek <polacek@redhat.com>
3290 * c-parser.c (c_parser_if_body): Set the location of the
3291 body of the conditional after parsing all the labels. Call
3292 warn_for_multistatement_macros.
3293 (c_parser_else_body): Likewise.
3294 (c_parser_switch_statement): Likewise.
3295 (c_parser_while_statement): Likewise.
3296 (c_parser_for_statement): Likewise.
3297 (c_parser_statement): Add a default argument. Save the location
3298 after labels have been parsed.
3299 (c_parser_c99_block_statement): Likewise.
3301 2017-06-19 Richard Biener <rguenther@suse.de>
3303 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3304 negated _Literals to parse _Literal (int) -1.
3306 2017-06-13 Martin Liska <mliska@suse.cz>
3309 * c-convert.c (convert): Use sanitize_flags_p.
3310 * c-decl.c (grokdeclarator): Likewise.
3311 * c-typeck.c (convert_for_assignment): Likewise.
3312 (c_finish_return): Likewise.
3313 (build_binary_op): Likewise.
3315 2017-06-08 Jakub Jelinek <jakub@redhat.com>
3318 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3319 to sizetype before size_binop.
3321 2017-06-07 Jakub Jelinek <jakub@redhat.com>
3323 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3326 2017-06-06 Marek Polacek <polacek@redhat.com>
3329 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3331 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3333 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3335 * c-parser.c (c_parser_binary_expression): Implement the
3336 -Wsizeof_pointer_div warning.
3337 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3338 from a parenthesized expression.
3339 (c_parser_expr_list): Use c_last_sizeof_loc.
3340 * c-tree.h (c_last_sizeof_loc): New external.
3341 * c-typeck.c (c_last_sizeof_loc): New variable.
3342 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3344 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3347 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3349 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3351 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3354 2017-05-24 Martin Sebor <msebor@redhat.com>
3357 * c-fold.c (c_fully_fold_internal): Adjust.
3358 * c-typeck.c (parser_build_unary_op): Adjust.
3360 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3362 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3363 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3366 2017-05-23 Marek Polacek <polacek@redhat.com>
3368 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3371 2017-05-22 Jakub Jelinek <jakub@redhat.com>
3373 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3374 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3375 it returned invariant. Call tree_invariant_p unconditionally
3376 afterwards to decide whether to return expr or op0.
3378 2017-05-22 Nathan Sidwell <nathan@acm.org>
3380 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3382 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3384 * c-parser.c (c_parser_omp_clause_default): Handle
3385 "OMP_CLAUSE_DEFAULT_PRESENT".
3387 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3389 * config-lang.in (gtfiles): Add c-family/c-format.c.
3391 2017-05-18 Nathan Sidwell <nathan@acm.org>
3393 * c-decl.c (pushdecl_top_level): Delete unused function.
3395 2017-05-18 Marek Polacek <polacek@redhat.com>
3397 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3398 (check_earlier_gotos): Likewise.
3399 (define_label): Likewise.
3400 (pending_xref_error): Likewise.
3401 (smallest_type_quals_location): Likewise.
3402 (grokdeclarator): Likewise.
3403 (grokparms): Likewise.
3404 (identifier_global_value): Likewise.
3405 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3406 (find_init_member): Likewise.
3408 2017-05-18 Marek Polacek <polacek@redhat.com>
3410 * c-decl.c (start_decl): Use false/true instead of 0/1.
3411 (grokdeclarator): Likewise.
3412 (finish_struct): Likewise.
3413 (start_function): Change the return type to bool. Use false/true
3415 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3416 * c-tree.h (start_function): Update.
3417 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3418 (set_designator): Change the return type to bool. Use false/true
3421 2017-05-17 Marek Polacek <polacek@redhat.com>
3423 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3424 * c-typeck.c: Likewise.
3426 2017-05-17 Marek Polacek <polacek@redhat.com>
3429 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3430 DECL_IGNORED_P even for non-static compound literals.
3432 2017-05-17 Martin Liska <mliska@suse.cz>
3434 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3435 use it instead of int type.
3437 2017-05-17 Marek Polacek <polacek@redhat.com>
3439 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3441 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
3442 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
3443 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3444 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3446 (c_parser_conditional_expression): Likewise.
3447 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3448 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3449 (process_init_element): Likewise.
3450 (build_binary_op): Likewise.
3451 (handle_omp_array_sections_1): Likewise.
3453 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3455 * c-parser.c (c_parser_omp_clause_num_gangs)
3456 (c_parser_omp_clause_num_workers)
3457 (c_parser_omp_clause_vector_length): Merge functions into...
3458 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3461 2017-05-11 Nathan Sidwell <nathan@acm.org>
3463 * gimple-parser.c: Don't #include tree-dump.h.
3465 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3468 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3470 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3473 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3474 incorrect __MEM syntax.
3476 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3479 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3482 2017-05-09 Nathan Sidwell <nathan@acm.org>
3484 * c-tree.h (pushdecl): Declare.
3486 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3488 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3489 with diagnostic_report_diagnostic.
3490 * c-errors.c (pedwarn_c99): Likewise.
3491 (pedwarn_c90): Likewise.
3493 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3496 * c-gimplify.c (c_gimplify_expr): Remove calls to
3497 cilk_gimplifY_call_params_in_spawned_fn.
3499 2017-04-25 David Malcolm <dmalcolm@redhat.com>
3501 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3502 hint for removing extra semicolon.
3504 2017-04-21 Jakub Jelinek <jakub@redhat.com>
3507 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3508 enabled, set specs->type to integer_type_node.
3510 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3512 * c-array-notation.c: Fix typo in comment.
3514 2017-03-29 Marek Polacek <polacek@redhat.com>
3517 * c-decl.c (finish_decl): Check VAR_P.
3519 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3522 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3523 * c-typeck.c (c_mark_addressable): Likewise. Look through
3524 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3526 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3528 2017-03-23 Marek Polacek <polacek@redhat.com>
3530 * c-tree.h: Remove a C_RID_YYCODE reference.
3532 2017-03-21 Jakub Jelinek <jakub@redhat.com>
3535 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3536 optional COMPOUND_EXPR with ubsan instrumentation.
3538 2017-03-17 Marek Polacek <polacek@redhat.com>
3540 * c-parser.c: Add C11 references.
3542 2017-03-15 Marek Polacek <polacek@redhat.com>
3544 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3546 2017-03-11 Marek Polacek <polacek@redhat.com>
3548 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3550 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3552 PR translation/79848
3553 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3555 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3557 2017-03-09 Marek Polacek <polacek@redhat.com>
3560 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3561 parameter declarations with initializers.
3563 2017-03-09 Jakub Jelinek <jakub@redhat.com>
3566 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3569 2017-03-07 Jakub Jelinek <jakub@redhat.com>
3572 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3573 for "may only be used in compound statements" diagnostics, change it
3574 such that the same translatable string is used for all pragmas. For
3575 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3577 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3578 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3579 "may only be used in compound statements" diagnostics, such that the
3580 same translatable string is used for all pragmas.
3582 2017-03-04 Marek Polacek <polacek@redhat.com>
3585 * c-decl.c (implicit_decl_warning): Add missing space.
3587 2017-03-03 Marek Polacek <polacek@redhat.com>
3590 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3591 current_function_prototype_arg_types is error_mark_node. Fix
3592 formatting. Use TREE_VALUE instead of TREE_TYPE.
3594 2017-03-03 Jakub Jelinek <jakub@redhat.com>
3597 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3598 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3599 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3603 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3604 instead of %<_Generic>.
3605 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3606 (c_parser_omp_target_exit_data): Use %<release%> instead of
3609 2017-02-28 Jakub Jelinek <jakub@redhat.com>
3611 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3612 instead of just cond ? "..." : "...".
3613 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3614 for "enter"/"exit" keyword.
3615 (c_finish_oacc_routine): Don't use %s to supply portions of the
3618 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3621 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3622 handle -Wrestrict here.
3623 * c-typeck.c (build_function_call_vec): Adjust
3624 check_function_arguments caller.
3626 2017-02-23 Richard Biener <rguenther@suse.de>
3629 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3630 to initialize c_exprs to return.
3631 (c_parser_gimple_binary_expression): Likewise.
3632 (c_parser_gimple_unary_expression): Likewise.
3633 (c_parser_gimple_postfix_expression): Likewise.
3635 2017-02-22 Marek Polacek <polacek@redhat.com>
3638 * c-typeck.c (convert_arguments): Handle error_mark_node.
3640 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3642 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3643 value of c_parser_parse_ssa_name against error_mark_node and emit
3644 error if ssa name is anonymous and written as default definition.
3646 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3648 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3651 2017-02-16 Jakub Jelinek <jakub@redhat.com>
3654 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3655 ignore #pragma omp target even when not followed by identifier.
3657 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3659 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3660 (c_parser_gimple_unary_expression): Likewise.
3662 2017-02-13 Jakub Jelinek <jakub@redhat.com>
3664 * c-parser.c (c_parser_oacc_declare): Add missing space in
3667 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3670 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3671 set_c_expr_source_range when parsing ssa-name.
3673 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
3674 Richard Biener <rguenther@suse.de>
3676 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3677 building IL when arguments are error_mark_node.
3678 (c_parser_gimple_unary_expression): Likewise.
3679 (c_parser_gimple_if_stmt): Likewise.
3680 (c_parser_gimple_switch_stmt): Likewise.
3681 (c_parser_gimple_return_stmt): Likewise.
3682 (c_parser_parse_ssa_name): When name lookup fails do not build
3683 an SSA name. Use undeclared rather than not declared in error
3686 2017-02-09 Marek Polacek <polacek@redhat.com>
3689 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3690 instead of c_parser_skip_until_found.
3692 2017-02-09 Jakub Jelinek <jakub@redhat.com>
3695 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3696 symtab_node::get on automatic variables.
3698 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3699 Chung-Lin Tang <cltang@codesourcery.com>
3701 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3702 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3704 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3706 2017-02-07 Richard Biener <rguenther@suse.de>
3708 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3709 (c_parser_gimple_postfix_expression_after_primary):
3710 Do not use c_build_function_call_vec to avoid folding and promotion.
3713 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3716 * c-decl.c (pop_scope): Pass main_input_filename to
3717 build_translation_unit_decl.
3719 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3721 * c-parser.c: Include "read-rtl-function.h" and
3723 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3724 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3725 production. Update for renaming of field "gimple_pass" to
3726 "gimple_or_rtl_pass". If __RTL was seen, call
3727 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3728 to an auto_timevar, to cope with early exit.
3729 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3730 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3731 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3733 (c_parser_parse_rtl_body): New function.
3734 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3735 (struct c_declspecs): Rename field "gimple_pass" to
3736 "gimple_or_rtl_pass". Add field "rtl_p".
3737 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3738 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3739 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3740 (c_parser_gimple_or_rtl_pass_list): ...this.
3742 2017-01-20 Marek Polacek <polacek@redhat.com>
3745 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3747 2017-01-13 Richard Biener <rguenther@suse.de>
3749 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3752 2017-01-13 Richard Biener <rguenther@suse.de>
3754 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3755 _Literal ( type-name ) number.
3757 2017-01-12 Richard Biener <rguenther@suse.de>
3759 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3762 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3765 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3768 2017-01-11 Richard Biener <rguenther@suse.de>
3771 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3772 returns on parse errors.
3774 2017-01-04 Marek Polacek <polacek@redhat.com>
3777 * c-parser.c (c_parser_postfix_expression): Mark zero character
3778 constants by setting original_type in c_expr.
3779 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3780 with a zero character constant.
3781 (char_type_p): New function.
3783 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3785 * c-parser.c (c_parser_declaration_or_fndef): Create a
3786 rich_location at init_loc and parse it to start_init.
3787 (last_init_list_comma): New global.
3788 (c_parser_braced_init): Update last_init_list_comma when parsing
3789 commas. Pass it to pop_init_level. Pass location of closing
3790 brace to pop_init_level.
3791 (c_parser_postfix_expression_after_paren_type): Create a
3792 rich_location at type_loc and parse it to start_init.
3793 (c_parser_omp_declare_reduction): Likewise for loc.
3794 * c-tree.h (start_init): Add rich_location * param.
3795 (pop_init_level): Add location_t param.
3796 * c-typeck.c (struct initializer_stack): Add field
3797 "missing_brace_richloc".
3798 (start_init): Add richloc param, use it to initialize
3799 the stack node's missing_brace_richloc.
3800 (last_init_list_comma): New decl.
3801 (finish_implicit_inits): Pass last_init_list_comma to
3803 (push_init_level): When finding missing open braces, add fix-it
3804 hints to the richloc.
3805 (pop_init_level): Add "insert_before" param and pass it
3806 when calling pop_init_level. Add fixits about missing
3807 close braces to any richloc. Use the richloc for the
3808 -Wmissing-braces warning.
3809 (set_designator): Pass last_init_list_comma to pop_init_level.
3810 (process_init_element): Likewise.
3812 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3814 Update copyright years.
3816 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3819 * c-typeck.c (build_function_call_vec): If check_function_arguments
3820 returns true, set TREE_NO_WARNING on CALL_EXPR.
3823 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3824 to *expr instead of overwriting it.
3826 2016-12-20 Richard Biener <rguenther@suse.de>
3828 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3830 (c_parser_gimple_statement): Only build assigns for non-error
3832 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3834 2016-12-14 Martin Jambor <mjambor@suse.cz>
3836 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3838 (c_finish_oacc_routine): Adjusted call to
3839 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3840 to use their new names.
3841 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3843 (c_parser_oacc_update): Likewise.
3844 (c_parser_omp_simd): Likewise.
3845 (c_parser_omp_target_update): Likewise.
3846 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3847 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3849 (c_finish_omp_cancellation_point): Likewise.
3850 * gimple-parser.c: Do not include omp-low.h
3852 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3853 James Norris <jnorris@codesourcery.com>
3855 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3856 EXIT_DATA,WAIT} are not used in compound statements.
3857 (c_parser_oacc_enter_exit_data): Update diagnostics.
3859 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3862 * c-decl.c (diagnose_mismatched_decls): Use
3863 OPT_Wbuiltin_declaration_mismatch here too.
3865 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
3866 Alan Hayward <alan.hayward@arm.com>
3867 David Sherwood <david.sherwood@arm.com>
3869 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3870 (make_label, finish_struct): Likewise.
3872 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3873 Richard Biener <rguenther@suse.de>
3875 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3876 * config-lang.in (gtfiles): Add c/c-parser.h.
3877 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3878 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3879 * c-parser.c (enum c_id_kind, struct c_token,
3880 c_parser_next_token_is, c_parser_next_token_is_not,
3881 c_parser_next_token_is_keyword,
3882 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3884 * c-parser.h: ... new header.
3885 * c-parser.c: Include c-parser.h and gimple-parser.h.
3886 (c_parser_peek_token, c_parser_peek_2nd_token,
3887 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3888 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3889 c_parser_error, c_parser_require, c_parser_skip_until_found,
3890 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3891 c_parser_type_name): Export.
3892 (c_parser_tokens_buf): New function.
3893 (c_parser_error): Likewise.
3894 (c_parser_set_error): Likewise.
3895 (c_parser_declspecs): Handle RID_GIMPLE.
3896 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3897 via c_parser_parse_gimple_body.
3898 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3899 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3900 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3901 c_parser_error, c_parser_require, c_parser_skip_until_found,
3902 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3903 c_parser_type_name): Declare.
3904 (struct c_parser): Declare forward.
3905 (c_parser_tokens_buf): Declare.
3906 (c_parser_error): Likewise.
3907 (c_parser_set_error): Likewise.
3908 * gimple-parser.c: New file.
3909 * gimple-parser.h: Likewise.
3911 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3914 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3917 2016-09-11 Le-Chun Wu <lcwu@google.com>
3918 Mark Wielaard <mjw@redhat.com>
3920 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3921 to the given -Wshadow= variant.
3923 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3925 * c-typeck.c: Include memmodel.h.
3927 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3930 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3931 instead of lhd_return_null_tree_v.
3933 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3936 * c-decl.c (smallest_type_quals_location): New static function.
3937 (grokdeclarator): Try to find the correct location for an ignored
3940 2016-09-26 Marek Polacek <polacek@redhat.com>
3943 * c-decl.c (pop_scope): Add gcc_fallthrough.
3945 2016-09-26 Marek Polacek <polacek@redhat.com>
3948 * c-parser.c (struct c_token): Add flags field.
3949 (c_lex_one_token): Pass it to c_lex_with_flags.
3950 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3951 into IFN_FALLTHROUGH.
3952 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3953 attribute fallthrough after a case label or default label.
3954 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3956 2016-09-24 Marek Polacek <polacek@redhat.com>
3959 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3960 have boolean value. Warn about ++/-- on booleans.
3962 2016-09-23 Jakub Jelinek <jakub@redhat.com>
3964 * c-parser.c (incomplete_record_decls): Remove unnecessary
3965 = vNULL initialization of file scope vec.
3967 2016-09-16 Marek Polacek <polacek@redhat.com>
3969 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3971 2016-09-14 Marek Polacek <polacek@redhat.com>
3973 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3974 (fix_array_notation_expr): Likewise.
3975 * c-decl.c (finish_decl): Likewise.
3976 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3977 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3978 (function_to_pointer_conversion): Use false instead of 0.
3979 (convert_lvalue_to_rvalue): Likewise.
3980 (parser_build_unary_op): Likewise.
3981 (build_atomic_assign): Likewise.
3982 (build_unary_op): Change nonconvert parameter type to bool, use
3983 true/false instead of 1/0.
3984 (build_binary_op): Use true instead of 1.
3986 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3988 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3989 of add_fixit_insert to add_fixit_insert_before.
3991 2016-09-13 Marek Polacek <polacek@redhat.com>
3993 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3996 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3999 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4000 COMPOUND_EXPR to warn_for_omitted_condop.
4002 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4004 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4005 c_get_substring_location for this new langhook.
4007 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4010 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4012 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4013 instead of mark_exp_read on low_bound/length expression.
4014 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4015 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4016 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4017 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4018 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4019 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4020 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4021 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4022 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4023 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4024 instead of mark_expr_read.
4025 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4026 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4027 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4028 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4029 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4030 array section bases outside of depend clause, for depend clause
4031 use convert_lvalue_to_rvalue on the base.
4032 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4033 linear, aligned, map, to and from clauses.
4034 (c_omp_clause_copy_ctor): New function.
4036 2016-09-01 Marek Polacek <polacek@redhat.com>
4039 * c-typeck.c (composite_type): Add FALLTHRU comment.
4041 2016-08-31 David Malcolm <dmalcolm@redhat.com>
4043 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4044 to the insertion fixits for "struct", "union", and "enum".
4046 2016-08-30 David Malcolm <dmalcolm@redhat.com>
4048 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4049 rather than add_fixit_misspelled_id.
4050 (undeclared_variable): Likewise.
4051 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4052 now-redundant "here" params from add_fixit_insert method calls.
4053 (c_parser_parameter_declaration): Likewise.
4054 * c-typeck.c (build_component_ref): Remove now-redundant range
4055 param from add_fixit_replace method calls.
4057 2016-08-25 Marek Polacek <polacek@redhat.com>
4059 * c-typeck.c (parser_build_binary_op): Pass LHS to
4060 warn_logical_not_parentheses.
4062 2016-08-25 Marek Polacek <polacek@redhat.com>
4065 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4066 or _FloatN or _FloatNx is not supported.
4067 (finish_declspecs): Set type to integer_type_node when _FloatN or
4068 _FloatNx is not supported.
4070 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4073 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4074 (struct c_declspecs): Add field floatn_nx_idx.
4075 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4076 and _FloatNx type specifiers.
4077 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4078 (c_parser_declspecs, c_parser_attribute_any_word)
4079 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4080 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4081 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4082 narrower than double.
4084 2016-08-12 Jakub Jelinek <jakub@redhat.com>
4085 Martin Liska <mliska@suse.cz>
4088 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4089 % to determine val element to change. Assert that
4090 wchar_bytes * charwidth fits into val array.
4092 2016-08-12 Marek Polacek <polacek@redhat.com>
4095 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4096 (c_parser_postfix_expression): Likewise.
4097 * c-typeck.c (build_unary_op): Adjust fall through comment.
4098 (c_mark_addressable): Likewise.
4100 2016-08-11 Jakub Jelinek <jakub@redhat.com>
4103 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4104 array member through typedef, for orig_qual_indirect == 0 clear
4107 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4110 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4111 this up to selftest::run_c_tests.
4112 (selftest::run_c_tests): New function.
4114 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4116 * c-parser.c (struct oacc_routine_data): Add error_seen and
4117 fndecl_seen members.
4118 (c_finish_oacc_routine): Use these.
4119 (c_parser_declaration_or_fndef): Adjust.
4120 (c_parser_oacc_routine): Likewise. Support more C language
4121 constructs, and improve diagnostics. Move pragma context
4123 (c_parser_pragma): ... here.
4125 * c-parser.c (struct oacc_routine_data): New.
4126 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4128 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4129 declare target" attribute.
4131 2016-08-01 Jan Beulich <jbeulich@suse.com>
4133 * c-fold.c (c_fully_fold_internal): Also emit shift count
4134 warnings for vector types.
4135 * c-typeck.c (build_binary_op): Likewise.
4137 2016-07-29 Marek Polacek <polacek@redhat.com>
4140 * c-decl.c (finish_struct): Rephrase an error message.
4143 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4144 to error node for invalid code.
4147 * c-decl.c (implicitly_declare): Return decl early not only for
4148 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4150 2016-07-29 Jakub Jelinek <jakub@redhat.com>
4153 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4154 on GNU extern inline functions.
4156 2016-07-29 Marek Polacek <polacek@redhat.com>
4159 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4162 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4164 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4166 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4168 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4170 (best_macro_match): Likewise, converting from a typedef to a
4172 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4173 (lookup_name_fuzzy): Update for change of best_macro_match to a
4174 subclass with a ctor that calls cpp_forall_identifiers.
4176 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4178 * c-decl.c (implicit_decl_warning): Update for conversion of
4179 return type of lookup_name_fuzzy to const char *.
4180 (undeclared_variable): Likewise.
4181 (lookup_name_fuzzy): Convert return type from tree to
4183 * c-parser.c (c_parser_declaration_or_fndef): Update for
4184 conversion of return type of lookup_name_fuzzy to const char *.
4185 (c_parser_parameter_declaration): Likewise.
4187 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4189 * c-parser.c (c_parser_oacc_declare): Don't scan for
4191 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4192 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4193 zero-length subarrays.
4195 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4198 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4199 instead of FUZZY_LOOKUP_NAME.
4200 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4201 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4203 2016-07-14 Jakub Jelinek <jakub@redhat.com>
4206 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4208 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4210 * c-parser.c (c_parser_generic_selection): Make type of variable
4212 (c_parser_omp_declare_simd): Likewise.
4214 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4216 * c-decl.c (struct c_struct_parse_info): Change member types
4217 from vec to auto_vec.
4218 (start_struct): Adjust.
4219 (finish_struct): Likewise.
4221 2016-07-02 Jakub Jelinek <jakub@redhat.com>
4224 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4226 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4228 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4229 Move pragma context checking into...
4230 (c_parser_omp_cancellation_point): ... here, and improve
4231 diagnostic messages.
4232 * c-typeck.c (c_finish_omp_cancel)
4233 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4235 2016-06-29 Jakub Jelinek <jakub@redhat.com>
4238 * c-typeck.c (c_build_qualified_type): Don't clear
4239 C_TYPE_INCOMPLETE_VARS for the main variant.
4241 2016-06-28 Martin Sebor <msebor@redhat.com>
4244 * c-typeck.c (output_init_element): Diagnose incompatible types
4245 before non-constant initializers.
4247 2016-06-28 Jakub Jelinek <jakub@redhat.com>
4249 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4251 2016-06-23 Andi Kleen <ak@linux.intel.com>
4253 * Make-lang.in: Add support for autofdo.
4255 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4258 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4259 (implicit_decl_warning): When issuing warnings for implicit
4260 declarations, attempt to provide a suggestion via
4262 (undeclared_variable): Likewise when issuing errors.
4263 (lookup_name_in_scope): Likewise.
4264 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4265 (best_macro_match): New typedef.
4266 (find_closest_macro_cpp_cb): New function.
4267 (lookup_name_fuzzy): New function.
4268 * c-parser.c: Include gcc-rich-location.h.
4269 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4270 (c_keyword_starts_typename): ...this new function.
4271 (c_parser_declaration_or_fndef): When issuing errors about
4272 missing "struct" etc, add a fixit. For other kinds of errors,
4273 attempt to provide a suggestion via lookup_name_fuzzy.
4274 (c_parser_parms_declarator): When looking ahead to detect typos in
4275 type names, also reject CPP_KEYWORD.
4276 (c_parser_parameter_declaration): When issuing errors about
4277 unknown type names, attempt to provide a suggestion via
4279 * c-tree.h (c_keyword_starts_typename): New prototype.
4281 2016-06-20 Joseph Myers <joseph@codesourcery.com>
4284 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4285 c_common_type returns error_mark_node.
4287 2016-06-19 Martin Sebor <msebor@redhat.com>
4290 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4291 __alignof__ (expression).
4293 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4295 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4297 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4299 * c-typeck.c (build_component_ref): Simplify fixit code by
4300 using gcc_rich_location::add_fixit_misspelled_id.
4301 (set_init_label): Likewise.
4303 2016-06-13 David Malcolm <dmalcolm@redhat.com>
4305 * c-parser.c (c_parser_initelt): Provide location of name for new
4306 location_t param of set_init_label.
4307 * c-tree.h (set_init_label): Add location_t param.
4308 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4309 param and use it when issuing error messages about unrecognized
4310 field names. Attempt to provide a fixit hint if appropriate,
4311 otherwise update the error message to provide the type name.
4313 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4316 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4319 2016-06-08 Martin Sebor <msebor@redhat.com>
4320 Jakub Jelinek <jakub@redhat.com>
4324 * c-typeck.c (convert_arguments): Don't promote last argument
4325 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4327 2016-06-08 Marek Polacek <polacek@redhat.com>
4330 * c-decl.c (grokdeclarator): Check TYPE_P.
4333 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4336 2016-06-07 David Malcolm <dmalcolm@redhat.com>
4338 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4339 and structure element reference, capture the location of the
4340 element name token and pass it to build_component_ref.
4341 (c_parser_postfix_expression_after_primary): Likewise for
4342 structure element dereference.
4343 (c_parser_omp_variable_list): Likewise for
4344 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4345 * c-tree.h (build_component_ref): Add location_t param.
4346 * c-typeck.c (build_component_ref): Add location_t param
4347 COMPONENT_LOC. Use it, if available, when issuing hints about
4348 mispelled member names to provide a fixit replacement hint.
4350 2016-06-06 Marek Polacek <polacek@redhat.com>
4353 * c-parser.c (c_parser_direct_declarator): Set location.
4355 2016-06-06 Marek Polacek <polacek@redhat.com>
4357 * c-typeck.c (comptypes_internal): Handle comparisons of
4358 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4359 TYPE_REF_CAN_ALIAS_ALL.
4361 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4363 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4364 arguments as addressable when async clause exists.
4366 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4369 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4370 when combined with target construct.
4372 2016-05-26 Jakub Jelinek <jakub@redhat.com>
4374 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4375 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4377 2016-05-25 Marek Polacek <polacek@redhat.com>
4380 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4383 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4385 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4387 * c-parser.c (c_parser_oacc_declare): Add support for
4388 GOMP_MAP_FIRSTPRIVATE_POINTER.
4389 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4390 argument with enum c_omp_region_type ort.
4391 (handle_omp_array_sections): Likewise. Update call to
4392 handle_omp_array_sections_1.
4393 (c_finish_omp_clauses): Add specific errors and warning messages for
4394 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4395 call to handle_omp_array_sections.
4397 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4399 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4401 2016-05-24 Richard Biener <rguenther@suse.de>
4405 * c-typeck.c (build_array_ref): Do not complain about indexing
4406 non-lvalue vectors. Adjust for function name change.
4408 2016-05-20 Martin Sebor <msebor@redhat.com>
4411 * c-typeck.c (error_init): Use
4412 expansion_point_location_if_in_system_header.
4413 (warning_init): Same.
4415 2016-05-19 David Malcolm <dmalcolm@redhat.com>
4418 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4420 (c_parser_postfix_expression): Likewise.
4421 * c-tree.h (c_expr::set_error): New method.
4422 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4423 that result's range is initialized.
4425 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4427 * c-typeck.c (parser_build_unary_op): Fix formatting.
4429 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4431 * c-decl.c (grokdeclarator): Remove errmsg and use of
4432 targetm.invalid_return_type.
4433 (grokparms): Remove errmsg and use of
4434 targetm.invalid_parameter_type.
4436 2016-05-13 Joseph Myers <joseph@codesourcery.com>
4438 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4439 function return type.
4441 2016-05-12 Marek Polacek <polacek@redhat.com>
4444 * c-decl.c (build_compound_literal): Pass LOC down to
4445 c_incomplete_type_error.
4446 * c-tree.h (require_complete_type): Adjust declaration.
4447 (c_incomplete_type_error): Likewise.
4448 * c-typeck.c (require_complete_type): Add location parameter, pass it
4449 down to c_incomplete_type_error.
4450 (c_incomplete_type_error): Add location parameter, pass it down to
4452 (build_component_ref): Pass location down to c_incomplete_type_error.
4453 (default_conversion): Pass location down to require_complete_type.
4454 (build_array_ref): Likewise.
4455 (build_function_call_vec): Likewise.
4456 (convert_arguments): Likewise.
4457 (build_unary_op): Likewise.
4458 (build_c_cast): Likewise.
4459 (build_modify_expr): Likewise.
4460 (convert_for_assignment): Likewise.
4461 (c_finish_omp_clauses): Likewise.
4463 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4466 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4468 * c-errors.c (pedwarn_c90): Return true if warned.
4469 * c-tree.h (pedwarn_c90): Change return type to bool.
4470 (enum c_declspec_word): Add new enumerator cdw_atomic.
4472 2016-05-11 Marek Polacek <polacek@redhat.com>
4475 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4476 diagnose_mismatched_attributes and call it.
4478 2016-05-10 Marek Polacek <polacek@redhat.com>
4481 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4482 on a declaration following the definition.
4484 2016-05-05 Jakub Jelinek <jakub@redhat.com>
4486 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4487 parse it through to c_parser_c99_block_statement.
4488 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4491 2016-05-04 Marek Polacek <polacek@redhat.com>
4493 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4496 2016-05-04 Marek Polacek <polacek@redhat.com>
4499 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4500 for macro expansions.
4502 2016-05-03 Marek Polacek <polacek@redhat.com>
4505 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4506 check_builtin_function_arguments.
4508 2016-05-03 Richard Biener <rguenther@suse.de>
4510 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4511 the checksum from the previous stage.
4513 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4515 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4516 c_finish_omp_clauses.
4517 (c_parser_omp_all_clauses): Likewise.
4518 (c_parser_oacc_cache): Likewise.
4519 (c_parser_oacc_loop): Likewise.
4520 (omp_split_clauses): Likewise.
4521 (c_parser_omp_declare_target): Likewise.
4522 (c_parser_cilk_all_clauses): Likewise.
4523 (c_parser_cilk_for): Likewise.
4524 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4525 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4527 2016-05-02 Marek Polacek <polacek@redhat.com>
4530 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4533 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4536 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4537 OACC_LOOP_CLAUSE_MASK.
4538 (c_parser_oacc_kernels_parallel): Update call to
4539 c_oacc_split_loop_clauses.
4541 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
4543 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4544 argument to build_modify_expr in two cases.
4546 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4548 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4549 warn_for_memset instead of warning directly here.
4551 2016-04-26 Marek Polacek <polacek@redhat.com>
4554 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4556 (c_parser_for_statement): ... here.
4557 (c_parser_if_statement): Use it.
4558 (c_parser_switch_statement): Use it.
4559 (c_parser_while_statement): Use it.
4562 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4564 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4567 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4568 instead of c_finish_cilk_clauses.
4569 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4570 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4571 floating-point variables in the linear clause for Cilk Plus.
4573 2016-04-18 Michael Matz <matz@suse.de>
4575 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4576 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4578 2016-04-15 Marek Polacek <polacek@redhat.com>
4581 * c-typeck.c (build_unary_op): Pass location down to error and
4584 2016-04-15 Jakub Jelinek <jakub@redhat.com>
4587 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4589 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4590 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4591 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4592 Adjust c_parser_pragma callers.
4593 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4595 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4597 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4598 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4599 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4600 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4601 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4602 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4603 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4604 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4606 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4607 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4610 2016-04-13 Marek Polacek <polacek@redhat.com>
4613 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4615 (c_parser_statement): Likewise.
4616 (c_parser_c99_block_statement): Likewise.
4617 (c_parser_while_statement): Likewise.
4618 (c_parser_for_statement): Likewise.
4619 (c_parser_if_body): Don't set IF_P here.
4620 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4621 about dangling else here.
4622 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4623 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4624 warn about dangling else here.
4626 2016-04-04 Marek Polacek <polacek@redhat.com>
4629 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4631 2016-03-31 Marek Polacek <polacek@redhat.com>
4634 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4636 2016-03-18 David Malcolm <dmalcolm@redhat.com>
4639 * c-parser.c (c_parser_postfix_expression): Set the source range
4640 for uses of "__builtin_types_compatible_p".
4642 2016-03-17 Jakub Jelinek <jakub@redhat.com>
4645 * c-typeck.c (composite_type): Don't count void_list_node
4646 into len, if the list is terminated by void_list_node, start
4647 with void_list_node instead of NULL for newargs. Stop
4650 2016-03-16 Marek Polacek <polacek@redhat.com>
4653 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4654 nested functions returning VM types.
4656 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4658 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4659 when calling c_finish_omp_clauses.
4661 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4664 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4667 2016-03-04 Marek Polacek <polacek@redhat.com>
4670 * c-parser.c (c_parser_postfix_expression): Call
4671 c_parser_cast_expression rather than c_parser_postfix_expression.
4673 2016-03-01 Jakub Jelinek <jakub@redhat.com>
4677 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4678 of incomplete decls to error_mark_node.
4680 2016-02-24 Marek Polacek <polacek@redhat.com>
4683 * c-decl.c (finish_decl): Don't update the copy of the type of a
4684 different decl type.
4686 2016-02-23 Jakub Jelinek <jakub@redhat.com>
4689 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4690 in id_kind reclassification.
4692 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4695 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4697 2016-02-16 James Norris <jnorris@codesourcery.com>
4700 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4702 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4704 * c-decl.c (build_null_declspecs): Zero the entire struct.
4707 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4708 callers changed. If nested_p is true, use it to call
4709 finish_implicit_inits.
4710 * c-tree.h (finish_implicit_inits): Declare.
4711 * c-typeck.c (finish_implicit_inits): New function. Move code
4713 (push_init_level): ... here.
4714 (set_designator, process_init_element): Call finish_implicit_inits.
4716 2016-02-11 Jakub Jelinek <jakub@redhat.com>
4719 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4720 arguments for -Waddress warning.
4722 2016-02-04 Jakub Jelinek <jakub@redhat.com>
4725 * c-decl.c (finish_enum): When honoring mode attribute,
4726 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4728 2016-01-29 Jakub Jelinek <jakub@redhat.com>
4731 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4732 all type variants, not just TYPE_MAIN_VARIANT.
4734 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4737 * c-decl.c (c_write_global_declarations_1): Warn with
4738 warn_unused_function if static prototype without definition
4741 2016-01-27 Marek Polacek <polacek@redhat.com>
4744 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4745 to unsigned, if needed. Add -Wsign-compare warning.
4747 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4749 PR tree-optimization/69483
4750 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4752 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4755 * c-tree.h (incomplete_record_decls): Declare.
4756 * c-parser.c (incomplete_record_decls): Define.
4757 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4758 report error if any decl has zero size.
4759 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4760 or enum type to incomplete_record_decls.
4762 2016-01-14 Tom de Vries <tom@codesourcery.com>
4764 PR tree-optimization/68773
4765 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4768 2016-01-14 Marek Polacek <polacek@redhat.com>
4771 * c-decl.c (grokdeclarator): Provide more information for invalid
4774 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4776 * c-parser.c (c_parser_unary_expression): For dereferences, build
4777 a combined location before calling build_indirect_ref, so that
4778 error reports cover the full range, manually updating the c_expr
4781 2016-01-06 Marek Polacek <polacek@redhat.com>
4784 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4785 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4788 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4790 Update copyright years.
4792 2016-01-04 Marek Polacek <polacek@redhat.com>
4795 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4796 optimization to use __atomic_fetch_* built-in if possible.
4798 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4800 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4802 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4805 2015-12-22 Marek Polacek <polacek@redhat.com>
4808 * c-typeck.c (build_component_ref): Warn when acessing elements of
4809 atomic structures or unions.
4811 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4813 * c-typeck.c: Include "gcc-rich-location.h".
4814 (build_binary_op): In the two places that call binary_op_error,
4815 create a gcc_rich_location and populate it with the location of
4816 the binary op and its two operands.
4818 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4820 * c-parser.c (c_parser_statement_after_labels): When calling
4821 c_finish_return, Use the return expression's location if it has
4822 one, falling back to the location of the first token within it.
4823 * c-typeck.c (c_finish_return): When issuing warnings about
4824 the incorrect presence/absence of a return value, issue a note
4825 showing the declaration of the function.
4827 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4829 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4831 (c_parser_peek_nth_token): New function.
4832 (c_parser_peek_conflict_marker): New function.
4833 (c_parser_error): Detect conflict markers and report them as such.
4835 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4837 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4838 to preserve range information for the primary expression
4839 in the call to c_parser_postfix_expression_after_primary.
4841 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4843 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4844 expression location, falling back on the first token location,
4845 rather than always using the latter.
4847 2015-12-16 Marek Polacek <polacek@redhat.com>
4850 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4853 2015-12-15 Marek Polacek <polacek@redhat.com>
4856 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4859 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4861 * c-parser.c (c_parser_alignof_expression): Capture location of
4862 closing parenthesis (if any), or of end of unary expression, and
4863 use it to build a src_range for the expression.
4865 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4868 * c-parser.c (c_parser_get_builtin_args): Add
4869 "out_close_paren_loc" param, and write back to it.
4870 (c_parser_postfix_expression): Capture the closing
4871 parenthesis location for RID_CHOOSE_EXPR,
4872 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4873 RID_BUILTIN_SHUFFLE and use it to set the source range
4874 for such expressions; within RID_BUILTIN_COMPLEX set
4875 the underlying location.
4877 2015-12-07 Marek Polacek <polacek@redhat.com>
4880 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4881 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4883 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4885 * c-tree.h (c_build_va_arg): Adjust prototype.
4886 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4887 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4888 parameter, adjust throughout and issue an error if EXPR is a component
4889 with reverse storage order.
4891 2015-12-02 Jason Merrill <jason@redhat.com>
4893 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4894 (c_fully_fold_internal, decl_constant_value_for_optimization):
4895 Move from c-common.c.
4896 * c-tree.h: Declare decl_constant_value_for_optimization.
4897 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4899 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4902 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4903 following link from declarator to next declarator. Track original
4904 qualified type and pass it to c_build_qualified_type.
4905 * c-typeck.c (c_build_qualified_type): Add arguments
4906 orig_qual_type and orig_qual_indirect.
4908 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4910 * c-parser.c (c_parser_omp_clause_name)
4911 (c_parser_oacc_all_clauses): Alphabetical sorting.
4913 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4916 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4919 2015-12-01 Julian Brown <julian@codesourcery.com>
4920 Cesar Philippidis <cesar@codesourcery.com>
4921 James Norris <James_Norris@mentor.com>
4923 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4924 (c_parser_oacc_clause_use_device): New function.
4925 (c_parser_oacc_all_clauses): Add use_device support.
4926 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4927 (c_parser_oacc_host_data): New function.
4928 (c_parser_omp_construct): Add host_data support.
4929 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4930 * c-typeck.c (c_finish_oacc_host_data): New function.
4931 (c_finish_omp_clauses): Add use_device support.
4933 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4936 * c-decl.c: Set TYPE_PACKED in variants.
4938 2015-11-27 Martin Liska <mliska@suse.cz>
4941 * c-array-notation.c (fix_builtin_array_notation_fn):
4942 Use release_vec_vec instead of vec::release.
4943 (build_array_notation_expr): Likewise.
4944 (fix_conditional_array_notations_1): Likewise.
4945 (fix_array_notation_expr): Likewise.
4946 (fix_array_notation_call_expr): Likewise.
4948 2015-11-27 Jakub Jelinek <jakub@redhat.com>
4951 * c-parser.c (c_parser_compound_statement_nostart): If
4952 last_label is true, use pragma_stmt instead of pragma_compound
4953 as second c_parser_pragma argument.
4954 (c_parser_omp_ordered, c_parser_omp_target_update,
4955 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4956 false as second argument to c_parser_skip_to_pragma_eol after
4957 diagnosing standalone directives used in pragma_stmt context.
4959 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4961 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4962 with "if (ENABLE_OFFLOADING)".
4964 2015-11-23 David Malcolm <dmalcolm@redhat.com>
4967 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4968 for various Objective-C constructs: Class.name syntax,
4969 @selector(), @protocol(), @encode(), and [] message syntax.
4971 2015-11-20 David Malcolm <dmalcolm@redhat.com>
4974 * c-typeck.c (should_suggest_deref_p): New function.
4975 (build_component_ref): Special-case POINTER_TYPE when
4976 generating a "not a structure of union" error message, and
4977 suggest a "->" rather than a ".", providing a fix-it hint.
4979 2015-11-19 David Malcolm <dmalcolm@redhat.com>
4981 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4982 candidate into a new function, find_closest_identifier.
4984 2015-11-19 Marek Polacek <polacek@redhat.com>
4987 * c-typeck.c (parser_build_binary_op): Properly handle
4988 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4990 2015-11-17 David Malcolm <dmalcolm@redhat.com>
4992 * c-parser.c (set_c_expr_source_range): Bulletproof both
4993 overloaded implementations against NULL expr->value.
4994 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4996 (c_parser_unary_expression): Likewise when handling addresses of
4998 (c_parser_postfix_expression): Likewise for statement expressions,
4999 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5000 __builtin_va_arg, and for __builtin_offset_of.
5001 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5002 src_range using the range of the braced initializer.
5003 (c_parser_transaction_expression): Set src_range for "ret" to a
5004 sane pair of values.
5006 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5008 * c-parser.c (c_finish_omp_declare_simd): Look for
5009 "simd" attribute as well. Update error message.
5011 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5013 * c-parser.c (c_parser_omp_declare_target): Adjust.
5015 2015-11-14 Jakub Jelinek <jakub@redhat.com>
5017 * c-typeck.c (c_finish_omp_clauses): Don't mark
5018 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5020 2015-11-14 Marek Polacek <polacek@redhat.com>
5022 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5023 * c-typeck.c: Likewise.
5025 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5027 * c-decl.c (warn_defaults_to): Pass line_table to
5029 * c-errors.c (pedwarn_c99): Likewise.
5030 (pedwarn_c90): Likewise.
5031 * c-parser.c (set_c_expr_source_range): New functions.
5032 (c_token::get_range): New method.
5033 (c_token::get_finish): New method.
5034 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5035 based on the range from the start of the LHS to the end of the
5037 (c_parser_conditional_expression): Likewise, based on the range
5038 from the start of the cond.value to the end of exp2.value.
5039 (c_parser_binary_expression): Call set_c_expr_source_range on
5040 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5041 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5042 based on the cast_loc through to the end of the expr.
5043 (c_parser_unary_expression): Likewise, based on the
5044 op_loc through to the end of op.
5045 (c_parser_sizeof_expression) Likewise, based on the start of the
5046 sizeof token through to either the closing paren or the end of
5048 (c_parser_postfix_expression): Likewise, using the token range,
5049 or from the open paren through to the close paren for
5050 parenthesized expressions.
5051 (c_parser_postfix_expression_after_primary): Likewise, for
5052 various kinds of expression.
5053 * c-tree.h (struct c_expr): Add field "src_range".
5054 (c_expr::get_start): New method.
5055 (c_expr::get_finish): New method.
5056 (set_c_expr_source_range): New decls.
5057 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5058 on ret for prefix unary ops.
5059 (parser_build_binary_op): Likewise, running from the start of
5060 arg1.value through to the end of arg2.value.
5062 2015-11-13 Marek Polacek <polacek@redhat.com>
5065 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5067 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5069 * c-typeck.c: Include spellcheck.h.
5070 (lookup_field_fuzzy_find_candidates): New function.
5071 (lookup_field_fuzzy): New function.
5072 (build_component_ref): If the field was not found, try using
5073 lookup_field_fuzzy and potentially offer a suggestion.
5075 2015-11-12 James Norris <jnorris@codesourcery.com>
5076 Joseph Myers <joseph@codesourcery.com>
5078 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5079 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5080 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5081 and PRAGMA_OMP_CLAUSE_LINK.
5082 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5083 and PRAGMA_OACC_CLAUSE_LINK.
5084 (OACC_DECLARE_CLAUSE_MASK): New definition.
5085 (c_parser_oacc_declare): New function.
5087 2015-11-12 Marek Polacek <polacek@redhat.com>
5090 * c-parser.c (c_parser_for_statement): Reclassify the token in
5093 2015-11-11 Marek Polacek <polacek@redhat.com>
5097 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5098 checking the size of an array.
5100 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5102 * c-array-notation.c: Remove unused header files.
5103 * c-aux-info.c: Likewise.
5104 * c-convert.c: Likewise.
5105 * c-decl.c: Likewise.
5106 * c-errors.c: Likewise.
5107 * c-lang.c: Likewise.
5108 * c-objc-common.c: Likewise.
5109 * c-parser.c: Likewise.
5110 * c-typeck.c: Likewise.
5111 * gccspec.c: Likewise.
5113 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5114 Cesar Philippidis <cesar@codesourcery.com>
5115 James Norris <jnorris@codesourcery.com>
5116 Julian Brown <julian@codesourcery.com>
5117 Nathan Sidwell <nathan@codesourcery.com>
5119 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5121 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5122 (c_parser_pragma): Parse 'acc routine'.
5123 (OACC_ROUTINE_CLAUSE_MARK): Define.
5124 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5126 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5129 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5130 location of the backward-goto to the start of the loop body.
5132 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5135 * c-parser.c (c_parser_while_statement): Finish the loop before
5136 parsing ahead for misleading indentation.
5137 (c_parser_for_statement): Likewise.
5139 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5141 * c-decl.c (finish_struct): If the structure has reverse storage
5142 order, rewrite the type of array fields with scalar component. Call
5143 maybe_apply_pragma_scalar_storage_order on entry.
5144 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5145 errors on bit-fields and reverse SSO here and not...
5146 (c_mark_addressable): ...here.
5147 (output_init_element): Adjust call to initializer_constant_valid_p.
5148 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5150 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5152 * c-decl.c (warn_defaults_to): Update for change in signature
5153 of diagnostic_set_info.
5154 * c-errors.c (pedwarn_c99): Likewise.
5155 (pedwarn_c90): Likewise.
5156 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5157 for textinfo::set_location.
5159 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5160 Thomas Schwinge <thomas@codesourcery.com>
5161 James Norris <jnorris@codesourcery.com>
5163 * c-parser.c (c_parser_omp_clause_name): Add support for
5164 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5165 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5166 default(none) in OpenACC.
5167 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5169 (c_parser_oacc_clause_tile): New function.
5170 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5171 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5172 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5174 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5175 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5177 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5178 (c_parser_oacc_update): Update the error message for missing clauses.
5179 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5180 and OMP_CLAUSE_INDEPENDENT.
5182 2015-11-05 Marek Polacek <polacek@redhat.com>
5185 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5186 deal with pre-evaluation on invalid types.
5188 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5189 Ilya Verbin <ilya.verbin@intel.com>
5191 * c-parser.c: Include context.h and gimple-expr.h.
5192 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5193 monotonic together with nonmonotonic.
5194 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5195 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5196 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5197 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5198 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5199 expressions on combined target teams before the target.
5200 (c_parser_omp_declare_target): If decl has "omp declare target" or
5201 "omp declare target link" attribute, and cgraph or varpool node already
5202 exists, then set corresponding flags. Call c_finish_omp_clauses
5203 in the parenthesized extended-list syntax case.
5204 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5206 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5207 on OMP_CLAUSE_REDUCTION array sections.
5208 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5209 into the constant offset, or for variable low-bound using
5210 POINTER_PLUS_EXPR. For structure element based array sections use
5211 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5212 (c_finish_omp_clauses): Drop generic_field_head, structure
5213 elements are now always mapped even as array section bases,
5214 diagnose same var in data sharing and mapping clauses. Diagnose if
5215 linear step on declare simd is neither a constant nor a uniform
5216 parameter. Look through POINTER_PLUS_EXPR for array section
5217 reductions. Diagnose the same var or function appearing multiple
5218 times on the same directive. Fix up wording for the to clause if t
5219 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5220 modifier on kinds other than dynamic or guided or nonmonotonic
5221 modifier together with ordered clause.
5223 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5224 Chung-Lin Tang <cltang@codesourcery.com>
5226 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5228 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5230 * c-array-notation.c: Reorder #include's and remove duplicates.
5231 * c-aux-info.c: Likewise.
5232 * c-convert.c: Likewise.
5233 * c-decl.c: Likewise.
5234 * c-errors.c: Likewise.
5235 * c-lang.c: Likewise.
5236 * c-objc-common.c: Likewise.
5237 * c-parser.c: Likewise.
5238 * c-typeck.c: Likewise.
5240 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
5243 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5244 after calling build_qualified_type.
5246 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5247 Thomas Schwinge <thomas@codesourcery.com>
5248 James Norris <jnorris@codesourcery.com>
5249 Joseph Myers <joseph@codesourcery.com>
5250 Julian Brown <julian@codesourcery.com>
5251 Bernd Schmidt <bschmidt@redhat.com>
5253 * c-parser.c (c_parser_oacc_shape_clause): New.
5254 (c_parser_oacc_simple_clause): New.
5255 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5256 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5258 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5259 James Norris <jnorris@codesourcery.com>
5260 Cesar Philippidis <cesar@codesourcery.com>
5264 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5265 parameters, and handle these. Adjust all users.
5266 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5268 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5270 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5272 (c_finish_omp_construct): Declare function.
5273 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5274 Merge functions into...
5275 (c_finish_omp_construct): ... this new function.
5277 2015-10-22 Richard Biener <rguenther@suse.de>
5279 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5280 before folding a MINUS_EXPR.
5282 2015-10-21 Marek Polacek <polacek@redhat.com>
5285 * c-decl.c (start_function): Warn about vararg functions without
5288 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5290 * c-typeck.c (build_conditional_expr): Use boolean vector
5291 type for vector comparison.
5292 (build_vec_cmp): New.
5293 (build_binary_op): Use build_vec_cmp for comparison.
5295 2015-10-20 Marek Polacek <polacek@redhat.com>
5297 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5299 2015-10-20 Marek Polacek <polacek@redhat.com>
5302 * c-parser.c (c_parser_attributes): Break out of the loop if the
5303 token after an attribute isn't a comma.
5305 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5306 Aldy Hernandez <aldyh@redhat.com>
5308 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5309 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5310 (c_parser_omp_variable_list): Handle structure elements for
5311 map, to and from clauses. Handle array sections in reduction
5312 clause. Formatting fixes.
5313 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5314 if clause modifiers.
5315 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5316 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5317 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5318 c_parser_omp_clause_is_device_ptr): New functions.
5319 (c_parser_omp_clause_ordered): Parse optional parameter.
5320 (c_parser_omp_clause_reduction): Handle array reductions.
5321 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5322 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5324 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5325 (c_parser_omp_clause_depend_sink): New function.
5326 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5327 (c_parser_omp_clause_map): Parse release/delete map kinds and
5328 optional always modifier.
5329 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5330 and c_finish_omp_clauses callers.
5331 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5332 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5333 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5334 (OMP_CRITICAL_CLAUSE_MASK): Define.
5335 (c_parser_omp_critical): Parse critical clauses.
5336 (c_parser_omp_for_loop): Handle doacross loops, adjust
5337 c_finish_omp_for and c_finish_omp_clauses callers.
5338 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5339 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5340 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5341 (c_parser_omp_for): Disallow ordered clause when combined with
5342 distribute. Disallow linear clause when combined with distribute
5343 and not combined with simd.
5344 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5345 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5346 parse clauses and if depend clause is found, don't parse a body.
5347 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5348 Allow target parallel without for after it.
5349 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5350 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5351 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5353 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5354 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5355 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5356 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5358 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5359 defaultmap and is_device_ptr clauses.
5360 (c_parser_omp_target): Parse target parallel and target simd. Set
5361 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5362 and target exit data. Diagnose invalid map kinds.
5363 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5364 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5366 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5368 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5369 (c_parser_omp_taskloop): New function.
5370 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5371 handle PRAGMA_OMP_TASKLOOP.
5372 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5373 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5374 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5375 Add IS_OMP argument, handle structure element bases, diagnose
5376 bitfields, pass IS_OMP recursively, diagnose known zero length
5377 array sections in depend clauses, handle array sections in reduction
5378 clause, diagnose negative length even for pointers.
5379 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5380 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5381 array sections in reduction clause, set
5382 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5383 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5384 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5385 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5387 2015-10-06 Marek Polacek <polacek@redhat.com>
5389 * c-parser.c (c_parser_statement_after_labels): Use
5390 protected_set_expr_location.
5391 (c_parser_omp_clause_num_gangs): Likewise.
5392 (c_parser_omp_clause_num_threads): Likewise.
5393 (c_parser_omp_clause_num_workers): Likewise.
5394 (c_parser_omp_clause_vector_length): Likewise.
5395 (c_parser_omp_clause_num_teams): Likewise.
5396 (c_parser_omp_clause_thread_limit): Likewise.
5397 * c-typeck.c (build_c_cast): Likewise.
5398 (c_cast_expr): Likewise.
5400 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5402 * c-typeck.c (c_tree_equal): Use real_equal instead of
5405 2015-10-04 Jason Merrill <jason@redhat.com>
5407 * c-parser.c (c_lex_one_token): Handle @synchronized.
5408 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5409 can change whether the function is transaction_safe.
5411 2015-10-02 Marek Polacek <polacek@redhat.com>
5414 * c-typeck.c (convert_for_assignment): Use the expansion point
5415 location throughout.
5417 2015-10-02 Marek Polacek <polacek@redhat.com>
5420 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5421 and pass it down to c_parser_if_statement.
5422 (c_parser_else_body): Add CHAIN parameter and pass it down to
5423 c_parser_statement_after_labels.
5424 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5425 duplicated if-else-if conditions.
5427 2015-10-01 Marek Polacek <polacek@redhat.com>
5429 * c-typeck.c (convert_for_assignment): Improve commentary.
5431 2015-09-30 Marek Polacek <polacek@redhat.com>
5434 * c-typeck.c (c_finish_return): Use the expansion point location for
5435 certain "return with value" warnings.
5437 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5439 * c-parser.c (pragma_lex): Add loc argument.
5441 2015-09-15 Marek Polacek <polacek@redhat.com>
5444 * c-decl.c (tag_exists_p): New function.
5445 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5446 struct/union/enum keywords are missing.
5447 * c-tree.h (tag_exists_p): Declare.
5449 2015-09-15 Marek Polacek <polacek@redhat.com>
5451 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5452 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5453 Return NULL_TREE instead of 0.
5454 (lookup_name): Return NULL_TREE instead of 0.
5455 (lookup_name_in_scope): Likewise.
5456 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5457 (parser_xref_tag): Use false instead of 0.
5458 (start_struct): Use true instead of 1.
5459 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5461 2015-09-14 Marek Polacek <polacek@redhat.com>
5463 * c-typeck.c (set_nonincremental_init_from_string): Use
5464 HOST_WIDE_INT_M1U when shifting a negative value.
5466 2015-09-09 Mark Wielaard <mjw@redhat.com>
5468 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5471 2015-09-10 Jakub Jelinek <jakub@redhat.com>
5474 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5475 into OMP_FOR_PRE_BODY rather than before the loop.
5477 2015-09-09 Jakub Jelinek <jakub@redhat.com>
5480 * c-parser.c (c_parser_oacc_all_clauses,
5481 c_parser_omp_all_clauses): Remove invalid clause from
5482 list of clauses even if parser->error is set.
5485 * c-parser.c (c_parser_omp_clause_aligned,
5486 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5488 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5492 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5493 instead of c_parser_unary_expression. If the result is !lvalue_p,
5494 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5496 2015-09-04 Marek Polacek <polacek@redhat.com>
5499 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5501 2015-09-03 Martin Sebor <msebor@redhat.com>
5504 * c-typeck.c (convert_arguments, parser_build_unary_op,
5505 build_conditional_expr, c_cast_expr, convert_for_assignment,
5506 build_binary_op, _objc_common_truthvalue_conversion): Call
5508 (c_decl_implicit): Define.
5510 2015-09-02 Marek Polacek <polacek@redhat.com>
5513 * c-parser.c (c_parser_enum_specifier): Give a better error for
5516 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5518 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5520 2015-08-12 Marek Polacek <polacek@redhat.com>
5522 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5525 2015-08-03 Marek Polacek <polacek@redhat.com>
5528 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5530 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5532 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5534 * c-parser.c (c_parser_if_body): Take token_indent_info
5535 argument. Call warn_for_misleading_indentation even when the
5536 body is a semicolon. Extract token_indent_infos corresponding
5537 to the guard, body and next tokens. Adjust call to
5538 warn_for_misleading_indentation accordingly.
5539 (c_parser_else_body): Likewise.
5540 (c_parser_if_statement): Likewise.
5541 (c_parser_while_statement): Likewise.
5542 (c_parser_for_statement): Likewise.
5544 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5545 Manuel López-Ibáñez <manu@gcc.gnu.org>
5547 * c-decl.c (get_parm_info): Remove static var. Update warning
5550 2015-07-27 Marek Polacek <polacek@redhat.com>
5554 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5556 2015-07-20 Marek Polacek <polacek@redhat.com>
5559 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5560 (build_binary_op): Warn about left shift overflows.
5562 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5564 * c-array-notation.c: Adjust includes for flags.h changes.
5565 * c-objc-common.c: Likewise.
5567 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5569 * c-array-notation.c: Adjust includes.
5570 * c-aux-info.c: Likewise.
5571 * c-convert.c: Likewise.
5572 * c-decl.c: Likewise.
5573 * c-errors.c: Likewise.
5574 * c-lang.c: Likewise.
5575 * c-objc-common.c: Likewise.
5576 * c-parser.c: Likewise.
5577 * c-typeck.c: Likewise.
5579 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5582 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5584 2015-06-29 Marek Polacek <polacek@redhat.com>
5587 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5588 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5589 about -Wswitch-bool here.
5590 (do_case): Update c_add_case_label call.
5591 (c_finish_case): Update c_do_switch_warnings call.
5593 2015-06-27 Marek Polacek <polacek@redhat.com>
5595 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5597 2015-06-26 Marek Polacek <polacek@redhat.com>
5599 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5601 * c-typeck.c (array_to_pointer_conversion): Likewise.
5602 (build_unary_op): Likewise.
5603 (c_finish_return): Likewise.
5605 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5607 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5608 * c-parser.c: Likewise.
5610 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5612 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5613 instead of pointer_hash.
5614 (detect_field_duplicates): Likewise.
5616 2015-06-25 Marek Polacek <polacek@redhat.com>
5618 * c-array-notation.c: Use VAR_P throughout.
5619 * c-decl.c: Likewise.
5620 * c-objc-common.c: Likewise.
5621 * c-parser.c: Likewise.
5622 * c-typeck.c: Likewise.
5624 2015-06-25 Marek Polacek <polacek@redhat.com>
5626 * c-decl.c: Use is_global_var throughout.
5627 * c-parser.c: Likewise.
5628 * c-typeck.c: Likewise.
5630 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5632 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5633 * c-aux-info.c: Likewise.
5634 * c-convert.c: Likewise.
5635 * c-decl.c: Likewise.
5636 * c-errors.c: Likewise.
5637 * c-lang.c: Likewise.
5638 * c-objc-common.c: Likewise.
5639 * c-parser.c: Likewise.
5640 * c-typeck.c: Likewise.
5642 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
5645 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5648 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5650 * c-decl.c (pop_scope): Register the main translation unit
5651 through the new debug hook.
5653 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5655 * c-array-notation.c : Adjust include files.
5656 * c-aux-info.c : Likewise.
5657 * c-convert.c : Likewise.
5658 * c-decl.c : Likewise.
5659 * c-errors.c : Likewise.
5660 * c-lang.c : Likewise.
5661 * c-lang.h : Likewise.
5662 * c-objc-common.c : Likewise.
5663 * c-parser.c : Likewise.
5664 * c-typeck.c : Likewise.
5666 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5668 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5669 immediately clobber it.
5670 (c_write_global_declarations_1): Remove call to
5671 check_global_declaration_1.
5672 (c_write_global_declarations_2): Remove.
5673 (c_write_final_cleanups): Rename from c_write_global_declarations.
5674 Remove call to finalize_compilation_unit.
5675 Remove calls to debugging hooks.
5676 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5677 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5678 * c-tree.h: Remove c_write_global_declarations.
5680 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5682 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5683 * c-aux-info.c: Likewise.
5684 * c-convert.c: Likewise.
5685 * c-decl.c: Likewise.
5686 * c-errors.c: Likewise.
5687 * c-lang.c: Likewise.
5688 * c-objc-common.c: Likewise.
5689 * c-parser.c: Likewise.
5690 * c-typeck.c: Likewise.
5692 2015-06-04 Marek Polacek <polacek@redhat.com>
5695 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5698 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5700 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5701 Warn for empty struct.
5702 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5704 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5706 * c-decl.c (start_function): Call plugin before parsing.
5707 (finish_function): Call plugin after parsing.
5709 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5712 * c-decl.c (merge_decls): Merge DECL_COMMON.
5714 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
5716 * Make-lang.in (check_gcc_pallelize): Define.
5718 2015-05-22 Marek Polacek <polacek@redhat.com>
5721 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5724 2015-05-21 Marek Polacek <polacek@redhat.com>
5726 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5729 2015-05-20 Marek Polacek <polacek@redhat.com>
5731 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5732 * c-typeck.c: Likewise.
5734 2015-05-19 Marek Polacek <polacek@redhat.com>
5736 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5738 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5741 * c-parser.c (c_parser_omp_for_loop): Don't add
5742 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5743 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5744 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5747 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5749 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5752 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5755 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5758 2015-05-14 Marek Polacek <polacek@redhat.com>
5762 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5765 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5767 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5768 to add a call to warn_for_misleading_indentation.
5769 (c_parser_else_body): Likewise, adding param "else_loc".
5770 (c_parser_if_statement): Check for misleading indentation.
5771 (c_parser_while_statement): Likewise.
5772 (c_parser_for_statement): Likewise.
5774 2015-05-08 Marek Polacek <polacek@redhat.com>
5777 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5778 (output_init_element): Likewise.
5780 2015-05-07 Marek Polacek <polacek@redhat.com>
5783 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5786 2015-04-30 Marek Polacek <polacek@redhat.com>
5788 * c-typeck.c (set_init_label): Call error_at instead of error and
5791 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5794 * c-typeck.c (c_build_va_arg): Clarify the error message.
5796 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5798 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5799 OMP_STANDALONE_CLAUSES.
5801 2015-04-28 Marek Polacek <polacek@redhat.com>
5803 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5805 2015-04-28 Marek Polacek <polacek@redhat.com>
5808 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5810 2015-04-25 Marek Polacek <polacek@redhat.com>
5813 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5816 2015-04-23 Marek Polacek <polacek@redhat.com>
5819 * c-decl.c (set_labels_context_r): New function.
5820 (store_parm_decls): Call it via walk_tree_without_duplicates.
5821 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5822 instead of create_tmp_var. Build TARGET_EXPR instead of
5824 (build_atomic_assign): Use create_tmp_var_raw instead of
5825 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5827 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5829 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5830 (c_parser_omp_target_update): Add missed %> to error_at ().
5832 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5835 * c-decl.c (c_default_pointer_mode): Remove definition.
5836 * c-tree.h (c_default_pointer_mode): Remove declaration.
5838 2015-03-27 Tobias Burnus <burnus@net-b.de>
5841 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5843 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5844 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5845 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5847 2015-03-19 Jakub Jelinek <jakub@redhat.com>
5849 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5850 attribute for DECL_EXTERNAL VAR_DECLs.
5852 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5854 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5857 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5860 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5861 before preparing arguments to warn_logical_not_parentheses.
5863 2015-03-09 Jakub Jelinek <jakub@redhat.com>
5866 * c-typeck.c (parser_build_binary_op): Don't warn for
5867 !!x == y or !b == y where b is _Bool.
5869 2015-03-09 Marek Polacek <polacek@redhat.com>
5871 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5872 * c-decl.c (grokdeclarator): Likewise.
5873 * c-typeck.c (build_binary_op): Likewise.
5875 2015-02-27 Marek Polacek <polacek@redhat.com>
5878 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5880 2015-02-14 Marek Polacek <polacek@redhat.com>
5883 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5884 declared through a typedef name.
5886 2015-02-13 Marek Polacek <polacek@redhat.com>
5889 * c-decl.c (grokdeclarator): Print also the type when giving
5890 the error message about array's incomplete element type.
5892 2015-02-11 Jakub Jelinek <jakub@redhat.com>
5895 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5896 check in the POP macro.
5898 2015-02-09 Marek Polacek <polacek@redhat.com>
5901 * c-typeck.c (process_init_element): Don't always wrap
5902 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5903 initializing a range of elements.
5905 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5909 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5911 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5913 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5914 processing enum declaration.
5916 2015-01-29 Marek Polacek <polacek@redhat.com>
5919 * c-typeck.c (pop_init_level): If constructor_elements has
5920 exactly one element with integer_zerop value, set constructor_zeroinit
5921 to 1. Remove braces around warning_init call.
5923 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5926 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5927 of FUNCTION_DECLs with error_mark_node.
5929 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5932 * c-typeck.c (convert_arguments): Return -1 if there are
5933 error_args, even if we've diagnosed too many arguments.
5935 2015-01-21 Richard Biener <rguenther@suse.de>
5938 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5939 for builtins the user declared correctly.
5941 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5942 Bernd Schmidt <bernds@codesourcery.com>
5943 Cesar Philippidis <cesar@codesourcery.com>
5944 James Norris <jnorris@codesourcery.com>
5945 Jakub Jelinek <jakub@redhat.com>
5946 Ilmir Usmanov <i.usmanov@samsung.com>
5948 * c-parser.c: Include "gomp-constants.h".
5949 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5950 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5951 Use OMP_CLAUSE_SET_MAP_KIND.
5952 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5953 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5954 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5955 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5956 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5957 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5958 "copyout", "create", "delete", "deviceptr", "gang", "host",
5959 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5960 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5961 "present_or_create", "pcreate", "seq", "self", "vector",
5962 "vector_length", "wait", "worker".
5963 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5964 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5965 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5966 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5967 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5968 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5969 (c_parser_oacc_data_clause_deviceptr)
5970 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5971 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5972 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5973 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5974 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5975 (c_parser_oacc_parallel, c_parser_oacc_update)
5976 (c_parser_oacc_wait): New functions.
5977 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5978 (c_finish_oacc_data): New prototypes.
5979 * c-typeck.c: Include "gomp-constants.h".
5980 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5981 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5982 OMP_CLAUSE_SET_MAP_KIND.
5983 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5984 (c_finish_oacc_data): New functions.
5985 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5986 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5987 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5988 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5989 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5990 GOMP_MAP_FORCE_DEVICEPTR.
5992 2015-01-09 Michael Collison <michael.collison@linaro.org>
5994 * c-array-notation.c: Include hash-set.h, machmode.h,
5995 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5996 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5997 * c-aux-info.c: Ditto.
5998 * c-convert.c: Ditto.
6000 * c-errors.c: Ditto.
6001 * c-lang.c: Dittoxs.
6002 * c-objc-common.c: Ditto.
6003 * c-parser.c: Ditto.
6004 * c-typeck.c: Include hash-set.h, machmode.h,
6005 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6006 fold-const.h, wide-int.h, inchash.h, real.h and
6007 fixed-value.h due to flattening of tree.h.
6009 2015-01-07 Marek Polacek <polacek@redhat.com>
6012 * c-typeck.c (process_init_element): Disallow initialization of
6013 a flexible array member with a string constant if the structure
6016 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6019 * c-typeck.c (convert_for_assignment, c_finish_return): For
6020 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6021 types also set in_late_binary_op around convert call.
6022 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6023 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6024 result on expr as last argument to ubsan_instrument_float_cast,
6025 if in_late_binary_op, don't use c_save_expr but save_expr.
6027 Update copyright years.
6029 2015-01-05 Marek Polacek <polacek@redhat.com>
6032 * c-typeck.c (build_array_ref): Pass loc down to
6033 warn_array_subscript_with_type_char.
6035 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6037 * c-typeck.c: New behavious for pointers to arrays with qualifiers
6038 (common-pointer-type): For pointers to arrays take qualifiers from
6040 (build_conditional_expr): Add warnings for lost qualifiers.
6041 (comp-target-types): Allow pointers to arrays with different qualifiers.
6042 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
6043 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
6044 to PEDWARN_FOR_QUALIFIERS.
6046 2014-12-17 Jakub Jelinek <jakub@redhat.com>
6049 * c-convert.c: Include ubsan.h.
6050 (convert): For real -> integral casts and
6051 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6052 instead instrument the float cast directly.
6054 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6056 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6057 c_finish_stmt_expr): Remove NULL last argument from
6058 create_tmp_var_raw and create_tmp_var calls.
6059 * c-array-notation.c (fix_builtin_array_notation_fn,
6060 build_array_notation_expr, fix_conditional_array_notations_1,
6061 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6063 2014-11-28 Marek Polacek <polacek@redhat.com>
6066 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6067 convert the right operand to integer type.
6069 2014-11-25 Marek Polacek <polacek@redhat.com>
6072 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6073 for inline functions.
6075 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6078 * c-typeck.c (build_array_ref): Adjust
6079 convert_vector_to_pointer_for_subscript caller. If it returns true,
6080 call non_lvalue_loc on the result.
6082 2014-11-11 Richard Biener <rguenther@suse.de>
6084 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6087 2014-11-10 Andi Kleen <ak@linux.intel.com>
6090 * c-parser.c (c_parser_statement_after_labels): Call
6092 (c_parser_if_statement): Dito.
6093 (c_parser_switch_statement): Dito.
6094 (c_parser_while_statement): Dito.
6095 (c_parser_do_statement): Dito.
6096 (c_parser_for_statement): Dito.
6097 * c-typeck.c (c_finish_loop): Dito.
6099 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6101 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6102 OPT_Wshift_count_overflow in the warnings.
6104 2014-10-30 Marek Polacek <polacek@redhat.com>
6106 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6107 print the stripped version as well, if they're not the same.
6109 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6111 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6114 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6116 * c-decl.c: Adjust include files.
6117 * c-parser.c: Ditto.
6119 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6120 Tom Tromey <tromey@redhat.com>
6122 * c-tree.h (enum c_oracle_request): New.
6123 (c_binding_oracle_function): New typedef.
6124 (c_binding_oracle, c_pushtag, c_bind): Declare.
6125 * c-decl.c (c_binding_oracle): New global.
6126 (I_SYMBOL_CHECKED): New macro.
6127 (i_symbol_binding): New function.
6128 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6129 (I_TAG_CHECKED): New macro.
6130 (i_tag_binding): New function.
6131 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6132 (I_LABEL_CHECKED): New macro.
6133 (i_label_binding): New function.
6134 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6135 (c_print_identifier): Save and restore c_binding_oracle.
6136 (c_pushtag, c_bind): New functions.
6138 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6140 * c-typeck.c: Adjust include files.
6142 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6145 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6146 initialization here...
6147 (c_initialize_diagnostics): ... but here. Set defaults after
6148 building pretty-printer.
6150 2014-10-23 Marek Polacek <polacek@redhat.com>
6153 * c-decl.c (pop_scope): Don't print warning in external_scope.
6155 2014-10-19 Marek Polacek <polacek@redhat.com>
6158 * c-typeck.c (output_init_element): Allow initializing objects with
6159 static storage duration with compound literals even in C99 and add
6162 2014-10-17 Marek Polacek <polacek@redhat.com>
6165 * c-typeck.c (digest_init): Allow initializing objects with static
6166 storage duration with compound literals even in C99 and add pedwarn
6169 2014-10-17 Marek Polacek <polacek@redhat.com>
6172 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6173 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6174 error multiple times. Print the type.
6176 2014-10-17 Marek Polacek <polacek@redhat.com>
6179 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6182 2014-10-17 Marek Polacek <polacek@redhat.com>
6184 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6185 (start_function): Use OPT_Wimplicit_int instead of 0.
6186 (store_parm_decls_oldstyle): Likewise.
6188 2014-10-17 Alan Modra <amodra@gmail.com>
6191 * c-decl.c (merge_decls): Don't merge section name or tls model
6192 to newdecl symtab node, instead merge to olddecl. Override
6193 existing olddecl section name. Set tls_model for all thread-local
6194 vars, not just OMP thread-private ones. Remove incorrect comment.
6196 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6198 * c-decl.c: Adjust include files.
6200 2014-10-14 DJ Delorie <dj@redhat.com>
6202 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6203 (c_token_starts_typename): Check all __intN, not just __int128.
6204 (c_token_starts_declspecs): Likewise.
6205 (c_parser_declspecs): Likewise.
6206 (c_parser_attribute_any_word): Likewise.
6207 (c_parser_objc_selector): Likewise.
6208 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6209 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6211 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6213 (finish_declspecs): Likewise.
6215 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6217 * c-parser.c (c_parser_all_labels): New function to replace
6219 (c_parser_statement): Call the new function.
6221 2014-10-09 Marek Polacek <polacek@redhat.com>
6224 * c-typeck.c (pop_init_level): Don't warn about initializing
6227 2014-10-07 Marek Polacek <polacek@redhat.com>
6230 * c-decl.c (header_for_builtin_fn): New function.
6231 (implicitly_declare): Suggest which header to include.
6233 2014-10-07 Marek Polacek <polacek@redhat.com>
6235 * c-convert.c (convert): Use error_operand_p.
6236 * c-typeck.c (require_complete_type): Likewise.
6237 (really_atomic_lvalue): Likewise.
6238 (digest_init): Likewise.
6239 (handle_omp_array_sections_1): Likewise.
6241 2014-10-03 Marek Polacek <polacek@redhat.com>
6244 * c-decl.c (pop_scope): Don't warn about "inline function declared
6245 but never defined" for functions marked with gnu_inline attribute.
6247 2014-09-25 Jakub Jelinek <jakub@redhat.com>
6250 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6251 on low_bound and length.
6253 2014-09-24 Marek Polacek <polacek@redhat.com>
6257 * c-parser.c: Don't define CPP_KEYWORD.
6258 (c_parser_switch_statement): Pass original type to c_finish_case.
6259 * c-tree.h (c_finish_case): Update declaration.
6260 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6261 conditionally to c_do_switch_warnings.
6263 2014-09-03 Marek Polacek <polacek@redhat.com>
6266 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6269 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6270 Balaji V. Iyer <balaji.v.iyer@intel.com>
6271 Igor Zamyatin <igor.zamyatin@intel.com>
6273 * c-parser.c (c_parser_cilk_for): New function.
6274 (c_parser_cilk_grainsize): Likewise.
6275 (c_get_temp_regvar): Likewise.
6276 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6277 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6278 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6279 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6282 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6284 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6285 with using HOST_WIDE_INT without truncation to 'int'
6287 2014-08-22 Marek Polacek <polacek@redhat.com>
6290 * c-typeck.c (parser_build_binary_op): Adjust call to
6291 warn_logical_not_parentheses.
6293 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6296 * c-parser.c (c_parser_array_notation): Check for correct
6297 type of an array added.
6299 2014-08-19 Marek Polacek <polacek@redhat.com>
6302 * c-typeck.c (build_binary_op): If either operand of a comparison
6303 is a boolean expression, call maybe_warn_bool_compare.
6305 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6308 * c-typeck.c (build_c_cast): Do a conversion even when the
6309 TYPE_MAIN_VARIANTs are the same.
6311 2014-08-19 Marek Polacek <polacek@redhat.com>
6313 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6314 pedwarn_c99 instead of pedwarn.
6315 (grokfield): Likewise.
6316 (warn_defaults_to): New function.
6317 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6318 Unconditionally call pedwarn_c99 instead of pedwarn.
6319 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6320 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6321 check flag_isoc11 before.
6322 * c-errors.c (pedwarn_c99): Change the return type to bool.
6323 Handle -Wc99-c11-compat.
6324 * c-parser.c (disable_extension_diagnostics): Handle
6325 warn_c99_c11_compat.
6326 (restore_extension_diagnostics): Likewise.
6327 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6328 instead of pedwarn, don't check flag_isoc11 before.
6329 (c_parser_declspecs): Likewise.
6330 (c_parser_alignas_specifier): Likewise.
6331 (c_parser_alignof_expression): Likewise.
6332 (c_parser_generic_selection): Likewise.
6333 * c-tree.h (pedwarn_c99): Update declaration.
6334 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6337 2014-08-19 Marek Polacek <polacek@redhat.com>
6339 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6341 * c-errors.c: Include "opts.h".
6342 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6343 * c-parser.c (disable_extension_diagnostics): Handle negative value
6344 of warn_c90_c99_compat, too.
6345 (restore_extension_diagnostics): Likewise.
6346 (c_parser_compound_statement_nostart): Pass
6347 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6349 2014-08-12 Marek Polacek <polacek@redhat.com>
6351 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6353 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6355 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6357 2014-08-10 Marek Polacek <polacek@redhat.com>
6360 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6361 Call pedwarn_c90 instead of pedwarn.
6362 (check_bitfield_type_and_width): Likewise.
6363 (declspecs_add_qual): Likewise.
6364 (declspecs_add_type): Likewise.
6365 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6366 Adjust to only call pedwarn_c90.
6367 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6368 pedwarn_c90 instead of pedwarn.
6369 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6370 * c-parser.c (disable_extension_diagnostics): Handle
6371 warn_c90_c99_compat.
6372 (restore_extension_diagnostics): Likewise.
6373 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6374 pedwarn_c90 instead of pedwarn.
6375 (c_parser_initelt): Likewise.
6376 (c_parser_postfix_expression): Likewise.
6377 (c_parser_postfix_expression_after_paren_type): Likewise.
6378 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6379 * c-tree.h: Fix formatting.
6380 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6381 pedwarn_c90 instead of pedwarn.
6383 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6385 * c-typeck.c: Remove include of pointer-set.h.
6387 2014-08-07 Marek Polacek <polacek@redhat.com>
6389 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6391 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6393 * c-typeck.c: Use hash_map instead of pointer_map.
6395 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6397 * c-decl.c: Use hash_set instead of pointer_set.
6399 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6402 * c-array-notation.c (expand_array_notations): Handling
6405 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
6408 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6411 2014-07-30 Tom Tromey <tromey@redhat.com>
6413 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6415 (really_start_incremental_init, push_init_level): Initialize
6417 (pop_init_level): Set global designator_depth.
6418 (process_init_element): Check for designated_init attribute.
6420 2014-07-20 Marek Polacek <polacek@redhat.com>
6423 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6424 (implicitly_declare): Pass location to implicit_decl_warning.
6426 2014-07-14 Jakub Jelinek <jakub@redhat.com>
6429 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6430 If non-NULL, call c_parser_check_literal_zero.
6431 (c_parser_check_literal_zero): New function.
6432 (c_parser_postfix_expression_after_primary): Adjust
6433 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6435 2014-07-06 Marek Polacek <polacek@redhat.com>
6438 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6439 * c-tree.h (C_ARRAY_PARAMETER): Define.
6440 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6443 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
6444 Chen Gang <gang.chen.5i5j@gmail.com>
6446 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6449 2014-07-01 Marek Polacek <polacek@redhat.com>
6451 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6452 instead of 0 to WARN_FOR_ASSIGNMENT.
6454 2014-07-01 Marek Polacek <polacek@redhat.com>
6457 * c-typeck.c (convert_for_assignment): Pass
6458 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6460 2014-06-30 Marek Polacek <polacek@redhat.com>
6462 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6463 has no_sanitize_undefined attribute.
6465 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6468 * c-array-notation.c (fix_builtin_array_notation_fn):
6469 Check for 0 arguments in builtin call. Check that bultin argument is
6471 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6474 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6476 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6477 qualifiers in __auto_type for atomic types.
6478 (c_parser_typeof_specifier): Discard all type qualifiers in
6479 __typeof__ for atomic types.
6481 2014-06-25 Marek Polacek <polacek@redhat.com>
6484 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6485 the return expression to c_finish_return.
6487 2014-06-25 Jakub Jelinek <jakub@redhat.com>
6489 * c-typeck.c (c_finish_omp_clauses): Make sure
6490 OMP_CLAUSE_LINEAR_STEP has correct type.
6492 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6496 2014-06-24 Jakub Jelinek <jakub@redhat.com>
6498 * c-parser.c (c_parser_omp_for_loop): For
6499 #pragma omp parallel for simd move lastprivate clause from parallel
6500 to for rather than simd.
6502 2014-06-23 Marek Polacek <polacek@redhat.com>
6504 * c-typeck.c (parser_build_binary_op): Don't call
6505 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6507 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6509 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6510 * c-decl.c (merge_decls): Likewise.
6512 2014-06-09 Marek Polacek <polacek@redhat.com>
6515 * c-typeck.c (error_init): Call inform instead of error_at.
6516 (pedwarn_init): Call inform instead of pedwarn.
6517 (warning_init): Call inform instead of warning_at.
6519 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
6521 * c-decl.c (merge_decls): Use set_decl_section_name.
6522 (duplicate_decls): Remove node if it exists.
6524 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6527 * c-typeck.c (push_init_level, process_init_element,
6528 pop_init_level): Correct check for zero initialization, move
6529 missing brace warning to respect zero initialization.
6531 2014-06-05 Marek Polacek <polacek@redhat.com>
6534 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6536 2014-06-05 Marek Polacek <polacek@redhat.com>
6539 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6540 on the left hand side operand of a comparison.
6542 2014-06-05 Marek Polacek <polacek@redhat.com>
6545 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6546 Print note only if the warning was printed.
6548 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6551 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6554 2014-06-03 Marek Polacek <polacek@redhat.com>
6557 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6559 * c-tree.h (c_start_case): Update.
6560 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6561 switch condition has boolean value.
6563 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
6565 * c-decl.c: Include builtins.h.
6566 * c-parser.c: Likewise.
6568 2014-05-27 Marek Polacek <polacek@redhat.com>
6571 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6572 error and warning calls to error_at and warning_at. Pass location of
6573 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6574 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6575 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6577 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6580 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6581 function parameters.
6583 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
6585 * c-decl.c (merge_decls): Preserve symtab node pointers.
6586 (duplicate_decls): Free new decl.
6588 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6590 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6593 * c-parser.c (c_parser_omp_target): Return bool values.
6595 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6597 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6598 num_teams_loc variable to num_thread_limit_loc.
6600 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6602 * c-array-notation.c (expand_array_notations): Use void_node
6603 instead of void_zero_node.
6605 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6607 * c-decl.c (finish_struct): Adjust.
6608 (finish_enum): Likewise.
6610 (record_inline_static): Likewise.
6611 (push_scope): Likewise.
6612 (make_label): Likewise.
6613 (lookup_label_for_goto): Likewise.
6614 (finish_struct): Likewise.
6615 (finish_enum): Likewise.
6616 (store_parm_decls): Likewise.
6617 (c_push_function_context): Likewise.
6618 * c-lang.h: Remove usage of variable_size gty attribute.
6619 * c-parser.c (c_parse_init): Adjust.
6620 (c_parse_file): Likewise.
6622 2014-05-13 Marek Polacek <polacek@redhat.com>
6625 * c-typeck.c (convert_for_assignment): Pass location to
6626 WARN_FOR_ASSIGNMENT instead of input_location.
6628 2014-05-10 Marek Polacek <polacek@redhat.com>
6630 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6631 maybe_warn_string_init.
6632 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6633 maybe_warn_string_init.
6634 * c-tree.h (maybe_warn_string_init): Update declaration.
6635 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6636 Call pedwarn_init with loc instead of with input_location.
6637 (digest_init): Pass init_loc to maybe_warn_string_init.
6638 (pop_init_level): Call pedwarn_init with loc instead of with
6640 (set_init_index): Likewise.
6641 (process_init_element): Likewise.
6643 2014-05-09 Marek Polacek <polacek@redhat.com>
6646 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6647 (c_parser_initelt): Pass location to set_init_label. Pass array index
6648 location to set_init_index.
6649 * c-tree.h (push_init_level): Update declaration.
6650 (pop_init_level): Likewise.
6651 (set_init_index): Likewise.
6652 (set_init_label): Likewise.
6653 * c-typeck.c (error_init): Add location parameter. Call error_at
6655 (digest_init): Pass init_loc to error_init.
6656 (really_start_incremental_init):
6657 (push_init_level): Add location parameter. Pass loc to pop_init_level
6659 (pop_init_level): Likewise.
6660 (set_designator): Add location parameter. Pass loc to pop_init_level,
6661 push_init_level, and error_init.
6662 (set_init_index): Add location parameter. Pass loc to error_init and
6664 (set_init_label): Likewise.
6665 (output_init_element): Pass loc to error_init.
6666 (process_init_element): Pass loc to error_init, pop_init_level,
6667 pedwarn_init, and push_init_level.
6669 2014-05-09 Marek Polacek <polacek@redhat.com>
6672 * c-parser.c (c_parser_attributes): Parse the arguments as an
6673 expression-list if the attribute takes identifier.
6675 2014-05-08 Marek Polacek <polacek@redhat.com>
6678 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6681 2014-05-08 Marek Polacek <polacek@redhat.com>
6684 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6687 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6688 Mike Stump <mikestump@comcast.net>
6689 Richard Sandiford <rdsandiford@googlemail.com>
6691 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6692 (finish_enum): Use wide-int interfaces.
6693 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6694 * c-typeck.c (build_c_cast): Likewise.
6695 (set_nonincremental_init_from_string): Likewise.
6696 (c_tree_equal): Likewise.
6698 2014-05-02 Marek Polacek <polacek@redhat.com>
6701 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6702 Return size_one_node when the type is not complete.
6703 (pointer_diff): Remove comment.
6704 (build_unary_op): Improve error messages.
6706 2014-05-02 Marek Polacek <polacek@redhat.com>
6708 * c-typeck.c (c_finish_return): Separate warning_at calls.
6710 2014-05-02 Marek Polacek <polacek@redhat.com>
6712 * c-tree.h (error_init): Remove declaration.
6713 (pedwarn_init): Likewise.
6714 * c-typeck.c (error_init): Make static and move above.
6715 (pedwarn_init): Likewise.
6716 (warning_init): Move above.
6717 (maybe_warn_string_init): Likewise.
6719 2014-05-01 Jeff Law <law@redhat.com>
6723 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6724 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6727 2014-05-02 Marek Polacek <polacek@redhat.com>
6730 * c-typeck.c (push_init_level): Set constructor_designated to
6731 p->designated for structures.
6733 2014-05-01 Marek Polacek <polacek@redhat.com>
6736 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6737 function-definition has an attribute after the declarator.
6739 2014-05-01 Marek Polacek <polacek@redhat.com>
6742 * c-typeck.c (warning_init): Add location_t parameter. Call
6743 warning_at instead of warning.
6744 (push_init_level): Pass input_location to warning_init.
6745 (add_pending_init): Add location_t parameter. Pass loc to
6747 (set_nonincremental_init): Pass input_location to add_pending_init.
6748 (set_nonincremental_init_from_string): Likewise.
6749 (output_init_element): Pass loc to warning_init and to
6752 2014-05-01 Marek Polacek <polacek@redhat.com>
6755 * c-typeck.c (c_finish_return): Distinguish between label and variable
6756 when warning about returning local address.
6758 2014-05-01 Marek Polacek <polacek@redhat.com>
6761 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6764 2014-05-01 Marek Polacek <polacek@redhat.com>
6767 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6768 instead of 0 to WARN_FOR_QUALIFIERS.
6770 2014-05-01 Marek Polacek <polacek@redhat.com>
6773 * c-typeck.c (default_conversion): Use better location for
6776 2014-04-30 Marek Polacek <polacek@redhat.com>
6778 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6779 also when SANITIZE_FLOAT_DIVIDE is on.
6781 2014-04-30 Marek Polacek <polacek@redhat.com>
6784 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6785 and pedwarn_init. Use loc insted of input_location.
6787 2014-04-30 Marek Polacek <polacek@redhat.com>
6790 * c-typeck.c (build_binary_op): Use location when warning about
6793 2014-04-25 Marek Polacek <polacek@redhat.com>
6796 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6797 always_inline/noinline and hot/cold attributes.
6799 2014-04-25 Marek Polacek <polacek@redhat.com>
6802 * c-parser.c (c_parser_initelt): Pass input_location to
6803 process_init_element.
6804 (c_parser_initval): Pass loc to process_init_element.
6805 * c-tree.h (process_init_element): Adjust declaration.
6806 * c-typeck.c (push_init_level): Pass input_location to
6807 process_init_element.
6808 (pop_init_level): Likewise.
6809 (set_designator): Likewise.
6810 (output_init_element): Add location_t parameter. Pass loc to
6812 (output_pending_init_elements): Pass input_location to
6813 output_init_element.
6814 (process_init_element): Add location_t parameter. Pass loc to
6815 output_init_element.
6817 2014-04-24 Jakub Jelinek <jakub@redhat.com>
6819 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6820 atomic-clause, allow comma in between atomic-clause and
6823 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6826 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6827 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6829 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6832 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6833 create_tmp_var instead build_decl for creating temps.
6834 (build_array_notation_expr): Likewise.
6835 (fix_conditional_array_notations_1): Likewise.
6836 (fix_array_notation_expr): Likewise.
6837 (fix_array_notation_call_expr): Likewise.
6839 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6842 * c-tree.h (c_build_function_call_vec): New prototype.
6843 * c-typeck.c (build_function_call_vec): Don't call
6844 resolve_overloaded_builtin here.
6845 (c_build_function_call_vec): New wrapper function around
6846 build_function_call_vec. Call resolve_overloaded_builtin here.
6847 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6848 Call c_build_function_call_vec instead of build_function_call_vec.
6849 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6850 * c-decl.c (finish_decl): Likewise.
6852 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6855 * c-typeck.c: Use correct format string in cast-qual warning
6857 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6859 * c-decl.c (c_decl_attributes): Use
6860 lang_hooks.types.omp_mappable_type.
6861 * c-typeck.c (c_finish_omp_clauses): Likewise.
6863 2014-03-06 Marek Polacek <polacek@redhat.com>
6866 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6867 of checking tree code.
6869 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6871 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6872 (c_parser_parameter_declaration): Likewise.
6874 2014-02-19 Marek Polacek <polacek@redhat.com>
6877 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6878 Call mark_exp_read on exp.value.
6879 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6880 TREE_ADDRESSABLE on old instead of val.
6881 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6883 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6885 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6886 C_EXPR_APPEND by vec_safe_push.
6887 * c-tree.h (C_EXPR_APPEND): Remove.
6889 2014-01-31 Marek Polacek <polacek@redhat.com>
6892 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6893 build_function_call_vec.
6894 (build_function_call): Likewise.
6895 (build_atomic_assign): Likewise.
6896 (build_function_call_vec): Add arg_loc parameter. Use it.
6897 (convert_arguments): Likewise.
6898 (convert_for_assignment): Rename rhs_loc to expr_loc.
6899 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6900 (c_parser_objc_keywordexpr): Likewise.
6901 (c_parser_postfix_expression_after_primary): Call
6902 build_function_call_vec with expr_loc rather than op_loc.
6903 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6904 build_function_call_vec.
6905 (c_parser_expr_list): Add locations parameter. Fill it with locations
6906 of function arguments.
6907 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6909 2014-01-30 Marek Polacek <polacek@redhat.com>
6912 * c-typeck.c (build_function_call_vec): Use loc parameter.
6913 (convert_arguments): Add location parameter. Use it.
6914 (ep_convert_and_check): Likewise.
6915 (build_atomic_assign): Adjust convert_for_assignment call.
6916 (build_modify_expr): Likewise.
6917 (digest_init): Likewise.
6918 (c_finish_return): Likewise.
6919 (build_conditional_expr): Adjust ep_convert_and_check calls.
6920 (convert_for_assignment): Add rhs_loc parameter. Use it.
6921 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6924 2014-01-30 Richard Biener <rguenther@suse.de>
6927 * c-typeck.c (build_function_call_vec): Do not replace calls
6928 to a function via an incompatible type with a runtime abort.
6930 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6932 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6933 flag_enable_cilkplus with flag_cilkplus.
6934 (c_parser_direct_declarator_inner): Likewise.
6935 (c_parser_attribute_any_word): Likewise.
6936 (c_parser_attributes): Likewise.
6937 (c_parser_compound_statement): Likewise.
6938 (c_parser_statement_after_labels): Likewise.
6939 (c_parser_if_statement): Likewise.
6940 (c_parser_switch_statement): Likewise.
6941 (c_parser_do_statement): Likewise.
6942 (c_parser_for_statement): Likewise.
6943 (c_parser_unary_expression): Likewise.
6944 (c_parser_postfix_expression): Likewise.
6945 (c_parser_postfix_expression_after_primary): Likewise.
6946 (c_parser_postfix_expression_after_primary): Likewise.
6947 (c_parser_omp_clause_name): Likewise.
6948 (c_finish_omp_declare_simd): Likewise.
6949 (c_parser_cilk_verify_simd): Likewise.
6950 * c-typeck.c (build_array_ref): Likewise.
6951 (build_function_call_vec): Likewise.
6952 (convert_arguments): Likewise.
6953 (build_compound_expr): Likewise.
6954 (c_finish_return): Likewise.
6955 (c_finish_if_stmt): Likewise.
6956 (c_finish_loop): Likewise.
6957 (build_binary_op): Likewise.
6959 2014-01-23 Marek Polacek <polacek@redhat.com>
6962 * c-typeck.c (parser_build_binary_op): Use location instead of
6964 (build_binary_op): Pass location to shorten_compare.
6966 2014-01-23 Marek Polacek <polacek@redhat.com>
6969 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6972 2014-01-23 Marek Polacek <polacek@redhat.com>
6975 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6976 of a comma expression.
6977 (emit_side_effect_warnings): Likewise.
6979 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6982 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6983 function to use walk_tree and moved a lot of its functionality to
6984 expand_array_notations.
6985 (expand_array_notations): New function.
6987 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6989 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6990 attribute an attribute without value.
6992 2014-01-23 Jakub Jelinek <jakub@redhat.com>
6995 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6996 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6998 2014-01-22 Marek Polacek <polacek@redhat.com>
7001 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7002 of remove_c_maybe_const_expr on op1 and op2.
7004 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7007 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7008 effects, preevaluate rhs using SAVE_EXPR first.
7010 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7013 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7014 statements with if-elseif statements.
7016 2014-01-06 Marek Polacek <polacek@redhat.com>
7019 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7020 defined bit-field types only in ISO C.
7022 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7024 Update copyright years
7026 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7028 * c-array-notation.c: Use the standard form for the copyright notice.
7030 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7032 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7033 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7034 field in parser is not empty. If not-empty, call the function
7035 c_parser_finish_omp_declare_simd.
7036 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7037 between SIMD-enabled functions and #pragma simd. Added new parameter.
7038 (c_parser_cilk_all_clauses): Modified the usage of the function
7039 c_parser_cilk_clause_vectorlength as mentioned above.
7040 (c_parser_cilk_simd_fn_vector_attrs): New function.
7041 (c_finish_cilk_simd_fn_tokens): Likewise.
7042 (is_cilkplus_vector_p): Likewise.
7043 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7044 "nomask," and "mask" strings in clause name.
7045 (c_parser_omp_all_clauses): Added 3 new case statements:
7046 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7047 PRAGMA_CILK_CLAUSE_NOMASK.
7048 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7049 check for vector attribute and if so call the function
7050 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7051 called the function c_finish_cilk_simd_fn_tokens.
7052 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7053 parser field is non-empty. If so, parse them as you would parse
7054 the omp declare simd pragma.
7055 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7056 Added a check when step is a parameter and flag it as error.
7057 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7058 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7061 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7063 * c-parser.c (c_parser_omp_parallel): Fix description.
7065 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7067 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7068 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7069 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7070 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7072 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7075 * c-parser.c (c_parser_alignas_specifier): Use
7076 c_sizeof_or_alignof_type instead of c_alignof.
7077 (c_parser_alignof_expression): Likewise, with min_alignof
7078 parameter depending on alignof spelling used.
7080 2013-12-04 Marek Polacek <polacek@redhat.com>
7083 * c-decl.c (start_function): Don't warn for missing prototype for
7086 2013-12-03 Marek Polacek <polacek@redhat.com>
7089 * c-decl.c (build_compound_literal): Allow compound literals with
7090 empty initial value.
7092 2013-12-02 Joseph Myers <joseph@codesourcery.com>
7095 * c-typeck.c (build_modify_expr): Diagnose assignment to
7096 expression with array type.
7098 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7101 * c-typeck.c (process_init_element): Do not treat a string as
7102 initializing a whole array when used with a designator for an
7105 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7108 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7109 an inline function following a static declaration.
7111 2013-11-28 Jakub Jelinek <jakub@redhat.com>
7114 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7115 to p_name before calling c_parser_omp_teams instead of after.
7116 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7117 argument. Remove unused p_name variable.
7119 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
7120 Jakub Jelinek <jakub@redhat.com>
7122 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7123 external_scope is NULL.
7125 2013-11-27 Tom de Vries <tom@codesourcery.com>
7126 Marc Glisse <marc.glisse@inria.fr>
7129 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7131 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7133 * c-typeck.c: Add required include files from gimple.h.
7135 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7137 * c-decl.c (define_label, shadow_tag_warned)
7138 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7139 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7140 (declspecs_add_type): Remove use of in_system_header macro.
7141 * c-parser.c (c_parser_unary_expression): Likewise.
7142 * c-typeck.c (store_init_value, process_init_element)
7143 (c_start_case): Likewise.
7145 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7148 * c-parser.c (c_parser_set_source_position_from_token): Remove
7149 reference to in_system_header from comment.
7151 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7153 * c-decl.c (grokdeclarator): Update comment to refer to
7154 tree_to_[su]hwi rather than tree_low_cst.
7156 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7158 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7159 tree_to_uhwi throughout.
7161 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7163 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7166 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7168 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7171 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7173 * c-parser.c (c_parser_cilk_simd): New.
7174 (c_parser_cilk_verify_simd): New.
7175 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7176 (c_parser_omp_for_loop): Add case for NE_EXPR.
7177 Set c_break_label for CILK_SIMD.
7178 (c_parser_cilk_clause_vectorlength): New.
7179 (c_parser_cilk_clause_linear): New.
7180 (c_parser_cilk_clause_name): New.
7181 (c_parser_cilk_all_clauses): New.
7182 * c-typeck.c (build_unary_op): Pass location argument to
7184 (build_modify_expr): Same.
7185 (build_asm_expr): Same.
7186 (c_finish_bc_stmt): Error on break/continue in loops.
7188 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7190 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7192 2013-11-14 Diego Novillo <dnovillo@google.com>
7194 * c-decl.c: Include print-tree.h.
7195 Include stor-layout.h.
7198 Include stringpool.h.
7199 * c-lang.c: Include fold-const.h.
7200 * c-parser.c: Include stringpool.h.
7202 Include stor-layout.h.
7204 Include trans-mem.h.
7205 * c-typeck.c: Include stor-layout.h.
7206 Include trans-mem.h.
7210 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7212 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7213 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7215 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7216 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7218 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7219 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7220 (c_parser_declarator, c_parser_direct_declarator_inner)
7221 (c_parser_parameter_declaration, c_parser_type_name): All callers
7223 (c_parser_declaration_or_fndef): Handle declarations with type
7224 determined from the initializer.
7226 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7228 * c-typeck.c: Include gimplify.h.
7230 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7232 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7233 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7235 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7236 or _Thread_local as appropriate in diagnostics.
7237 (build_null_declspecs): Initialize ret->thread_gnu_p.
7238 (declspecs_add_scspec): Handle either __thread or _Thread_local
7239 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7240 pedantic. Do not disallow _Thread_local extern and _Thread_local
7243 2013-11-07 Joseph Myers <joseph@codesourcery.com>
7244 Andrew MacLeod <amacleod@redhat.com>
7246 * c-aux-info.c (gen_type): Handle atomic qualifier.
7247 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7248 qualifiers when compating types.
7249 (shadow_tag_warned): Handle atomic_p in declspecs.
7250 (quals_from_declspecs): Likewise.
7251 (start_decl): Use c_type_promotes_to when promoting argument
7253 (grokdeclarator): Handle _Atomic.
7254 (get_parm_info): Diagnose any qualifier on "void" as only
7256 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7257 comparing types. Use c_type_promotes_to when promoting argument
7259 (finish_function): Use c_type_promotes_to when promoting argument
7261 (build_null_declspecs): Handle atomic_p in declspecs.
7262 (declspecs_add_qual): Handle RID_ATOMIC.
7263 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7264 (c_token_starts_declspecs): Handle RID_ATOMIC.
7265 (c_parser_declspecs): Handle atomic type specifiers and
7267 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7268 from types of expressions with atomic type.
7269 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7270 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7271 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7272 (c_parser_statement_after_labels, c_parser_switch_statement)
7273 (c_parser_for_statement, c_parser_expr_no_commas)
7274 (c_parser_conditional_expression, c_parser_binary_expression)
7275 (c_parser_cast_expression, c_parser_unary_expression)
7276 (c_parser_postfix_expression)
7277 (c_parser_postfix_expression_after_primary, c_parser_expression):
7278 Use convert_lvalue_to_rvalue.
7279 (c_parser_expression_conv, c_parser_expr_list): Document
7280 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7281 (c_parser_objc_synchronized_statement): Use
7282 convert_lvalue_to_rvalue.
7283 (c_parser_objc_selector): Handle RID_ATOMIC.
7284 (c_parser_objc_receiver, c_parser_array_notation): Use
7285 convert_lvalue_to_rvalue.
7286 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7287 _Atomic (type-name).
7288 (struct c_declspecs): Add atomic_p field.
7289 (convert_lvalue_to_rvalue): Declare.
7290 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7291 corresponding atomic types.
7292 (qualify_type): Don't add _Atomic qualifiers from second argument.
7293 (comp_target_types): Do not allow _Atomic mismatches.
7294 (type_lists_compatible_p): Do not remove atomic qualifiers when
7296 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7297 (build_atomic_assign): New functions.
7298 (build_unary_op): Use build_atomic_assign for atomic increment and
7300 (build_conditional_expr): Do not treat _Atomic void as a qualified
7302 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7303 (find_anonymous_field_with_type, convert_to_anonymous_field)
7304 (convert_for_assignment): Do not remove atomic qualifiers when
7306 (digest_init): Do not accept initialization of arrays of atomic
7307 elements by string constants.
7308 (build_asm_expr): Use convert_lvalue_to_rvalue.
7309 (build_binary_op): Do not treat _Atomic void as a qualified
7312 2013-11-06 DJ Delorie <dj@redhat.com>
7314 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7315 both explicit and builtin, print the location of the explicit one.
7317 2013-11-05 Tobias Burnus <burnus@net-b.de>
7319 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7320 c_parser_omp_distribute, c_parser_omp_teams,
7321 c_parser_omp_target, c_parser_omp_declare): Handle
7324 2013-11-03 Marek Polacek <polacek@redhat.com>
7326 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7328 2013-11-01 Jakub Jelinek <jakub@redhat.com>
7330 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7331 check_dup_generic at the end, unless remove is true.
7332 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7334 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7336 2013-10-31 Jakub Jelinek <jakub@redhat.com>
7338 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7339 with decl that is not pointer nor array.
7341 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7343 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7344 a spawning function is found.
7345 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7346 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7347 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7348 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7350 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7351 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7353 (c_finish_return): Added a check to reject _Cilk_spawn in return
7355 (build_cilk_spawn): New function.
7356 (build_cilk_sync): Likewise.
7357 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
7359 2013-10-27 Tobias Burnus <burnus@net-b.de>
7362 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7363 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7364 (c_parser_statement_after_labels): Update calls.
7366 2013-10-24 Tobias Burnus <burnus@net-b.de>
7369 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7370 Handle PRAGMA_IVDEP.
7371 (c_parser_statement_after_labels): Update call.
7373 2013-10-24 Marek Polacek <polacek@redhat.com>
7375 * c-parser.c (c_parser_struct_declaration): Add a comment.
7376 (c_parser_declarator): Don't allow _Alignas here.
7378 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
7380 * c-parser.c: Include omp-low.h.
7381 * c-typeck.c: Likewise.
7383 2013-10-17 Marek Polacek <polacek@redhat.com>
7386 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7387 Document syntax of the array-declarator.
7388 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7390 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7391 (c_parser_struct_declaration): Likewise.
7392 (c_parser_declarator): Likewise.
7393 (c_parser_direct_declarator_inner): Likewise.
7394 (c_parser_parameter_declaration): Likewise.
7395 (c_parser_type_name): Likewise.
7397 2013-10-11 Jakub Jelinek <jakub@redhat.com>
7399 * c-lang.h (current_omp_declare_target_attribute): New extern
7401 * c-parser.c: Include c-lang.h.
7402 (struct c_parser): Change tokens to c_token *.
7403 Add tokens_buf field. Change tokens_avail type to unsigned int.
7404 (c_parser_consume_token): If parser->tokens isn't
7405 &parser->tokens_buf[0], increment parser->tokens.
7406 (c_parser_consume_pragma): Likewise.
7407 (enum pragma_context): Add pragma_struct and pragma_param.
7408 (c_parser_external_declaration): Adjust
7409 c_parser_declaration_or_fndef caller.
7410 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7411 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7412 Adjust recursive call.
7413 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7415 (c_parser_parameter_declaration): Use pragma_param instead of
7417 (c_parser_compound_statement_nostart, c_parser_label,
7418 c_parser_for_statement): Adjust
7419 c_parser_declaration_or_fndef callers.
7420 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7421 it through to c_parser_conditional_expression.
7422 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7423 pass it through to c_parser_binary_expression. Adjust recursive
7425 (c_parser_binary_expression): Remove prec argument, add
7426 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7427 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7428 binop matches it, use build2 instead of parser_build_binary_op.
7429 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7430 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7431 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7432 Handle pragma_struct and pragma_param the same as pragma_external.
7433 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7434 (c_parser_omp_variable_list): Parse array sections for
7435 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7436 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7437 (c_parser_omp_clause_reduction): Handle user defined reductions.
7438 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7439 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7440 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7441 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7442 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7443 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7444 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7445 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7446 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7447 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7448 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7449 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7450 (c_parser_omp_for_loop): Add CODE argument, pass it through
7451 to c_finish_omp_for. Change last argument to cclauses,
7452 and adjust uses to grab parallel clauses from the array of all
7453 the split clauses. Adjust c_parser_binary_expression,
7454 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7455 (omp_split_clauses): New function.
7456 (c_parser_omp_simd): New function.
7457 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7458 Allow the function to be called also when parsing combined constructs,
7459 and call c_parser_omp_simd when parsing for simd.
7460 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7461 #pragma omp section, require exactly one structured-block instead of
7462 sequence of statements.
7463 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7464 Allow the function to be called also when parsing combined constructs.
7465 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7466 Allow the function to be called also when parsing combined
7468 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7469 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7470 c_parser_omp_teams, c_parser_omp_target_data,
7471 c_parser_omp_target_update, c_parser_omp_target,
7472 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7473 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7474 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7475 (c_parser_omp_construct): Add p_name and mask vars. Handle
7476 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7477 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7478 and c_parser_omp_sections callers.
7479 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7480 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7481 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7482 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7483 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7485 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7486 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7487 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7488 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7489 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7490 * c-typeck.c: Include tree-inline.h.
7491 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7492 handle_omp_array_sections_1, handle_omp_array_sections,
7493 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7494 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7495 user defined reductions.
7496 (c_tree_equal): New function.
7497 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7498 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7499 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7500 c_check_omp_declare_reduction_r): New prototypes.
7501 * c-decl.c (current_omp_declare_target_attribute): New variable.
7502 (c_decl_attributes): New function.
7503 (start_decl, start_function): Use it instead of decl_attributes.
7504 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7505 c_omp_reduction_decl, c_omp_reduction_lookup,
7506 c_check_omp_declare_reduction_r): New functions.
7508 2013-09-25 Tom Tromey <tromey@redhat.com>
7510 * Make-lang.in (c/gccspec.o): Remove.
7511 (CFLAGS-c/gccspec.o): New variable.
7512 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7513 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7514 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7516 2013-09-25 Tom Tromey <tromey@redhat.com>
7518 * Make-lang.in (c/gccspec.o): Don't use subshell.
7520 2013-09-18 Marek Polacek <polacek@redhat.com>
7523 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7524 Remove unnecessary check.
7526 2013-09-18 Marek Polacek <polacek@redhat.com>
7529 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7530 no_sanitize_undefined attribute.
7532 2013-09-13 Kai Tietz <ktietz@redhat.com>
7535 * c-decl.c (c_builtin_function_ext_scope): Remove
7536 wrong assumption that it is never called on prexisting
7539 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7541 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7543 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7545 * c-objc-common.c (c_tree_printer): Tidy.
7547 2013-08-30 Marek Polacek <polacek@redhat.com>
7549 * c-typeck.c (build_binary_op): Add division by zero and shift
7552 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
7553 Joseph Myers <joseph@codesourcery.com>
7556 * c-typeck.c (c_common_type): Prefer double_type_node over
7557 other REAL_TYPE types with the same precision.
7558 (convert_arguments): Likewise.
7560 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7562 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7563 (c_initialize_diagnostics): Call a destructor for the early printer.
7565 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7567 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7568 printer initialization.
7570 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
7573 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7574 check for truth values.
7575 (expand_array_notation_exprs): Added truth values case. Removed an
7576 unwanted else. Added for-loop to walk through subtrees in default
7579 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7581 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7583 2013-07-23 Joseph Myers <joseph@codesourcery.com>
7585 * c-parser.c (struct c_generic_association): Fix typo.
7587 2013-07-23 Tom Tromey <tromey@redhat.com>
7588 Joseph Myers <joseph@codesourcery.com>
7590 * c-parser.c (struct c_generic_association): New.
7591 (c_generic_association_d): New typedef.
7592 (c_parser_generic_selection): New function.
7593 (c_parser_postfix_expression): Handle RID_GENERIC.
7595 2013-07-13 Jason Merrill <jason@redhat.com>
7598 * c-decl.c (finish_struct): Check for too-large class.
7600 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7603 * c-typeck.c (set_init_index): When folding, check for index overflow.
7605 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7607 * c-parser.c (c_parser_array_notation): Removed rejection of array
7608 notations in an array of function pointers.
7610 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7612 * c-array-notation.c (make_triplet_val_inv): New function.
7613 (create_cmp_incr): Likewise.
7614 (create_array_refs): Likewise.
7615 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7616 Also modularized common parts between functions and called the function.
7617 (build_array_notation_expr): Likewise.
7618 (fix_conditional_array_notations_1): Likewise.
7619 (fix_array_notation_expr): Likewise.
7620 (fix_array_notation_call_expr): Likewise.
7622 2013-06-18 Marek Polacek <polacek@redhat.com>
7625 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7627 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7629 * c-array-notation.c (build_array_notation_expr): Reject array notation
7630 mismatch between LHS and RHS even inside a call_expr. Also, removed
7631 a couple while statements that were dead code.
7633 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7635 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7636 excessive precision expressions in function parameters. Also removed
7637 couple unwanted while statements.
7639 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7641 * c-array-notation.c (expand_array_notation_exprs): Added
7642 ARRAY_NOTATION_REF case.
7644 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7646 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7647 function to c-family/array-notation-common.c.
7648 (is_cilkplus_reduce_builtin): Likewise.
7649 (find_rank): Likewise.
7650 (extract_array_notation_exprs): Likewise.
7651 (replace_array_notations): Likewise.
7652 (find_inv_trees): Likewise.
7653 (replace_inv_trees): Likewise.
7654 (contains_array_notation_expr): Likewise.
7655 (find_correct_array_notation_type): Likewise.
7656 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7657 (struct inv_list): Moved this to c-family/array-notation-common.c.
7658 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7660 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7662 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7663 reduction functions outside the for-loop. Added a check if the fundecl
7664 is non-NULL. Finally, removed an unwanted if-statement, and made the
7667 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7669 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7670 condition of the if-statement matches the rank of else-block and then-
7671 block when array notations are used.
7672 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7673 expression after the entire function body is parsed.
7674 (c_parser_expr_no_commas): Delayed creating array notation expressions
7675 to the end of function parsing.
7676 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7677 whole if-statement instead of just the condition.
7678 (expand_array_notation_exprs): Added MODIFY_EXPR case.
7680 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7683 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7684 array to NULL_TREE if they are unused. Also added a check for the
7685 field to be NULL before its fields are used in future.
7687 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7690 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7691 (build_array_notation_expr): Likewise.
7693 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7695 * c-typeck.c (build_array_ref): Added a check to see if array's
7696 index is greater than one. If true, then emit an error.
7697 (build_function_call_vec): Exclude error reporting and checking
7698 for builtin array-notation functions.
7699 (convert_arguments): Likewise.
7700 (c_finish_return): Added a check for array notations as a return
7701 expression. If true, then emit an error.
7702 (c_finish_loop): Added a check for array notations in a loop
7703 condition. If true then emit an error.
7704 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7705 (build_binary_op): Added a check for array notation expr inside
7706 op1 and op0. If present, we call another function to find correct
7708 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7709 * c-parser.c (c_parser_compound_statement): Check if array
7710 notation code is used in tree, if so, then transform them into
7712 (c_parser_expr_no_commas): Check if array notation is used in LHS
7713 or RHS, if so, then build array notation expression instead of
7715 (c_parser_postfix_expression_after_primary): Added a check for
7716 colon(s) after square braces, if so then handle it like an array
7717 notation. Also, break up array notations in unary op if found.
7718 (c_parser_direct_declarator_inner): Added a check for array
7720 (c_parser_compound_statement): Added a check for array notation in
7721 a stmt. If one is present, then expand array notation expr.
7722 (c_parser_if_statement): Likewise.
7723 (c_parser_switch_statement): Added a check for array notations in
7724 a switch statement's condition. If true, then output an error.
7725 (c_parser_while_statement): Similarly, but for a while.
7726 (c_parser_do_statement): Similarly, but for a do-while.
7727 (c_parser_for_statement): Similarly, but for a for-loop.
7728 (c_parser_unary_expression): Check if array notation is used in a
7729 pre-increment or pre-decrement expression. If true, then expand
7731 (c_parser_array_notation): New function.
7732 * c-array-notation.c: New file.
7733 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7735 2013-05-23 Mike Stump <mikestump@comcast.net>
7737 * c-typeck.c (convert_for_assignment): Handle references to memory
7740 2013-05-16 Jason Merrill <jason@redhat.com>
7742 * Make-lang.in (cc1$(exeext)): Use link mutex.
7744 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7746 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7747 to simply use OPT_Wpointer_arith.
7748 (build_unary_op): Likewise.
7750 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7753 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7754 argument. If set, or it temporarily for parsing of the first
7755 argument into force_folding_builtin_constant_p.
7756 (c_parser_postfix_expression): Adjust callers.
7758 2013-03-21 Richard Biener <rguenther@suse.de>
7760 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7761 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7763 2013-02-12 Marek Polacek <polacek@redhat.com>
7766 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7769 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7772 * c-typeck.c (set_nonincremental_init_from_string): If
7773 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7775 (process_init_element): Likewise.
7777 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7780 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7781 argument, don't call default_function_array_conversion
7782 nor c_fully_fold here.
7783 (c_parser_asm_statement): Adjust callers.
7784 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7785 and outputs here, and call default_function_array_conversion
7786 on inputs that don't need to be addressable.
7788 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7791 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7792 warning require that both c_common_unsigned_type as well as
7793 c_common_signed_type is the same for both mvl and mvr types.
7795 2012-11-16 Diego Novillo <dnovillo@google.com>
7797 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7799 * c-common.c: Use new vec API in vec.h.
7800 * c-common.h: Likewise.
7801 * c-gimplify.c: Likewise.
7802 * c-pragma.c: Likewise.
7803 * c-pretty-print.c: Likewise.
7804 * c-pretty-print.h: Likewise.
7805 * c-semantics.c: Likewise.
7806 * c-decl.c: Likewise.
7807 * c-parser.c: Likewise.
7808 * c-tree.h: Likewise.
7809 * c-typeck.c: Likewise.
7811 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7814 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7816 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7819 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7820 shadows a function, unless the variable is a function or a
7821 pointer-to-function.
7823 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7826 * c-parser.c (struct c_tree_loc_pair): Removed.
7827 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7828 add location_t * and tree * arguments, fill in array of 3
7829 sizeof_arg trees and corresponding locs.
7830 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7831 c_parser_expr_list callers.
7832 (c_parser_postfix_expression_after_primary): Likewise. Pass
7833 array of 3 sizeof_arg trees and locs (corresponding to first
7834 3 arguments) to sizeof_pointer_memaccess_warning.
7836 2012-10-09 Lawrence Crowl <crowl@google.com>
7838 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7839 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7842 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7845 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7848 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7851 * c-typeck.c: Include c-common.h.
7852 (enum stv_conv): Moved to c-common.h.
7853 (scalar_to_vector): Moved to c-common.c.
7854 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7855 * Make-lang.in: c-typeck.c depends on c-common.h.
7857 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7859 * c-decl.c (c_write_global_declarations): Fix handling of
7862 2012-09-30 Sharad Singhai <singhai@google.com>
7864 * c-decl.c (c_write_global_declarations): Use a different method
7865 to determine if the dump has ben initialized.
7867 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7870 * c-typeck.c (c_cast_expr): When casting to a type requiring
7871 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7874 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7877 * c-typeck.c (build_unary_op): Pass original argument of
7878 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7879 any C_MAYBE_CONST_EXPR, if it has integer operands.
7880 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7881 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7882 to c_objc_common_truthvalue_conversion, then remove any
7883 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7884 c_objc_common_truthvalue_conversion not
7885 c_common_truthvalue_conversion.
7886 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7887 call note_integer_operands for arguments with integer operands
7888 that are not integer constants.
7890 2012-09-13 Jakub Jelinek <jakub@redhat.com>
7893 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7894 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7896 2012-08-31 Jakub Jelinek <jakub@redhat.com>
7899 * c-convert.c (convert): Don't call fold_convert_loc if
7900 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7901 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7902 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7904 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7907 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7908 for nested and empty_ok arguments in the call to
7909 c_parser_declaration_or_fndef.
7911 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7913 * c-tree.h (c_last_sizeof_arg): Declare.
7914 * c-parser.c (struct c_tree_loc_pair): New type.
7915 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7917 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7918 (c_parser_postfix_expression_after_primary): Likewise. Call
7919 sizeof_pointer_memaccess_warning if needed.
7920 (sizeof_ptr_memacc_comptypes): New function.
7921 * c-typeck.c (c_last_sizeof_arg): New global variable.
7922 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7924 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7926 * c-lang.h (lang_decl): Add variable_size GTY option.
7928 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7930 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7931 * Make-lang.in: Fix dependencies.
7933 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7935 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7936 and add language Makefile hooks.
7937 * config-lang.in: New file.
7938 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7939 add the required "normal" config-lang.in rules.
7940 * c-lang.h: Moved from gcc/ to here.
7941 * c-tree.h: Likewise.
7942 * c-objc-common.c: Likewise.
7943 * c-objc-common.h: Likewise.
7944 * c-typeck.c: Likewise.
7945 * c-convert.c: Likewise.
7946 * c-lang.c: Likewise.
7947 * c-aux-info.c: Likewise.
7948 * c-errors.c: Likewise.
7949 * gccspec.c: Likewise.
7950 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7951 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7953 Copyright (C) 2012-2021 Free Software Foundation, Inc.
7955 Copying and distribution of this file, with or without modification,
7956 are permitted in any medium without royalty provided the copyright
7957 notice and this notice are preserved.