1 2021-10-15 Richard Biener <rguenther@suse.de>
5 (c_parser_gimple_postfix_expression_after_primary): Check
6 for a pointer do be dereferenced by ->.
8 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
10 * c-parser.c (c_finish_omp_declare_variant): Change call from
11 c_omp_check_context_selector to omp_check_context_selector. Change
12 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
14 2021-10-09 Jakub Jelinek <jakub@redhat.com>
16 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
17 (c_parser_omp_scan_loop_body): Use it.
18 (c_parser_omp_sections_scope): Likewise.
20 2021-10-07 Richard Biener <rguenther@suse.de>
22 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
24 2021-10-05 Richard Biener <rguenther@suse.de>
27 * gimple-parser.c (c_parser_gimple_postfix_expression):
28 Accept more address _Literals.
30 2021-10-04 Marek Polacek <polacek@redhat.com>
33 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
35 2021-10-01 Martin Sebor <msebor@redhat.com>
38 * c-typeck.c (maybe_warn_for_null_address): New function.
39 (build_binary_op): Call it.
41 2021-10-01 Jakub Jelinek <jakub@redhat.com>
42 Richard Biener <rguenther@suse.de>
45 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
46 for division even for SANITIZE_SI_OVERFLOW.
48 2021-10-01 Jakub Jelinek <jakub@redhat.com>
50 * c-parser.c (c_parser_omp_clause_order): Set
51 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
53 2021-09-28 Andrew Pinski <apinski@marvell.com>
56 * c-parser.c (c_parser_statement_after_labels): Pass
57 the c_expr instead of the tree to c_finish_goto_ptr.
58 * c-typeck.c (c_finish_goto_ptr): Change the second
59 argument type to c_expr.
60 * c-tree.h (c_finish_goto_ptr): Likewise.
61 Error out if the expression was not of a pointer type.
63 2021-09-22 Jakub Jelinek <jakub@redhat.com>
65 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
68 2021-09-18 Jakub Jelinek <jakub@redhat.com>
70 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
71 and reproducible modifiers.
72 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
74 2021-09-18 Jakub Jelinek <jakub@redhat.com>
76 * c-parser.c (c_parser_omp_clause_default): Handle private and
77 firstprivate arguments, adjust diagnostics on unknown argument.
79 2021-09-17 Jakub Jelinek <jakub@redhat.com>
81 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
84 2021-09-10 Jakub Jelinek <jakub@redhat.com>
86 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
87 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
88 don't call build_conditional_expr, instead build a COND_EXPR directly.
89 (c_parser_binary_expression): Avoid calling parser_build_binary_op
90 if omp_atomic_lhs even in more cases for >, < or ==.
91 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
92 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
93 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
94 * c-typeck.c (build_binary_op): For flag_openmp only handle
97 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
99 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
102 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
104 * c-decl.c (enum deprecated_states): Add unavailable state.
105 (merge_decls): Copy unavailability.
106 (quals_from_declspecs): Handle unavailable case.
107 (start_decl): Amend the logic handling suppression of nested
108 deprecation states to include unavailability.
109 (smallest_type_quals_location): Amend comment.
110 (grokdeclarator): Handle the unavailable deprecation state.
111 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
112 * c-tree.h (struct c_declspecs): Add unavailable_p.
113 * c-typeck.c (build_component_ref): Handle unavailability.
114 (build_external_ref): Likewise.
116 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
117 Joseph Myers <joseph@codesourcery.com>
120 * c-decl.c (duplicate_decls): On significant mismatches, mark the
121 types of both (non-function) decls as error_mark_node, so that the
122 middle-end can see the code is malformed.
123 (free_attr_access_data): Don't process if the type has been set to
126 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
128 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
129 and 'ancestor' in 'target device' clauses.
131 2021-08-23 Jakub Jelinek <jakub@redhat.com>
133 * c-parser.c (c_parser_omp_clause_num_tasks,
134 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
136 2021-08-22 Martin Uecker <muecker@gwdg.de>
139 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
140 for pointers to arrays with qualifiers.
141 (build_conditional_expr): For C23 don't lose qualifiers for pointers
142 to arrays when the other pointer is a void pointer. Update warnings.
143 (convert_for_assignment): Update warnings for C2X when converting from
144 void* with qualifiers to a pointer to array with the same qualifiers.
146 2021-08-20 Jakub Jelinek <jakub@redhat.com>
148 * c-parser.c (c_parser_omp_error): New function.
149 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
151 2021-08-20 Jakub Jelinek <jakub@redhat.com>
153 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
154 comma at the end of list.
155 (c_parser_omp_requires): Likewise.
157 2021-08-19 Jakub Jelinek <jakub@redhat.com>
159 * c-parser.c (c_parser_omp_requires): Don't call
160 c_parser_peek_2nd_token and optionally consume token if current
161 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
163 2021-08-18 Jakub Jelinek <jakub@redhat.com>
165 * c-parser.c (c_parser_omp_nothing): New function.
166 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
168 2021-08-18 Jakub Jelinek <jakub@redhat.com>
170 * c-parser.c (c_parser_statement_after_labels): Add restart label
171 near the start of the function. If c_parser_pragma returns false,
173 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
174 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
175 return what c_parser_omp_declare returned. Return true instead of
176 false after emitting errors that the directive is not allowed in
178 (c_parser_omp_ordered): Return true instead of
179 false after emitting errors that the directive is not allowed in
181 (c_parser_omp_target_update): Likewise.
182 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
183 Change return type from tree to bool, return false if the
184 directive should be ignored in pragma_stmt contexts.
185 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
186 return their result directly.
187 (c_parser_omp_cancellation_point): Change return type from void to
188 bool, return false if the directive should be ignored in pragma_stmt
190 (c_parser_omp_declare): Likewise.
192 2021-08-17 Jakub Jelinek <jakub@redhat.com>
194 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
195 (c_parser_omp_scope): New function.
196 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
198 2021-08-12 Jakub Jelinek <jakub@redhat.com>
200 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
201 (c_parser_omp_clause_filter): New function.
202 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
203 (OMP_MASKED_CLAUSE_MASK): Define.
204 (c_parser_omp_masked): New function.
205 (c_parser_omp_parallel): Handle parallel masked.
206 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
207 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
209 2021-08-12 Martin Uecker <muecker@gwdg.de>
213 * c-typeck.c (c_expr_sizeof_type): Evaluate
214 size expressions for structs of variable size.
216 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
218 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
219 'primary' as alias for 'master'.
221 2021-08-10 Martin Uecker <muecker@gwdg.de>
224 * c-typeck.c (c_expr_sizeof_expr): Evaluate
225 size expressions for structs of variable size.
227 2021-08-06 Tamar Christina <tamar.christina@arm.com>
229 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
230 * c-tree.h (c_simulate_enum_decl): Likewise.
232 2021-08-06 Martin Sebor <msebor@redhat.com>
234 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
235 vec arguments to by-reference.
236 (c_finish_omp_declare_simd): Same.
237 (c_parser_compound_statement_nostart): Same.
238 (c_parser_for_statement): Same.
239 (c_parser_objc_methodprotolist): Same.
240 (c_parser_oacc_routine): Same.
241 (c_parser_omp_for_loop): Same.
242 (c_parser_omp_declare_simd): Same.
244 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
245 Joseph Myers <joseph@codesourcery.com>
246 Cesar Philippidis <cesar@codesourcery.com>
248 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
249 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
250 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
251 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
253 2021-07-20 Martin Sebor <msebor@redhat.com>
255 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
257 * c-typeck.c (c_build_function_call_vec): Same.
259 2021-07-15 Martin Sebor <msebor@redhat.com>
263 * c-decl.c (get_parm_array_spec): Strip nops.
265 2021-07-06 Martin Sebor <msebor@redhat.com>
267 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
269 2021-07-02 Jakub Jelinek <jakub@redhat.com>
272 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
273 appears before a CPP_NAME.
275 2021-06-25 Martin Sebor <msebor@redhat.com>
277 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
278 warning_suppressed_p, suppress_warning, and copy_no_warning.
279 (diagnose_mismatched_decls): Same.
280 (duplicate_decls): Same.
281 (grokdeclarator): Same.
282 (finish_function): Same.
283 (c_write_global_declarations_1): Same.
284 * c-fold.c (c_fully_fold_internal): Same.
285 * c-parser.c (c_parser_expr_no_commas): Same.
286 (c_parser_postfix_expression): Same.
287 * c-typeck.c (array_to_pointer_conversion): Same.
288 (function_to_pointer_conversion): Same.
289 (default_function_array_conversion): Same.
290 (convert_lvalue_to_rvalue): Same.
291 (default_conversion): Same.
292 (build_indirect_ref): Same.
293 (build_function_call_vec): Same.
294 (build_atomic_assign): Same.
295 (build_unary_op): Same.
296 (c_finish_return): Same.
297 (emit_side_effect_warnings): Same.
298 (c_finish_stmt_expr): Same.
299 (c_omp_clause_copy_ctor): Same.
301 2021-06-24 Jakub Jelinek <jakub@redhat.com>
304 * c-parser.c (c_parser_has_attribute_expression): Set source range for
307 2021-06-24 Jakub Jelinek <jakub@redhat.com>
310 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
313 2021-06-24 Jakub Jelinek <jakub@redhat.com>
315 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
316 C_ORT_OMP for clauses on target construct.
317 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
318 (c_parser_omp_target): For non-combined target add
319 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
320 C_ORT_OMP_TARGET to c_finish_omp_clauses.
321 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
322 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
323 never present on C_ORT_*DECLARE_SIMD.
324 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
325 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
326 corresponding map clauses.
328 2021-06-21 Jakub Jelinek <jakub@redhat.com>
331 * c-typeck.c (c_mark_addressable): Diagnose trying to make
332 bit-fields addressable.
334 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
336 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
339 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
342 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
343 var in the error case.
345 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
348 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
349 spot built-in functions.
351 2021-06-06 Jakub Jelinek <jakub@redhat.com>
354 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
355 even when target is combined with other constructs.
357 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
360 * c-decl.c (finish_struct): Fix thinko in previous change.
361 * c-typeck.c (convert_for_assignment): Do not warn on pointer
362 assignment and initialization for storage order purposes if the
363 RHS is a call to a DECL_IS_MALLOC function.
365 2021-06-04 Martin Sebor <msebor@redhat.com>
368 * c-objc-common.c (print_type): Handle erroneous types.
370 2021-06-03 Jakub Jelinek <jakub@redhat.com>
373 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
374 after depend only cases.
376 2021-05-31 Richard Biener <rguenther@suse.de>
379 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
380 * c-parser.c (c_parser_postfix_expression): Likewise.
382 2021-05-28 Richard Biener <rguenther@suse.de>
385 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
386 invalid if conditions.
388 2021-05-28 Jakub Jelinek <jakub@redhat.com>
391 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
392 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
393 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
394 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
395 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
396 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
397 if present in map_head, map_field_head or map_firstprivate_head
400 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
402 * c-parser.c (c_parser_omp_clause_affinity): New.
403 (c_parser_omp_clause_name, c_parser_omp_variable_list,
404 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
405 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
406 c_finish_omp_clauses): Likewise.
408 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
411 * c-decl.c (finish_struct): Warn for a union containing an aggregate
412 field with a differing scalar storage order.
414 2021-05-21 Jakub Jelinek <jakub@redhat.com>
417 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
418 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
419 if a decl is mentioned both in map clause and in such firstprivate
420 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
422 2021-05-19 Jakub Jelinek <jakub@redhat.com>
425 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
426 master when combined with taskloop.
427 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
428 parallel master when not combined with taskloop.
430 2021-05-18 Richard Biener <rguenther@suse.de>
433 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
434 Diagnose calls to non-functions.
435 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
437 2021-05-17 Richard Biener <rguenther@suse.de>
440 * gimple-parser.c (c_parser_gimple_label): Avoid building
441 a GIMPLE label with NULL label decl.
443 2021-05-13 Martin Sebor <msebor@redhat.com>
446 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
448 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
450 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
453 2021-05-10 Martin Liska <mliska@suse.cz>
455 * c-aux-info.c (affix_data_type): Use startswith
456 function instead of strncmp.
457 * c-typeck.c (build_function_call_vec): Likewise.
458 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
460 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
462 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
463 on the address of a pointer field in a record with reverse SSO.
465 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
467 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
468 for || and && reductions.
470 2021-04-29 Joseph Myers <joseph@codesourcery.com>
472 * c-typeck.c (function_types_compatible_p): For C2X, treat
473 unprototyped function as compatible with non-variadic prototyped
474 function even if some argument types are changed by the default
477 2021-04-15 Martin Sebor <msebor@redhat.com>
481 * c-decl.c (pushdecl): Always propagate type attribute.
483 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
486 * c-typeck.c (c_common_type): Do not drop attributes that
487 affect type identity.
489 2021-04-10 Jakub Jelinek <jakub@redhat.com>
492 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
495 2021-03-25 Jakub Jelinek <jakub@redhat.com>
498 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
501 2021-03-19 Jakub Jelinek <jakub@redhat.com>
504 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
505 with modifycode NOP_EXPR produces and mark the _Atomic var as read
507 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
508 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
509 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
511 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
514 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
515 ensure that the varpool node is marked as offloadable.
517 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
520 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
522 2021-02-24 Martin Sebor <msebor@redhat.com>
525 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
527 2021-02-18 Jakub Jelinek <jakub@redhat.com>
530 * c-typeck.c (c_finish_return): Don't wrap retval into
531 EXCESS_PRECISION_EXPR in functions that return void.
533 2021-02-11 Marek Polacek <polacek@redhat.com>
535 * c-parser.c (c_parser_if_statement): Use vec_free.
537 2021-02-04 Martin Sebor <msebor@redhat.com>
540 * c-decl.c (locate_old_decl): Add type to diagnostic output.
541 (diagnose_mismatched_decls): Same.
542 (start_function): Introduce temporaries for better readability.
543 * c-typeck.c (comptypes_internal): Only consider complete enum
544 types in comparisons with integers.
546 2021-02-01 Martin Sebor <msebor@redhat.com>
549 * c-decl.c (free_attr_access_data): New function.
550 (c_parse_final_cleanups): Call free_attr_access_data.
552 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
554 * c-parser.c (c_parser_omp_clause_detach): New.
555 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
556 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
557 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
558 clause. Prevent use of detach with mergeable and overriding the
559 data sharing mode of the event handle.
561 2021-01-15 Jakub Jelinek <jakub@redhat.com>
563 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
564 unqualified element type and then call c_build_qualified_type on the
567 2021-01-07 Richard Biener <rguenther@suse.de>
569 * gimple-parser.c (c_parser_gimple_compound_statement): Only
570 reallocate loop array if it is too small.
572 2020-12-16 Martin Uecker <muecker@gwdg.de>
575 * c-typeck.c (build_modify_expr): Drop qualifiers.
577 2020-12-16 Martin Uecker <muecker@gwdg.de>
580 * c-parser.c (c_parser_expression): Look into
581 nop expression when marking expressions as read.
583 2020-12-14 Martin Liska <mliska@suse.cz>
586 * c-typeck.c (pointer_diff): Do not emit a top-level
588 (build_binary_op): Likewise.
590 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
592 * c-parser.c (c_parser_omp_allocate): New.
593 (c_parser_omp_construct): Call it.
595 2020-12-09 Richard Biener <rguenther@suse.de>
598 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
601 2020-12-07 Martin Uecker <muecker@gwdg.de>
604 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
605 that drops qualifiers to the end of the function.
607 2020-11-26 Martin Uecker <muecker@gwdg.de>
611 * c-parser.c (c_parser_declaration_or_fndef): Remove
612 redundant code to drop qualifiers of _Atomic types for __auto_type.
613 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
614 types for __typeof__.
616 2020-11-24 Jakub Jelinek <jakub@redhat.com>
619 * c-parser.c (c_parser_binary_expression): For omp atomic binary
620 expressions, use make_node instead of build2 to avoid checking build2
623 2020-11-23 Joseph Myers <joseph@codesourcery.com>
626 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
627 for comparisons of complete and incomplete pointers.
629 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
631 * c-aux-info.c (gen_type): Support opaque types.
633 2020-11-20 Martin Sebor <msebor@redhat.com>
636 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
638 2020-11-20 Jakub Jelinek <jakub@redhat.com>
641 * Make-lang.in (c.serial): Change from goal to a variable.
642 (.PHONY): Drop c.serial.
644 2020-11-20 Martin Uecker <muecker@gwdg.de>
646 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
648 2020-11-19 Jakub Jelinek <jakub@redhat.com>
651 * c-decl.c (get_parm_array_spec): Bail out of nelts is
654 2020-11-18 Jakub Jelinek <jakub@redhat.com>
656 * Make-lang.in (c.serial): New goal.
657 (.PHONY): Add c.serial c.prev.
658 (cc1$(exeext)): Call LINK_PROGRESS.
660 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
662 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
664 * c-typeck.c (build_asm_expr): Remove an assert checking output
665 absence for asm goto.
667 2020-11-13 Jakub Jelinek <jakub@redhat.com>
669 * c-typeck.c (c_finish_omp_clauses): Don't clear
670 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
672 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
675 * c-parser.c (c_parser_objc_class_definition): Pass the
676 location of the class name to the interface declaration.
678 2020-11-10 Strager Neds <strager.nds@gmail.com>
680 * c-decl.c (merge_decls): Use new overload of
681 set_decl_section_name.
683 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
685 * c-parser.c (c_parser_omp_target_data): Add use of
686 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
687 handled map clause kind.
688 (c_parser_omp_target_enter_data): Likewise.
689 (c_parser_omp_target_exit_data): Likewise.
690 (c_parser_omp_target): Likewise.
691 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
692 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
693 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
694 same struct field access to co-exist on OpenMP construct.
696 2020-11-07 Martin Uecker <muecker@gwdg.de>
698 * c-parser.c (c_parser_label): Implement mixing of labels and code.
699 (c_parser_all_labels): Likewise.
701 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
703 * c-parser.c (c_parser_objc_at_property_declaration):
704 Improve parsing fidelity. Associate better location info
705 with @property attributes. Clean up the interface to
706 objc_add_property_declaration ().
708 2020-11-06 Nathan Sidwell <nathan@acm.org>
710 * c-decl.c (diagnose_mismatched_decls): Rename
711 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
712 (warn_if_shadowing, implicitly_declare, names_builtin_p)
713 (collect_source_refs): Likewise.
714 * c-typeck.c (inform_declaration, inform_for_arg)
715 (convert_for_assignment): Likewise.
717 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
719 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
721 (c_parser_omp_construct): Update call.
723 2020-11-04 Jakub Jelinek <jakub@redhat.com>
726 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
727 find underlying decl to clear in the aligned_head bitmap.
729 2020-11-04 Joseph Myers <joseph@codesourcery.com>
731 * c-decl.c (handle_nodiscard_attribute): New.
732 (std_attribute_table): Add nodiscard.
733 * c-parser.c (c_parser_std_attribute): Expect argument to
734 nodiscard attribute to be a string. Do not special-case ignoring
736 * c-typeck.c (maybe_warn_nodiscard): New.
737 (build_compound_expr, emit_side_effect_warnings): Call
738 maybe_warn_nodiscard.
739 (c_process_expr_stmt, c_finish_stmt_expr): Also call
740 emit_side_effect_warnings if warn_unused_result.
742 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
744 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
746 (finish_init): Likewise.
747 (pop_init_level): Likewise.
749 2020-10-28 Joseph Myers <joseph@codesourcery.com>
751 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
752 error_at for omitted parameter name.
754 2020-10-28 Jakub Jelinek <jakub@redhat.com>
756 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
757 (c_parser_omp_clause_allocate): New function.
758 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
759 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
760 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
761 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
762 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
763 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
764 PRAGMA_OMP_CLAUSE_ALLOCATE.
765 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
767 2020-10-27 Joseph Myers <joseph@codesourcery.com>
769 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
772 2020-10-23 Marek Polacek <polacek@redhat.com>
775 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
776 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
777 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
778 * c-tree.h (char_type_p): Declare.
779 * c-typeck.c (char_type_p): No longer static.
781 2020-10-23 Martin Sebor <msebor@redhat.com>
784 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
786 2020-09-19 Martin Sebor <msebor@redhat.com>
789 * c-decl.c (lookup_last_decl): Define new function.
790 (c_decl_attributes): Call it.
791 (start_decl): Add argument and use it.
792 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
793 (get_parm_array_spec): Define new function.
794 (push_parm_decl): Call get_parm_array_spec.
795 (start_function): Call warn_parm_array_mismatch. Build attribute
796 access and add it to current function.
797 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
798 in forms of array parameters.
799 * c-tree.h (start_decl): Add argument.
801 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
803 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
806 (start_function): Adjust for above change.
807 (c_push_function_context, c_pop_function_context): Likewise.
808 * c-lang.h (struct language_function): Likewise.
809 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
810 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
812 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
813 (c_parser_switch_statement): Adjust break/switch context handling
814 and calls to renamed functions.
815 (c_parser_while_statement): Adjust break/switch context handling and
817 (c_parser_do_statement): Ditto, with DO_STMT respectively.
818 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
819 (c_parser_omp_for_loop): Adjust break/switch context handling.
820 * c-tree.h (c_break_label, c_cont_label): Delete.
821 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
822 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
823 (in_statement, switch_statement_break_seen_p): Declare.
824 (c_start_case, c_finish_case): Renamed to...
825 (c_start_switch, c_finish_switch).
826 (c_finish_bc_stmt): Adjust arguments.
827 * c-typeck.c (build_function_call_vec): Don't try to print
828 statements with %qE format.
829 (struct c_switch): Rename switch_expr field to switch_stmt.
830 Add break_stmt_seen_p field.
831 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
832 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
833 (do_case): Update for changes to struct c_switch.
834 (c_finish_case): Rename to c_finish_switch. Update for changes to
835 struct c_switch and change of representation from SWITCH_EXPR to
837 (c_finish_loop): Delete.
838 (c_finish_bc_stmt): Update to reflect changes to break/continue
839 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
840 of a GOTO_EXPR except for objc foreach loops.
842 2020-09-01 Jakub Jelinek <jakub@redhat.com>
845 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
848 2020-08-28 Martin Sebor <msebor@redhat.com>
851 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
854 2020-08-27 Martin Liska <mliska@suse.cz>
856 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
857 growth function to true.
859 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
862 * c-typeck.c (handle_omp_array_sections_1): Talk about
863 array function parameter in the error message.
865 2020-08-18 Jakub Jelinek <jakub@redhat.com>
868 * c-parser.c (c_parser_generic_selection): Change match_found from bool
869 to int, holding index of the match. Call mark_exp_read on the selector
870 expression and on expressions other than the selected one.
872 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
875 * c-typeck.c (process_init_element): Split test for whether to
876 recurse into a record, union or array into...
877 (initialize_elementwise_p): ...this new function. Don't recurse
878 into a vector type if the initialization value is also a vector.
880 2020-07-31 Richard Biener <rguenther@suse.de>
883 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
884 Define to c_common_finalize_early_debug.
886 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
888 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
889 (c_parser_omp_critical): Permit hint(0) clause without named critical.
890 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
892 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
895 * c-decl.c (finish_decl): Call target hook
896 lower_local_decl_alignment to lower local decl alignment.
898 2020-07-09 Julian Brown <julian@codesourcery.com>
899 Thomas Schwinge <thomas@codesourcery.com>
902 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
903 for standalone attach/detach clauses.
905 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
907 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
908 set, warn for conversion between pointers that point to incompatible
909 scalar storage orders.
911 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
913 * c-parser.c (c_parser_statement_after_labels): Pass correct
914 parameters to c_parser_do_statement.
916 2020-06-16 Jakub Jelinek <jakub@redhat.com>
918 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
920 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
921 premature c_fully_fold. Defer explicit c_fully_fold calls to after
923 * c-tree.h (c_in_omp_for): Declare.
924 * c-typeck.c (c_in_omp_for): Define.
925 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
926 (digest_init): Likewise.
927 (build_binary_op): Likewise.
929 2020-06-16 Jakub Jelinek <jakub@redhat.com>
931 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
932 from kind by comma rather than colon.
934 2020-06-05 Mark Wielaard <mark@klomp.org>
936 * c-decl.c (implicit_decl_warning): When warned and olddecl is
937 an undeclared builtin, then add a fixit header hint, if found.
938 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
939 warning_at about implicit builtin declaration type mismatch.
941 2020-06-03 Mark Wielaard <mark@klomp.org>
943 * c-parser.c (struct c_parser): Add seen_string_literal
945 (c_parser_consume_token): Reset seen_string_literal.
946 (c_parser_error_richloc): Add name_hint if seen_string_literal
947 and next token is a CPP_NAME and we have a missing header
948 suggestion for the name.
949 (c_parser_string_literal): Set seen_string_literal.
951 2020-06-03 Mark Wielaard <mark@klomp.org>
953 * c-parser.c (c_parser_postfix_expression_after_primary): Add
954 scope with matching_parens after CPP_OPEN_PAREN.
956 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
958 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
960 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
962 * Make-lang.in: Remove extra slash.
964 2020-05-19 Martin Liska <mliska@suse.cz>
966 * c-parser.c: Fix typo.
968 2020-05-14 Jakub Jelinek <jakub@redhat.com>
970 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
972 2020-05-07 Richard Biener <rguenther@suse.de>
975 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
978 2020-04-30 Jakub Jelinek <jakub@redhat.com>
981 * c-decl.c (set_labels_context_r): In addition to context-less
982 LABEL_DECLs adjust also LABEL_DECLs with context equal to
983 parent function if any.
984 (store_parm_decls): Adjust comment.
986 2020-04-19 Jakub Jelinek <jakub@redhat.com>
989 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
990 two CPP_COLON tokens.
992 2020-04-17 Jakub Jelinek <jakub@redhat.com>
995 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
998 2020-04-15 Jakub Jelinek <jakub@redhat.com>
1001 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1002 requires directive when not at file scope.
1004 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
1007 * c-decl.c (c_check_in_current_scope): New function.
1008 * c-tree.h (c_check_in_current_scope): Declare it.
1009 * c-parser.c (c_parser_oacc_declare): Add check that variables
1010 are declared in the same scope as the directive. Fix handling
1013 2020-04-07 Jakub Jelinek <jakub@redhat.com>
1016 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1017 if c_parser_omp_master succeeded.
1019 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1021 PR gcov-profile/94029
1023 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1024 the function_start_locus location. Don't do that afterwards for the
1025 __GIMPLE body parsing.
1027 2020-03-19 Jakub Jelinek <jakub@redhat.com>
1029 PR gcov-profile/94029
1030 * c-tree.h (finish_function): Add location_t argument defaulted to
1032 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1033 set it to the locus of closing } if non-NULL.
1034 (c_parser_compound_statement_nostart): Return locus of closing }.
1035 (c_parser_parse_rtl_body): Likewise.
1036 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1038 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1039 input_location to set function_end_locus.
1041 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1044 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1045 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1046 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1047 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1049 (finish_incomplete_vars): New function, moved from finish_struct. Use
1050 relayout_decl instead of layout_decl.
1051 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1052 being TYPE_VFIELD. Use finish_incomplete_vars.
1053 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1054 finish_incomplete_vars.
1055 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1056 also on ENUMERAL_TYPEs.
1058 2020-03-16 Jakub Jelinek <jakub@redhat.com>
1061 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1063 2020-03-13 Martin Sebor <msebor@redhat.com>
1066 * c-decl.c (builtin_structptr_type_count): New constant.
1067 (match_builtin_function_types): Reject decls that are incompatible
1068 in types pointed to by pointers.
1069 (diagnose_mismatched_decls): Adjust comments.
1071 2020-03-05 Joseph Myers <joseph@codesourcery.com>
1074 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1075 empty when initialized type is error_mark_node.
1076 (set_designator, process_init_element): Ignore initializers for
1077 elements of a variable-size type or of error_mark_node.
1079 2020-03-01 Martin Sebor <msebor@redhat.com>
1082 * c-decl.c (types_close_enough_to_match): New function.
1083 (match_builtin_function_types):
1084 (diagnose_mismatched_decls): Add missing inform call to a warning.
1086 2020-03-01 Martin Sebor <msebor@redhat.com>
1089 * c-typeck.c (build_functype_attribute_variant): New function.
1090 (composite_type): Call it.
1092 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1095 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1096 Rename last argument from probablity to probability.
1098 2020-02-13 Jakub Jelinek <jakub@redhat.com>
1101 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1102 *expr if it has side effects.
1104 2020-01-30 Jeff Law <law@redhat.com>
1107 * c-parser.c (c_parser_switch_statement): Make sure to request
1108 marking the switch expr as used.
1110 2020-01-22 Joseph Myers <joseph@codesourcery.com>
1113 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1114 argument with integer operands.
1116 2020-01-16 Kerem Kat <keremkat@gmail.com>
1119 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1120 to support 4 available tokens.
1122 2020-01-15 Joseph Myers <joseph@codesourcery.com>
1125 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1126 determine whether to set DECL_CONTEXT.
1128 2020-01-13 Joseph Myers <joseph@codesourcery.com>
1131 * c-typeck.c (build_c_cast): Check for expressions with integer
1132 operands that can occur in an unevaluated part of an integer
1133 constant expression and call note_integer_operands as needed.
1135 2019-01-08 Richard Biener <rguenther@suse.de>
1138 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1141 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1143 Update copyright years.
1145 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1147 * c-decl.c (collect_source_ref_cb): Delete.
1148 (for_each_global_decl): Rename into...
1149 (collect_source_refs): ...this. Call collect_source_ref directly.
1150 (c_parse_final_cleanups): Always call collect_source_ref on the main
1153 2019-12-19 Julian Brown <julian@codesourcery.com>
1154 Cesar Philippidis <cesar@codesourcery.com>
1156 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1158 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1159 Allow deref (->) in variable lists if true.
1160 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1161 Pass to c_parser_omp_variable_list.
1162 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1163 call to c_parser_omp_variable_list.
1164 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1165 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1166 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1167 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1168 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1169 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1170 and detach. Support deref.
1171 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1172 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1173 (c_oacc_check_attachments): New function.
1174 (c_finish_omp_clauses): Check attach/detach arguments for being
1175 pointers using above. Support deref.
1177 2019-12-19 Julian Brown <julian@codesourcery.com>
1178 Maciej W. Rozycki <macro@codesourcery.com>
1179 Tobias Burnus <tobias@codesourcery.com>
1180 Thomas Schwinge <thomas@codesourcery.com>
1182 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1183 (c_parser_oacc_data_clause): Likewise.
1184 (c_parser_oacc_all_clauses): Likewise.
1185 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1186 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1187 PRAGMA_OACC_CLAUSE_NO_CREATE.
1188 * c-typeck.c (handle_omp_array_sections): Support
1191 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1193 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1194 Replace label_text ctor calls.
1196 2019-12-04 Joseph Myers <joseph@codesourcery.com>
1200 * c-typeck.c (convert_lvalue_to_rvalue): Call
1201 require_complete_type for arguments not of void types.
1202 (build_indirect_ref): Do not diagnose dereferencing pointers to
1204 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1206 2019-12-03 Joseph Myers <joseph@codesourcery.com>
1209 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1210 old-style parameter definitions.
1212 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1216 * c-decl.c (flexible_array_type_p): Move to common code.
1218 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1220 * c-decl.c (start_decl): Allow initialization of variables whose
1221 size is a POLY_INT_CST.
1222 (finish_decl): Use verify_type_context to check whether the target
1223 allows variables with a particular type to have static or thread-local
1224 storage duration. Don't raise a second error if such variables do
1225 not have a constant size.
1226 (grokdeclarator): Use verify_type_context to check whether the
1227 target allows fields or array elements to have a particular type.
1228 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1229 the target allows pointer difference for the types involved.
1230 (build_unary_op): Likewise for pointer increment and decrement.
1232 2019-11-29 Joseph Myers <joseph@codesourcery.com>
1234 * c-parser.c (struct c_parser): Add members raw_tokens and
1236 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1237 using previously-lexed raw tokens.
1238 (c_parser_peek_nth_token_raw)
1239 (c_parser_check_balanced_raw_token_sequence): New functions.
1240 (c_parser_nth_token_starts_std_attributes): Use
1241 c_parser_check_balanced_raw_token_sequence for Objective-C.
1243 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1246 * c-decl.c (finish_declspecs): Use int instead of decimal
1247 floating-point types if decimal floating-point not supported.
1249 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1251 * c-tree.h (struct c_declarator): Use a structure for id member.
1252 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1253 declarators at the start, not when handling individual declarators
1254 later. Use u.id.id instead of u.id.
1255 (grokfield): Use u.id.id instead of u.id.
1256 (build_id_declarator): Set u.id.id and u.id.attrs.
1257 (finish_declspecs): Handle postfix attributes in case of typedef
1258 name or typeof used.
1259 * c-parser.c (c_parser_direct_declarator)
1260 (c_parser_direct_declarator_inner): Place declarator for
1261 attributes inside that for function or array, not outside. Set
1262 u.id.attrs for identifiers.
1263 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1264 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1267 2019-11-22 Jakub Jelinek <jakub@redhat.com>
1270 * c-decl.c (identifier_global_tag): Define.
1272 2019-11-20 Richard Biener <rguenther@suse.de>
1275 * c-decl.c (grokdeclarator): Prevent inlining of nested
1276 function with VLA arguments.
1278 2019-11-20 Joseph Myers <joseph@codesourcery.com>
1280 * c-decl.c (c_warn_type_attributes): New function.
1281 (groktypename, grokdeclarator, finish_declspecs): Call
1282 c_warn_type_attributes before applying attributes to types.
1283 * c-tree.h (c_warn_type_attributes): Declare.
1285 2019-11-19 Joseph Myers <joseph@codesourcery.com>
1287 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1288 standard attributes.
1289 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1290 pedwarn for unknown standard attributes and return error_mark_node
1293 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1295 * c-parser.c (c_parser_parse_rtl_body): Always call
1296 run_rtl_passes, even if startwith pass is not provided.
1298 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1300 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1301 duplicate standard attributes.
1303 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1305 * c-decl.c (std_attribute_table): Add maybe_unused.
1307 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1309 * c-decl.c (std_attribute_table): Add fallthrough.
1310 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1311 attribute at top level.
1313 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1315 * c-decl.c (std_attribute_table): New.
1316 (c_init_decl_processing): Register attributes from
1317 std_attribute_table.
1318 * c-parser.c (c_parser_attribute_arguments): Add arguments
1319 require_string and allow_empty_args. All callers changed.
1320 (c_parser_std_attribute): Set require_string argument for
1321 "deprecated" attribute.
1323 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1325 * c-parser.c (c_parser_postfix_expression)
1326 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1327 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1329 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1331 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1332 of build_same_sized_truth_vector_type.
1333 (build_vec_cmp): Likewise.
1335 2019-11-14 Jakub Jelinek <jakub@redhat.com>
1337 * c-parser.c (c_parser_omp_context_selector): Don't require score
1338 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1341 * c-parser.c (c_parser_omp_context_selector): Rename
1342 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1343 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1344 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1345 and string literals.
1347 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1349 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1350 ctsk_tagfirstref_attrs.
1351 (struct c_declspecs): Update description of attrs. Add
1352 postfix_attrs and non_std_attrs_seen_p. Increase size of
1353 typespec_kind bit-field.
1354 (c_warn_unused_attributes): New declaration.
1355 (parser_xref_tag): Update prototype.
1356 * c-decl.c (c_warn_unused_attributes): New function.
1357 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1358 ctsk_tagref_attrs. Handle attribute declarations.
1359 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1360 (grokdeclarator): Handle standard attributes.
1361 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1362 attributes to incomplete type reference.
1363 (xref_tag): Update call to parser_xref_tag.
1364 (declspecs_add_addrspace, declspecs_add_type)
1365 (declspecs_add_scspec, declspecs_add_attrs): Set
1366 non_std_attrs_seen_p.
1367 (finish_declspecs): Apply postfix standard attributes to type.
1368 * c-parser.c (c_token_starts_declspecs)
1369 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1370 (c_parser_next_tokens_start_declaration): Update comments.
1371 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1372 parser->tokens[2] to parser->tokens[1].
1373 (c_parser_nth_token_starts_std_attributes)
1374 (c_parser_std_attribute_specifier_sequence): New functions.
1375 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1376 attrs. All callers changed. Handle standard attributes.
1377 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1378 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1379 All callers changed.
1380 (c_parser_declspecs): Add arguments start_std_attr_ok and
1381 end_std_attr_ok. All callers changed. Handle standard
1383 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1384 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1385 (c_parser_compound_statement_nostart, c_parser_all_labels)
1386 (c_parser_label, c_parser_statement, c_parser_for_statement):
1387 Handle standard attributes.
1388 * c-parser.h (c_parser_declspecs): Update prototype.
1389 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1392 2019-11-12 Martin Liska <mliska@suse.cz>
1394 * gimple-parser.c: Do not include params.h.
1396 2019-11-12 Martin Liska <mliska@suse.cz>
1398 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1399 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1402 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1403 Frederik Harwath <frederik@codesourcery.com>
1406 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1407 (c_parser_oacc_kernels_parallel): Rename function to...
1408 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1409 (c_parser_omp_construct): Update accordingly.
1412 2019-11-11 Jakub Jelinek <jakub@redhat.com>
1414 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1415 without corresponding end declare target.
1417 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1419 * c-convert.c (convert): Only handle vector conversions if one of
1420 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1422 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1423 vectors satisfy gnu_vector_type_p.
1424 (build_unary_op): Only allow unary operators to be applied to
1425 vectors if they satisfy gnu_vector_type_p.
1426 (digest_init): Only allow by-element initialization of vectors
1427 if they satisfy gnu_vector_type_p.
1428 (really_start_incremental_init): Likewise.
1429 (push_init_level): Likewise.
1430 (pop_init_level): Likewise.
1431 (process_init_element): Likewise.
1432 (build_binary_op): Only allow binary operators to be applied to
1433 vectors if they satisfy gnu_vector_type_p.
1435 2019-11-08 Joseph Myers <joseph@codesourcery.com>
1437 * c-decl.c (grokparms): Convert () in a function definition to
1439 (store_parm_decls_oldstyle): Pedwarn for C2x.
1440 (store_parm_decls): Update comment about () not generating a
1443 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1445 * c-parser.c (c_parser_attribute_arguments): New function.
1446 Factored out of c_parser_gnu_attribute.
1447 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1448 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1449 (c_parser_std_attribute_specifier): New functions.
1450 (c_parser_transaction_attributes): Use
1451 c_parser_std_attribute_specifier.
1453 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1455 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1456 lex_joined_string and translate_strings_p.
1457 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1459 (c_parser_string_literal): New function.
1460 (c_parser_static_assert_declaration_no_semi): Use
1461 c_parser_string_literal. Do not set lex_untranslated_string.
1462 (c_parser_asm_string_literal): Use c_parser_string_literal.
1463 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1464 (c_parser_gnu_attributes): Set and restore translate_strings_p
1465 instead of lex_untranslated_string.
1466 (c_parser_asm_statement): Do not set lex_untranslated_string.
1467 (c_parser_asm_operands): Likewise.
1468 (c_parser_has_attribute_expression): Set and restore
1469 translate_strings_p instead of lex_untranslated_string.
1470 (c_parser_postfix_expression): Use c_parser_string_literal.
1471 (pragma_lex): Likewise.
1472 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1473 (c_parse_file): Set translate_strings_p.
1474 * gimple-parser.c (c_parser_gimple_postfix_expression)
1475 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1476 * c-parser.c (c_parser_string_literal): Declare function.
1478 2019-11-02 Jakub Jelinek <jakub@redhat.com>
1480 * c-parser.c (c_finish_omp_declare_variant): Use
1481 omp_get_context_selector instead of c_omp_get_context_selector.
1483 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1485 * c-tree.h (c_simulate_enum_decl): Declare.
1486 * c-decl.c (c_simulate_enum_decl): New function.
1487 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1489 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1491 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1492 * c-decl.c (c_simulate_builtin_function_decl): New function.
1493 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1496 2019-10-28 Martin Sebor <msebor@redhat.com>
1499 * c-decl.c (names_builtin_p): Define a new function.
1501 2019-10-28 Richard Biener <rguenther@suse.de>
1504 * gimple-parser.c (c_parser_parse_gimple_body): Make
1505 current_bb the entry block initially to easier recover
1507 (c_parser_gimple_compound_statement): Adjust.
1509 2019-10-24 Jakub Jelinek <jakub@redhat.com>
1511 * c-parser.c (c_finish_omp_declare_variant): Use
1512 omp_context_selector_matches instead of
1513 c_omp_context_selector_matches.
1514 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1515 attribute in between declare target and end declare target
1518 2019-10-15 Joseph Myers <joseph@codesourcery.com>
1520 * c-parser.c (c_parser_attribute_any_word): Rename to
1521 c_parser_gnu_attribute_any_word. All callers changed.
1522 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1524 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1526 (c_parser_declaration_or_fndef, c_parser_declspecs)
1527 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1528 (c_parser_struct_declaration, c_parser_declarator)
1529 (c_parser_gnu_attribute, c_parser_compound_statement)
1530 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1531 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1532 attribute-related syntax productions.
1534 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1536 * c-objc-common.c (useful_aka_type_p): Replace with...
1537 (get_aka_type): ...this new function. Given the original type,
1538 decide which aka type to print (if any). Only look through typedefs
1539 if user_facing_original_type_p.
1540 (print_type): Update accordingly.
1542 2019-10-14 Jakub Jelinek <jakub@redhat.com>
1544 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1545 into int NESTED, if it is 2, diagnose missing commas in between
1547 (c_parser_omp_context_selector): Pass 2 as last argument to
1548 c_parser_omp_all_clauses.
1550 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1552 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1553 For simd properties, put them directly into TREE_VALUE.
1554 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1555 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1556 add "omp declare variant base" attribute rather than
1557 "omp declare variant".
1559 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1561 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1563 2019-10-10 Jakub Jelinek <jakub@redhat.com>
1565 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1566 true, terminate processing on closing paren and don't skip to end of
1568 (c_parser_omp_declare_simd): Handle also declare variant.
1569 (omp_construct_selectors, omp_device_selectors,
1570 omp_implementation_selectors, omp_user_selectors): New variables.
1571 (c_parser_omp_context_selector,
1572 c_parser_omp_context_selector_specification,
1573 c_finish_omp_declare_variant): New functions.
1574 (c_finish_omp_declare_simd): Handle both declare simd and
1576 (c_parser_omp_declare): Handle declare variant.
1578 2019-10-02 Joseph Myers <joseph@codesourcery.com>
1580 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1583 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1585 * c-objc-common.c (useful_aka_type_p): New function.
1586 (print_type): Use it to decide whether an aka type is worth printing.
1588 2019-09-27 Jakub Jelinek <jakub@redhat.com>
1591 * c-parser.c (c_parser_predefined_identifier): New function.
1592 (c_parser_postfix_expression): Use it.
1593 (c_parser_omp_variable_list): Parse predefined identifiers.
1594 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1595 in shared and firstprivate clauses, even when they are predetermined
1598 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1600 * c-typeck.c (build_function_call_vec): Take the original function
1601 decl as an optional final parameter. Pass all built-in calls to
1602 check_builtin_function_arguments.
1604 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1607 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1608 of identifiers in the external scope only for variables and functions.
1610 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1613 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1615 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1618 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1619 after determining that the first token is not
1620 PRAGMA_GCC_PCH_PREPROCESS.
1622 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1624 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1625 FUNCTION_DECL to the right value in the presence of nested declarators.
1627 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1630 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1632 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1635 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1636 of a built_in_function.
1637 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1639 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1641 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1642 (c_parser_omp_clause_device_type): New function.
1643 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1644 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1645 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1646 diagnostics for declare target with clauses nested in clause-less
1647 declare target declaration-definition-seq.
1648 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1650 2019-08-09 Jakub Jelinek <jakub@redhat.com>
1652 * c-parser.c (check_no_duplicate_clause): Simplify using
1654 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1655 directive name modifiers.
1656 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1659 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1660 check_no_duplicate_clause call. Comment it out, instead emit a
1661 warning for duplicate dist_schedule clauses.
1663 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1665 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1667 2019-08-08 Jakub Jelinek <jakub@redhat.com>
1669 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1670 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1671 instead of generic_head to track duplicates.
1673 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1675 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1676 (c_parser_omp_clause_use_device_addr): New function.
1677 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1678 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1679 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1680 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1681 map or use_device_* clauses.
1682 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1683 in OpenMP, require pointer type rather than pointer or array type.
1684 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1686 2019-07-31 Jakub Jelinek <jakub@redhat.com>
1689 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1690 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1693 2019-07-25 Martin Liska <mliska@suse.cz>
1694 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1697 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1699 2019-07-25 Martin Liska <mliska@suse.cz>
1701 * c-decl.c (merge_decls): Use new macros
1702 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1704 2019-07-23 Richard Biener <rguenther@suse.de>
1706 PR tree-optimization/83518
1707 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1708 a CFG also rebuild cgraph edges.
1710 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1712 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1713 (c_parser_omp_clause_bind): New function.
1714 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1715 (OMP_LOOP_CLAUSE_MASK): Define.
1716 (c_parser_omp_loop): New function.
1717 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1718 loop combined with parallel or teams.
1719 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1720 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1722 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1725 * c-decl.c (finish_function): Check targetm.warn_func_return
1726 before issuing a -Wreturn-type warning.
1728 2019-07-12 Alexandre Oliva <oliva@adacore.com>
1730 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1731 (c_parser_compound_statement): Call it.
1733 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1735 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1736 (c_parser_omp_clause_order): New function.
1737 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1738 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1739 PRAGMA_OMP_CLAUSE_ORDER.
1740 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1742 2019-07-10 Richard Biener <rguenther@suse.de>
1744 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1745 _Literal (int *) &x for address literals.
1747 2019-07-09 Martin Sebor <msebor@redhat.com>
1750 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1752 (field_decl_cmp): Same.
1753 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1755 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1757 2019-07-09 Martin Sebor <msebor@redhat.com>
1760 * c-decl.c: Change class-key from class to struct and vice versa
1761 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1762 * gimple-parser.c: Same.
1764 2019-07-01 Richard Biener <rguenther@suse.de>
1766 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1767 _Literal (char *) &"foo" for address literals pointing to
1770 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1772 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1773 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1774 C incompatibility if alternate "__intN__" form is used.
1776 2019-06-24 Martin Sebor <msebor@redhat.com>
1778 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1780 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1782 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1783 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1784 (c_parser_omp_scan_loop_body): New function.
1785 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1786 inscan reduction clauses.
1787 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1788 non-inscan reductions on the same construct, or inscan reductions with
1789 ordered or schedule clauses, or inscan array reductions.
1791 2019-06-05 Martin Sebor <msebor@redhat.com>
1794 * c-typeck.c (c_finish_return): Only consider functions returning
1795 pointers as candidates for -Wreturn-local-addr.
1797 2019-06-05 Martin Sebor <msebor@redhat.com>
1799 * c-decl.c (start_decl): Adjust quoting and hyphenation
1801 (finish_decl): Same.
1802 (finish_enum): Same.
1803 (start_function): Same.
1804 (declspecs_add_type): Same.
1805 * c-parser.c (warn_for_abs): Same.
1806 * c-typeck.c (build_binary_op): Same.
1808 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1811 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1812 marked with an OpenACC 'routine' directive.
1815 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1816 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1819 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1820 clauses from "omp declare target" attribute.
1822 2019-05-16 Martin Sebor <msebor@redhat.com>
1824 * c-decl.c (start_decl): Quote keywords, operators, and
1825 types in diagnostics.
1826 (finish_decl): Same.
1827 * c-parser.c (c_parser_asm_statement): Same.
1828 (c_parser_conditional_expression): Same.
1829 (c_parser_transaction_cancel): Same.
1830 * c-typeck.c (c_common_type): Same.
1831 (build_conditional_expr): Same.
1832 (digest_init): Same.
1833 (process_init_element): Same.
1834 (build_binary_op): Same.
1836 2019-05-17 Richard Biener <rguenther@suse.de>
1838 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1839 (c_parser_gimple_unary_expression): Likewise.
1840 (c_parser_gimple_parentized_ternary_expression): New function.
1842 2019-05-16 Richard Biener <rguenther@suse.de>
1844 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1845 (c_parser_gimple_unary_expression): Likewise.
1847 2019-05-15 Richard Biener <rguenther@suse.de>
1849 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1852 2019-05-14 Richard Biener <rguenther@suse.de>
1854 * gimple-parser.c (c_parser_gimple_statement): Remove
1855 questionable auto-promotion to VIEW_CONVERT_EXPR.
1856 (c_parser_gimple_typespec): Split out from __MEM parsing.
1857 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1858 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1859 as __VIEW_CONVERT with -gimple.
1861 2019-05-09 Martin Liska <mliska@suse.cz>
1863 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1865 (c_parser_gimple_unary_expression): Parse also binary expression
1867 (c_parser_gimple_parentized_binary_expression): New function.
1869 2019-05-09 Martin Liska <mliska@suse.cz>
1871 * gimple-parser.c (struct gimple_parser): Add probability.
1872 for gimple_parser_edge.
1873 (gimple_parser::push_edge): Add new argument probability.
1874 (c_parser_gimple_parse_bb_spec): Parse also probability
1876 (c_parser_parse_gimple_body): Set edge probability.
1877 (c_parser_gimple_compound_statement): Consume token
1878 before calling c_parser_gimple_goto_stmt.
1880 (c_parser_gimple_statement): Pass new argument.
1881 (c_parser_gimple_goto_stmt): Likewise.
1882 (c_parser_gimple_if_stmt): Likewise.
1883 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1884 * c-parser.c (c_parser_declaration_or_fndef): Pass
1885 hot_bb_threshold argument.
1886 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1888 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1890 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1893 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1894 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1895 (c_parser_do_statement): Likewise.
1896 (c_parser_for_statement): Likewise. Formatting fixes.
1897 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1898 emit DEBUG_BEGIN_STMTs if needed.
1900 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1903 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1904 (c_start_case): Don't clear it.
1905 (do_case): Adjust c_add_case_label caller.
1906 (c_finish_case): Adjust c_do_switch_warnings caller.
1909 * c-decl.c (merge_decls): If remove is main variant and
1910 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1911 variant that has newdecl as TYPE_NAME if any.
1913 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1916 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1917 don't try to remove it from the variant list, but instead assert
1920 2019-04-01 Richard Biener <rguenther@suse.de>
1923 * c-tree.h (c_get_alias_set): Declare.
1924 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1925 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1926 as the underlying integer type.
1928 2019-03-19 Martin Sebor <msebor@redhat.com>
1930 PR tree-optimization/89688
1931 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1932 kinds of initializers.
1934 2019-03-19 Jakub Jelinek <jakub@redhat.com>
1937 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1938 return type even if quals_used is 0. Formatting fixes.
1940 2019-03-14 Richard Biener <rguenther@suse.de>
1942 * c-tree.h (enum c_declspec_il): New.
1943 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1945 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1946 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1947 (c_parser_declspecs): Adjust.
1948 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1949 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1951 (struct gimple_parser): New.
1952 (gimple_parser::push_edge): New method.
1953 (c_parser_gimple_parse_bb_spec): New helper.
1954 (c_parser_parse_gimple_body): Get start pass and IL specification.
1955 Initialize SSA and CFG.
1956 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1957 Build a gimple_parser parsing state and pass it along.
1958 (c_parser_gimple_statement): Change intermittend __PHI internal
1959 function argument for the edge.
1960 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1961 (c_parser_gimple_goto_stmt): Record edges to build.
1962 (c_parser_gimple_if_stmt): Likewise.
1963 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1964 (c_parser_gimple_or_rtl_pass_list): Likewise.
1966 2019-03-11 Martin Liska <mliska@suse.cz>
1968 * c-decl.c (check_for_loop_decls): Wrap an option name
1969 in a string format message and fix GNU coding style.
1970 * c-parser.c (c_parser_declspecs): Likewise.
1972 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1974 PR tree-optimization/89550
1975 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1977 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1978 or warning returned true.
1980 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1983 * c-typeck.c (convert_arguments): Call inform_declaration only if
1984 the previous warning_at call returned true.
1986 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1988 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1989 parameter. Adjust all users.
1990 (c_parser_oacc_simple_clause): Replace parser with loc formal
1991 parameter. Adjust all users.
1993 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1996 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1997 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1999 2019-02-15 Jakub Jelinek <jakub@redhat.com>
2002 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2003 before c_decl_attributes rather than after it.
2005 2019-02-06 Jakub Jelinek <jakub@redhat.com>
2008 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2009 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2010 instead of 3 nested ifs.
2012 2019-02-06 Joseph Myers <joseph@codesourcery.com>
2015 * c-decl.c (finish_decl): Do not complete array types for arrays
2016 with external linkage not at file scope.
2018 2019-02-05 Richard Biener <rguenther@suse.de>
2021 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2022 all type variants when not supported.
2024 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2027 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2028 * c-decl.c (decl_jump_unsafe): Return false for
2029 C_DECL_COMPOUND_LITERAL_P decls.
2030 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2032 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2035 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2039 * c-decl.c (last_fileptr_type): Remove.
2040 (last_structptr_types): New variable.
2041 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2042 {old,new}rettype instead of the types themselves. Assert
2043 last_structptr_types array has the same number of elements
2044 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2045 argument oldtype and newtype. Instead of handling
2046 just fileptr_type_node specially, handle all builtin_structptr_types
2047 pointer nodes. Formatting fix.
2049 2019-01-24 Martin Sebor <msebor@redhat.com>
2054 * c-decl.c (match_builtin_function_types): Add arguments.
2055 (diagnose_mismatched_decls): Diagnose mismatched declarations
2056 of built-ins more strictly.
2058 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2061 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2062 on #pragma omp cancel with different modifiers.
2064 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2068 * c-typeck.c (convert_for_assignment): Upate the
2069 warn_for_address_or_pointer_of_packed_member call.
2071 2019-01-16 Tom Honermann <tom@honermann.net>
2072 Jason Merrill <jason@redhat.com>
2074 * c-typeck.c (digest_init): Revised the error message produced for
2075 ill-formed cases of array initialization with a string literal.
2076 (error_init): Make variadic.
2078 2019-01-12 Jakub Jelinek <jakub@redhat.com>
2080 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2082 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2085 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2086 if current_function_decl is non-NULL.
2088 2019-01-07 Joseph Myers <joseph@codesourcery.com>
2092 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2093 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2094 functions declared but never defined only for external scope, not
2097 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2100 * c-parser.c (c_parser_postfix_expression): Parse
2101 __builtin_convertvector.
2103 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2105 Update copyright years.
2107 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2110 * c-typeck.c (convert_for_assignment): Call
2111 warn_for_address_or_pointer_of_packed_member.
2113 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2115 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2116 a more specific error message (instead of just falling through).
2118 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2120 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2121 asm qualifier is first seen; use that to give nicer "duplicate asm
2122 qualifier" messages. Delete 'quals" variable, instead pass the
2123 "is_volatile_ flag to build_asm_stmt directly.
2124 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2125 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2127 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2129 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2130 "done" boolean variable.
2132 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2135 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2136 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2137 (build_binary_op): Use struct op_location_t and
2138 class binary_op_rich_location.
2140 2018-12-11 Jakub Jelinek <jakub@redhat.com>
2143 * c-convert.c (convert): Call c_fully_fold before calling
2144 ubsan_instrument_float_cast.
2146 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2148 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2151 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2153 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2154 after asm. Pass a flag for it to build_asm_expr.
2155 * c-tree.h (build_asm_expr): Update declaration.
2156 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2159 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2162 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2163 combination of volatile and goto, in any order, without repetitions.
2165 2018-12-04 James Norris <jnorris@codesourcery.com>
2166 Cesar Philippidis <cesar@codesourcery.com>
2167 Julian Brown <julian@codesourcery.com>
2169 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2172 2018-11-30 Richard Biener <rguenther@suse.de>
2174 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2175 _Literal (type) { ... } as empty aggregate or vector constructor.
2177 2018-11-29 Martin Sebor <msebor@redhat.com>
2180 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2181 (convert_arguments): Add comments. Pass additional argument to
2184 2018-11-29 Martin Sebor <msebor@redhat.com>
2188 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2190 2018-11-23 Martin Sebor <msebor@redhat.com>
2193 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2194 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2196 2018-11-20 Martin Sebor <msebor@redhat.com>
2198 * c-parser.c (c_parser_has_attribute_expression): New function.
2199 (c_parser_attribute): New function.
2200 (c_parser_attributes): Move code into c_parser_attribute.
2201 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2203 2018-11-15 Martin Sebor <msebor@redhat.com>
2206 * c-decl.c (header_for_builtin_fn): Declare.
2207 (diagnose_mismatched_decls): Diagnose declarations of built-in
2208 functions without a prototype.
2209 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2210 (convert_argument): Same.
2211 (convert_arguments): Factor code out into convert_argument.
2212 Detect mismatches between built-in formal arguments in calls
2213 to built-in without prototype.
2214 (build_conditional_expr): Same.
2215 (type_or_builtin_type): New function.
2216 (convert_for_assignment): Add argument. Conditionally issue
2217 warnings instead of errors for mismatches.
2219 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2221 * c-decl.c: Replace "source_location" with "location_t".
2222 * c-tree.h: Likewise.
2223 * c-typeck.c: Likewise.
2224 * gimple-parser.c: Likewise.
2226 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2228 * c-parser.c (c_parser_omp_clause_final): Use
2229 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2230 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2231 parsing instead of c_parser_paren_condition.
2232 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2233 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2234 c_fully_fold instead of c_parser_condition.
2235 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2236 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2237 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2238 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2239 c_parser_expr_no_commas instead of c_parser_expression.
2241 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2242 reduction clause with inscan modifier.
2244 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2245 clauses other than atomic_default_mem_order.
2247 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2249 * c-parser.c: Include memmode.h.
2250 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2251 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2252 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2253 task_reduction clauses.
2254 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2255 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2256 section, or lvalue assignment expression.
2257 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2258 (c_parser_omp_clause_lastprivate): Parse optional
2259 conditional: modifier.
2260 (c_parser_omp_clause_hint): Require constant integer expression rather
2261 than just integer expression.
2262 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2264 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2265 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2266 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2268 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2269 iterators. Parse mutexinoutset and depobj kinds.
2270 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2272 (c_parser_omp_all_clauses): Likewise. Handle
2273 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2274 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2275 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2276 default memory order from requires directive if any. Adjust
2277 c_finish_omp_atomic caller.
2278 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2279 (c_parser_omp_flush): Parse flush with memory-order-clause.
2280 (c_parser_omp_for_loop): Allow NE_EXPR even in
2281 OpenMP loops, adjust c_finish_omp_for caller.
2282 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2283 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2284 Allow to be called while parsing combined parallel master.
2285 Parse combined master taskloop{, simd}.
2286 (c_parser_omp_parallel): Parse combined
2287 parallel master{, taskloop{, simd}} constructs.
2288 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2289 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2290 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2291 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2292 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2293 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2294 around teams body. Use SET_EXPR_LOCATION.
2295 (c_parser_omp_target_data): Allow target data
2296 with only use_device_ptr clauses.
2297 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2298 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2299 (c_parser_omp_requires): New function.
2300 (c_finish_taskloop_clauses): New function.
2301 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2302 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2303 declaration. Disallow in_reduction clause when combined with parallel
2305 (c_parser_omp_construct): Adjust c_parser_omp_master and
2306 c_parser_omp_taskgroup callers.
2307 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2309 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2310 like OMP_CLAUSE_REDUCTION.
2311 (handle_omp_array_sections): Likewise. Call save_expr on array
2312 reductions before calling build_index_type. Handle depend clauses
2314 (struct c_find_omp_var_s): New type.
2315 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2316 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2317 with static, runtime or auto schedule kinds. Call save_expr for whole
2318 array reduction sizes. Diagnose reductions with zero sized elements
2319 or variable length structures. Diagnose nogroup clause used with
2320 reduction clause(s). Handle depend clause with
2321 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2322 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2323 some different type for other kinds. Use build_unary_op with
2324 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2325 Handle depend clauses with iterators. Remove no longer needed special
2326 case that predetermined const qualified vars may be specified in
2327 firstprivate clause. Complain if const qualified vars are mentioned
2328 in data-sharing clauses other than firstprivate or shared. Use
2329 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2330 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2331 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2332 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2334 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2336 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2337 logic for change to name_hint::operator bool.
2338 (undeclared_variable): Likewise.
2339 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2340 (c_parser_parameter_declaration): Likewise.
2342 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2344 * c-errors.c (pedwarn_c11): New function.
2345 * c-parser.c (disable_extension_diagnostics): Save
2346 warn_c11_c2x_compat and set it to 0.
2347 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2348 (c_parser_static_assert_declaration_no_semi): Handle
2349 _Static_assert without string constant.
2350 * c-tree.h (pedwarn_c11): New prototype.
2352 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2354 * Make-lang.in (selftest-c): New.
2355 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2356 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2357 from gcc/Makefile.in.
2359 2018-10-02 Richard Biener <rguenther@suse.de>
2361 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2363 2018-09-26 Joseph Myers <joseph@codesourcery.com>
2366 * c-typeck.c (build_binary_op): Use excess precision for
2367 comparisons of integers and floating-point for C11 and later.
2369 2018-09-26 Martin Jambor <mjambor@suse.cz>
2372 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
2375 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2377 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2378 Update for new param.
2379 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2382 2018-09-17 Martin Jambor <mjambor@suse.cz>
2385 * c-parser.c: (warn_for_abs): New function.
2386 (c_parser_postfix_expression_after_primary): Call it.
2388 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2390 * c-typeck.c (digest_init): Shorten overlength strings.
2392 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2394 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2396 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2398 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2399 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2401 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
2403 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2404 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2406 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2409 * c-decl.c (implicitly_declare): Update call to
2410 maybe_add_include_fixit to suggest overriding the location, as it
2412 * c-objc-common.c (c_tree_printer): Update for conversion of
2413 show_caret_p to a tri-state.
2415 2018-08-27 Martin Liska <mliska@suse.cz>
2417 * c-decl.c (locate_old_decl): Use new function
2418 fndecl_built_in_p and remove check for FUNCTION_DECL if
2420 (diagnose_mismatched_decls): Likewise.
2421 (merge_decls): Likewise.
2422 (warn_if_shadowing): Likewise.
2423 (pushdecl): Likewise.
2424 (implicitly_declare): Likewise.
2425 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2426 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2427 * c-typeck.c (build_function_call_vec): Likewise.
2428 (convert_arguments): Likewise.
2430 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2433 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2434 (diagnose_mismatched_decls): Likewise, in various places.
2435 (warn_if_shadowing): Likewise.
2436 (implicit_decl_warning): Likewise.
2437 (implicitly_declare): Likewise.
2438 (undeclared_variable): Likewise.
2439 (declare_label): Likewise.
2440 (grokdeclarator): Likewise.
2441 (start_function): Likewise.
2442 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2443 (c_parser_parameter_declaration): Likewise.
2444 (c_parser_binary_expression): Likewise.
2445 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2446 (parser_build_binary_op): Likewise.
2447 (build_unary_op): Likewise.
2448 (error_init): Likewise.
2449 (pedwarn_init): Likewise.
2450 (warning_init): Likewise.
2451 (convert_for_assignment): Likewise.
2453 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2455 * c-objc-common.c: Include "gcc-rich-location.h".
2456 (c_tree_printer): Move implemenation of '%T' to...
2457 (print_type): ...this new function.
2458 (range_label_for_type_mismatch::get_text): New function.
2459 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2460 range for the various ic_argpass cases.
2461 (class maybe_range_label_for_tree_type_mismatch): New class.
2462 (build_binary_op): Use it when calling binary_op_error.
2464 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2466 * c-decl.c (start_decl): Do not warn if variables is named as main
2467 and is a local variable.
2469 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2472 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2473 objects of unknown size.
2475 2018-08-13 Martin Sebor <msebor@redhat.com>
2477 PR tree-optimization/71625
2478 * c-parser.c (c_parser_declaration_or_fndef): Call
2479 braced_list_to_string.
2481 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2484 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2487 2018-08-01 Martin Sebor <msebor@redhat.com>
2489 PR tree-optimization/86650
2490 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2491 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2493 2018-08-01 Jakub Jelinek <jakub@redhat.com>
2496 * c-typeck.c (init_field_decl_cmp): New function.
2497 (output_pending_init_elements): Use it for field comparisons
2498 instead of pure bit_position comparisons.
2500 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2502 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2503 type here, instead add "omp declare target implicit" attribute.
2504 (finish_decl): Diagnose vars without mappable type here.
2506 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2507 Thomas Schwinge <thomas@codesourcery.com>
2508 Cesar Philippidis <cesar@codesourcery.com>
2510 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2511 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2512 to their non-present_or_* counterparts. Make 'self' an alias to
2513 PRAGMA_OACC_CLAUSE_HOST.
2514 (c_parser_oacc_data_clause): Update GOMP mappings for
2515 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2516 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2517 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2518 Remove support for present_or_* clauses.
2519 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2520 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2521 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2522 (OACC_DATA_CLAUSE_MASK): Likewise.
2523 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2524 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2525 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2526 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2527 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2529 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2531 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2532 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2533 (c_parser_gimple_unary_expression): Likewise.
2535 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2538 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2539 before doing POINTER_DIFF_EXPR.
2541 2018-06-07 Marek Polacek <polacek@redhat.com>
2544 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2545 for loop initial declarations.
2547 2018-05-30 David Pagan <dave.pagan@oracle.com>
2550 * c-decl.c (grokdeclarator): Update check for return type warnings.
2551 (start_function): Likewise.
2552 (finish_function): Likewise.
2553 * c-typeck.c (c_finish_return): Update check for return type warnings.
2554 Pass OPT_Wreturn_type to pedwarn when appropriate.
2556 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2558 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2561 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2563 * gimple-parser.c: Include internal-fn.h.
2564 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2565 (c_parser_gimple_call_internal): New function.
2566 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2567 Fix typos in comment.
2569 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2572 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2573 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2575 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2576 fold_offsetof_1, pass argtype as TYPE to it and drop the
2579 2018-05-02 David Pagan <dave.pagan@oracle.com>
2582 * c-decl.c (old_style_parameter_scope): New function.
2583 * c-parser.c (c_parser_postfix_expression): Check for statement
2584 expressions in old-style function parameter list declarations.
2585 * c-parser.h (old_style_parameter_scope): New extern declaration.
2587 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2590 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2591 it is not TREE_STATIC.
2592 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2593 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2594 its COMPOUND_LITERAL_EXPR_DECL.
2596 2018-03-21 Joseph Myers <joseph@codesourcery.com>
2598 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2599 where all functions return the same _FloatN or _FloatNx type,
2600 treat integer types as _Float64 instead of double.
2602 2018-03-21 Jakub Jelinek <jakub@redhat.com>
2605 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2606 building vector comparison, diagnose it and return error_mark_node.
2608 2018-03-15 Jakub Jelinek <jakub@redhat.com>
2611 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2612 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2613 INTEGER_TYPE element type.
2615 2018-03-13 David Pagan <dave.pagan@oracle.com>
2618 * c-typeck.c (output_init_element): Ensure field initializer
2619 expression is always evaluated if there are side effects.
2621 2018-03-06 Jakub Jelinek <jakub@redhat.com>
2624 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2625 !building_stmt_list_p ().
2627 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2630 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2631 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2632 and include the BIND_EXPR in the list of things that need to be
2635 2018-02-09 Nathan Sidwell <nathan@acm.org>
2638 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2639 to strict_aliasing_warning.
2641 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2643 * c-typeck.c (really_start_incremental_init, push_init_level,
2644 set_nonincremental_init, output_init_element, process_init_element):
2645 Use DECL_UNNAMED_BIT_FIELD.
2647 2018-01-31 Marek Polacek <polacek@redhat.com>
2650 * c-parser.c (c_parser_compound_statement_nostart): Call
2651 expansion_point_location_if_in_system_header.
2653 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2656 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2659 2018-01-13 Jakub Jelinek <jakub@redhat.com>
2662 * c-tree.h (decl_constant_value_1): Add a bool argument.
2663 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2664 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2665 (decl_constant_value): Adjust caller.
2666 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2667 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2668 decl_constant_value returns initializer that has BLKmode or
2670 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2672 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2673 Alan Hayward <alan.hayward@arm.com>
2674 David Sherwood <david.sherwood@arm.com>
2676 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2677 TYPE_VECTOR_SUBPARTS.
2679 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2681 Update copyright years.
2683 2018-01-01 Jakub Jelinek <jakub@redhat.com>
2686 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2687 c_parser_conditional_expression, c_parser_cast_expression,
2688 c_parser_sizeof_expression, c_parser_alignof_expression,
2689 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2690 c_parser_transaction_expression): Use set_error () method instead
2691 of setting value member to error_mark_node.
2693 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2695 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2696 and _Float<N>X built-in functions.
2698 2017-12-22 Jakub Jelinek <jakub@redhat.com>
2701 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2702 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2703 incomplete vars rather than after it.
2706 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2707 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2708 and consider empty ones if there are no other stmts. For
2709 -Wunused-value walk all statements before the one only followed by
2712 2017-12-22 Mike Stump <mikestump@comcast.net>
2713 Eric Botcazou <ebotcazou@adacore.com>
2715 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2716 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2717 (c_parser_do_statement): Likewise.
2718 (c_parser_for_statement): Likewise.
2719 (c_parser_statement_after_labels): Adjust calls to above.
2720 (c_parse_pragma_ivdep): New static function.
2721 (c_parser_pragma_unroll): Likewise.
2722 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2723 <PRAGMA_UNROLL>: New case.
2725 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2727 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2728 perform_integral_promotions, digest_init): Replace Yoda conditions
2729 with typical order conditions.
2730 * c-decl.c (check_bitfield_type_and_width): Likewise.
2732 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2734 * c-typeck.c (c_safe_arg_type_equiv_p,
2735 c_safe_function_type_cast_p): New function.
2736 (build_c_cast): Implement -Wcast-function-type.
2738 2017-12-14 Richard Biener <rguenther@suse.de>
2741 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2742 like REALPART_EXPR for the behavior of whether its operand
2745 2017-12-12 Marek Polacek <polacek@redhat.com>
2748 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2750 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2752 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2753 * c-parser.c (add_debug_begin_stmt): New.
2754 (c_parser_declaration_or_fndef): Call it.
2755 (c_parser_compound_statement_nostart): Likewise.
2756 (c_parser_statement_after_labels): Likewise.
2757 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2759 2017-12-07 Joseph Myers <joseph@codesourcery.com>
2761 * c-decl.c (build_compound_literal): Add parameter alignas_align
2762 and set alignment of decl if nonzero.
2763 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2764 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2766 (c_parser_struct_declaration): Update syntax comment.
2767 (c_parser_type_name): Add alignas_ok argument and pass it to
2769 (c_parser_cast_expression): Pass true to c_parser_type_name and
2770 give error if a cast used an _Alignas specifier.
2771 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2772 give error if sizeof (type-name) used an _Alignas specifier.
2773 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2774 give error if _Alignof (type-name) used an _Alignas specifier.
2775 (c_parser_postfix_expression_after_paren_type): Check specified
2776 alignment for a compound literal and pass it to
2777 build_compound_literal.
2778 * c-parser.h (c_parser_type_name): Update prototype.
2779 * c-tree.h (build_compound_literal): Update prototype.
2781 2017-12-07 Martin Sebor <msebor@redhat.com>
2784 * c-decl.c (c_decl_attributes): Look up existing declaration and
2785 pass it to decl_attributes.
2787 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2790 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2791 reserved for use by the implementation.
2793 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2795 * c-decl.c: Include "c-family/c-spellcheck.h".
2797 2017-12-05 Martin Liska <mliska@suse.cz>
2798 Jakub Jelinek <jakub@redhat.com>
2800 * c-typeck.c (pointer_diff): Add new argument and instrument
2801 pointer subtraction.
2802 (build_binary_op): Similar for pointer comparison.
2804 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2807 * c-parser.c: Include tree-iterator.h.
2808 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2809 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2813 * c-tree.h (decl_constant_value_1): Declare.
2814 * c-typeck.c (decl_constant_value_1): New function.
2815 (decl_constant_value): Use it.
2816 * c-fold.c (c_fully_fold_internal): If in_init, use
2817 decl_constant_value_1 instead of decl_constant_value.
2819 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2821 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2823 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2826 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2827 c_switch_covers_all_cases_p returns true.
2829 2017-11-28 Julia Koval <julia.koval@intel.com>
2830 Sebastian Peryt <sebastian.peryt@intel.com>
2832 * Make-lang.in (c/c-array-notation.o): Remove.
2833 * c-array-notation.c: Delete.
2834 * c-decl.c: Remove cilkplus condition.
2835 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2836 c_parser_cilk_verify_simd, c_parser_array_notation,
2837 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2838 c_parser_cilk_simd_fn_vector_attrs,
2839 c_finish_cilk_simd_fn_tokens): Delete.
2840 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2841 (c_parser_direct_declarator_inner): Ditto.
2842 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2843 (c_parser_attributes, c_parser_compound_statement,
2844 c_parser_statement_after_labels, c_parser_if_statement,
2845 c_parser_switch_statement, c_parser_while_statement,
2846 c_parser_do_statement, c_parser_for_statement,
2847 c_parser_unary_expression, c_parser_postfix_expression,
2848 c_parser_postfix_expression_after_primary,
2849 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2850 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2852 * c-typeck.c (build_array_ref, build_function_call_vec,
2854 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2855 c_finish_loop, build_binary_op): Remove cilkplus support.
2857 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2859 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2862 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
2864 * Make-lang.in (c.install-plugin): Install backend import library.
2866 2017-11-23 Jakub Jelinek <jakub@redhat.com>
2868 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2869 pragma_stmt context.
2871 2017-11-23 Mike Stump <mikestump@comcast.net>
2872 Eric Botcazou <ebotcazou@adacore.com>
2874 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2876 (c_parser_do_statement): Likewise.
2877 (c_parser_for_statement): Likewise.
2879 2017-11-22 David Malcolm <dmalcolm@redhat.com>
2882 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2883 bool to bool *. Within '%T' handling, if showing an "aka", use
2884 "quoted" param to add appropriate quoting.
2886 2017-11-22 Marek Polacek <polacek@redhat.com>
2891 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2893 2017-11-21 David Malcolm <dmalcolm@redhat.com>
2896 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2897 earlier failed lookups.
2899 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2901 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2902 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2904 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2907 * c-decl.c: Include "c-family/known-headers.h".
2908 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2909 to known-headers.cc.
2910 (class suggest_missing_header): Move to known-header.h.
2911 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2912 than get_c_name_hint.
2914 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2916 * c-decl.c (get_c_name_hint): New function.
2917 (class suggest_missing_header): New class.
2918 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2919 suggest missing headers to the user.
2921 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2923 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2924 Include "c-family/name-hint.h"
2925 (implicit_decl_warning): Convert "hint" from
2926 const char * to name_hint. Pass location to
2927 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2928 warning was not printed.
2929 (undeclared_variable): Likewise for "guessed_id".
2930 (lookup_name_fuzzy): Convert return type from const char *
2931 to name_hint. Add location_t param.
2932 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2933 Include "c-family/name-hint.h"
2934 (c_parser_declaration_or_fndef): Convert "hint" from
2935 const char * to name_hint. Pass location to lookup_name_fuzzy.
2936 (c_parser_parameter_declaration): Likewise.
2938 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2942 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2944 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2945 handle_omp_array_sections): Likewise.
2946 (digest_init): Don't call decl_constant_value_for_optimization.
2947 * c-tree.h (decl_constant_value_for_optimization): Removed.
2948 * c-fold.c (c_fold_array_ref): New function.
2949 (c_fully_fold_internal): Add LVAL argument, propagate it through
2950 recursive calls. For VAR_P call decl_constant_value and
2951 unshare if not LVAL and either optimizing or IN_INIT. Remove
2952 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2953 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2954 (c_fully_fold): Add LVAL argument, pass it through to
2955 c_fully_fold_internal.
2956 (decl_constant_value_for_optimization): Removed.
2958 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2961 * c-parser.c (check_tgmath_function): New function.
2962 (enum tgmath_parm_kind): New enum.
2963 (c_parser_postfix_expression): Handle __builtin_tgmath.
2965 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2967 * c-decl.c (implicit_decl_warning): Update for renaming of
2968 pedwarn_at_rich_loc and warning_at_rich_loc.
2969 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2970 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2971 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2972 (c_parser_struct_or_union_specifier): Likewise for renaming of
2973 pedwarn_at_rich_loc.
2974 (c_parser_parameter_declaration): Likewise for renaming of
2976 * c-typeck.c (build_component_ref): Likewise.
2977 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2978 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2979 (set_init_label): Likewise for renaming of error_at_rich_loc.
2981 2017-10-30 Richard Biener <rguenther@suse.de>
2983 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2986 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2988 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2989 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2991 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2994 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2997 2017-10-25 Jakub Jelinek <jakub@redhat.com>
3000 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3001 newdecl to corresponding __builtin_ if any.
3003 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3006 * c-decl.c (diagnose_mismatched_decls): Use
3007 OPT_Wbuiltin_declaration_mismatch.
3009 2017-10-12 David Malcolm <dmalcolm@redhat.com>
3011 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3012 use it to guard calls to maybe_suggest_missing_token_insertion.
3013 (c_parser_parms_list_declarator): Override default value of new
3014 "type_is_unique" param to c_parser_require.
3015 (c_parser_asm_statement): Likewise.
3016 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3019 2017-10-11 Nathan Sidwell <nathan@acm.org>
3021 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3023 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3025 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3026 operating on trees as wide_ints.
3027 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3028 (c_tree_equal): Likewise.
3030 2017-10-04 David Malcolm <dmalcolm@redhat.com>
3032 * c-decl.c (push_parm_decl): Store c_parm's location into the
3034 (build_c_parm): Add "loc" param and store it within the c_parm.
3035 * c-parser.c (struct c_parser): Add "last_token_location" field.
3036 (c_parser_consume_token): Store location of the token into the
3038 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3039 when handling a FUNCTION_DECL, if it doesn't already have them.
3040 (c_parser_parameter_declaration): Generate a location for the
3041 parameter, and pass it to the call to build_c_parm.
3042 * c-tree.h (struct c_parm): Add field "loc".
3043 (build_c_parm): Add location_t param.
3044 * c-typeck.c (get_fndecl_argument_location): New function.
3045 (inform_for_arg): New function.
3046 (convert_for_assignment): Use inform_for_arg when dealing with
3049 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3051 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3053 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3054 don't SET_DECL_C_BIT_FIELD here.
3057 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3058 instead of trying to set just TREE_READONLY manually.
3060 2017-09-16 Tom de Vries <tom@codesourcery.com>
3063 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3066 2017-09-15 Joseph Myers <joseph@codesourcery.com>
3069 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3071 (build_conditional_expr): For C11, generate result with excess
3072 precision when one argument is an integer and the other is of a
3073 type using excess precision.
3075 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3077 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3079 2017-09-13 Marek Polacek <polacek@redhat.com>
3082 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3083 than expr.original_type.
3085 2017-09-12 Nathan Sidwell <nathan@acm.org>
3087 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3088 resort_sorted_fields): Moved from c-family/c-common.c.
3089 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3091 2017-09-01 Joseph Myers <joseph@codesourcery.com>
3094 * c-typeck.c (build_atomic_assign): Handle argument with excess
3095 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3096 argument passed to build_binary_op and convert_for_assignment but
3097 not for call to c_fully_fold.
3098 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3099 Ensure build_binary_op is called with argument with original
3100 semantic type. Avoid calling c_fully_fold with an
3101 EXCESS_PRECISION_EXPR from build_binary_op.
3103 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3106 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3108 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3109 Alan Hayward <alan.hayward@arm.com>
3110 David Sherwood <david.sherwood@arm.com>
3112 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3113 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3114 m1 and m2 to the signed equivalent of a fixed-point
3117 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3119 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3120 than CAN_HAVE_LOCATION_P when determining whether to use the
3121 location_t value within "value".
3123 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3125 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3126 rather than peeking the location of the first token.
3127 * c-tree.h (c_expr::get_location): New method.
3129 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3131 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3132 to check_function_arguments.
3134 2017-08-18 Marek Polacek <polacek@redhat.com>
3136 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3139 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3142 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3143 (check_bitfield_type_and_width): Don't allow bit-field with
3144 warn_if_not_aligned type.
3146 2017-08-14 Martin Sebor <msebor@redhat.com>
3149 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3151 2017-08-11 Marek Polacek <polacek@redhat.com>
3154 * c-decl.c (pushtag): Only print inform if the warning was printed.
3155 (grokdeclarator): Likewise.
3157 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3159 * c-parser.c (c_parser_error): Rename to...
3160 (c_parser_error_richloc): ...this, making static, and adding
3161 "richloc" parameter, passing it to the c_parse_error call,
3162 rather than calling c_parser_set_source_position_from_token.
3163 (c_parser_error): Reintroduce, reimplementing in terms of the
3164 above, converting return type from void to bool.
3165 (class token_pair): New class.
3166 (struct matching_paren_traits): New struct.
3167 (matching_parens): New typedef.
3168 (struct matching_brace_traits): New struct.
3169 (matching_braces): New typedef.
3170 (get_matching_symbol): New function.
3171 (c_parser_require): Add param MATCHING_LOCATION, using it to
3172 highlight matching "opening" tokens for missing "closing" tokens.
3173 (c_parser_skip_until_found): Likewise.
3174 (c_parser_static_assert_declaration_no_semi): Convert explicit
3175 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3176 class matching_parens, so that the pertinent open parenthesis is
3177 highlighted when there are problems locating the close
3179 (c_parser_struct_or_union_specifier): Likewise.
3180 (c_parser_typeof_specifier): Likewise.
3181 (c_parser_alignas_specifier): Likewise.
3182 (c_parser_simple_asm_expr): Likewise.
3183 (c_parser_braced_init): Likewise, for matching_braces.
3184 (c_parser_paren_condition): Likewise, for matching_parens.
3185 (c_parser_switch_statement): Likewise.
3186 (c_parser_for_statement): Likewise.
3187 (c_parser_asm_statement): Likewise.
3188 (c_parser_asm_operands): Likewise.
3189 (c_parser_cast_expression): Likewise.
3190 (c_parser_sizeof_expression): Likewise.
3191 (c_parser_alignof_expression): Likewise.
3192 (c_parser_generic_selection): Likewise.
3193 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3194 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3195 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3196 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3197 c_parser_skip_until_found call.
3198 (c_parser_objc_class_definition): Use class matching_parens as
3200 (c_parser_objc_method_decl): Likewise.
3201 (c_parser_objc_try_catch_finally_statement): Likewise.
3202 (c_parser_objc_synchronized_statement): Likewise.
3203 (c_parser_objc_at_property_declaration): Likewise.
3204 (c_parser_oacc_wait_list): Likewise.
3205 (c_parser_omp_var_list_parens): Likewise.
3206 (c_parser_omp_clause_collapse): Likewise.
3207 (c_parser_omp_clause_default): Likewise.
3208 (c_parser_omp_clause_if): Likewise.
3209 (c_parser_omp_clause_num_threads): Likewise.
3210 (c_parser_omp_clause_num_tasks): Likewise.
3211 (c_parser_omp_clause_grainsize): Likewise.
3212 (c_parser_omp_clause_priority): Likewise.
3213 (c_parser_omp_clause_hint): Likewise.
3214 (c_parser_omp_clause_defaultmap): Likewise.
3215 (c_parser_oacc_single_int_clause): Likewise.
3216 (c_parser_omp_clause_ordered): Likewise.
3217 (c_parser_omp_clause_reduction): Likewise.
3218 (c_parser_omp_clause_schedule): Likewise.
3219 (c_parser_omp_clause_num_teams): Likewise.
3220 (c_parser_omp_clause_thread_limit): Likewise.
3221 (c_parser_omp_clause_aligned): Likewise.
3222 (c_parser_omp_clause_linear): Likewise.
3223 (c_parser_omp_clause_safelen): Likewise.
3224 (c_parser_omp_clause_simdlen): Likewise.
3225 (c_parser_omp_clause_depend): Likewise.
3226 (c_parser_omp_clause_map): Likewise.
3227 (c_parser_omp_clause_device): Likewise.
3228 (c_parser_omp_clause_dist_schedule): Likewise.
3229 (c_parser_omp_clause_proc_bind): Likewise.
3230 (c_parser_omp_clause_uniform): Likewise.
3231 (c_parser_omp_for_loop): Likewise.
3232 (c_parser_cilk_clause_vectorlength): Likewise.
3233 (c_parser_cilk_clause_linear): Likewise.
3234 (c_parser_transaction_expression): Likewise.
3235 * c-parser.h (c_parser_require): Add param matching_location with
3236 default UNKNOWN_LOCATION.
3237 (c_parser_error): Convert return type from void to bool.
3238 (c_parser_skip_until_found): Add param matching_location with
3239 default UNKNOWN_LOCATION.
3241 2017-08-09 Marek Polacek <polacek@redhat.com>
3243 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3244 * c-tree.h (build_external_ref): Update declaration.
3245 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3246 (build_external_ref): Change the type of a parameter to bool.
3247 (parser_build_binary_op): Use true/false instead of 1/0.
3248 (pointer_diff): Likewise.
3249 (build_modify_expr): Likewise.
3250 (set_designator): Change the type of a parameter to bool.
3251 (set_init_index): Use true/false instead of 1/0.
3252 (set_init_label): Likewise.
3253 (output_init_element): Change the type of a parameter to bool.
3254 (output_pending_init_elements): Use true/false instead of 1/0.
3255 (process_init_element): Likewise.
3256 (build_binary_op): Change the type of a parameter to bool.
3258 2017-08-09 Marek Polacek <polacek@redhat.com>
3261 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3262 Call emit_diagnostic_valist instead of pedwarn.
3263 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3264 Print the relevant types in diagnostics.
3266 2017-08-09 Marek Polacek <polacek@redhat.com>
3269 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
3270 build_conditional_expr.
3271 * c-parser.c (c_parser_conditional_expression): Create locations for
3272 EXP1 and EXP2 from their source ranges. Pass the locations down to
3273 build_conditional_expr.
3274 * c-tree.h (build_conditional_expr): Update declaration.
3275 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3276 For -Wsign-compare, also print the types.
3278 2017-08-08 Martin Liska <mliska@suse.cz>
3280 * c-convert.c: Include header files.
3281 * c-typeck.c: Likewise.
3283 2017-08-07 Martin Liska <mliska@suse.cz>
3285 * c-parser.c (c_parser_attributes): Canonicalize name of an
3288 2017-08-02 Marek Polacek <polacek@redhat.com>
3291 * c-parser.c (c_parser_unary_expression): Use set_error.
3295 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3296 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3298 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
3299 Martin Liska <mliska@suse.cz>
3301 * c-typeck.c (c_finish_goto_label): Build gimple predict
3304 2017-07-31 Martin Liska <mliska@suse.cz>
3307 * c-convert.c (convert): Guard condition with flag_sanitize_p
3308 also with current_function_decl non-null equality.
3309 * c-decl.c (grokdeclarator): Likewise.
3310 * c-typeck.c (build_binary_op): Likewise.
3312 2017-07-25 Marek Polacek <polacek@redhat.com>
3314 * c-decl.c (grokfield): Remove local variable.
3316 2017-07-25 Marek Polacek <polacek@redhat.com>
3319 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3320 macro expansion if the body is in { }.
3321 (c_parser_while_statement): Likewise.
3322 (c_parser_for_statement): Likewise.
3324 2017-07-18 Nathan Sidwell <nathan@acm.org>
3326 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3328 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3330 * c-decl.c (implicitly_declare): When suggesting a missing
3331 #include, provide a fix-it hint.
3333 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3335 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3336 and call that instead.
3337 * c-tree.h (selftest::run_c_tests): New decl.
3339 2017-06-26 Marek Polacek <polacek@redhat.com>
3342 * c-parser.c (c_parser_if_body): Set the location of the
3343 body of the conditional after parsing all the labels. Call
3344 warn_for_multistatement_macros.
3345 (c_parser_else_body): Likewise.
3346 (c_parser_switch_statement): Likewise.
3347 (c_parser_while_statement): Likewise.
3348 (c_parser_for_statement): Likewise.
3349 (c_parser_statement): Add a default argument. Save the location
3350 after labels have been parsed.
3351 (c_parser_c99_block_statement): Likewise.
3353 2017-06-19 Richard Biener <rguenther@suse.de>
3355 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3356 negated _Literals to parse _Literal (int) -1.
3358 2017-06-13 Martin Liska <mliska@suse.cz>
3361 * c-convert.c (convert): Use sanitize_flags_p.
3362 * c-decl.c (grokdeclarator): Likewise.
3363 * c-typeck.c (convert_for_assignment): Likewise.
3364 (c_finish_return): Likewise.
3365 (build_binary_op): Likewise.
3367 2017-06-08 Jakub Jelinek <jakub@redhat.com>
3370 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3371 to sizetype before size_binop.
3373 2017-06-07 Jakub Jelinek <jakub@redhat.com>
3375 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3378 2017-06-06 Marek Polacek <polacek@redhat.com>
3381 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3383 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3385 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3387 * c-parser.c (c_parser_binary_expression): Implement the
3388 -Wsizeof_pointer_div warning.
3389 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3390 from a parenthesized expression.
3391 (c_parser_expr_list): Use c_last_sizeof_loc.
3392 * c-tree.h (c_last_sizeof_loc): New external.
3393 * c-typeck.c (c_last_sizeof_loc): New variable.
3394 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3396 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3399 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3401 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3403 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3406 2017-05-24 Martin Sebor <msebor@redhat.com>
3409 * c-fold.c (c_fully_fold_internal): Adjust.
3410 * c-typeck.c (parser_build_unary_op): Adjust.
3412 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3414 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3415 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3418 2017-05-23 Marek Polacek <polacek@redhat.com>
3420 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3423 2017-05-22 Jakub Jelinek <jakub@redhat.com>
3425 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3426 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3427 it returned invariant. Call tree_invariant_p unconditionally
3428 afterwards to decide whether to return expr or op0.
3430 2017-05-22 Nathan Sidwell <nathan@acm.org>
3432 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3434 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3436 * c-parser.c (c_parser_omp_clause_default): Handle
3437 "OMP_CLAUSE_DEFAULT_PRESENT".
3439 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3441 * config-lang.in (gtfiles): Add c-family/c-format.c.
3443 2017-05-18 Nathan Sidwell <nathan@acm.org>
3445 * c-decl.c (pushdecl_top_level): Delete unused function.
3447 2017-05-18 Marek Polacek <polacek@redhat.com>
3449 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3450 (check_earlier_gotos): Likewise.
3451 (define_label): Likewise.
3452 (pending_xref_error): Likewise.
3453 (smallest_type_quals_location): Likewise.
3454 (grokdeclarator): Likewise.
3455 (grokparms): Likewise.
3456 (identifier_global_value): Likewise.
3457 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3458 (find_init_member): Likewise.
3460 2017-05-18 Marek Polacek <polacek@redhat.com>
3462 * c-decl.c (start_decl): Use false/true instead of 0/1.
3463 (grokdeclarator): Likewise.
3464 (finish_struct): Likewise.
3465 (start_function): Change the return type to bool. Use false/true
3467 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3468 * c-tree.h (start_function): Update.
3469 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3470 (set_designator): Change the return type to bool. Use false/true
3473 2017-05-17 Marek Polacek <polacek@redhat.com>
3475 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3476 * c-typeck.c: Likewise.
3478 2017-05-17 Marek Polacek <polacek@redhat.com>
3481 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3482 DECL_IGNORED_P even for non-static compound literals.
3484 2017-05-17 Martin Liska <mliska@suse.cz>
3486 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3487 use it instead of int type.
3489 2017-05-17 Marek Polacek <polacek@redhat.com>
3491 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3493 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
3494 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
3495 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3496 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3498 (c_parser_conditional_expression): Likewise.
3499 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3500 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3501 (process_init_element): Likewise.
3502 (build_binary_op): Likewise.
3503 (handle_omp_array_sections_1): Likewise.
3505 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3507 * c-parser.c (c_parser_omp_clause_num_gangs)
3508 (c_parser_omp_clause_num_workers)
3509 (c_parser_omp_clause_vector_length): Merge functions into...
3510 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3513 2017-05-11 Nathan Sidwell <nathan@acm.org>
3515 * gimple-parser.c: Don't #include tree-dump.h.
3517 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3520 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3522 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3525 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3526 incorrect __MEM syntax.
3528 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3531 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3534 2017-05-09 Nathan Sidwell <nathan@acm.org>
3536 * c-tree.h (pushdecl): Declare.
3538 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3540 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3541 with diagnostic_report_diagnostic.
3542 * c-errors.c (pedwarn_c99): Likewise.
3543 (pedwarn_c90): Likewise.
3545 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3548 * c-gimplify.c (c_gimplify_expr): Remove calls to
3549 cilk_gimplifY_call_params_in_spawned_fn.
3551 2017-04-25 David Malcolm <dmalcolm@redhat.com>
3553 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3554 hint for removing extra semicolon.
3556 2017-04-21 Jakub Jelinek <jakub@redhat.com>
3559 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3560 enabled, set specs->type to integer_type_node.
3562 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3564 * c-array-notation.c: Fix typo in comment.
3566 2017-03-29 Marek Polacek <polacek@redhat.com>
3569 * c-decl.c (finish_decl): Check VAR_P.
3571 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3574 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3575 * c-typeck.c (c_mark_addressable): Likewise. Look through
3576 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3578 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3580 2017-03-23 Marek Polacek <polacek@redhat.com>
3582 * c-tree.h: Remove a C_RID_YYCODE reference.
3584 2017-03-21 Jakub Jelinek <jakub@redhat.com>
3587 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3588 optional COMPOUND_EXPR with ubsan instrumentation.
3590 2017-03-17 Marek Polacek <polacek@redhat.com>
3592 * c-parser.c: Add C11 references.
3594 2017-03-15 Marek Polacek <polacek@redhat.com>
3596 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3598 2017-03-11 Marek Polacek <polacek@redhat.com>
3600 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3602 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3604 PR translation/79848
3605 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3607 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3609 2017-03-09 Marek Polacek <polacek@redhat.com>
3612 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3613 parameter declarations with initializers.
3615 2017-03-09 Jakub Jelinek <jakub@redhat.com>
3618 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3621 2017-03-07 Jakub Jelinek <jakub@redhat.com>
3624 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3625 for "may only be used in compound statements" diagnostics, change it
3626 such that the same translatable string is used for all pragmas. For
3627 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3629 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3630 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3631 "may only be used in compound statements" diagnostics, such that the
3632 same translatable string is used for all pragmas.
3634 2017-03-04 Marek Polacek <polacek@redhat.com>
3637 * c-decl.c (implicit_decl_warning): Add missing space.
3639 2017-03-03 Marek Polacek <polacek@redhat.com>
3642 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3643 current_function_prototype_arg_types is error_mark_node. Fix
3644 formatting. Use TREE_VALUE instead of TREE_TYPE.
3646 2017-03-03 Jakub Jelinek <jakub@redhat.com>
3649 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3650 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3651 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3655 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3656 instead of %<_Generic>.
3657 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3658 (c_parser_omp_target_exit_data): Use %<release%> instead of
3661 2017-02-28 Jakub Jelinek <jakub@redhat.com>
3663 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3664 instead of just cond ? "..." : "...".
3665 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3666 for "enter"/"exit" keyword.
3667 (c_finish_oacc_routine): Don't use %s to supply portions of the
3670 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3673 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3674 handle -Wrestrict here.
3675 * c-typeck.c (build_function_call_vec): Adjust
3676 check_function_arguments caller.
3678 2017-02-23 Richard Biener <rguenther@suse.de>
3681 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3682 to initialize c_exprs to return.
3683 (c_parser_gimple_binary_expression): Likewise.
3684 (c_parser_gimple_unary_expression): Likewise.
3685 (c_parser_gimple_postfix_expression): Likewise.
3687 2017-02-22 Marek Polacek <polacek@redhat.com>
3690 * c-typeck.c (convert_arguments): Handle error_mark_node.
3692 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3694 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3695 value of c_parser_parse_ssa_name against error_mark_node and emit
3696 error if ssa name is anonymous and written as default definition.
3698 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3700 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3703 2017-02-16 Jakub Jelinek <jakub@redhat.com>
3706 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3707 ignore #pragma omp target even when not followed by identifier.
3709 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3711 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3712 (c_parser_gimple_unary_expression): Likewise.
3714 2017-02-13 Jakub Jelinek <jakub@redhat.com>
3716 * c-parser.c (c_parser_oacc_declare): Add missing space in
3719 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3722 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3723 set_c_expr_source_range when parsing ssa-name.
3725 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
3726 Richard Biener <rguenther@suse.de>
3728 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3729 building IL when arguments are error_mark_node.
3730 (c_parser_gimple_unary_expression): Likewise.
3731 (c_parser_gimple_if_stmt): Likewise.
3732 (c_parser_gimple_switch_stmt): Likewise.
3733 (c_parser_gimple_return_stmt): Likewise.
3734 (c_parser_parse_ssa_name): When name lookup fails do not build
3735 an SSA name. Use undeclared rather than not declared in error
3738 2017-02-09 Marek Polacek <polacek@redhat.com>
3741 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3742 instead of c_parser_skip_until_found.
3744 2017-02-09 Jakub Jelinek <jakub@redhat.com>
3747 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3748 symtab_node::get on automatic variables.
3750 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3751 Chung-Lin Tang <cltang@codesourcery.com>
3753 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3754 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3756 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3758 2017-02-07 Richard Biener <rguenther@suse.de>
3760 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3761 (c_parser_gimple_postfix_expression_after_primary):
3762 Do not use c_build_function_call_vec to avoid folding and promotion.
3765 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3768 * c-decl.c (pop_scope): Pass main_input_filename to
3769 build_translation_unit_decl.
3771 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3773 * c-parser.c: Include "read-rtl-function.h" and
3775 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3776 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3777 production. Update for renaming of field "gimple_pass" to
3778 "gimple_or_rtl_pass". If __RTL was seen, call
3779 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3780 to an auto_timevar, to cope with early exit.
3781 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3782 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3783 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3785 (c_parser_parse_rtl_body): New function.
3786 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3787 (struct c_declspecs): Rename field "gimple_pass" to
3788 "gimple_or_rtl_pass". Add field "rtl_p".
3789 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3790 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3791 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3792 (c_parser_gimple_or_rtl_pass_list): ...this.
3794 2017-01-20 Marek Polacek <polacek@redhat.com>
3797 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3799 2017-01-13 Richard Biener <rguenther@suse.de>
3801 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3804 2017-01-13 Richard Biener <rguenther@suse.de>
3806 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3807 _Literal ( type-name ) number.
3809 2017-01-12 Richard Biener <rguenther@suse.de>
3811 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3814 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3817 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3820 2017-01-11 Richard Biener <rguenther@suse.de>
3823 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3824 returns on parse errors.
3826 2017-01-04 Marek Polacek <polacek@redhat.com>
3829 * c-parser.c (c_parser_postfix_expression): Mark zero character
3830 constants by setting original_type in c_expr.
3831 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3832 with a zero character constant.
3833 (char_type_p): New function.
3835 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3837 * c-parser.c (c_parser_declaration_or_fndef): Create a
3838 rich_location at init_loc and parse it to start_init.
3839 (last_init_list_comma): New global.
3840 (c_parser_braced_init): Update last_init_list_comma when parsing
3841 commas. Pass it to pop_init_level. Pass location of closing
3842 brace to pop_init_level.
3843 (c_parser_postfix_expression_after_paren_type): Create a
3844 rich_location at type_loc and parse it to start_init.
3845 (c_parser_omp_declare_reduction): Likewise for loc.
3846 * c-tree.h (start_init): Add rich_location * param.
3847 (pop_init_level): Add location_t param.
3848 * c-typeck.c (struct initializer_stack): Add field
3849 "missing_brace_richloc".
3850 (start_init): Add richloc param, use it to initialize
3851 the stack node's missing_brace_richloc.
3852 (last_init_list_comma): New decl.
3853 (finish_implicit_inits): Pass last_init_list_comma to
3855 (push_init_level): When finding missing open braces, add fix-it
3856 hints to the richloc.
3857 (pop_init_level): Add "insert_before" param and pass it
3858 when calling pop_init_level. Add fixits about missing
3859 close braces to any richloc. Use the richloc for the
3860 -Wmissing-braces warning.
3861 (set_designator): Pass last_init_list_comma to pop_init_level.
3862 (process_init_element): Likewise.
3864 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3866 Update copyright years.
3868 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3871 * c-typeck.c (build_function_call_vec): If check_function_arguments
3872 returns true, set TREE_NO_WARNING on CALL_EXPR.
3875 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3876 to *expr instead of overwriting it.
3878 2016-12-20 Richard Biener <rguenther@suse.de>
3880 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3882 (c_parser_gimple_statement): Only build assigns for non-error
3884 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3886 2016-12-14 Martin Jambor <mjambor@suse.cz>
3888 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3890 (c_finish_oacc_routine): Adjusted call to
3891 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3892 to use their new names.
3893 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3895 (c_parser_oacc_update): Likewise.
3896 (c_parser_omp_simd): Likewise.
3897 (c_parser_omp_target_update): Likewise.
3898 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3899 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3901 (c_finish_omp_cancellation_point): Likewise.
3902 * gimple-parser.c: Do not include omp-low.h
3904 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3905 James Norris <jnorris@codesourcery.com>
3907 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3908 EXIT_DATA,WAIT} are not used in compound statements.
3909 (c_parser_oacc_enter_exit_data): Update diagnostics.
3911 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3914 * c-decl.c (diagnose_mismatched_decls): Use
3915 OPT_Wbuiltin_declaration_mismatch here too.
3917 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
3918 Alan Hayward <alan.hayward@arm.com>
3919 David Sherwood <david.sherwood@arm.com>
3921 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3922 (make_label, finish_struct): Likewise.
3924 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3925 Richard Biener <rguenther@suse.de>
3927 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3928 * config-lang.in (gtfiles): Add c/c-parser.h.
3929 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3930 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3931 * c-parser.c (enum c_id_kind, struct c_token,
3932 c_parser_next_token_is, c_parser_next_token_is_not,
3933 c_parser_next_token_is_keyword,
3934 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3936 * c-parser.h: ... new header.
3937 * c-parser.c: Include c-parser.h and gimple-parser.h.
3938 (c_parser_peek_token, c_parser_peek_2nd_token,
3939 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3940 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3941 c_parser_error, c_parser_require, c_parser_skip_until_found,
3942 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3943 c_parser_type_name): Export.
3944 (c_parser_tokens_buf): New function.
3945 (c_parser_error): Likewise.
3946 (c_parser_set_error): Likewise.
3947 (c_parser_declspecs): Handle RID_GIMPLE.
3948 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3949 via c_parser_parse_gimple_body.
3950 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3951 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3952 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3953 c_parser_error, c_parser_require, c_parser_skip_until_found,
3954 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3955 c_parser_type_name): Declare.
3956 (struct c_parser): Declare forward.
3957 (c_parser_tokens_buf): Declare.
3958 (c_parser_error): Likewise.
3959 (c_parser_set_error): Likewise.
3960 * gimple-parser.c: New file.
3961 * gimple-parser.h: Likewise.
3963 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3966 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3969 2016-09-11 Le-Chun Wu <lcwu@google.com>
3970 Mark Wielaard <mjw@redhat.com>
3972 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3973 to the given -Wshadow= variant.
3975 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3977 * c-typeck.c: Include memmodel.h.
3979 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3982 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3983 instead of lhd_return_null_tree_v.
3985 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3988 * c-decl.c (smallest_type_quals_location): New static function.
3989 (grokdeclarator): Try to find the correct location for an ignored
3992 2016-09-26 Marek Polacek <polacek@redhat.com>
3995 * c-decl.c (pop_scope): Add gcc_fallthrough.
3997 2016-09-26 Marek Polacek <polacek@redhat.com>
4000 * c-parser.c (struct c_token): Add flags field.
4001 (c_lex_one_token): Pass it to c_lex_with_flags.
4002 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4003 into IFN_FALLTHROUGH.
4004 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4005 attribute fallthrough after a case label or default label.
4006 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4008 2016-09-24 Marek Polacek <polacek@redhat.com>
4011 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4012 have boolean value. Warn about ++/-- on booleans.
4014 2016-09-23 Jakub Jelinek <jakub@redhat.com>
4016 * c-parser.c (incomplete_record_decls): Remove unnecessary
4017 = vNULL initialization of file scope vec.
4019 2016-09-16 Marek Polacek <polacek@redhat.com>
4021 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4023 2016-09-14 Marek Polacek <polacek@redhat.com>
4025 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4026 (fix_array_notation_expr): Likewise.
4027 * c-decl.c (finish_decl): Likewise.
4028 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4029 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4030 (function_to_pointer_conversion): Use false instead of 0.
4031 (convert_lvalue_to_rvalue): Likewise.
4032 (parser_build_unary_op): Likewise.
4033 (build_atomic_assign): Likewise.
4034 (build_unary_op): Change nonconvert parameter type to bool, use
4035 true/false instead of 1/0.
4036 (build_binary_op): Use true instead of 1.
4038 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4040 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4041 of add_fixit_insert to add_fixit_insert_before.
4043 2016-09-13 Marek Polacek <polacek@redhat.com>
4045 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4048 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4051 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4052 COMPOUND_EXPR to warn_for_omitted_condop.
4054 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4056 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4057 c_get_substring_location for this new langhook.
4059 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4062 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4064 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4065 instead of mark_exp_read on low_bound/length expression.
4066 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4067 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4068 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4069 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4070 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4071 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4072 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4073 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4074 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4075 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4076 instead of mark_expr_read.
4077 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4078 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4079 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4080 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4081 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4082 array section bases outside of depend clause, for depend clause
4083 use convert_lvalue_to_rvalue on the base.
4084 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4085 linear, aligned, map, to and from clauses.
4086 (c_omp_clause_copy_ctor): New function.
4088 2016-09-01 Marek Polacek <polacek@redhat.com>
4091 * c-typeck.c (composite_type): Add FALLTHRU comment.
4093 2016-08-31 David Malcolm <dmalcolm@redhat.com>
4095 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4096 to the insertion fixits for "struct", "union", and "enum".
4098 2016-08-30 David Malcolm <dmalcolm@redhat.com>
4100 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4101 rather than add_fixit_misspelled_id.
4102 (undeclared_variable): Likewise.
4103 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4104 now-redundant "here" params from add_fixit_insert method calls.
4105 (c_parser_parameter_declaration): Likewise.
4106 * c-typeck.c (build_component_ref): Remove now-redundant range
4107 param from add_fixit_replace method calls.
4109 2016-08-25 Marek Polacek <polacek@redhat.com>
4111 * c-typeck.c (parser_build_binary_op): Pass LHS to
4112 warn_logical_not_parentheses.
4114 2016-08-25 Marek Polacek <polacek@redhat.com>
4117 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4118 or _FloatN or _FloatNx is not supported.
4119 (finish_declspecs): Set type to integer_type_node when _FloatN or
4120 _FloatNx is not supported.
4122 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4125 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4126 (struct c_declspecs): Add field floatn_nx_idx.
4127 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4128 and _FloatNx type specifiers.
4129 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4130 (c_parser_declspecs, c_parser_attribute_any_word)
4131 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4132 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4133 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4134 narrower than double.
4136 2016-08-12 Jakub Jelinek <jakub@redhat.com>
4137 Martin Liska <mliska@suse.cz>
4140 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4141 % to determine val element to change. Assert that
4142 wchar_bytes * charwidth fits into val array.
4144 2016-08-12 Marek Polacek <polacek@redhat.com>
4147 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4148 (c_parser_postfix_expression): Likewise.
4149 * c-typeck.c (build_unary_op): Adjust fall through comment.
4150 (c_mark_addressable): Likewise.
4152 2016-08-11 Jakub Jelinek <jakub@redhat.com>
4155 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4156 array member through typedef, for orig_qual_indirect == 0 clear
4159 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4162 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4163 this up to selftest::run_c_tests.
4164 (selftest::run_c_tests): New function.
4166 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4168 * c-parser.c (struct oacc_routine_data): Add error_seen and
4169 fndecl_seen members.
4170 (c_finish_oacc_routine): Use these.
4171 (c_parser_declaration_or_fndef): Adjust.
4172 (c_parser_oacc_routine): Likewise. Support more C language
4173 constructs, and improve diagnostics. Move pragma context
4175 (c_parser_pragma): ... here.
4177 * c-parser.c (struct oacc_routine_data): New.
4178 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4180 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4181 declare target" attribute.
4183 2016-08-01 Jan Beulich <jbeulich@suse.com>
4185 * c-fold.c (c_fully_fold_internal): Also emit shift count
4186 warnings for vector types.
4187 * c-typeck.c (build_binary_op): Likewise.
4189 2016-07-29 Marek Polacek <polacek@redhat.com>
4192 * c-decl.c (finish_struct): Rephrase an error message.
4195 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4196 to error node for invalid code.
4199 * c-decl.c (implicitly_declare): Return decl early not only for
4200 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4202 2016-07-29 Jakub Jelinek <jakub@redhat.com>
4205 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4206 on GNU extern inline functions.
4208 2016-07-29 Marek Polacek <polacek@redhat.com>
4211 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4214 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4216 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4218 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4220 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4222 (best_macro_match): Likewise, converting from a typedef to a
4224 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4225 (lookup_name_fuzzy): Update for change of best_macro_match to a
4226 subclass with a ctor that calls cpp_forall_identifiers.
4228 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4230 * c-decl.c (implicit_decl_warning): Update for conversion of
4231 return type of lookup_name_fuzzy to const char *.
4232 (undeclared_variable): Likewise.
4233 (lookup_name_fuzzy): Convert return type from tree to
4235 * c-parser.c (c_parser_declaration_or_fndef): Update for
4236 conversion of return type of lookup_name_fuzzy to const char *.
4237 (c_parser_parameter_declaration): Likewise.
4239 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4241 * c-parser.c (c_parser_oacc_declare): Don't scan for
4243 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4244 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4245 zero-length subarrays.
4247 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4250 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4251 instead of FUZZY_LOOKUP_NAME.
4252 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4253 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4255 2016-07-14 Jakub Jelinek <jakub@redhat.com>
4258 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4260 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4262 * c-parser.c (c_parser_generic_selection): Make type of variable
4264 (c_parser_omp_declare_simd): Likewise.
4266 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4268 * c-decl.c (struct c_struct_parse_info): Change member types
4269 from vec to auto_vec.
4270 (start_struct): Adjust.
4271 (finish_struct): Likewise.
4273 2016-07-02 Jakub Jelinek <jakub@redhat.com>
4276 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4278 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4280 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4281 Move pragma context checking into...
4282 (c_parser_omp_cancellation_point): ... here, and improve
4283 diagnostic messages.
4284 * c-typeck.c (c_finish_omp_cancel)
4285 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4287 2016-06-29 Jakub Jelinek <jakub@redhat.com>
4290 * c-typeck.c (c_build_qualified_type): Don't clear
4291 C_TYPE_INCOMPLETE_VARS for the main variant.
4293 2016-06-28 Martin Sebor <msebor@redhat.com>
4296 * c-typeck.c (output_init_element): Diagnose incompatible types
4297 before non-constant initializers.
4299 2016-06-28 Jakub Jelinek <jakub@redhat.com>
4301 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4303 2016-06-23 Andi Kleen <ak@linux.intel.com>
4305 * Make-lang.in: Add support for autofdo.
4307 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4310 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4311 (implicit_decl_warning): When issuing warnings for implicit
4312 declarations, attempt to provide a suggestion via
4314 (undeclared_variable): Likewise when issuing errors.
4315 (lookup_name_in_scope): Likewise.
4316 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4317 (best_macro_match): New typedef.
4318 (find_closest_macro_cpp_cb): New function.
4319 (lookup_name_fuzzy): New function.
4320 * c-parser.c: Include gcc-rich-location.h.
4321 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4322 (c_keyword_starts_typename): ...this new function.
4323 (c_parser_declaration_or_fndef): When issuing errors about
4324 missing "struct" etc, add a fixit. For other kinds of errors,
4325 attempt to provide a suggestion via lookup_name_fuzzy.
4326 (c_parser_parms_declarator): When looking ahead to detect typos in
4327 type names, also reject CPP_KEYWORD.
4328 (c_parser_parameter_declaration): When issuing errors about
4329 unknown type names, attempt to provide a suggestion via
4331 * c-tree.h (c_keyword_starts_typename): New prototype.
4333 2016-06-20 Joseph Myers <joseph@codesourcery.com>
4336 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4337 c_common_type returns error_mark_node.
4339 2016-06-19 Martin Sebor <msebor@redhat.com>
4342 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4343 __alignof__ (expression).
4345 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4347 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4349 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4351 * c-typeck.c (build_component_ref): Simplify fixit code by
4352 using gcc_rich_location::add_fixit_misspelled_id.
4353 (set_init_label): Likewise.
4355 2016-06-13 David Malcolm <dmalcolm@redhat.com>
4357 * c-parser.c (c_parser_initelt): Provide location of name for new
4358 location_t param of set_init_label.
4359 * c-tree.h (set_init_label): Add location_t param.
4360 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4361 param and use it when issuing error messages about unrecognized
4362 field names. Attempt to provide a fixit hint if appropriate,
4363 otherwise update the error message to provide the type name.
4365 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4368 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4371 2016-06-08 Martin Sebor <msebor@redhat.com>
4372 Jakub Jelinek <jakub@redhat.com>
4376 * c-typeck.c (convert_arguments): Don't promote last argument
4377 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4379 2016-06-08 Marek Polacek <polacek@redhat.com>
4382 * c-decl.c (grokdeclarator): Check TYPE_P.
4385 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4388 2016-06-07 David Malcolm <dmalcolm@redhat.com>
4390 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4391 and structure element reference, capture the location of the
4392 element name token and pass it to build_component_ref.
4393 (c_parser_postfix_expression_after_primary): Likewise for
4394 structure element dereference.
4395 (c_parser_omp_variable_list): Likewise for
4396 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4397 * c-tree.h (build_component_ref): Add location_t param.
4398 * c-typeck.c (build_component_ref): Add location_t param
4399 COMPONENT_LOC. Use it, if available, when issuing hints about
4400 mispelled member names to provide a fixit replacement hint.
4402 2016-06-06 Marek Polacek <polacek@redhat.com>
4405 * c-parser.c (c_parser_direct_declarator): Set location.
4407 2016-06-06 Marek Polacek <polacek@redhat.com>
4409 * c-typeck.c (comptypes_internal): Handle comparisons of
4410 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4411 TYPE_REF_CAN_ALIAS_ALL.
4413 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4415 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4416 arguments as addressable when async clause exists.
4418 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4421 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4422 when combined with target construct.
4424 2016-05-26 Jakub Jelinek <jakub@redhat.com>
4426 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4427 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4429 2016-05-25 Marek Polacek <polacek@redhat.com>
4432 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4435 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4437 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4439 * c-parser.c (c_parser_oacc_declare): Add support for
4440 GOMP_MAP_FIRSTPRIVATE_POINTER.
4441 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4442 argument with enum c_omp_region_type ort.
4443 (handle_omp_array_sections): Likewise. Update call to
4444 handle_omp_array_sections_1.
4445 (c_finish_omp_clauses): Add specific errors and warning messages for
4446 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4447 call to handle_omp_array_sections.
4449 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4451 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4453 2016-05-24 Richard Biener <rguenther@suse.de>
4457 * c-typeck.c (build_array_ref): Do not complain about indexing
4458 non-lvalue vectors. Adjust for function name change.
4460 2016-05-20 Martin Sebor <msebor@redhat.com>
4463 * c-typeck.c (error_init): Use
4464 expansion_point_location_if_in_system_header.
4465 (warning_init): Same.
4467 2016-05-19 David Malcolm <dmalcolm@redhat.com>
4470 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4472 (c_parser_postfix_expression): Likewise.
4473 * c-tree.h (c_expr::set_error): New method.
4474 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4475 that result's range is initialized.
4477 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4479 * c-typeck.c (parser_build_unary_op): Fix formatting.
4481 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4483 * c-decl.c (grokdeclarator): Remove errmsg and use of
4484 targetm.invalid_return_type.
4485 (grokparms): Remove errmsg and use of
4486 targetm.invalid_parameter_type.
4488 2016-05-13 Joseph Myers <joseph@codesourcery.com>
4490 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4491 function return type.
4493 2016-05-12 Marek Polacek <polacek@redhat.com>
4496 * c-decl.c (build_compound_literal): Pass LOC down to
4497 c_incomplete_type_error.
4498 * c-tree.h (require_complete_type): Adjust declaration.
4499 (c_incomplete_type_error): Likewise.
4500 * c-typeck.c (require_complete_type): Add location parameter, pass it
4501 down to c_incomplete_type_error.
4502 (c_incomplete_type_error): Add location parameter, pass it down to
4504 (build_component_ref): Pass location down to c_incomplete_type_error.
4505 (default_conversion): Pass location down to require_complete_type.
4506 (build_array_ref): Likewise.
4507 (build_function_call_vec): Likewise.
4508 (convert_arguments): Likewise.
4509 (build_unary_op): Likewise.
4510 (build_c_cast): Likewise.
4511 (build_modify_expr): Likewise.
4512 (convert_for_assignment): Likewise.
4513 (c_finish_omp_clauses): Likewise.
4515 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4518 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4520 * c-errors.c (pedwarn_c90): Return true if warned.
4521 * c-tree.h (pedwarn_c90): Change return type to bool.
4522 (enum c_declspec_word): Add new enumerator cdw_atomic.
4524 2016-05-11 Marek Polacek <polacek@redhat.com>
4527 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4528 diagnose_mismatched_attributes and call it.
4530 2016-05-10 Marek Polacek <polacek@redhat.com>
4533 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4534 on a declaration following the definition.
4536 2016-05-05 Jakub Jelinek <jakub@redhat.com>
4538 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4539 parse it through to c_parser_c99_block_statement.
4540 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4543 2016-05-04 Marek Polacek <polacek@redhat.com>
4545 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4548 2016-05-04 Marek Polacek <polacek@redhat.com>
4551 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4552 for macro expansions.
4554 2016-05-03 Marek Polacek <polacek@redhat.com>
4557 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4558 check_builtin_function_arguments.
4560 2016-05-03 Richard Biener <rguenther@suse.de>
4562 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4563 the checksum from the previous stage.
4565 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4567 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4568 c_finish_omp_clauses.
4569 (c_parser_omp_all_clauses): Likewise.
4570 (c_parser_oacc_cache): Likewise.
4571 (c_parser_oacc_loop): Likewise.
4572 (omp_split_clauses): Likewise.
4573 (c_parser_omp_declare_target): Likewise.
4574 (c_parser_cilk_all_clauses): Likewise.
4575 (c_parser_cilk_for): Likewise.
4576 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4577 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4579 2016-05-02 Marek Polacek <polacek@redhat.com>
4582 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4585 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4588 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4589 OACC_LOOP_CLAUSE_MASK.
4590 (c_parser_oacc_kernels_parallel): Update call to
4591 c_oacc_split_loop_clauses.
4593 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
4595 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4596 argument to build_modify_expr in two cases.
4598 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4600 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4601 warn_for_memset instead of warning directly here.
4603 2016-04-26 Marek Polacek <polacek@redhat.com>
4606 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4608 (c_parser_for_statement): ... here.
4609 (c_parser_if_statement): Use it.
4610 (c_parser_switch_statement): Use it.
4611 (c_parser_while_statement): Use it.
4614 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4616 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4619 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4620 instead of c_finish_cilk_clauses.
4621 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4622 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4623 floating-point variables in the linear clause for Cilk Plus.
4625 2016-04-18 Michael Matz <matz@suse.de>
4627 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4628 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4630 2016-04-15 Marek Polacek <polacek@redhat.com>
4633 * c-typeck.c (build_unary_op): Pass location down to error and
4636 2016-04-15 Jakub Jelinek <jakub@redhat.com>
4639 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4641 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4642 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4643 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4644 Adjust c_parser_pragma callers.
4645 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4647 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4649 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4650 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4651 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4652 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4653 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4654 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4655 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4656 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4658 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4659 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4662 2016-04-13 Marek Polacek <polacek@redhat.com>
4665 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4667 (c_parser_statement): Likewise.
4668 (c_parser_c99_block_statement): Likewise.
4669 (c_parser_while_statement): Likewise.
4670 (c_parser_for_statement): Likewise.
4671 (c_parser_if_body): Don't set IF_P here.
4672 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4673 about dangling else here.
4674 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4675 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4676 warn about dangling else here.
4678 2016-04-04 Marek Polacek <polacek@redhat.com>
4681 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4683 2016-03-31 Marek Polacek <polacek@redhat.com>
4686 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4688 2016-03-18 David Malcolm <dmalcolm@redhat.com>
4691 * c-parser.c (c_parser_postfix_expression): Set the source range
4692 for uses of "__builtin_types_compatible_p".
4694 2016-03-17 Jakub Jelinek <jakub@redhat.com>
4697 * c-typeck.c (composite_type): Don't count void_list_node
4698 into len, if the list is terminated by void_list_node, start
4699 with void_list_node instead of NULL for newargs. Stop
4702 2016-03-16 Marek Polacek <polacek@redhat.com>
4705 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4706 nested functions returning VM types.
4708 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4710 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4711 when calling c_finish_omp_clauses.
4713 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4716 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4719 2016-03-04 Marek Polacek <polacek@redhat.com>
4722 * c-parser.c (c_parser_postfix_expression): Call
4723 c_parser_cast_expression rather than c_parser_postfix_expression.
4725 2016-03-01 Jakub Jelinek <jakub@redhat.com>
4729 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4730 of incomplete decls to error_mark_node.
4732 2016-02-24 Marek Polacek <polacek@redhat.com>
4735 * c-decl.c (finish_decl): Don't update the copy of the type of a
4736 different decl type.
4738 2016-02-23 Jakub Jelinek <jakub@redhat.com>
4741 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4742 in id_kind reclassification.
4744 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4747 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4749 2016-02-16 James Norris <jnorris@codesourcery.com>
4752 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4754 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4756 * c-decl.c (build_null_declspecs): Zero the entire struct.
4759 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4760 callers changed. If nested_p is true, use it to call
4761 finish_implicit_inits.
4762 * c-tree.h (finish_implicit_inits): Declare.
4763 * c-typeck.c (finish_implicit_inits): New function. Move code
4765 (push_init_level): ... here.
4766 (set_designator, process_init_element): Call finish_implicit_inits.
4768 2016-02-11 Jakub Jelinek <jakub@redhat.com>
4771 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4772 arguments for -Waddress warning.
4774 2016-02-04 Jakub Jelinek <jakub@redhat.com>
4777 * c-decl.c (finish_enum): When honoring mode attribute,
4778 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4780 2016-01-29 Jakub Jelinek <jakub@redhat.com>
4783 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4784 all type variants, not just TYPE_MAIN_VARIANT.
4786 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4789 * c-decl.c (c_write_global_declarations_1): Warn with
4790 warn_unused_function if static prototype without definition
4793 2016-01-27 Marek Polacek <polacek@redhat.com>
4796 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4797 to unsigned, if needed. Add -Wsign-compare warning.
4799 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4801 PR tree-optimization/69483
4802 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4804 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4807 * c-tree.h (incomplete_record_decls): Declare.
4808 * c-parser.c (incomplete_record_decls): Define.
4809 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4810 report error if any decl has zero size.
4811 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4812 or enum type to incomplete_record_decls.
4814 2016-01-14 Tom de Vries <tom@codesourcery.com>
4816 PR tree-optimization/68773
4817 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4820 2016-01-14 Marek Polacek <polacek@redhat.com>
4823 * c-decl.c (grokdeclarator): Provide more information for invalid
4826 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4828 * c-parser.c (c_parser_unary_expression): For dereferences, build
4829 a combined location before calling build_indirect_ref, so that
4830 error reports cover the full range, manually updating the c_expr
4833 2016-01-06 Marek Polacek <polacek@redhat.com>
4836 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4837 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4840 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4842 Update copyright years.
4844 2016-01-04 Marek Polacek <polacek@redhat.com>
4847 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4848 optimization to use __atomic_fetch_* built-in if possible.
4850 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4852 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4854 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4857 2015-12-22 Marek Polacek <polacek@redhat.com>
4860 * c-typeck.c (build_component_ref): Warn when acessing elements of
4861 atomic structures or unions.
4863 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4865 * c-typeck.c: Include "gcc-rich-location.h".
4866 (build_binary_op): In the two places that call binary_op_error,
4867 create a gcc_rich_location and populate it with the location of
4868 the binary op and its two operands.
4870 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4872 * c-parser.c (c_parser_statement_after_labels): When calling
4873 c_finish_return, Use the return expression's location if it has
4874 one, falling back to the location of the first token within it.
4875 * c-typeck.c (c_finish_return): When issuing warnings about
4876 the incorrect presence/absence of a return value, issue a note
4877 showing the declaration of the function.
4879 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4881 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4883 (c_parser_peek_nth_token): New function.
4884 (c_parser_peek_conflict_marker): New function.
4885 (c_parser_error): Detect conflict markers and report them as such.
4887 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4889 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4890 to preserve range information for the primary expression
4891 in the call to c_parser_postfix_expression_after_primary.
4893 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4895 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4896 expression location, falling back on the first token location,
4897 rather than always using the latter.
4899 2015-12-16 Marek Polacek <polacek@redhat.com>
4902 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4905 2015-12-15 Marek Polacek <polacek@redhat.com>
4908 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4911 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4913 * c-parser.c (c_parser_alignof_expression): Capture location of
4914 closing parenthesis (if any), or of end of unary expression, and
4915 use it to build a src_range for the expression.
4917 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4920 * c-parser.c (c_parser_get_builtin_args): Add
4921 "out_close_paren_loc" param, and write back to it.
4922 (c_parser_postfix_expression): Capture the closing
4923 parenthesis location for RID_CHOOSE_EXPR,
4924 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4925 RID_BUILTIN_SHUFFLE and use it to set the source range
4926 for such expressions; within RID_BUILTIN_COMPLEX set
4927 the underlying location.
4929 2015-12-07 Marek Polacek <polacek@redhat.com>
4932 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4933 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4935 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4937 * c-tree.h (c_build_va_arg): Adjust prototype.
4938 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4939 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4940 parameter, adjust throughout and issue an error if EXPR is a component
4941 with reverse storage order.
4943 2015-12-02 Jason Merrill <jason@redhat.com>
4945 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4946 (c_fully_fold_internal, decl_constant_value_for_optimization):
4947 Move from c-common.c.
4948 * c-tree.h: Declare decl_constant_value_for_optimization.
4949 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4951 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4954 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4955 following link from declarator to next declarator. Track original
4956 qualified type and pass it to c_build_qualified_type.
4957 * c-typeck.c (c_build_qualified_type): Add arguments
4958 orig_qual_type and orig_qual_indirect.
4960 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4962 * c-parser.c (c_parser_omp_clause_name)
4963 (c_parser_oacc_all_clauses): Alphabetical sorting.
4965 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4968 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4971 2015-12-01 Julian Brown <julian@codesourcery.com>
4972 Cesar Philippidis <cesar@codesourcery.com>
4973 James Norris <James_Norris@mentor.com>
4975 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4976 (c_parser_oacc_clause_use_device): New function.
4977 (c_parser_oacc_all_clauses): Add use_device support.
4978 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4979 (c_parser_oacc_host_data): New function.
4980 (c_parser_omp_construct): Add host_data support.
4981 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4982 * c-typeck.c (c_finish_oacc_host_data): New function.
4983 (c_finish_omp_clauses): Add use_device support.
4985 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4988 * c-decl.c: Set TYPE_PACKED in variants.
4990 2015-11-27 Martin Liska <mliska@suse.cz>
4993 * c-array-notation.c (fix_builtin_array_notation_fn):
4994 Use release_vec_vec instead of vec::release.
4995 (build_array_notation_expr): Likewise.
4996 (fix_conditional_array_notations_1): Likewise.
4997 (fix_array_notation_expr): Likewise.
4998 (fix_array_notation_call_expr): Likewise.
5000 2015-11-27 Jakub Jelinek <jakub@redhat.com>
5003 * c-parser.c (c_parser_compound_statement_nostart): If
5004 last_label is true, use pragma_stmt instead of pragma_compound
5005 as second c_parser_pragma argument.
5006 (c_parser_omp_ordered, c_parser_omp_target_update,
5007 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5008 false as second argument to c_parser_skip_to_pragma_eol after
5009 diagnosing standalone directives used in pragma_stmt context.
5011 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5013 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5014 with "if (ENABLE_OFFLOADING)".
5016 2015-11-23 David Malcolm <dmalcolm@redhat.com>
5019 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5020 for various Objective-C constructs: Class.name syntax,
5021 @selector(), @protocol(), @encode(), and [] message syntax.
5023 2015-11-20 David Malcolm <dmalcolm@redhat.com>
5026 * c-typeck.c (should_suggest_deref_p): New function.
5027 (build_component_ref): Special-case POINTER_TYPE when
5028 generating a "not a structure of union" error message, and
5029 suggest a "->" rather than a ".", providing a fix-it hint.
5031 2015-11-19 David Malcolm <dmalcolm@redhat.com>
5033 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5034 candidate into a new function, find_closest_identifier.
5036 2015-11-19 Marek Polacek <polacek@redhat.com>
5039 * c-typeck.c (parser_build_binary_op): Properly handle
5040 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5042 2015-11-17 David Malcolm <dmalcolm@redhat.com>
5044 * c-parser.c (set_c_expr_source_range): Bulletproof both
5045 overloaded implementations against NULL expr->value.
5046 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5048 (c_parser_unary_expression): Likewise when handling addresses of
5050 (c_parser_postfix_expression): Likewise for statement expressions,
5051 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5052 __builtin_va_arg, and for __builtin_offset_of.
5053 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5054 src_range using the range of the braced initializer.
5055 (c_parser_transaction_expression): Set src_range for "ret" to a
5056 sane pair of values.
5058 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5060 * c-parser.c (c_finish_omp_declare_simd): Look for
5061 "simd" attribute as well. Update error message.
5063 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5065 * c-parser.c (c_parser_omp_declare_target): Adjust.
5067 2015-11-14 Jakub Jelinek <jakub@redhat.com>
5069 * c-typeck.c (c_finish_omp_clauses): Don't mark
5070 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5072 2015-11-14 Marek Polacek <polacek@redhat.com>
5074 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5075 * c-typeck.c: Likewise.
5077 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5079 * c-decl.c (warn_defaults_to): Pass line_table to
5081 * c-errors.c (pedwarn_c99): Likewise.
5082 (pedwarn_c90): Likewise.
5083 * c-parser.c (set_c_expr_source_range): New functions.
5084 (c_token::get_range): New method.
5085 (c_token::get_finish): New method.
5086 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5087 based on the range from the start of the LHS to the end of the
5089 (c_parser_conditional_expression): Likewise, based on the range
5090 from the start of the cond.value to the end of exp2.value.
5091 (c_parser_binary_expression): Call set_c_expr_source_range on
5092 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5093 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5094 based on the cast_loc through to the end of the expr.
5095 (c_parser_unary_expression): Likewise, based on the
5096 op_loc through to the end of op.
5097 (c_parser_sizeof_expression) Likewise, based on the start of the
5098 sizeof token through to either the closing paren or the end of
5100 (c_parser_postfix_expression): Likewise, using the token range,
5101 or from the open paren through to the close paren for
5102 parenthesized expressions.
5103 (c_parser_postfix_expression_after_primary): Likewise, for
5104 various kinds of expression.
5105 * c-tree.h (struct c_expr): Add field "src_range".
5106 (c_expr::get_start): New method.
5107 (c_expr::get_finish): New method.
5108 (set_c_expr_source_range): New decls.
5109 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5110 on ret for prefix unary ops.
5111 (parser_build_binary_op): Likewise, running from the start of
5112 arg1.value through to the end of arg2.value.
5114 2015-11-13 Marek Polacek <polacek@redhat.com>
5117 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5119 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5121 * c-typeck.c: Include spellcheck.h.
5122 (lookup_field_fuzzy_find_candidates): New function.
5123 (lookup_field_fuzzy): New function.
5124 (build_component_ref): If the field was not found, try using
5125 lookup_field_fuzzy and potentially offer a suggestion.
5127 2015-11-12 James Norris <jnorris@codesourcery.com>
5128 Joseph Myers <joseph@codesourcery.com>
5130 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5131 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5132 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5133 and PRAGMA_OMP_CLAUSE_LINK.
5134 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5135 and PRAGMA_OACC_CLAUSE_LINK.
5136 (OACC_DECLARE_CLAUSE_MASK): New definition.
5137 (c_parser_oacc_declare): New function.
5139 2015-11-12 Marek Polacek <polacek@redhat.com>
5142 * c-parser.c (c_parser_for_statement): Reclassify the token in
5145 2015-11-11 Marek Polacek <polacek@redhat.com>
5149 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5150 checking the size of an array.
5152 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5154 * c-array-notation.c: Remove unused header files.
5155 * c-aux-info.c: Likewise.
5156 * c-convert.c: Likewise.
5157 * c-decl.c: Likewise.
5158 * c-errors.c: Likewise.
5159 * c-lang.c: Likewise.
5160 * c-objc-common.c: Likewise.
5161 * c-parser.c: Likewise.
5162 * c-typeck.c: Likewise.
5163 * gccspec.c: Likewise.
5165 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5166 Cesar Philippidis <cesar@codesourcery.com>
5167 James Norris <jnorris@codesourcery.com>
5168 Julian Brown <julian@codesourcery.com>
5169 Nathan Sidwell <nathan@codesourcery.com>
5171 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5173 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5174 (c_parser_pragma): Parse 'acc routine'.
5175 (OACC_ROUTINE_CLAUSE_MARK): Define.
5176 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5178 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5181 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5182 location of the backward-goto to the start of the loop body.
5184 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5187 * c-parser.c (c_parser_while_statement): Finish the loop before
5188 parsing ahead for misleading indentation.
5189 (c_parser_for_statement): Likewise.
5191 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5193 * c-decl.c (finish_struct): If the structure has reverse storage
5194 order, rewrite the type of array fields with scalar component. Call
5195 maybe_apply_pragma_scalar_storage_order on entry.
5196 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5197 errors on bit-fields and reverse SSO here and not...
5198 (c_mark_addressable): ...here.
5199 (output_init_element): Adjust call to initializer_constant_valid_p.
5200 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5202 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5204 * c-decl.c (warn_defaults_to): Update for change in signature
5205 of diagnostic_set_info.
5206 * c-errors.c (pedwarn_c99): Likewise.
5207 (pedwarn_c90): Likewise.
5208 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5209 for textinfo::set_location.
5211 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5212 Thomas Schwinge <thomas@codesourcery.com>
5213 James Norris <jnorris@codesourcery.com>
5215 * c-parser.c (c_parser_omp_clause_name): Add support for
5216 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5217 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5218 default(none) in OpenACC.
5219 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5221 (c_parser_oacc_clause_tile): New function.
5222 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5223 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5224 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5226 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5227 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5229 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5230 (c_parser_oacc_update): Update the error message for missing clauses.
5231 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5232 and OMP_CLAUSE_INDEPENDENT.
5234 2015-11-05 Marek Polacek <polacek@redhat.com>
5237 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5238 deal with pre-evaluation on invalid types.
5240 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5241 Ilya Verbin <ilya.verbin@intel.com>
5243 * c-parser.c: Include context.h and gimple-expr.h.
5244 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5245 monotonic together with nonmonotonic.
5246 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5247 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5248 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5249 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5250 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5251 expressions on combined target teams before the target.
5252 (c_parser_omp_declare_target): If decl has "omp declare target" or
5253 "omp declare target link" attribute, and cgraph or varpool node already
5254 exists, then set corresponding flags. Call c_finish_omp_clauses
5255 in the parenthesized extended-list syntax case.
5256 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5258 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5259 on OMP_CLAUSE_REDUCTION array sections.
5260 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5261 into the constant offset, or for variable low-bound using
5262 POINTER_PLUS_EXPR. For structure element based array sections use
5263 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5264 (c_finish_omp_clauses): Drop generic_field_head, structure
5265 elements are now always mapped even as array section bases,
5266 diagnose same var in data sharing and mapping clauses. Diagnose if
5267 linear step on declare simd is neither a constant nor a uniform
5268 parameter. Look through POINTER_PLUS_EXPR for array section
5269 reductions. Diagnose the same var or function appearing multiple
5270 times on the same directive. Fix up wording for the to clause if t
5271 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5272 modifier on kinds other than dynamic or guided or nonmonotonic
5273 modifier together with ordered clause.
5275 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5276 Chung-Lin Tang <cltang@codesourcery.com>
5278 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5280 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5282 * c-array-notation.c: Reorder #include's and remove duplicates.
5283 * c-aux-info.c: Likewise.
5284 * c-convert.c: Likewise.
5285 * c-decl.c: Likewise.
5286 * c-errors.c: Likewise.
5287 * c-lang.c: Likewise.
5288 * c-objc-common.c: Likewise.
5289 * c-parser.c: Likewise.
5290 * c-typeck.c: Likewise.
5292 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
5295 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5296 after calling build_qualified_type.
5298 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5299 Thomas Schwinge <thomas@codesourcery.com>
5300 James Norris <jnorris@codesourcery.com>
5301 Joseph Myers <joseph@codesourcery.com>
5302 Julian Brown <julian@codesourcery.com>
5303 Bernd Schmidt <bschmidt@redhat.com>
5305 * c-parser.c (c_parser_oacc_shape_clause): New.
5306 (c_parser_oacc_simple_clause): New.
5307 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5308 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5310 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5311 James Norris <jnorris@codesourcery.com>
5312 Cesar Philippidis <cesar@codesourcery.com>
5316 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5317 parameters, and handle these. Adjust all users.
5318 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5320 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5322 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5324 (c_finish_omp_construct): Declare function.
5325 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5326 Merge functions into...
5327 (c_finish_omp_construct): ... this new function.
5329 2015-10-22 Richard Biener <rguenther@suse.de>
5331 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5332 before folding a MINUS_EXPR.
5334 2015-10-21 Marek Polacek <polacek@redhat.com>
5337 * c-decl.c (start_function): Warn about vararg functions without
5340 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5342 * c-typeck.c (build_conditional_expr): Use boolean vector
5343 type for vector comparison.
5344 (build_vec_cmp): New.
5345 (build_binary_op): Use build_vec_cmp for comparison.
5347 2015-10-20 Marek Polacek <polacek@redhat.com>
5349 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5351 2015-10-20 Marek Polacek <polacek@redhat.com>
5354 * c-parser.c (c_parser_attributes): Break out of the loop if the
5355 token after an attribute isn't a comma.
5357 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5358 Aldy Hernandez <aldyh@redhat.com>
5360 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5361 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5362 (c_parser_omp_variable_list): Handle structure elements for
5363 map, to and from clauses. Handle array sections in reduction
5364 clause. Formatting fixes.
5365 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5366 if clause modifiers.
5367 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5368 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5369 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5370 c_parser_omp_clause_is_device_ptr): New functions.
5371 (c_parser_omp_clause_ordered): Parse optional parameter.
5372 (c_parser_omp_clause_reduction): Handle array reductions.
5373 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5374 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5376 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5377 (c_parser_omp_clause_depend_sink): New function.
5378 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5379 (c_parser_omp_clause_map): Parse release/delete map kinds and
5380 optional always modifier.
5381 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5382 and c_finish_omp_clauses callers.
5383 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5384 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5385 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5386 (OMP_CRITICAL_CLAUSE_MASK): Define.
5387 (c_parser_omp_critical): Parse critical clauses.
5388 (c_parser_omp_for_loop): Handle doacross loops, adjust
5389 c_finish_omp_for and c_finish_omp_clauses callers.
5390 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5391 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5392 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5393 (c_parser_omp_for): Disallow ordered clause when combined with
5394 distribute. Disallow linear clause when combined with distribute
5395 and not combined with simd.
5396 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5397 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5398 parse clauses and if depend clause is found, don't parse a body.
5399 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5400 Allow target parallel without for after it.
5401 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5402 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5403 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5405 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5406 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5407 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5408 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5410 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5411 defaultmap and is_device_ptr clauses.
5412 (c_parser_omp_target): Parse target parallel and target simd. Set
5413 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5414 and target exit data. Diagnose invalid map kinds.
5415 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5416 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5418 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5420 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5421 (c_parser_omp_taskloop): New function.
5422 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5423 handle PRAGMA_OMP_TASKLOOP.
5424 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5425 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5426 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5427 Add IS_OMP argument, handle structure element bases, diagnose
5428 bitfields, pass IS_OMP recursively, diagnose known zero length
5429 array sections in depend clauses, handle array sections in reduction
5430 clause, diagnose negative length even for pointers.
5431 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5432 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5433 array sections in reduction clause, set
5434 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5435 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5436 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5437 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5439 2015-10-06 Marek Polacek <polacek@redhat.com>
5441 * c-parser.c (c_parser_statement_after_labels): Use
5442 protected_set_expr_location.
5443 (c_parser_omp_clause_num_gangs): Likewise.
5444 (c_parser_omp_clause_num_threads): Likewise.
5445 (c_parser_omp_clause_num_workers): Likewise.
5446 (c_parser_omp_clause_vector_length): Likewise.
5447 (c_parser_omp_clause_num_teams): Likewise.
5448 (c_parser_omp_clause_thread_limit): Likewise.
5449 * c-typeck.c (build_c_cast): Likewise.
5450 (c_cast_expr): Likewise.
5452 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5454 * c-typeck.c (c_tree_equal): Use real_equal instead of
5457 2015-10-04 Jason Merrill <jason@redhat.com>
5459 * c-parser.c (c_lex_one_token): Handle @synchronized.
5460 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5461 can change whether the function is transaction_safe.
5463 2015-10-02 Marek Polacek <polacek@redhat.com>
5466 * c-typeck.c (convert_for_assignment): Use the expansion point
5467 location throughout.
5469 2015-10-02 Marek Polacek <polacek@redhat.com>
5472 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5473 and pass it down to c_parser_if_statement.
5474 (c_parser_else_body): Add CHAIN parameter and pass it down to
5475 c_parser_statement_after_labels.
5476 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5477 duplicated if-else-if conditions.
5479 2015-10-01 Marek Polacek <polacek@redhat.com>
5481 * c-typeck.c (convert_for_assignment): Improve commentary.
5483 2015-09-30 Marek Polacek <polacek@redhat.com>
5486 * c-typeck.c (c_finish_return): Use the expansion point location for
5487 certain "return with value" warnings.
5489 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5491 * c-parser.c (pragma_lex): Add loc argument.
5493 2015-09-15 Marek Polacek <polacek@redhat.com>
5496 * c-decl.c (tag_exists_p): New function.
5497 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5498 struct/union/enum keywords are missing.
5499 * c-tree.h (tag_exists_p): Declare.
5501 2015-09-15 Marek Polacek <polacek@redhat.com>
5503 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5504 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5505 Return NULL_TREE instead of 0.
5506 (lookup_name): Return NULL_TREE instead of 0.
5507 (lookup_name_in_scope): Likewise.
5508 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5509 (parser_xref_tag): Use false instead of 0.
5510 (start_struct): Use true instead of 1.
5511 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5513 2015-09-14 Marek Polacek <polacek@redhat.com>
5515 * c-typeck.c (set_nonincremental_init_from_string): Use
5516 HOST_WIDE_INT_M1U when shifting a negative value.
5518 2015-09-09 Mark Wielaard <mjw@redhat.com>
5520 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5523 2015-09-10 Jakub Jelinek <jakub@redhat.com>
5526 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5527 into OMP_FOR_PRE_BODY rather than before the loop.
5529 2015-09-09 Jakub Jelinek <jakub@redhat.com>
5532 * c-parser.c (c_parser_oacc_all_clauses,
5533 c_parser_omp_all_clauses): Remove invalid clause from
5534 list of clauses even if parser->error is set.
5537 * c-parser.c (c_parser_omp_clause_aligned,
5538 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5540 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5544 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5545 instead of c_parser_unary_expression. If the result is !lvalue_p,
5546 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5548 2015-09-04 Marek Polacek <polacek@redhat.com>
5551 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5553 2015-09-03 Martin Sebor <msebor@redhat.com>
5556 * c-typeck.c (convert_arguments, parser_build_unary_op,
5557 build_conditional_expr, c_cast_expr, convert_for_assignment,
5558 build_binary_op, _objc_common_truthvalue_conversion): Call
5560 (c_decl_implicit): Define.
5562 2015-09-02 Marek Polacek <polacek@redhat.com>
5565 * c-parser.c (c_parser_enum_specifier): Give a better error for
5568 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5570 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5572 2015-08-12 Marek Polacek <polacek@redhat.com>
5574 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5577 2015-08-03 Marek Polacek <polacek@redhat.com>
5580 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5582 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5584 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5586 * c-parser.c (c_parser_if_body): Take token_indent_info
5587 argument. Call warn_for_misleading_indentation even when the
5588 body is a semicolon. Extract token_indent_infos corresponding
5589 to the guard, body and next tokens. Adjust call to
5590 warn_for_misleading_indentation accordingly.
5591 (c_parser_else_body): Likewise.
5592 (c_parser_if_statement): Likewise.
5593 (c_parser_while_statement): Likewise.
5594 (c_parser_for_statement): Likewise.
5596 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5597 Manuel López-Ibáñez <manu@gcc.gnu.org>
5599 * c-decl.c (get_parm_info): Remove static var. Update warning
5602 2015-07-27 Marek Polacek <polacek@redhat.com>
5606 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5608 2015-07-20 Marek Polacek <polacek@redhat.com>
5611 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5612 (build_binary_op): Warn about left shift overflows.
5614 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5616 * c-array-notation.c: Adjust includes for flags.h changes.
5617 * c-objc-common.c: Likewise.
5619 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5621 * c-array-notation.c: Adjust includes.
5622 * c-aux-info.c: Likewise.
5623 * c-convert.c: Likewise.
5624 * c-decl.c: Likewise.
5625 * c-errors.c: Likewise.
5626 * c-lang.c: Likewise.
5627 * c-objc-common.c: Likewise.
5628 * c-parser.c: Likewise.
5629 * c-typeck.c: Likewise.
5631 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5634 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5636 2015-06-29 Marek Polacek <polacek@redhat.com>
5639 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5640 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5641 about -Wswitch-bool here.
5642 (do_case): Update c_add_case_label call.
5643 (c_finish_case): Update c_do_switch_warnings call.
5645 2015-06-27 Marek Polacek <polacek@redhat.com>
5647 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5649 2015-06-26 Marek Polacek <polacek@redhat.com>
5651 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5653 * c-typeck.c (array_to_pointer_conversion): Likewise.
5654 (build_unary_op): Likewise.
5655 (c_finish_return): Likewise.
5657 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5659 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5660 * c-parser.c: Likewise.
5662 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5664 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5665 instead of pointer_hash.
5666 (detect_field_duplicates): Likewise.
5668 2015-06-25 Marek Polacek <polacek@redhat.com>
5670 * c-array-notation.c: Use VAR_P throughout.
5671 * c-decl.c: Likewise.
5672 * c-objc-common.c: Likewise.
5673 * c-parser.c: Likewise.
5674 * c-typeck.c: Likewise.
5676 2015-06-25 Marek Polacek <polacek@redhat.com>
5678 * c-decl.c: Use is_global_var throughout.
5679 * c-parser.c: Likewise.
5680 * c-typeck.c: Likewise.
5682 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5684 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5685 * c-aux-info.c: Likewise.
5686 * c-convert.c: Likewise.
5687 * c-decl.c: Likewise.
5688 * c-errors.c: Likewise.
5689 * c-lang.c: Likewise.
5690 * c-objc-common.c: Likewise.
5691 * c-parser.c: Likewise.
5692 * c-typeck.c: Likewise.
5694 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
5697 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5700 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5702 * c-decl.c (pop_scope): Register the main translation unit
5703 through the new debug hook.
5705 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5707 * c-array-notation.c : Adjust include files.
5708 * c-aux-info.c : Likewise.
5709 * c-convert.c : Likewise.
5710 * c-decl.c : Likewise.
5711 * c-errors.c : Likewise.
5712 * c-lang.c : Likewise.
5713 * c-lang.h : Likewise.
5714 * c-objc-common.c : Likewise.
5715 * c-parser.c : Likewise.
5716 * c-typeck.c : Likewise.
5718 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5720 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5721 immediately clobber it.
5722 (c_write_global_declarations_1): Remove call to
5723 check_global_declaration_1.
5724 (c_write_global_declarations_2): Remove.
5725 (c_write_final_cleanups): Rename from c_write_global_declarations.
5726 Remove call to finalize_compilation_unit.
5727 Remove calls to debugging hooks.
5728 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5729 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5730 * c-tree.h: Remove c_write_global_declarations.
5732 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5734 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5735 * c-aux-info.c: Likewise.
5736 * c-convert.c: Likewise.
5737 * c-decl.c: Likewise.
5738 * c-errors.c: Likewise.
5739 * c-lang.c: Likewise.
5740 * c-objc-common.c: Likewise.
5741 * c-parser.c: Likewise.
5742 * c-typeck.c: Likewise.
5744 2015-06-04 Marek Polacek <polacek@redhat.com>
5747 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5750 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5752 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5753 Warn for empty struct.
5754 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5756 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5758 * c-decl.c (start_function): Call plugin before parsing.
5759 (finish_function): Call plugin after parsing.
5761 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5764 * c-decl.c (merge_decls): Merge DECL_COMMON.
5766 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
5768 * Make-lang.in (check_gcc_pallelize): Define.
5770 2015-05-22 Marek Polacek <polacek@redhat.com>
5773 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5776 2015-05-21 Marek Polacek <polacek@redhat.com>
5778 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5781 2015-05-20 Marek Polacek <polacek@redhat.com>
5783 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5784 * c-typeck.c: Likewise.
5786 2015-05-19 Marek Polacek <polacek@redhat.com>
5788 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5790 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5793 * c-parser.c (c_parser_omp_for_loop): Don't add
5794 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5795 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5796 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5799 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5801 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5804 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5807 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5810 2015-05-14 Marek Polacek <polacek@redhat.com>
5814 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5817 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5819 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5820 to add a call to warn_for_misleading_indentation.
5821 (c_parser_else_body): Likewise, adding param "else_loc".
5822 (c_parser_if_statement): Check for misleading indentation.
5823 (c_parser_while_statement): Likewise.
5824 (c_parser_for_statement): Likewise.
5826 2015-05-08 Marek Polacek <polacek@redhat.com>
5829 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5830 (output_init_element): Likewise.
5832 2015-05-07 Marek Polacek <polacek@redhat.com>
5835 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5838 2015-04-30 Marek Polacek <polacek@redhat.com>
5840 * c-typeck.c (set_init_label): Call error_at instead of error and
5843 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5846 * c-typeck.c (c_build_va_arg): Clarify the error message.
5848 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5850 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5851 OMP_STANDALONE_CLAUSES.
5853 2015-04-28 Marek Polacek <polacek@redhat.com>
5855 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5857 2015-04-28 Marek Polacek <polacek@redhat.com>
5860 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5862 2015-04-25 Marek Polacek <polacek@redhat.com>
5865 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5868 2015-04-23 Marek Polacek <polacek@redhat.com>
5871 * c-decl.c (set_labels_context_r): New function.
5872 (store_parm_decls): Call it via walk_tree_without_duplicates.
5873 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5874 instead of create_tmp_var. Build TARGET_EXPR instead of
5876 (build_atomic_assign): Use create_tmp_var_raw instead of
5877 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5879 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5881 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5882 (c_parser_omp_target_update): Add missed %> to error_at ().
5884 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5887 * c-decl.c (c_default_pointer_mode): Remove definition.
5888 * c-tree.h (c_default_pointer_mode): Remove declaration.
5890 2015-03-27 Tobias Burnus <burnus@net-b.de>
5893 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5895 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5896 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5897 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5899 2015-03-19 Jakub Jelinek <jakub@redhat.com>
5901 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5902 attribute for DECL_EXTERNAL VAR_DECLs.
5904 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5906 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5909 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5912 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5913 before preparing arguments to warn_logical_not_parentheses.
5915 2015-03-09 Jakub Jelinek <jakub@redhat.com>
5918 * c-typeck.c (parser_build_binary_op): Don't warn for
5919 !!x == y or !b == y where b is _Bool.
5921 2015-03-09 Marek Polacek <polacek@redhat.com>
5923 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5924 * c-decl.c (grokdeclarator): Likewise.
5925 * c-typeck.c (build_binary_op): Likewise.
5927 2015-02-27 Marek Polacek <polacek@redhat.com>
5930 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5932 2015-02-14 Marek Polacek <polacek@redhat.com>
5935 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5936 declared through a typedef name.
5938 2015-02-13 Marek Polacek <polacek@redhat.com>
5941 * c-decl.c (grokdeclarator): Print also the type when giving
5942 the error message about array's incomplete element type.
5944 2015-02-11 Jakub Jelinek <jakub@redhat.com>
5947 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5948 check in the POP macro.
5950 2015-02-09 Marek Polacek <polacek@redhat.com>
5953 * c-typeck.c (process_init_element): Don't always wrap
5954 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5955 initializing a range of elements.
5957 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5961 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5963 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5965 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5966 processing enum declaration.
5968 2015-01-29 Marek Polacek <polacek@redhat.com>
5971 * c-typeck.c (pop_init_level): If constructor_elements has
5972 exactly one element with integer_zerop value, set constructor_zeroinit
5973 to 1. Remove braces around warning_init call.
5975 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5978 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5979 of FUNCTION_DECLs with error_mark_node.
5981 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5984 * c-typeck.c (convert_arguments): Return -1 if there are
5985 error_args, even if we've diagnosed too many arguments.
5987 2015-01-21 Richard Biener <rguenther@suse.de>
5990 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5991 for builtins the user declared correctly.
5993 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5994 Bernd Schmidt <bernds@codesourcery.com>
5995 Cesar Philippidis <cesar@codesourcery.com>
5996 James Norris <jnorris@codesourcery.com>
5997 Jakub Jelinek <jakub@redhat.com>
5998 Ilmir Usmanov <i.usmanov@samsung.com>
6000 * c-parser.c: Include "gomp-constants.h".
6001 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6002 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6003 Use OMP_CLAUSE_SET_MAP_KIND.
6004 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6005 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6006 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6007 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6008 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6009 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6010 "copyout", "create", "delete", "deviceptr", "gang", "host",
6011 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6012 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6013 "present_or_create", "pcreate", "seq", "self", "vector",
6014 "vector_length", "wait", "worker".
6015 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6016 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6017 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6018 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6019 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6020 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6021 (c_parser_oacc_data_clause_deviceptr)
6022 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6023 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6024 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6025 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6026 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6027 (c_parser_oacc_parallel, c_parser_oacc_update)
6028 (c_parser_oacc_wait): New functions.
6029 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6030 (c_finish_oacc_data): New prototypes.
6031 * c-typeck.c: Include "gomp-constants.h".
6032 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6033 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6034 OMP_CLAUSE_SET_MAP_KIND.
6035 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6036 (c_finish_oacc_data): New functions.
6037 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6038 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6039 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6040 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6041 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6042 GOMP_MAP_FORCE_DEVICEPTR.
6044 2015-01-09 Michael Collison <michael.collison@linaro.org>
6046 * c-array-notation.c: Include hash-set.h, machmode.h,
6047 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6048 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6049 * c-aux-info.c: Ditto.
6050 * c-convert.c: Ditto.
6052 * c-errors.c: Ditto.
6053 * c-lang.c: Dittoxs.
6054 * c-objc-common.c: Ditto.
6055 * c-parser.c: Ditto.
6056 * c-typeck.c: Include hash-set.h, machmode.h,
6057 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6058 fold-const.h, wide-int.h, inchash.h, real.h and
6059 fixed-value.h due to flattening of tree.h.
6061 2015-01-07 Marek Polacek <polacek@redhat.com>
6064 * c-typeck.c (process_init_element): Disallow initialization of
6065 a flexible array member with a string constant if the structure
6068 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6071 * c-typeck.c (convert_for_assignment, c_finish_return): For
6072 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6073 types also set in_late_binary_op around convert call.
6074 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6075 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6076 result on expr as last argument to ubsan_instrument_float_cast,
6077 if in_late_binary_op, don't use c_save_expr but save_expr.
6079 Update copyright years.
6081 2015-01-05 Marek Polacek <polacek@redhat.com>
6084 * c-typeck.c (build_array_ref): Pass loc down to
6085 warn_array_subscript_with_type_char.
6087 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6089 * c-typeck.c: New behavious for pointers to arrays with qualifiers
6090 (common-pointer-type): For pointers to arrays take qualifiers from
6092 (build_conditional_expr): Add warnings for lost qualifiers.
6093 (comp-target-types): Allow pointers to arrays with different qualifiers.
6094 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
6095 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
6096 to PEDWARN_FOR_QUALIFIERS.
6098 2014-12-17 Jakub Jelinek <jakub@redhat.com>
6101 * c-convert.c: Include ubsan.h.
6102 (convert): For real -> integral casts and
6103 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6104 instead instrument the float cast directly.
6106 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6108 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6109 c_finish_stmt_expr): Remove NULL last argument from
6110 create_tmp_var_raw and create_tmp_var calls.
6111 * c-array-notation.c (fix_builtin_array_notation_fn,
6112 build_array_notation_expr, fix_conditional_array_notations_1,
6113 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6115 2014-11-28 Marek Polacek <polacek@redhat.com>
6118 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6119 convert the right operand to integer type.
6121 2014-11-25 Marek Polacek <polacek@redhat.com>
6124 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6125 for inline functions.
6127 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6130 * c-typeck.c (build_array_ref): Adjust
6131 convert_vector_to_pointer_for_subscript caller. If it returns true,
6132 call non_lvalue_loc on the result.
6134 2014-11-11 Richard Biener <rguenther@suse.de>
6136 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6139 2014-11-10 Andi Kleen <ak@linux.intel.com>
6142 * c-parser.c (c_parser_statement_after_labels): Call
6144 (c_parser_if_statement): Dito.
6145 (c_parser_switch_statement): Dito.
6146 (c_parser_while_statement): Dito.
6147 (c_parser_do_statement): Dito.
6148 (c_parser_for_statement): Dito.
6149 * c-typeck.c (c_finish_loop): Dito.
6151 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6153 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6154 OPT_Wshift_count_overflow in the warnings.
6156 2014-10-30 Marek Polacek <polacek@redhat.com>
6158 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6159 print the stripped version as well, if they're not the same.
6161 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6163 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6166 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6168 * c-decl.c: Adjust include files.
6169 * c-parser.c: Ditto.
6171 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6172 Tom Tromey <tromey@redhat.com>
6174 * c-tree.h (enum c_oracle_request): New.
6175 (c_binding_oracle_function): New typedef.
6176 (c_binding_oracle, c_pushtag, c_bind): Declare.
6177 * c-decl.c (c_binding_oracle): New global.
6178 (I_SYMBOL_CHECKED): New macro.
6179 (i_symbol_binding): New function.
6180 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6181 (I_TAG_CHECKED): New macro.
6182 (i_tag_binding): New function.
6183 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6184 (I_LABEL_CHECKED): New macro.
6185 (i_label_binding): New function.
6186 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6187 (c_print_identifier): Save and restore c_binding_oracle.
6188 (c_pushtag, c_bind): New functions.
6190 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6192 * c-typeck.c: Adjust include files.
6194 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6197 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6198 initialization here...
6199 (c_initialize_diagnostics): ... but here. Set defaults after
6200 building pretty-printer.
6202 2014-10-23 Marek Polacek <polacek@redhat.com>
6205 * c-decl.c (pop_scope): Don't print warning in external_scope.
6207 2014-10-19 Marek Polacek <polacek@redhat.com>
6210 * c-typeck.c (output_init_element): Allow initializing objects with
6211 static storage duration with compound literals even in C99 and add
6214 2014-10-17 Marek Polacek <polacek@redhat.com>
6217 * c-typeck.c (digest_init): Allow initializing objects with static
6218 storage duration with compound literals even in C99 and add pedwarn
6221 2014-10-17 Marek Polacek <polacek@redhat.com>
6224 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6225 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6226 error multiple times. Print the type.
6228 2014-10-17 Marek Polacek <polacek@redhat.com>
6231 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6234 2014-10-17 Marek Polacek <polacek@redhat.com>
6236 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6237 (start_function): Use OPT_Wimplicit_int instead of 0.
6238 (store_parm_decls_oldstyle): Likewise.
6240 2014-10-17 Alan Modra <amodra@gmail.com>
6243 * c-decl.c (merge_decls): Don't merge section name or tls model
6244 to newdecl symtab node, instead merge to olddecl. Override
6245 existing olddecl section name. Set tls_model for all thread-local
6246 vars, not just OMP thread-private ones. Remove incorrect comment.
6248 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6250 * c-decl.c: Adjust include files.
6252 2014-10-14 DJ Delorie <dj@redhat.com>
6254 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6255 (c_token_starts_typename): Check all __intN, not just __int128.
6256 (c_token_starts_declspecs): Likewise.
6257 (c_parser_declspecs): Likewise.
6258 (c_parser_attribute_any_word): Likewise.
6259 (c_parser_objc_selector): Likewise.
6260 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6261 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6263 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6265 (finish_declspecs): Likewise.
6267 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6269 * c-parser.c (c_parser_all_labels): New function to replace
6271 (c_parser_statement): Call the new function.
6273 2014-10-09 Marek Polacek <polacek@redhat.com>
6276 * c-typeck.c (pop_init_level): Don't warn about initializing
6279 2014-10-07 Marek Polacek <polacek@redhat.com>
6282 * c-decl.c (header_for_builtin_fn): New function.
6283 (implicitly_declare): Suggest which header to include.
6285 2014-10-07 Marek Polacek <polacek@redhat.com>
6287 * c-convert.c (convert): Use error_operand_p.
6288 * c-typeck.c (require_complete_type): Likewise.
6289 (really_atomic_lvalue): Likewise.
6290 (digest_init): Likewise.
6291 (handle_omp_array_sections_1): Likewise.
6293 2014-10-03 Marek Polacek <polacek@redhat.com>
6296 * c-decl.c (pop_scope): Don't warn about "inline function declared
6297 but never defined" for functions marked with gnu_inline attribute.
6299 2014-09-25 Jakub Jelinek <jakub@redhat.com>
6302 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6303 on low_bound and length.
6305 2014-09-24 Marek Polacek <polacek@redhat.com>
6309 * c-parser.c: Don't define CPP_KEYWORD.
6310 (c_parser_switch_statement): Pass original type to c_finish_case.
6311 * c-tree.h (c_finish_case): Update declaration.
6312 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6313 conditionally to c_do_switch_warnings.
6315 2014-09-03 Marek Polacek <polacek@redhat.com>
6318 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6321 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6322 Balaji V. Iyer <balaji.v.iyer@intel.com>
6323 Igor Zamyatin <igor.zamyatin@intel.com>
6325 * c-parser.c (c_parser_cilk_for): New function.
6326 (c_parser_cilk_grainsize): Likewise.
6327 (c_get_temp_regvar): Likewise.
6328 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6329 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6330 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6331 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6334 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6336 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6337 with using HOST_WIDE_INT without truncation to 'int'
6339 2014-08-22 Marek Polacek <polacek@redhat.com>
6342 * c-typeck.c (parser_build_binary_op): Adjust call to
6343 warn_logical_not_parentheses.
6345 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6348 * c-parser.c (c_parser_array_notation): Check for correct
6349 type of an array added.
6351 2014-08-19 Marek Polacek <polacek@redhat.com>
6354 * c-typeck.c (build_binary_op): If either operand of a comparison
6355 is a boolean expression, call maybe_warn_bool_compare.
6357 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6360 * c-typeck.c (build_c_cast): Do a conversion even when the
6361 TYPE_MAIN_VARIANTs are the same.
6363 2014-08-19 Marek Polacek <polacek@redhat.com>
6365 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6366 pedwarn_c99 instead of pedwarn.
6367 (grokfield): Likewise.
6368 (warn_defaults_to): New function.
6369 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6370 Unconditionally call pedwarn_c99 instead of pedwarn.
6371 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6372 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6373 check flag_isoc11 before.
6374 * c-errors.c (pedwarn_c99): Change the return type to bool.
6375 Handle -Wc99-c11-compat.
6376 * c-parser.c (disable_extension_diagnostics): Handle
6377 warn_c99_c11_compat.
6378 (restore_extension_diagnostics): Likewise.
6379 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6380 instead of pedwarn, don't check flag_isoc11 before.
6381 (c_parser_declspecs): Likewise.
6382 (c_parser_alignas_specifier): Likewise.
6383 (c_parser_alignof_expression): Likewise.
6384 (c_parser_generic_selection): Likewise.
6385 * c-tree.h (pedwarn_c99): Update declaration.
6386 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6389 2014-08-19 Marek Polacek <polacek@redhat.com>
6391 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6393 * c-errors.c: Include "opts.h".
6394 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6395 * c-parser.c (disable_extension_diagnostics): Handle negative value
6396 of warn_c90_c99_compat, too.
6397 (restore_extension_diagnostics): Likewise.
6398 (c_parser_compound_statement_nostart): Pass
6399 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6401 2014-08-12 Marek Polacek <polacek@redhat.com>
6403 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6405 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6407 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6409 2014-08-10 Marek Polacek <polacek@redhat.com>
6412 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6413 Call pedwarn_c90 instead of pedwarn.
6414 (check_bitfield_type_and_width): Likewise.
6415 (declspecs_add_qual): Likewise.
6416 (declspecs_add_type): Likewise.
6417 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6418 Adjust to only call pedwarn_c90.
6419 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6420 pedwarn_c90 instead of pedwarn.
6421 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6422 * c-parser.c (disable_extension_diagnostics): Handle
6423 warn_c90_c99_compat.
6424 (restore_extension_diagnostics): Likewise.
6425 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6426 pedwarn_c90 instead of pedwarn.
6427 (c_parser_initelt): Likewise.
6428 (c_parser_postfix_expression): Likewise.
6429 (c_parser_postfix_expression_after_paren_type): Likewise.
6430 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6431 * c-tree.h: Fix formatting.
6432 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6433 pedwarn_c90 instead of pedwarn.
6435 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6437 * c-typeck.c: Remove include of pointer-set.h.
6439 2014-08-07 Marek Polacek <polacek@redhat.com>
6441 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6443 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6445 * c-typeck.c: Use hash_map instead of pointer_map.
6447 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6449 * c-decl.c: Use hash_set instead of pointer_set.
6451 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6454 * c-array-notation.c (expand_array_notations): Handling
6457 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
6460 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6463 2014-07-30 Tom Tromey <tromey@redhat.com>
6465 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6467 (really_start_incremental_init, push_init_level): Initialize
6469 (pop_init_level): Set global designator_depth.
6470 (process_init_element): Check for designated_init attribute.
6472 2014-07-20 Marek Polacek <polacek@redhat.com>
6475 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6476 (implicitly_declare): Pass location to implicit_decl_warning.
6478 2014-07-14 Jakub Jelinek <jakub@redhat.com>
6481 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6482 If non-NULL, call c_parser_check_literal_zero.
6483 (c_parser_check_literal_zero): New function.
6484 (c_parser_postfix_expression_after_primary): Adjust
6485 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6487 2014-07-06 Marek Polacek <polacek@redhat.com>
6490 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6491 * c-tree.h (C_ARRAY_PARAMETER): Define.
6492 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6495 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
6496 Chen Gang <gang.chen.5i5j@gmail.com>
6498 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6501 2014-07-01 Marek Polacek <polacek@redhat.com>
6503 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6504 instead of 0 to WARN_FOR_ASSIGNMENT.
6506 2014-07-01 Marek Polacek <polacek@redhat.com>
6509 * c-typeck.c (convert_for_assignment): Pass
6510 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6512 2014-06-30 Marek Polacek <polacek@redhat.com>
6514 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6515 has no_sanitize_undefined attribute.
6517 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6520 * c-array-notation.c (fix_builtin_array_notation_fn):
6521 Check for 0 arguments in builtin call. Check that bultin argument is
6523 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6526 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6528 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6529 qualifiers in __auto_type for atomic types.
6530 (c_parser_typeof_specifier): Discard all type qualifiers in
6531 __typeof__ for atomic types.
6533 2014-06-25 Marek Polacek <polacek@redhat.com>
6536 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6537 the return expression to c_finish_return.
6539 2014-06-25 Jakub Jelinek <jakub@redhat.com>
6541 * c-typeck.c (c_finish_omp_clauses): Make sure
6542 OMP_CLAUSE_LINEAR_STEP has correct type.
6544 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6548 2014-06-24 Jakub Jelinek <jakub@redhat.com>
6550 * c-parser.c (c_parser_omp_for_loop): For
6551 #pragma omp parallel for simd move lastprivate clause from parallel
6552 to for rather than simd.
6554 2014-06-23 Marek Polacek <polacek@redhat.com>
6556 * c-typeck.c (parser_build_binary_op): Don't call
6557 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6559 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6561 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6562 * c-decl.c (merge_decls): Likewise.
6564 2014-06-09 Marek Polacek <polacek@redhat.com>
6567 * c-typeck.c (error_init): Call inform instead of error_at.
6568 (pedwarn_init): Call inform instead of pedwarn.
6569 (warning_init): Call inform instead of warning_at.
6571 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
6573 * c-decl.c (merge_decls): Use set_decl_section_name.
6574 (duplicate_decls): Remove node if it exists.
6576 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6579 * c-typeck.c (push_init_level, process_init_element,
6580 pop_init_level): Correct check for zero initialization, move
6581 missing brace warning to respect zero initialization.
6583 2014-06-05 Marek Polacek <polacek@redhat.com>
6586 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6588 2014-06-05 Marek Polacek <polacek@redhat.com>
6591 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6592 on the left hand side operand of a comparison.
6594 2014-06-05 Marek Polacek <polacek@redhat.com>
6597 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6598 Print note only if the warning was printed.
6600 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6603 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6606 2014-06-03 Marek Polacek <polacek@redhat.com>
6609 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6611 * c-tree.h (c_start_case): Update.
6612 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6613 switch condition has boolean value.
6615 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
6617 * c-decl.c: Include builtins.h.
6618 * c-parser.c: Likewise.
6620 2014-05-27 Marek Polacek <polacek@redhat.com>
6623 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6624 error and warning calls to error_at and warning_at. Pass location of
6625 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6626 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6627 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6629 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6632 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6633 function parameters.
6635 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
6637 * c-decl.c (merge_decls): Preserve symtab node pointers.
6638 (duplicate_decls): Free new decl.
6640 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6642 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6645 * c-parser.c (c_parser_omp_target): Return bool values.
6647 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6649 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6650 num_teams_loc variable to num_thread_limit_loc.
6652 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6654 * c-array-notation.c (expand_array_notations): Use void_node
6655 instead of void_zero_node.
6657 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6659 * c-decl.c (finish_struct): Adjust.
6660 (finish_enum): Likewise.
6662 (record_inline_static): Likewise.
6663 (push_scope): Likewise.
6664 (make_label): Likewise.
6665 (lookup_label_for_goto): Likewise.
6666 (finish_struct): Likewise.
6667 (finish_enum): Likewise.
6668 (store_parm_decls): Likewise.
6669 (c_push_function_context): Likewise.
6670 * c-lang.h: Remove usage of variable_size gty attribute.
6671 * c-parser.c (c_parse_init): Adjust.
6672 (c_parse_file): Likewise.
6674 2014-05-13 Marek Polacek <polacek@redhat.com>
6677 * c-typeck.c (convert_for_assignment): Pass location to
6678 WARN_FOR_ASSIGNMENT instead of input_location.
6680 2014-05-10 Marek Polacek <polacek@redhat.com>
6682 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6683 maybe_warn_string_init.
6684 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6685 maybe_warn_string_init.
6686 * c-tree.h (maybe_warn_string_init): Update declaration.
6687 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6688 Call pedwarn_init with loc instead of with input_location.
6689 (digest_init): Pass init_loc to maybe_warn_string_init.
6690 (pop_init_level): Call pedwarn_init with loc instead of with
6692 (set_init_index): Likewise.
6693 (process_init_element): Likewise.
6695 2014-05-09 Marek Polacek <polacek@redhat.com>
6698 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6699 (c_parser_initelt): Pass location to set_init_label. Pass array index
6700 location to set_init_index.
6701 * c-tree.h (push_init_level): Update declaration.
6702 (pop_init_level): Likewise.
6703 (set_init_index): Likewise.
6704 (set_init_label): Likewise.
6705 * c-typeck.c (error_init): Add location parameter. Call error_at
6707 (digest_init): Pass init_loc to error_init.
6708 (really_start_incremental_init):
6709 (push_init_level): Add location parameter. Pass loc to pop_init_level
6711 (pop_init_level): Likewise.
6712 (set_designator): Add location parameter. Pass loc to pop_init_level,
6713 push_init_level, and error_init.
6714 (set_init_index): Add location parameter. Pass loc to error_init and
6716 (set_init_label): Likewise.
6717 (output_init_element): Pass loc to error_init.
6718 (process_init_element): Pass loc to error_init, pop_init_level,
6719 pedwarn_init, and push_init_level.
6721 2014-05-09 Marek Polacek <polacek@redhat.com>
6724 * c-parser.c (c_parser_attributes): Parse the arguments as an
6725 expression-list if the attribute takes identifier.
6727 2014-05-08 Marek Polacek <polacek@redhat.com>
6730 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6733 2014-05-08 Marek Polacek <polacek@redhat.com>
6736 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6739 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6740 Mike Stump <mikestump@comcast.net>
6741 Richard Sandiford <rdsandiford@googlemail.com>
6743 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6744 (finish_enum): Use wide-int interfaces.
6745 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6746 * c-typeck.c (build_c_cast): Likewise.
6747 (set_nonincremental_init_from_string): Likewise.
6748 (c_tree_equal): Likewise.
6750 2014-05-02 Marek Polacek <polacek@redhat.com>
6753 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6754 Return size_one_node when the type is not complete.
6755 (pointer_diff): Remove comment.
6756 (build_unary_op): Improve error messages.
6758 2014-05-02 Marek Polacek <polacek@redhat.com>
6760 * c-typeck.c (c_finish_return): Separate warning_at calls.
6762 2014-05-02 Marek Polacek <polacek@redhat.com>
6764 * c-tree.h (error_init): Remove declaration.
6765 (pedwarn_init): Likewise.
6766 * c-typeck.c (error_init): Make static and move above.
6767 (pedwarn_init): Likewise.
6768 (warning_init): Move above.
6769 (maybe_warn_string_init): Likewise.
6771 2014-05-01 Jeff Law <law@redhat.com>
6775 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6776 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6779 2014-05-02 Marek Polacek <polacek@redhat.com>
6782 * c-typeck.c (push_init_level): Set constructor_designated to
6783 p->designated for structures.
6785 2014-05-01 Marek Polacek <polacek@redhat.com>
6788 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6789 function-definition has an attribute after the declarator.
6791 2014-05-01 Marek Polacek <polacek@redhat.com>
6794 * c-typeck.c (warning_init): Add location_t parameter. Call
6795 warning_at instead of warning.
6796 (push_init_level): Pass input_location to warning_init.
6797 (add_pending_init): Add location_t parameter. Pass loc to
6799 (set_nonincremental_init): Pass input_location to add_pending_init.
6800 (set_nonincremental_init_from_string): Likewise.
6801 (output_init_element): Pass loc to warning_init and to
6804 2014-05-01 Marek Polacek <polacek@redhat.com>
6807 * c-typeck.c (c_finish_return): Distinguish between label and variable
6808 when warning about returning local address.
6810 2014-05-01 Marek Polacek <polacek@redhat.com>
6813 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6816 2014-05-01 Marek Polacek <polacek@redhat.com>
6819 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6820 instead of 0 to WARN_FOR_QUALIFIERS.
6822 2014-05-01 Marek Polacek <polacek@redhat.com>
6825 * c-typeck.c (default_conversion): Use better location for
6828 2014-04-30 Marek Polacek <polacek@redhat.com>
6830 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6831 also when SANITIZE_FLOAT_DIVIDE is on.
6833 2014-04-30 Marek Polacek <polacek@redhat.com>
6836 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6837 and pedwarn_init. Use loc insted of input_location.
6839 2014-04-30 Marek Polacek <polacek@redhat.com>
6842 * c-typeck.c (build_binary_op): Use location when warning about
6845 2014-04-25 Marek Polacek <polacek@redhat.com>
6848 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6849 always_inline/noinline and hot/cold attributes.
6851 2014-04-25 Marek Polacek <polacek@redhat.com>
6854 * c-parser.c (c_parser_initelt): Pass input_location to
6855 process_init_element.
6856 (c_parser_initval): Pass loc to process_init_element.
6857 * c-tree.h (process_init_element): Adjust declaration.
6858 * c-typeck.c (push_init_level): Pass input_location to
6859 process_init_element.
6860 (pop_init_level): Likewise.
6861 (set_designator): Likewise.
6862 (output_init_element): Add location_t parameter. Pass loc to
6864 (output_pending_init_elements): Pass input_location to
6865 output_init_element.
6866 (process_init_element): Add location_t parameter. Pass loc to
6867 output_init_element.
6869 2014-04-24 Jakub Jelinek <jakub@redhat.com>
6871 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6872 atomic-clause, allow comma in between atomic-clause and
6875 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6878 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6879 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6881 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6884 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6885 create_tmp_var instead build_decl for creating temps.
6886 (build_array_notation_expr): Likewise.
6887 (fix_conditional_array_notations_1): Likewise.
6888 (fix_array_notation_expr): Likewise.
6889 (fix_array_notation_call_expr): Likewise.
6891 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6894 * c-tree.h (c_build_function_call_vec): New prototype.
6895 * c-typeck.c (build_function_call_vec): Don't call
6896 resolve_overloaded_builtin here.
6897 (c_build_function_call_vec): New wrapper function around
6898 build_function_call_vec. Call resolve_overloaded_builtin here.
6899 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6900 Call c_build_function_call_vec instead of build_function_call_vec.
6901 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6902 * c-decl.c (finish_decl): Likewise.
6904 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6907 * c-typeck.c: Use correct format string in cast-qual warning
6909 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6911 * c-decl.c (c_decl_attributes): Use
6912 lang_hooks.types.omp_mappable_type.
6913 * c-typeck.c (c_finish_omp_clauses): Likewise.
6915 2014-03-06 Marek Polacek <polacek@redhat.com>
6918 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6919 of checking tree code.
6921 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6923 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6924 (c_parser_parameter_declaration): Likewise.
6926 2014-02-19 Marek Polacek <polacek@redhat.com>
6929 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6930 Call mark_exp_read on exp.value.
6931 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6932 TREE_ADDRESSABLE on old instead of val.
6933 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6935 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6937 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6938 C_EXPR_APPEND by vec_safe_push.
6939 * c-tree.h (C_EXPR_APPEND): Remove.
6941 2014-01-31 Marek Polacek <polacek@redhat.com>
6944 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6945 build_function_call_vec.
6946 (build_function_call): Likewise.
6947 (build_atomic_assign): Likewise.
6948 (build_function_call_vec): Add arg_loc parameter. Use it.
6949 (convert_arguments): Likewise.
6950 (convert_for_assignment): Rename rhs_loc to expr_loc.
6951 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6952 (c_parser_objc_keywordexpr): Likewise.
6953 (c_parser_postfix_expression_after_primary): Call
6954 build_function_call_vec with expr_loc rather than op_loc.
6955 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6956 build_function_call_vec.
6957 (c_parser_expr_list): Add locations parameter. Fill it with locations
6958 of function arguments.
6959 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6961 2014-01-30 Marek Polacek <polacek@redhat.com>
6964 * c-typeck.c (build_function_call_vec): Use loc parameter.
6965 (convert_arguments): Add location parameter. Use it.
6966 (ep_convert_and_check): Likewise.
6967 (build_atomic_assign): Adjust convert_for_assignment call.
6968 (build_modify_expr): Likewise.
6969 (digest_init): Likewise.
6970 (c_finish_return): Likewise.
6971 (build_conditional_expr): Adjust ep_convert_and_check calls.
6972 (convert_for_assignment): Add rhs_loc parameter. Use it.
6973 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6976 2014-01-30 Richard Biener <rguenther@suse.de>
6979 * c-typeck.c (build_function_call_vec): Do not replace calls
6980 to a function via an incompatible type with a runtime abort.
6982 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6984 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6985 flag_enable_cilkplus with flag_cilkplus.
6986 (c_parser_direct_declarator_inner): Likewise.
6987 (c_parser_attribute_any_word): Likewise.
6988 (c_parser_attributes): Likewise.
6989 (c_parser_compound_statement): Likewise.
6990 (c_parser_statement_after_labels): Likewise.
6991 (c_parser_if_statement): Likewise.
6992 (c_parser_switch_statement): Likewise.
6993 (c_parser_do_statement): Likewise.
6994 (c_parser_for_statement): Likewise.
6995 (c_parser_unary_expression): Likewise.
6996 (c_parser_postfix_expression): Likewise.
6997 (c_parser_postfix_expression_after_primary): Likewise.
6998 (c_parser_postfix_expression_after_primary): Likewise.
6999 (c_parser_omp_clause_name): Likewise.
7000 (c_finish_omp_declare_simd): Likewise.
7001 (c_parser_cilk_verify_simd): Likewise.
7002 * c-typeck.c (build_array_ref): Likewise.
7003 (build_function_call_vec): Likewise.
7004 (convert_arguments): Likewise.
7005 (build_compound_expr): Likewise.
7006 (c_finish_return): Likewise.
7007 (c_finish_if_stmt): Likewise.
7008 (c_finish_loop): Likewise.
7009 (build_binary_op): Likewise.
7011 2014-01-23 Marek Polacek <polacek@redhat.com>
7014 * c-typeck.c (parser_build_binary_op): Use location instead of
7016 (build_binary_op): Pass location to shorten_compare.
7018 2014-01-23 Marek Polacek <polacek@redhat.com>
7021 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7024 2014-01-23 Marek Polacek <polacek@redhat.com>
7027 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7028 of a comma expression.
7029 (emit_side_effect_warnings): Likewise.
7031 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7034 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7035 function to use walk_tree and moved a lot of its functionality to
7036 expand_array_notations.
7037 (expand_array_notations): New function.
7039 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7041 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7042 attribute an attribute without value.
7044 2014-01-23 Jakub Jelinek <jakub@redhat.com>
7047 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7048 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7050 2014-01-22 Marek Polacek <polacek@redhat.com>
7053 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7054 of remove_c_maybe_const_expr on op1 and op2.
7056 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7059 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7060 effects, preevaluate rhs using SAVE_EXPR first.
7062 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7065 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7066 statements with if-elseif statements.
7068 2014-01-06 Marek Polacek <polacek@redhat.com>
7071 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7072 defined bit-field types only in ISO C.
7074 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7076 Update copyright years
7078 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7080 * c-array-notation.c: Use the standard form for the copyright notice.
7082 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7084 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7085 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7086 field in parser is not empty. If not-empty, call the function
7087 c_parser_finish_omp_declare_simd.
7088 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7089 between SIMD-enabled functions and #pragma simd. Added new parameter.
7090 (c_parser_cilk_all_clauses): Modified the usage of the function
7091 c_parser_cilk_clause_vectorlength as mentioned above.
7092 (c_parser_cilk_simd_fn_vector_attrs): New function.
7093 (c_finish_cilk_simd_fn_tokens): Likewise.
7094 (is_cilkplus_vector_p): Likewise.
7095 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7096 "nomask," and "mask" strings in clause name.
7097 (c_parser_omp_all_clauses): Added 3 new case statements:
7098 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7099 PRAGMA_CILK_CLAUSE_NOMASK.
7100 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7101 check for vector attribute and if so call the function
7102 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7103 called the function c_finish_cilk_simd_fn_tokens.
7104 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7105 parser field is non-empty. If so, parse them as you would parse
7106 the omp declare simd pragma.
7107 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7108 Added a check when step is a parameter and flag it as error.
7109 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7110 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7113 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7115 * c-parser.c (c_parser_omp_parallel): Fix description.
7117 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7119 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7120 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7121 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7122 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7124 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7127 * c-parser.c (c_parser_alignas_specifier): Use
7128 c_sizeof_or_alignof_type instead of c_alignof.
7129 (c_parser_alignof_expression): Likewise, with min_alignof
7130 parameter depending on alignof spelling used.
7132 2013-12-04 Marek Polacek <polacek@redhat.com>
7135 * c-decl.c (start_function): Don't warn for missing prototype for
7138 2013-12-03 Marek Polacek <polacek@redhat.com>
7141 * c-decl.c (build_compound_literal): Allow compound literals with
7142 empty initial value.
7144 2013-12-02 Joseph Myers <joseph@codesourcery.com>
7147 * c-typeck.c (build_modify_expr): Diagnose assignment to
7148 expression with array type.
7150 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7153 * c-typeck.c (process_init_element): Do not treat a string as
7154 initializing a whole array when used with a designator for an
7157 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7160 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7161 an inline function following a static declaration.
7163 2013-11-28 Jakub Jelinek <jakub@redhat.com>
7166 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7167 to p_name before calling c_parser_omp_teams instead of after.
7168 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7169 argument. Remove unused p_name variable.
7171 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
7172 Jakub Jelinek <jakub@redhat.com>
7174 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7175 external_scope is NULL.
7177 2013-11-27 Tom de Vries <tom@codesourcery.com>
7178 Marc Glisse <marc.glisse@inria.fr>
7181 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7183 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7185 * c-typeck.c: Add required include files from gimple.h.
7187 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7189 * c-decl.c (define_label, shadow_tag_warned)
7190 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7191 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7192 (declspecs_add_type): Remove use of in_system_header macro.
7193 * c-parser.c (c_parser_unary_expression): Likewise.
7194 * c-typeck.c (store_init_value, process_init_element)
7195 (c_start_case): Likewise.
7197 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7200 * c-parser.c (c_parser_set_source_position_from_token): Remove
7201 reference to in_system_header from comment.
7203 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7205 * c-decl.c (grokdeclarator): Update comment to refer to
7206 tree_to_[su]hwi rather than tree_low_cst.
7208 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7210 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7211 tree_to_uhwi throughout.
7213 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7215 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7218 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7220 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7223 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7225 * c-parser.c (c_parser_cilk_simd): New.
7226 (c_parser_cilk_verify_simd): New.
7227 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7228 (c_parser_omp_for_loop): Add case for NE_EXPR.
7229 Set c_break_label for CILK_SIMD.
7230 (c_parser_cilk_clause_vectorlength): New.
7231 (c_parser_cilk_clause_linear): New.
7232 (c_parser_cilk_clause_name): New.
7233 (c_parser_cilk_all_clauses): New.
7234 * c-typeck.c (build_unary_op): Pass location argument to
7236 (build_modify_expr): Same.
7237 (build_asm_expr): Same.
7238 (c_finish_bc_stmt): Error on break/continue in loops.
7240 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7242 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7244 2013-11-14 Diego Novillo <dnovillo@google.com>
7246 * c-decl.c: Include print-tree.h.
7247 Include stor-layout.h.
7250 Include stringpool.h.
7251 * c-lang.c: Include fold-const.h.
7252 * c-parser.c: Include stringpool.h.
7254 Include stor-layout.h.
7256 Include trans-mem.h.
7257 * c-typeck.c: Include stor-layout.h.
7258 Include trans-mem.h.
7262 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7264 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7265 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7267 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7268 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7270 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7271 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7272 (c_parser_declarator, c_parser_direct_declarator_inner)
7273 (c_parser_parameter_declaration, c_parser_type_name): All callers
7275 (c_parser_declaration_or_fndef): Handle declarations with type
7276 determined from the initializer.
7278 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7280 * c-typeck.c: Include gimplify.h.
7282 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7284 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7285 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7287 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7288 or _Thread_local as appropriate in diagnostics.
7289 (build_null_declspecs): Initialize ret->thread_gnu_p.
7290 (declspecs_add_scspec): Handle either __thread or _Thread_local
7291 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7292 pedantic. Do not disallow _Thread_local extern and _Thread_local
7295 2013-11-07 Joseph Myers <joseph@codesourcery.com>
7296 Andrew MacLeod <amacleod@redhat.com>
7298 * c-aux-info.c (gen_type): Handle atomic qualifier.
7299 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7300 qualifiers when compating types.
7301 (shadow_tag_warned): Handle atomic_p in declspecs.
7302 (quals_from_declspecs): Likewise.
7303 (start_decl): Use c_type_promotes_to when promoting argument
7305 (grokdeclarator): Handle _Atomic.
7306 (get_parm_info): Diagnose any qualifier on "void" as only
7308 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7309 comparing types. Use c_type_promotes_to when promoting argument
7311 (finish_function): Use c_type_promotes_to when promoting argument
7313 (build_null_declspecs): Handle atomic_p in declspecs.
7314 (declspecs_add_qual): Handle RID_ATOMIC.
7315 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7316 (c_token_starts_declspecs): Handle RID_ATOMIC.
7317 (c_parser_declspecs): Handle atomic type specifiers and
7319 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7320 from types of expressions with atomic type.
7321 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7322 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7323 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7324 (c_parser_statement_after_labels, c_parser_switch_statement)
7325 (c_parser_for_statement, c_parser_expr_no_commas)
7326 (c_parser_conditional_expression, c_parser_binary_expression)
7327 (c_parser_cast_expression, c_parser_unary_expression)
7328 (c_parser_postfix_expression)
7329 (c_parser_postfix_expression_after_primary, c_parser_expression):
7330 Use convert_lvalue_to_rvalue.
7331 (c_parser_expression_conv, c_parser_expr_list): Document
7332 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7333 (c_parser_objc_synchronized_statement): Use
7334 convert_lvalue_to_rvalue.
7335 (c_parser_objc_selector): Handle RID_ATOMIC.
7336 (c_parser_objc_receiver, c_parser_array_notation): Use
7337 convert_lvalue_to_rvalue.
7338 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7339 _Atomic (type-name).
7340 (struct c_declspecs): Add atomic_p field.
7341 (convert_lvalue_to_rvalue): Declare.
7342 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7343 corresponding atomic types.
7344 (qualify_type): Don't add _Atomic qualifiers from second argument.
7345 (comp_target_types): Do not allow _Atomic mismatches.
7346 (type_lists_compatible_p): Do not remove atomic qualifiers when
7348 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7349 (build_atomic_assign): New functions.
7350 (build_unary_op): Use build_atomic_assign for atomic increment and
7352 (build_conditional_expr): Do not treat _Atomic void as a qualified
7354 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7355 (find_anonymous_field_with_type, convert_to_anonymous_field)
7356 (convert_for_assignment): Do not remove atomic qualifiers when
7358 (digest_init): Do not accept initialization of arrays of atomic
7359 elements by string constants.
7360 (build_asm_expr): Use convert_lvalue_to_rvalue.
7361 (build_binary_op): Do not treat _Atomic void as a qualified
7364 2013-11-06 DJ Delorie <dj@redhat.com>
7366 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7367 both explicit and builtin, print the location of the explicit one.
7369 2013-11-05 Tobias Burnus <burnus@net-b.de>
7371 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7372 c_parser_omp_distribute, c_parser_omp_teams,
7373 c_parser_omp_target, c_parser_omp_declare): Handle
7376 2013-11-03 Marek Polacek <polacek@redhat.com>
7378 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7380 2013-11-01 Jakub Jelinek <jakub@redhat.com>
7382 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7383 check_dup_generic at the end, unless remove is true.
7384 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7386 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7388 2013-10-31 Jakub Jelinek <jakub@redhat.com>
7390 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7391 with decl that is not pointer nor array.
7393 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7395 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7396 a spawning function is found.
7397 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7398 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7399 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7400 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7402 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7403 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7405 (c_finish_return): Added a check to reject _Cilk_spawn in return
7407 (build_cilk_spawn): New function.
7408 (build_cilk_sync): Likewise.
7409 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
7411 2013-10-27 Tobias Burnus <burnus@net-b.de>
7414 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7415 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7416 (c_parser_statement_after_labels): Update calls.
7418 2013-10-24 Tobias Burnus <burnus@net-b.de>
7421 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7422 Handle PRAGMA_IVDEP.
7423 (c_parser_statement_after_labels): Update call.
7425 2013-10-24 Marek Polacek <polacek@redhat.com>
7427 * c-parser.c (c_parser_struct_declaration): Add a comment.
7428 (c_parser_declarator): Don't allow _Alignas here.
7430 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
7432 * c-parser.c: Include omp-low.h.
7433 * c-typeck.c: Likewise.
7435 2013-10-17 Marek Polacek <polacek@redhat.com>
7438 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7439 Document syntax of the array-declarator.
7440 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7442 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7443 (c_parser_struct_declaration): Likewise.
7444 (c_parser_declarator): Likewise.
7445 (c_parser_direct_declarator_inner): Likewise.
7446 (c_parser_parameter_declaration): Likewise.
7447 (c_parser_type_name): Likewise.
7449 2013-10-11 Jakub Jelinek <jakub@redhat.com>
7451 * c-lang.h (current_omp_declare_target_attribute): New extern
7453 * c-parser.c: Include c-lang.h.
7454 (struct c_parser): Change tokens to c_token *.
7455 Add tokens_buf field. Change tokens_avail type to unsigned int.
7456 (c_parser_consume_token): If parser->tokens isn't
7457 &parser->tokens_buf[0], increment parser->tokens.
7458 (c_parser_consume_pragma): Likewise.
7459 (enum pragma_context): Add pragma_struct and pragma_param.
7460 (c_parser_external_declaration): Adjust
7461 c_parser_declaration_or_fndef caller.
7462 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7463 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7464 Adjust recursive call.
7465 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7467 (c_parser_parameter_declaration): Use pragma_param instead of
7469 (c_parser_compound_statement_nostart, c_parser_label,
7470 c_parser_for_statement): Adjust
7471 c_parser_declaration_or_fndef callers.
7472 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7473 it through to c_parser_conditional_expression.
7474 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7475 pass it through to c_parser_binary_expression. Adjust recursive
7477 (c_parser_binary_expression): Remove prec argument, add
7478 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7479 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7480 binop matches it, use build2 instead of parser_build_binary_op.
7481 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7482 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7483 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7484 Handle pragma_struct and pragma_param the same as pragma_external.
7485 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7486 (c_parser_omp_variable_list): Parse array sections for
7487 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7488 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7489 (c_parser_omp_clause_reduction): Handle user defined reductions.
7490 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7491 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7492 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7493 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7494 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7495 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7496 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7497 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7498 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7499 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7500 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7501 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7502 (c_parser_omp_for_loop): Add CODE argument, pass it through
7503 to c_finish_omp_for. Change last argument to cclauses,
7504 and adjust uses to grab parallel clauses from the array of all
7505 the split clauses. Adjust c_parser_binary_expression,
7506 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7507 (omp_split_clauses): New function.
7508 (c_parser_omp_simd): New function.
7509 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7510 Allow the function to be called also when parsing combined constructs,
7511 and call c_parser_omp_simd when parsing for simd.
7512 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7513 #pragma omp section, require exactly one structured-block instead of
7514 sequence of statements.
7515 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7516 Allow the function to be called also when parsing combined constructs.
7517 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7518 Allow the function to be called also when parsing combined
7520 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7521 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7522 c_parser_omp_teams, c_parser_omp_target_data,
7523 c_parser_omp_target_update, c_parser_omp_target,
7524 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7525 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7526 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7527 (c_parser_omp_construct): Add p_name and mask vars. Handle
7528 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7529 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7530 and c_parser_omp_sections callers.
7531 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7532 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7533 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7534 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7535 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7537 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7538 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7539 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7540 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7541 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7542 * c-typeck.c: Include tree-inline.h.
7543 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7544 handle_omp_array_sections_1, handle_omp_array_sections,
7545 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7546 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7547 user defined reductions.
7548 (c_tree_equal): New function.
7549 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7550 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7551 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7552 c_check_omp_declare_reduction_r): New prototypes.
7553 * c-decl.c (current_omp_declare_target_attribute): New variable.
7554 (c_decl_attributes): New function.
7555 (start_decl, start_function): Use it instead of decl_attributes.
7556 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7557 c_omp_reduction_decl, c_omp_reduction_lookup,
7558 c_check_omp_declare_reduction_r): New functions.
7560 2013-09-25 Tom Tromey <tromey@redhat.com>
7562 * Make-lang.in (c/gccspec.o): Remove.
7563 (CFLAGS-c/gccspec.o): New variable.
7564 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7565 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7566 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7568 2013-09-25 Tom Tromey <tromey@redhat.com>
7570 * Make-lang.in (c/gccspec.o): Don't use subshell.
7572 2013-09-18 Marek Polacek <polacek@redhat.com>
7575 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7576 Remove unnecessary check.
7578 2013-09-18 Marek Polacek <polacek@redhat.com>
7581 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7582 no_sanitize_undefined attribute.
7584 2013-09-13 Kai Tietz <ktietz@redhat.com>
7587 * c-decl.c (c_builtin_function_ext_scope): Remove
7588 wrong assumption that it is never called on prexisting
7591 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7593 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7595 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7597 * c-objc-common.c (c_tree_printer): Tidy.
7599 2013-08-30 Marek Polacek <polacek@redhat.com>
7601 * c-typeck.c (build_binary_op): Add division by zero and shift
7604 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
7605 Joseph Myers <joseph@codesourcery.com>
7608 * c-typeck.c (c_common_type): Prefer double_type_node over
7609 other REAL_TYPE types with the same precision.
7610 (convert_arguments): Likewise.
7612 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7614 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7615 (c_initialize_diagnostics): Call a destructor for the early printer.
7617 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7619 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7620 printer initialization.
7622 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
7625 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7626 check for truth values.
7627 (expand_array_notation_exprs): Added truth values case. Removed an
7628 unwanted else. Added for-loop to walk through subtrees in default
7631 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7633 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7635 2013-07-23 Joseph Myers <joseph@codesourcery.com>
7637 * c-parser.c (struct c_generic_association): Fix typo.
7639 2013-07-23 Tom Tromey <tromey@redhat.com>
7640 Joseph Myers <joseph@codesourcery.com>
7642 * c-parser.c (struct c_generic_association): New.
7643 (c_generic_association_d): New typedef.
7644 (c_parser_generic_selection): New function.
7645 (c_parser_postfix_expression): Handle RID_GENERIC.
7647 2013-07-13 Jason Merrill <jason@redhat.com>
7650 * c-decl.c (finish_struct): Check for too-large class.
7652 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7655 * c-typeck.c (set_init_index): When folding, check for index overflow.
7657 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7659 * c-parser.c (c_parser_array_notation): Removed rejection of array
7660 notations in an array of function pointers.
7662 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7664 * c-array-notation.c (make_triplet_val_inv): New function.
7665 (create_cmp_incr): Likewise.
7666 (create_array_refs): Likewise.
7667 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7668 Also modularized common parts between functions and called the function.
7669 (build_array_notation_expr): Likewise.
7670 (fix_conditional_array_notations_1): Likewise.
7671 (fix_array_notation_expr): Likewise.
7672 (fix_array_notation_call_expr): Likewise.
7674 2013-06-18 Marek Polacek <polacek@redhat.com>
7677 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7679 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7681 * c-array-notation.c (build_array_notation_expr): Reject array notation
7682 mismatch between LHS and RHS even inside a call_expr. Also, removed
7683 a couple while statements that were dead code.
7685 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7687 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7688 excessive precision expressions in function parameters. Also removed
7689 couple unwanted while statements.
7691 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7693 * c-array-notation.c (expand_array_notation_exprs): Added
7694 ARRAY_NOTATION_REF case.
7696 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7698 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7699 function to c-family/array-notation-common.c.
7700 (is_cilkplus_reduce_builtin): Likewise.
7701 (find_rank): Likewise.
7702 (extract_array_notation_exprs): Likewise.
7703 (replace_array_notations): Likewise.
7704 (find_inv_trees): Likewise.
7705 (replace_inv_trees): Likewise.
7706 (contains_array_notation_expr): Likewise.
7707 (find_correct_array_notation_type): Likewise.
7708 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7709 (struct inv_list): Moved this to c-family/array-notation-common.c.
7710 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7712 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7714 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7715 reduction functions outside the for-loop. Added a check if the fundecl
7716 is non-NULL. Finally, removed an unwanted if-statement, and made the
7719 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7721 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7722 condition of the if-statement matches the rank of else-block and then-
7723 block when array notations are used.
7724 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7725 expression after the entire function body is parsed.
7726 (c_parser_expr_no_commas): Delayed creating array notation expressions
7727 to the end of function parsing.
7728 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7729 whole if-statement instead of just the condition.
7730 (expand_array_notation_exprs): Added MODIFY_EXPR case.
7732 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7735 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7736 array to NULL_TREE if they are unused. Also added a check for the
7737 field to be NULL before its fields are used in future.
7739 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7742 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7743 (build_array_notation_expr): Likewise.
7745 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7747 * c-typeck.c (build_array_ref): Added a check to see if array's
7748 index is greater than one. If true, then emit an error.
7749 (build_function_call_vec): Exclude error reporting and checking
7750 for builtin array-notation functions.
7751 (convert_arguments): Likewise.
7752 (c_finish_return): Added a check for array notations as a return
7753 expression. If true, then emit an error.
7754 (c_finish_loop): Added a check for array notations in a loop
7755 condition. If true then emit an error.
7756 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7757 (build_binary_op): Added a check for array notation expr inside
7758 op1 and op0. If present, we call another function to find correct
7760 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7761 * c-parser.c (c_parser_compound_statement): Check if array
7762 notation code is used in tree, if so, then transform them into
7764 (c_parser_expr_no_commas): Check if array notation is used in LHS
7765 or RHS, if so, then build array notation expression instead of
7767 (c_parser_postfix_expression_after_primary): Added a check for
7768 colon(s) after square braces, if so then handle it like an array
7769 notation. Also, break up array notations in unary op if found.
7770 (c_parser_direct_declarator_inner): Added a check for array
7772 (c_parser_compound_statement): Added a check for array notation in
7773 a stmt. If one is present, then expand array notation expr.
7774 (c_parser_if_statement): Likewise.
7775 (c_parser_switch_statement): Added a check for array notations in
7776 a switch statement's condition. If true, then output an error.
7777 (c_parser_while_statement): Similarly, but for a while.
7778 (c_parser_do_statement): Similarly, but for a do-while.
7779 (c_parser_for_statement): Similarly, but for a for-loop.
7780 (c_parser_unary_expression): Check if array notation is used in a
7781 pre-increment or pre-decrement expression. If true, then expand
7783 (c_parser_array_notation): New function.
7784 * c-array-notation.c: New file.
7785 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7787 2013-05-23 Mike Stump <mikestump@comcast.net>
7789 * c-typeck.c (convert_for_assignment): Handle references to memory
7792 2013-05-16 Jason Merrill <jason@redhat.com>
7794 * Make-lang.in (cc1$(exeext)): Use link mutex.
7796 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7798 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7799 to simply use OPT_Wpointer_arith.
7800 (build_unary_op): Likewise.
7802 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7805 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7806 argument. If set, or it temporarily for parsing of the first
7807 argument into force_folding_builtin_constant_p.
7808 (c_parser_postfix_expression): Adjust callers.
7810 2013-03-21 Richard Biener <rguenther@suse.de>
7812 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7813 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7815 2013-02-12 Marek Polacek <polacek@redhat.com>
7818 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7821 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7824 * c-typeck.c (set_nonincremental_init_from_string): If
7825 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7827 (process_init_element): Likewise.
7829 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7832 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7833 argument, don't call default_function_array_conversion
7834 nor c_fully_fold here.
7835 (c_parser_asm_statement): Adjust callers.
7836 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7837 and outputs here, and call default_function_array_conversion
7838 on inputs that don't need to be addressable.
7840 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7843 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7844 warning require that both c_common_unsigned_type as well as
7845 c_common_signed_type is the same for both mvl and mvr types.
7847 2012-11-16 Diego Novillo <dnovillo@google.com>
7849 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7851 * c-common.c: Use new vec API in vec.h.
7852 * c-common.h: Likewise.
7853 * c-gimplify.c: Likewise.
7854 * c-pragma.c: Likewise.
7855 * c-pretty-print.c: Likewise.
7856 * c-pretty-print.h: Likewise.
7857 * c-semantics.c: Likewise.
7858 * c-decl.c: Likewise.
7859 * c-parser.c: Likewise.
7860 * c-tree.h: Likewise.
7861 * c-typeck.c: Likewise.
7863 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7866 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7868 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7871 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7872 shadows a function, unless the variable is a function or a
7873 pointer-to-function.
7875 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7878 * c-parser.c (struct c_tree_loc_pair): Removed.
7879 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7880 add location_t * and tree * arguments, fill in array of 3
7881 sizeof_arg trees and corresponding locs.
7882 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7883 c_parser_expr_list callers.
7884 (c_parser_postfix_expression_after_primary): Likewise. Pass
7885 array of 3 sizeof_arg trees and locs (corresponding to first
7886 3 arguments) to sizeof_pointer_memaccess_warning.
7888 2012-10-09 Lawrence Crowl <crowl@google.com>
7890 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7891 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7894 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7897 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7900 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7903 * c-typeck.c: Include c-common.h.
7904 (enum stv_conv): Moved to c-common.h.
7905 (scalar_to_vector): Moved to c-common.c.
7906 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7907 * Make-lang.in: c-typeck.c depends on c-common.h.
7909 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7911 * c-decl.c (c_write_global_declarations): Fix handling of
7914 2012-09-30 Sharad Singhai <singhai@google.com>
7916 * c-decl.c (c_write_global_declarations): Use a different method
7917 to determine if the dump has ben initialized.
7919 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7922 * c-typeck.c (c_cast_expr): When casting to a type requiring
7923 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7926 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7929 * c-typeck.c (build_unary_op): Pass original argument of
7930 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7931 any C_MAYBE_CONST_EXPR, if it has integer operands.
7932 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7933 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7934 to c_objc_common_truthvalue_conversion, then remove any
7935 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7936 c_objc_common_truthvalue_conversion not
7937 c_common_truthvalue_conversion.
7938 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7939 call note_integer_operands for arguments with integer operands
7940 that are not integer constants.
7942 2012-09-13 Jakub Jelinek <jakub@redhat.com>
7945 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7946 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7948 2012-08-31 Jakub Jelinek <jakub@redhat.com>
7951 * c-convert.c (convert): Don't call fold_convert_loc if
7952 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7953 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7954 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7956 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7959 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7960 for nested and empty_ok arguments in the call to
7961 c_parser_declaration_or_fndef.
7963 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7965 * c-tree.h (c_last_sizeof_arg): Declare.
7966 * c-parser.c (struct c_tree_loc_pair): New type.
7967 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7969 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7970 (c_parser_postfix_expression_after_primary): Likewise. Call
7971 sizeof_pointer_memaccess_warning if needed.
7972 (sizeof_ptr_memacc_comptypes): New function.
7973 * c-typeck.c (c_last_sizeof_arg): New global variable.
7974 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7976 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7978 * c-lang.h (lang_decl): Add variable_size GTY option.
7980 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7982 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7983 * Make-lang.in: Fix dependencies.
7985 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7987 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7988 and add language Makefile hooks.
7989 * config-lang.in: New file.
7990 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7991 add the required "normal" config-lang.in rules.
7992 * c-lang.h: Moved from gcc/ to here.
7993 * c-tree.h: Likewise.
7994 * c-objc-common.c: Likewise.
7995 * c-objc-common.h: Likewise.
7996 * c-typeck.c: Likewise.
7997 * c-convert.c: Likewise.
7998 * c-lang.c: Likewise.
7999 * c-aux-info.c: Likewise.
8000 * c-errors.c: Likewise.
8001 * gccspec.c: Likewise.
8002 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8003 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8005 Copyright (C) 2012-2021 Free Software Foundation, Inc.
8007 Copying and distribution of this file, with or without modification,
8008 are permitted in any medium without royalty provided the copyright
8009 notice and this notice are preserved.