1 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
3 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
4 * c-parser.c: Likewise.
6 2021-12-09 Jakub Jelinek <jakub@redhat.com>
9 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
10 to resort_data.new_value.
12 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
14 * c-parser.c (struct omp_dim): New struct type for use inside
15 c_parser_omp_variable_list.
16 (c_parser_omp_variable_list): Allow multiple levels of array and
17 component accesses in array section base-pointer expression.
18 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
19 c_parser_omp_var_list_parens.
20 (c_parser_omp_clause_from): Likewise.
21 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
22 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
24 (c_finish_omp_clauses): Extend allowed ranged of expressions
25 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
27 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
30 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
31 call to c_parser_omp_variable_list to 'true'.
32 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
34 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
36 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
38 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
39 orphan loop" checking.
41 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
42 Thomas Schwinge <thomas@codesourcery.com>
44 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
45 OpenACC gang reductions.
47 2021-11-30 Richard Biener <rguenther@suse.de>
49 * gimple-parser.c (c_parser_gimple_postfix_expression):
50 avoid unreachable code after break.
52 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
55 * Make-lang.in: Use ETAGS variable in TAGS target.
57 2021-11-29 Richard Biener <rguenther@suse.de>
59 * c-typeck.c (c_tree_equal): Remove unreachable return.
60 * c-parser.c (get_matching_symbol): Likewise.
62 2021-11-23 Jakub Jelinek <jakub@redhat.com>
64 * c-typeck.c (c_clone_omp_udr): Don't initialize
65 id.transform_lang_insert_block.
67 2021-11-19 Martin Sebor <msebor@redhat.com>
71 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
72 code resulting from macro expansion.
74 2021-11-19 Martin Liska <mliska@suse.cz>
77 2021-11-19 Martin Liska <mliska@suse.cz>
79 * c-parser.c (add_debug_begin_stmt): Use option directly.
81 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
83 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
84 * c-parser.c (c_parser_postfix_expression): Likewise.
86 2021-11-18 Martin Liska <mliska@suse.cz>
88 * c-parser.c (add_debug_begin_stmt): Use option directly.
90 2021-11-17 Martin Sebor <msebor@redhat.com>
93 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
94 bounds before deciding if they're constant.
96 2021-11-15 Jakub Jelinek <jakub@redhat.com>
98 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
99 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
101 2021-11-11 Jakub Jelinek <jakub@redhat.com>
103 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
104 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
105 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
106 OMP_CLAUSE_NUM_TEAMS_EXPR.
107 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
108 combined target teams even lower-bound expression.
110 2021-11-11 Richard Biener <rguenther@suse.de>
112 * gimple-parser.c: Shuffle bitmap.h include.
114 2021-11-03 Joseph Myers <joseph@codesourcery.com>
117 * c-convert.c (c_convert): New function, based on convert.
118 (convert): Make into wrapper of c_convert.
119 (convert_init): New function.
120 * c-typeck.c (enum impl_conv): Add ic_init_const.
121 (convert_for_assignment): Handle ic_init_const like ic_init. Add
122 new argument to convert_and_check call.
123 (digest_init): Pass ic_init_const to convert_for_assignment for
124 initializers required to be constant.
126 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
128 * c-tree.h (c_simulate_record_decl): Declare.
129 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
130 * c-decl.c (c_simulate_record_decl): New function.
132 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
135 * Make-lang.in: Add dummy c.install-dvi target.
137 2021-10-15 Richard Biener <rguenther@suse.de>
141 (c_parser_gimple_postfix_expression_after_primary): Check
142 for a pointer do be dereferenced by ->.
144 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
146 * c-parser.c (c_finish_omp_declare_variant): Change call from
147 c_omp_check_context_selector to omp_check_context_selector. Change
148 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
150 2021-10-09 Jakub Jelinek <jakub@redhat.com>
152 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
153 (c_parser_omp_scan_loop_body): Use it.
154 (c_parser_omp_sections_scope): Likewise.
156 2021-10-07 Richard Biener <rguenther@suse.de>
158 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
160 2021-10-05 Richard Biener <rguenther@suse.de>
163 * gimple-parser.c (c_parser_gimple_postfix_expression):
164 Accept more address _Literals.
166 2021-10-04 Marek Polacek <polacek@redhat.com>
169 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
171 2021-10-01 Martin Sebor <msebor@redhat.com>
174 * c-typeck.c (maybe_warn_for_null_address): New function.
175 (build_binary_op): Call it.
177 2021-10-01 Jakub Jelinek <jakub@redhat.com>
178 Richard Biener <rguenther@suse.de>
181 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
182 for division even for SANITIZE_SI_OVERFLOW.
184 2021-10-01 Jakub Jelinek <jakub@redhat.com>
186 * c-parser.c (c_parser_omp_clause_order): Set
187 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
189 2021-09-28 Andrew Pinski <apinski@marvell.com>
192 * c-parser.c (c_parser_statement_after_labels): Pass
193 the c_expr instead of the tree to c_finish_goto_ptr.
194 * c-typeck.c (c_finish_goto_ptr): Change the second
195 argument type to c_expr.
196 * c-tree.h (c_finish_goto_ptr): Likewise.
197 Error out if the expression was not of a pointer type.
199 2021-09-22 Jakub Jelinek <jakub@redhat.com>
201 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
204 2021-09-18 Jakub Jelinek <jakub@redhat.com>
206 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
207 and reproducible modifiers.
208 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
210 2021-09-18 Jakub Jelinek <jakub@redhat.com>
212 * c-parser.c (c_parser_omp_clause_default): Handle private and
213 firstprivate arguments, adjust diagnostics on unknown argument.
215 2021-09-17 Jakub Jelinek <jakub@redhat.com>
217 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
220 2021-09-10 Jakub Jelinek <jakub@redhat.com>
222 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
223 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
224 don't call build_conditional_expr, instead build a COND_EXPR directly.
225 (c_parser_binary_expression): Avoid calling parser_build_binary_op
226 if omp_atomic_lhs even in more cases for >, < or ==.
227 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
228 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
229 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
230 * c-typeck.c (build_binary_op): For flag_openmp only handle
233 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
235 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
238 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
240 * c-decl.c (enum deprecated_states): Add unavailable state.
241 (merge_decls): Copy unavailability.
242 (quals_from_declspecs): Handle unavailable case.
243 (start_decl): Amend the logic handling suppression of nested
244 deprecation states to include unavailability.
245 (smallest_type_quals_location): Amend comment.
246 (grokdeclarator): Handle the unavailable deprecation state.
247 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
248 * c-tree.h (struct c_declspecs): Add unavailable_p.
249 * c-typeck.c (build_component_ref): Handle unavailability.
250 (build_external_ref): Likewise.
252 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
253 Joseph Myers <joseph@codesourcery.com>
256 * c-decl.c (duplicate_decls): On significant mismatches, mark the
257 types of both (non-function) decls as error_mark_node, so that the
258 middle-end can see the code is malformed.
259 (free_attr_access_data): Don't process if the type has been set to
262 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
264 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
265 and 'ancestor' in 'target device' clauses.
267 2021-08-23 Jakub Jelinek <jakub@redhat.com>
269 * c-parser.c (c_parser_omp_clause_num_tasks,
270 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
272 2021-08-22 Martin Uecker <muecker@gwdg.de>
275 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
276 for pointers to arrays with qualifiers.
277 (build_conditional_expr): For C23 don't lose qualifiers for pointers
278 to arrays when the other pointer is a void pointer. Update warnings.
279 (convert_for_assignment): Update warnings for C2X when converting from
280 void* with qualifiers to a pointer to array with the same qualifiers.
282 2021-08-20 Jakub Jelinek <jakub@redhat.com>
284 * c-parser.c (c_parser_omp_error): New function.
285 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
287 2021-08-20 Jakub Jelinek <jakub@redhat.com>
289 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
290 comma at the end of list.
291 (c_parser_omp_requires): Likewise.
293 2021-08-19 Jakub Jelinek <jakub@redhat.com>
295 * c-parser.c (c_parser_omp_requires): Don't call
296 c_parser_peek_2nd_token and optionally consume token if current
297 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
299 2021-08-18 Jakub Jelinek <jakub@redhat.com>
301 * c-parser.c (c_parser_omp_nothing): New function.
302 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
304 2021-08-18 Jakub Jelinek <jakub@redhat.com>
306 * c-parser.c (c_parser_statement_after_labels): Add restart label
307 near the start of the function. If c_parser_pragma returns false,
309 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
310 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
311 return what c_parser_omp_declare returned. Return true instead of
312 false after emitting errors that the directive is not allowed in
314 (c_parser_omp_ordered): Return true instead of
315 false after emitting errors that the directive is not allowed in
317 (c_parser_omp_target_update): Likewise.
318 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
319 Change return type from tree to bool, return false if the
320 directive should be ignored in pragma_stmt contexts.
321 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
322 return their result directly.
323 (c_parser_omp_cancellation_point): Change return type from void to
324 bool, return false if the directive should be ignored in pragma_stmt
326 (c_parser_omp_declare): Likewise.
328 2021-08-17 Jakub Jelinek <jakub@redhat.com>
330 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
331 (c_parser_omp_scope): New function.
332 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
334 2021-08-12 Jakub Jelinek <jakub@redhat.com>
336 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
337 (c_parser_omp_clause_filter): New function.
338 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
339 (OMP_MASKED_CLAUSE_MASK): Define.
340 (c_parser_omp_masked): New function.
341 (c_parser_omp_parallel): Handle parallel masked.
342 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
343 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
345 2021-08-12 Martin Uecker <muecker@gwdg.de>
349 * c-typeck.c (c_expr_sizeof_type): Evaluate
350 size expressions for structs of variable size.
352 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
354 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
355 'primary' as alias for 'master'.
357 2021-08-10 Martin Uecker <muecker@gwdg.de>
360 * c-typeck.c (c_expr_sizeof_expr): Evaluate
361 size expressions for structs of variable size.
363 2021-08-06 Tamar Christina <tamar.christina@arm.com>
365 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
366 * c-tree.h (c_simulate_enum_decl): Likewise.
368 2021-08-06 Martin Sebor <msebor@redhat.com>
370 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
371 vec arguments to by-reference.
372 (c_finish_omp_declare_simd): Same.
373 (c_parser_compound_statement_nostart): Same.
374 (c_parser_for_statement): Same.
375 (c_parser_objc_methodprotolist): Same.
376 (c_parser_oacc_routine): Same.
377 (c_parser_omp_for_loop): Same.
378 (c_parser_omp_declare_simd): Same.
380 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
381 Joseph Myers <joseph@codesourcery.com>
382 Cesar Philippidis <cesar@codesourcery.com>
384 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
385 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
386 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
387 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
389 2021-07-20 Martin Sebor <msebor@redhat.com>
391 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
393 * c-typeck.c (c_build_function_call_vec): Same.
395 2021-07-15 Martin Sebor <msebor@redhat.com>
399 * c-decl.c (get_parm_array_spec): Strip nops.
401 2021-07-06 Martin Sebor <msebor@redhat.com>
403 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
405 2021-07-02 Jakub Jelinek <jakub@redhat.com>
408 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
409 appears before a CPP_NAME.
411 2021-06-25 Martin Sebor <msebor@redhat.com>
413 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
414 warning_suppressed_p, suppress_warning, and copy_no_warning.
415 (diagnose_mismatched_decls): Same.
416 (duplicate_decls): Same.
417 (grokdeclarator): Same.
418 (finish_function): Same.
419 (c_write_global_declarations_1): Same.
420 * c-fold.c (c_fully_fold_internal): Same.
421 * c-parser.c (c_parser_expr_no_commas): Same.
422 (c_parser_postfix_expression): Same.
423 * c-typeck.c (array_to_pointer_conversion): Same.
424 (function_to_pointer_conversion): Same.
425 (default_function_array_conversion): Same.
426 (convert_lvalue_to_rvalue): Same.
427 (default_conversion): Same.
428 (build_indirect_ref): Same.
429 (build_function_call_vec): Same.
430 (build_atomic_assign): Same.
431 (build_unary_op): Same.
432 (c_finish_return): Same.
433 (emit_side_effect_warnings): Same.
434 (c_finish_stmt_expr): Same.
435 (c_omp_clause_copy_ctor): Same.
437 2021-06-24 Jakub Jelinek <jakub@redhat.com>
440 * c-parser.c (c_parser_has_attribute_expression): Set source range for
443 2021-06-24 Jakub Jelinek <jakub@redhat.com>
446 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
449 2021-06-24 Jakub Jelinek <jakub@redhat.com>
451 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
452 C_ORT_OMP for clauses on target construct.
453 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
454 (c_parser_omp_target): For non-combined target add
455 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
456 C_ORT_OMP_TARGET to c_finish_omp_clauses.
457 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
458 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
459 never present on C_ORT_*DECLARE_SIMD.
460 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
461 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
462 corresponding map clauses.
464 2021-06-21 Jakub Jelinek <jakub@redhat.com>
467 * c-typeck.c (c_mark_addressable): Diagnose trying to make
468 bit-fields addressable.
470 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
472 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
475 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
478 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
479 var in the error case.
481 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
484 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
485 spot built-in functions.
487 2021-06-06 Jakub Jelinek <jakub@redhat.com>
490 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
491 even when target is combined with other constructs.
493 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
496 * c-decl.c (finish_struct): Fix thinko in previous change.
497 * c-typeck.c (convert_for_assignment): Do not warn on pointer
498 assignment and initialization for storage order purposes if the
499 RHS is a call to a DECL_IS_MALLOC function.
501 2021-06-04 Martin Sebor <msebor@redhat.com>
504 * c-objc-common.c (print_type): Handle erroneous types.
506 2021-06-03 Jakub Jelinek <jakub@redhat.com>
509 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
510 after depend only cases.
512 2021-05-31 Richard Biener <rguenther@suse.de>
515 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
516 * c-parser.c (c_parser_postfix_expression): Likewise.
518 2021-05-28 Richard Biener <rguenther@suse.de>
521 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
522 invalid if conditions.
524 2021-05-28 Jakub Jelinek <jakub@redhat.com>
527 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
528 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
529 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
530 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
531 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
532 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
533 if present in map_head, map_field_head or map_firstprivate_head
536 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
538 * c-parser.c (c_parser_omp_clause_affinity): New.
539 (c_parser_omp_clause_name, c_parser_omp_variable_list,
540 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
541 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
542 c_finish_omp_clauses): Likewise.
544 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
547 * c-decl.c (finish_struct): Warn for a union containing an aggregate
548 field with a differing scalar storage order.
550 2021-05-21 Jakub Jelinek <jakub@redhat.com>
553 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
554 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
555 if a decl is mentioned both in map clause and in such firstprivate
556 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
558 2021-05-19 Jakub Jelinek <jakub@redhat.com>
561 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
562 master when combined with taskloop.
563 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
564 parallel master when not combined with taskloop.
566 2021-05-18 Richard Biener <rguenther@suse.de>
569 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
570 Diagnose calls to non-functions.
571 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
573 2021-05-17 Richard Biener <rguenther@suse.de>
576 * gimple-parser.c (c_parser_gimple_label): Avoid building
577 a GIMPLE label with NULL label decl.
579 2021-05-13 Martin Sebor <msebor@redhat.com>
582 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
584 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
586 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
589 2021-05-10 Martin Liska <mliska@suse.cz>
591 * c-aux-info.c (affix_data_type): Use startswith
592 function instead of strncmp.
593 * c-typeck.c (build_function_call_vec): Likewise.
594 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
596 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
598 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
599 on the address of a pointer field in a record with reverse SSO.
601 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
603 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
604 for || and && reductions.
606 2021-04-29 Joseph Myers <joseph@codesourcery.com>
608 * c-typeck.c (function_types_compatible_p): For C2X, treat
609 unprototyped function as compatible with non-variadic prototyped
610 function even if some argument types are changed by the default
613 2021-04-15 Martin Sebor <msebor@redhat.com>
617 * c-decl.c (pushdecl): Always propagate type attribute.
619 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
622 * c-typeck.c (c_common_type): Do not drop attributes that
623 affect type identity.
625 2021-04-10 Jakub Jelinek <jakub@redhat.com>
628 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
631 2021-03-25 Jakub Jelinek <jakub@redhat.com>
634 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
637 2021-03-19 Jakub Jelinek <jakub@redhat.com>
640 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
641 with modifycode NOP_EXPR produces and mark the _Atomic var as read
643 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
644 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
645 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
647 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
650 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
651 ensure that the varpool node is marked as offloadable.
653 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
656 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
658 2021-02-24 Martin Sebor <msebor@redhat.com>
661 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
663 2021-02-18 Jakub Jelinek <jakub@redhat.com>
666 * c-typeck.c (c_finish_return): Don't wrap retval into
667 EXCESS_PRECISION_EXPR in functions that return void.
669 2021-02-11 Marek Polacek <polacek@redhat.com>
671 * c-parser.c (c_parser_if_statement): Use vec_free.
673 2021-02-04 Martin Sebor <msebor@redhat.com>
676 * c-decl.c (locate_old_decl): Add type to diagnostic output.
677 (diagnose_mismatched_decls): Same.
678 (start_function): Introduce temporaries for better readability.
679 * c-typeck.c (comptypes_internal): Only consider complete enum
680 types in comparisons with integers.
682 2021-02-01 Martin Sebor <msebor@redhat.com>
685 * c-decl.c (free_attr_access_data): New function.
686 (c_parse_final_cleanups): Call free_attr_access_data.
688 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
690 * c-parser.c (c_parser_omp_clause_detach): New.
691 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
692 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
693 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
694 clause. Prevent use of detach with mergeable and overriding the
695 data sharing mode of the event handle.
697 2021-01-15 Jakub Jelinek <jakub@redhat.com>
699 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
700 unqualified element type and then call c_build_qualified_type on the
703 2021-01-07 Richard Biener <rguenther@suse.de>
705 * gimple-parser.c (c_parser_gimple_compound_statement): Only
706 reallocate loop array if it is too small.
708 2020-12-16 Martin Uecker <muecker@gwdg.de>
711 * c-typeck.c (build_modify_expr): Drop qualifiers.
713 2020-12-16 Martin Uecker <muecker@gwdg.de>
716 * c-parser.c (c_parser_expression): Look into
717 nop expression when marking expressions as read.
719 2020-12-14 Martin Liska <mliska@suse.cz>
722 * c-typeck.c (pointer_diff): Do not emit a top-level
724 (build_binary_op): Likewise.
726 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
728 * c-parser.c (c_parser_omp_allocate): New.
729 (c_parser_omp_construct): Call it.
731 2020-12-09 Richard Biener <rguenther@suse.de>
734 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
737 2020-12-07 Martin Uecker <muecker@gwdg.de>
740 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
741 that drops qualifiers to the end of the function.
743 2020-11-26 Martin Uecker <muecker@gwdg.de>
747 * c-parser.c (c_parser_declaration_or_fndef): Remove
748 redundant code to drop qualifiers of _Atomic types for __auto_type.
749 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
750 types for __typeof__.
752 2020-11-24 Jakub Jelinek <jakub@redhat.com>
755 * c-parser.c (c_parser_binary_expression): For omp atomic binary
756 expressions, use make_node instead of build2 to avoid checking build2
759 2020-11-23 Joseph Myers <joseph@codesourcery.com>
762 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
763 for comparisons of complete and incomplete pointers.
765 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
767 * c-aux-info.c (gen_type): Support opaque types.
769 2020-11-20 Martin Sebor <msebor@redhat.com>
772 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
774 2020-11-20 Jakub Jelinek <jakub@redhat.com>
777 * Make-lang.in (c.serial): Change from goal to a variable.
778 (.PHONY): Drop c.serial.
780 2020-11-20 Martin Uecker <muecker@gwdg.de>
782 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
784 2020-11-19 Jakub Jelinek <jakub@redhat.com>
787 * c-decl.c (get_parm_array_spec): Bail out of nelts is
790 2020-11-18 Jakub Jelinek <jakub@redhat.com>
792 * Make-lang.in (c.serial): New goal.
793 (.PHONY): Add c.serial c.prev.
794 (cc1$(exeext)): Call LINK_PROGRESS.
796 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
798 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
800 * c-typeck.c (build_asm_expr): Remove an assert checking output
801 absence for asm goto.
803 2020-11-13 Jakub Jelinek <jakub@redhat.com>
805 * c-typeck.c (c_finish_omp_clauses): Don't clear
806 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
808 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
811 * c-parser.c (c_parser_objc_class_definition): Pass the
812 location of the class name to the interface declaration.
814 2020-11-10 Strager Neds <strager.nds@gmail.com>
816 * c-decl.c (merge_decls): Use new overload of
817 set_decl_section_name.
819 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
821 * c-parser.c (c_parser_omp_target_data): Add use of
822 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
823 handled map clause kind.
824 (c_parser_omp_target_enter_data): Likewise.
825 (c_parser_omp_target_exit_data): Likewise.
826 (c_parser_omp_target): Likewise.
827 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
828 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
829 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
830 same struct field access to co-exist on OpenMP construct.
832 2020-11-07 Martin Uecker <muecker@gwdg.de>
834 * c-parser.c (c_parser_label): Implement mixing of labels and code.
835 (c_parser_all_labels): Likewise.
837 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
839 * c-parser.c (c_parser_objc_at_property_declaration):
840 Improve parsing fidelity. Associate better location info
841 with @property attributes. Clean up the interface to
842 objc_add_property_declaration ().
844 2020-11-06 Nathan Sidwell <nathan@acm.org>
846 * c-decl.c (diagnose_mismatched_decls): Rename
847 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
848 (warn_if_shadowing, implicitly_declare, names_builtin_p)
849 (collect_source_refs): Likewise.
850 * c-typeck.c (inform_declaration, inform_for_arg)
851 (convert_for_assignment): Likewise.
853 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
855 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
857 (c_parser_omp_construct): Update call.
859 2020-11-04 Jakub Jelinek <jakub@redhat.com>
862 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
863 find underlying decl to clear in the aligned_head bitmap.
865 2020-11-04 Joseph Myers <joseph@codesourcery.com>
867 * c-decl.c (handle_nodiscard_attribute): New.
868 (std_attribute_table): Add nodiscard.
869 * c-parser.c (c_parser_std_attribute): Expect argument to
870 nodiscard attribute to be a string. Do not special-case ignoring
872 * c-typeck.c (maybe_warn_nodiscard): New.
873 (build_compound_expr, emit_side_effect_warnings): Call
874 maybe_warn_nodiscard.
875 (c_process_expr_stmt, c_finish_stmt_expr): Also call
876 emit_side_effect_warnings if warn_unused_result.
878 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
880 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
882 (finish_init): Likewise.
883 (pop_init_level): Likewise.
885 2020-10-28 Joseph Myers <joseph@codesourcery.com>
887 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
888 error_at for omitted parameter name.
890 2020-10-28 Jakub Jelinek <jakub@redhat.com>
892 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
893 (c_parser_omp_clause_allocate): New function.
894 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
895 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
896 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
897 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
898 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
899 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
900 PRAGMA_OMP_CLAUSE_ALLOCATE.
901 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
903 2020-10-27 Joseph Myers <joseph@codesourcery.com>
905 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
908 2020-10-23 Marek Polacek <polacek@redhat.com>
911 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
912 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
913 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
914 * c-tree.h (char_type_p): Declare.
915 * c-typeck.c (char_type_p): No longer static.
917 2020-10-23 Martin Sebor <msebor@redhat.com>
920 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
922 2020-09-19 Martin Sebor <msebor@redhat.com>
925 * c-decl.c (lookup_last_decl): Define new function.
926 (c_decl_attributes): Call it.
927 (start_decl): Add argument and use it.
928 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
929 (get_parm_array_spec): Define new function.
930 (push_parm_decl): Call get_parm_array_spec.
931 (start_function): Call warn_parm_array_mismatch. Build attribute
932 access and add it to current function.
933 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
934 in forms of array parameters.
935 * c-tree.h (start_decl): Add argument.
937 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
939 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
942 (start_function): Adjust for above change.
943 (c_push_function_context, c_pop_function_context): Likewise.
944 * c-lang.h (struct language_function): Likewise.
945 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
946 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
948 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
949 (c_parser_switch_statement): Adjust break/switch context handling
950 and calls to renamed functions.
951 (c_parser_while_statement): Adjust break/switch context handling and
953 (c_parser_do_statement): Ditto, with DO_STMT respectively.
954 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
955 (c_parser_omp_for_loop): Adjust break/switch context handling.
956 * c-tree.h (c_break_label, c_cont_label): Delete.
957 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
958 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
959 (in_statement, switch_statement_break_seen_p): Declare.
960 (c_start_case, c_finish_case): Renamed to...
961 (c_start_switch, c_finish_switch).
962 (c_finish_bc_stmt): Adjust arguments.
963 * c-typeck.c (build_function_call_vec): Don't try to print
964 statements with %qE format.
965 (struct c_switch): Rename switch_expr field to switch_stmt.
966 Add break_stmt_seen_p field.
967 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
968 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
969 (do_case): Update for changes to struct c_switch.
970 (c_finish_case): Rename to c_finish_switch. Update for changes to
971 struct c_switch and change of representation from SWITCH_EXPR to
973 (c_finish_loop): Delete.
974 (c_finish_bc_stmt): Update to reflect changes to break/continue
975 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
976 of a GOTO_EXPR except for objc foreach loops.
978 2020-09-01 Jakub Jelinek <jakub@redhat.com>
981 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
984 2020-08-28 Martin Sebor <msebor@redhat.com>
987 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
990 2020-08-27 Martin Liska <mliska@suse.cz>
992 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
993 growth function to true.
995 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
998 * c-typeck.c (handle_omp_array_sections_1): Talk about
999 array function parameter in the error message.
1001 2020-08-18 Jakub Jelinek <jakub@redhat.com>
1004 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1005 to int, holding index of the match. Call mark_exp_read on the selector
1006 expression and on expressions other than the selected one.
1008 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1011 * c-typeck.c (process_init_element): Split test for whether to
1012 recurse into a record, union or array into...
1013 (initialize_elementwise_p): ...this new function. Don't recurse
1014 into a vector type if the initialization value is also a vector.
1016 2020-07-31 Richard Biener <rguenther@suse.de>
1019 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1020 Define to c_common_finalize_early_debug.
1022 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1024 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1025 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1026 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1028 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1031 * c-decl.c (finish_decl): Call target hook
1032 lower_local_decl_alignment to lower local decl alignment.
1034 2020-07-09 Julian Brown <julian@codesourcery.com>
1035 Thomas Schwinge <thomas@codesourcery.com>
1038 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1039 for standalone attach/detach clauses.
1041 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1043 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1044 set, warn for conversion between pointers that point to incompatible
1045 scalar storage orders.
1047 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1049 * c-parser.c (c_parser_statement_after_labels): Pass correct
1050 parameters to c_parser_do_statement.
1052 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1054 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1056 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1057 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1059 * c-tree.h (c_in_omp_for): Declare.
1060 * c-typeck.c (c_in_omp_for): Define.
1061 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1062 (digest_init): Likewise.
1063 (build_binary_op): Likewise.
1065 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1067 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1068 from kind by comma rather than colon.
1070 2020-06-05 Mark Wielaard <mark@klomp.org>
1072 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1073 an undeclared builtin, then add a fixit header hint, if found.
1074 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1075 warning_at about implicit builtin declaration type mismatch.
1077 2020-06-03 Mark Wielaard <mark@klomp.org>
1079 * c-parser.c (struct c_parser): Add seen_string_literal
1081 (c_parser_consume_token): Reset seen_string_literal.
1082 (c_parser_error_richloc): Add name_hint if seen_string_literal
1083 and next token is a CPP_NAME and we have a missing header
1084 suggestion for the name.
1085 (c_parser_string_literal): Set seen_string_literal.
1087 2020-06-03 Mark Wielaard <mark@klomp.org>
1089 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1090 scope with matching_parens after CPP_OPEN_PAREN.
1092 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1094 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1096 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1098 * Make-lang.in: Remove extra slash.
1100 2020-05-19 Martin Liska <mliska@suse.cz>
1102 * c-parser.c: Fix typo.
1104 2020-05-14 Jakub Jelinek <jakub@redhat.com>
1106 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1108 2020-05-07 Richard Biener <rguenther@suse.de>
1111 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1114 2020-04-30 Jakub Jelinek <jakub@redhat.com>
1117 * c-decl.c (set_labels_context_r): In addition to context-less
1118 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1119 parent function if any.
1120 (store_parm_decls): Adjust comment.
1122 2020-04-19 Jakub Jelinek <jakub@redhat.com>
1125 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1126 two CPP_COLON tokens.
1128 2020-04-17 Jakub Jelinek <jakub@redhat.com>
1131 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1134 2020-04-15 Jakub Jelinek <jakub@redhat.com>
1137 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1138 requires directive when not at file scope.
1140 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
1143 * c-decl.c (c_check_in_current_scope): New function.
1144 * c-tree.h (c_check_in_current_scope): Declare it.
1145 * c-parser.c (c_parser_oacc_declare): Add check that variables
1146 are declared in the same scope as the directive. Fix handling
1149 2020-04-07 Jakub Jelinek <jakub@redhat.com>
1152 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1153 if c_parser_omp_master succeeded.
1155 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1157 PR gcov-profile/94029
1159 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1160 the function_start_locus location. Don't do that afterwards for the
1161 __GIMPLE body parsing.
1163 2020-03-19 Jakub Jelinek <jakub@redhat.com>
1165 PR gcov-profile/94029
1166 * c-tree.h (finish_function): Add location_t argument defaulted to
1168 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1169 set it to the locus of closing } if non-NULL.
1170 (c_parser_compound_statement_nostart): Return locus of closing }.
1171 (c_parser_parse_rtl_body): Likewise.
1172 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1174 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1175 input_location to set function_end_locus.
1177 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1180 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1181 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1182 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1183 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1185 (finish_incomplete_vars): New function, moved from finish_struct. Use
1186 relayout_decl instead of layout_decl.
1187 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1188 being TYPE_VFIELD. Use finish_incomplete_vars.
1189 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1190 finish_incomplete_vars.
1191 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1192 also on ENUMERAL_TYPEs.
1194 2020-03-16 Jakub Jelinek <jakub@redhat.com>
1197 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1199 2020-03-13 Martin Sebor <msebor@redhat.com>
1202 * c-decl.c (builtin_structptr_type_count): New constant.
1203 (match_builtin_function_types): Reject decls that are incompatible
1204 in types pointed to by pointers.
1205 (diagnose_mismatched_decls): Adjust comments.
1207 2020-03-05 Joseph Myers <joseph@codesourcery.com>
1210 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1211 empty when initialized type is error_mark_node.
1212 (set_designator, process_init_element): Ignore initializers for
1213 elements of a variable-size type or of error_mark_node.
1215 2020-03-01 Martin Sebor <msebor@redhat.com>
1218 * c-decl.c (types_close_enough_to_match): New function.
1219 (match_builtin_function_types):
1220 (diagnose_mismatched_decls): Add missing inform call to a warning.
1222 2020-03-01 Martin Sebor <msebor@redhat.com>
1225 * c-typeck.c (build_functype_attribute_variant): New function.
1226 (composite_type): Call it.
1228 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1231 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1232 Rename last argument from probablity to probability.
1234 2020-02-13 Jakub Jelinek <jakub@redhat.com>
1237 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1238 *expr if it has side effects.
1240 2020-01-30 Jeff Law <law@redhat.com>
1243 * c-parser.c (c_parser_switch_statement): Make sure to request
1244 marking the switch expr as used.
1246 2020-01-22 Joseph Myers <joseph@codesourcery.com>
1249 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1250 argument with integer operands.
1252 2020-01-16 Kerem Kat <keremkat@gmail.com>
1255 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1256 to support 4 available tokens.
1258 2020-01-15 Joseph Myers <joseph@codesourcery.com>
1261 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1262 determine whether to set DECL_CONTEXT.
1264 2020-01-13 Joseph Myers <joseph@codesourcery.com>
1267 * c-typeck.c (build_c_cast): Check for expressions with integer
1268 operands that can occur in an unevaluated part of an integer
1269 constant expression and call note_integer_operands as needed.
1271 2019-01-08 Richard Biener <rguenther@suse.de>
1274 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1277 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1279 Update copyright years.
1281 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1283 * c-decl.c (collect_source_ref_cb): Delete.
1284 (for_each_global_decl): Rename into...
1285 (collect_source_refs): ...this. Call collect_source_ref directly.
1286 (c_parse_final_cleanups): Always call collect_source_ref on the main
1289 2019-12-19 Julian Brown <julian@codesourcery.com>
1290 Cesar Philippidis <cesar@codesourcery.com>
1292 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1294 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1295 Allow deref (->) in variable lists if true.
1296 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1297 Pass to c_parser_omp_variable_list.
1298 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1299 call to c_parser_omp_variable_list.
1300 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1301 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1302 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1303 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1304 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1305 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1306 and detach. Support deref.
1307 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1308 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1309 (c_oacc_check_attachments): New function.
1310 (c_finish_omp_clauses): Check attach/detach arguments for being
1311 pointers using above. Support deref.
1313 2019-12-19 Julian Brown <julian@codesourcery.com>
1314 Maciej W. Rozycki <macro@codesourcery.com>
1315 Tobias Burnus <tobias@codesourcery.com>
1316 Thomas Schwinge <thomas@codesourcery.com>
1318 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1319 (c_parser_oacc_data_clause): Likewise.
1320 (c_parser_oacc_all_clauses): Likewise.
1321 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1322 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1323 PRAGMA_OACC_CLAUSE_NO_CREATE.
1324 * c-typeck.c (handle_omp_array_sections): Support
1327 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1329 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1330 Replace label_text ctor calls.
1332 2019-12-04 Joseph Myers <joseph@codesourcery.com>
1336 * c-typeck.c (convert_lvalue_to_rvalue): Call
1337 require_complete_type for arguments not of void types.
1338 (build_indirect_ref): Do not diagnose dereferencing pointers to
1340 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1342 2019-12-03 Joseph Myers <joseph@codesourcery.com>
1345 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1346 old-style parameter definitions.
1348 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1352 * c-decl.c (flexible_array_type_p): Move to common code.
1354 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1356 * c-decl.c (start_decl): Allow initialization of variables whose
1357 size is a POLY_INT_CST.
1358 (finish_decl): Use verify_type_context to check whether the target
1359 allows variables with a particular type to have static or thread-local
1360 storage duration. Don't raise a second error if such variables do
1361 not have a constant size.
1362 (grokdeclarator): Use verify_type_context to check whether the
1363 target allows fields or array elements to have a particular type.
1364 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1365 the target allows pointer difference for the types involved.
1366 (build_unary_op): Likewise for pointer increment and decrement.
1368 2019-11-29 Joseph Myers <joseph@codesourcery.com>
1370 * c-parser.c (struct c_parser): Add members raw_tokens and
1372 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1373 using previously-lexed raw tokens.
1374 (c_parser_peek_nth_token_raw)
1375 (c_parser_check_balanced_raw_token_sequence): New functions.
1376 (c_parser_nth_token_starts_std_attributes): Use
1377 c_parser_check_balanced_raw_token_sequence for Objective-C.
1379 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1382 * c-decl.c (finish_declspecs): Use int instead of decimal
1383 floating-point types if decimal floating-point not supported.
1385 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1387 * c-tree.h (struct c_declarator): Use a structure for id member.
1388 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1389 declarators at the start, not when handling individual declarators
1390 later. Use u.id.id instead of u.id.
1391 (grokfield): Use u.id.id instead of u.id.
1392 (build_id_declarator): Set u.id.id and u.id.attrs.
1393 (finish_declspecs): Handle postfix attributes in case of typedef
1394 name or typeof used.
1395 * c-parser.c (c_parser_direct_declarator)
1396 (c_parser_direct_declarator_inner): Place declarator for
1397 attributes inside that for function or array, not outside. Set
1398 u.id.attrs for identifiers.
1399 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1400 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1403 2019-11-22 Jakub Jelinek <jakub@redhat.com>
1406 * c-decl.c (identifier_global_tag): Define.
1408 2019-11-20 Richard Biener <rguenther@suse.de>
1411 * c-decl.c (grokdeclarator): Prevent inlining of nested
1412 function with VLA arguments.
1414 2019-11-20 Joseph Myers <joseph@codesourcery.com>
1416 * c-decl.c (c_warn_type_attributes): New function.
1417 (groktypename, grokdeclarator, finish_declspecs): Call
1418 c_warn_type_attributes before applying attributes to types.
1419 * c-tree.h (c_warn_type_attributes): Declare.
1421 2019-11-19 Joseph Myers <joseph@codesourcery.com>
1423 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1424 standard attributes.
1425 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1426 pedwarn for unknown standard attributes and return error_mark_node
1429 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1431 * c-parser.c (c_parser_parse_rtl_body): Always call
1432 run_rtl_passes, even if startwith pass is not provided.
1434 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1436 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1437 duplicate standard attributes.
1439 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1441 * c-decl.c (std_attribute_table): Add maybe_unused.
1443 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1445 * c-decl.c (std_attribute_table): Add fallthrough.
1446 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1447 attribute at top level.
1449 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1451 * c-decl.c (std_attribute_table): New.
1452 (c_init_decl_processing): Register attributes from
1453 std_attribute_table.
1454 * c-parser.c (c_parser_attribute_arguments): Add arguments
1455 require_string and allow_empty_args. All callers changed.
1456 (c_parser_std_attribute): Set require_string argument for
1457 "deprecated" attribute.
1459 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1461 * c-parser.c (c_parser_postfix_expression)
1462 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1463 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1465 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1467 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1468 of build_same_sized_truth_vector_type.
1469 (build_vec_cmp): Likewise.
1471 2019-11-14 Jakub Jelinek <jakub@redhat.com>
1473 * c-parser.c (c_parser_omp_context_selector): Don't require score
1474 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1477 * c-parser.c (c_parser_omp_context_selector): Rename
1478 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1479 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1480 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1481 and string literals.
1483 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1485 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1486 ctsk_tagfirstref_attrs.
1487 (struct c_declspecs): Update description of attrs. Add
1488 postfix_attrs and non_std_attrs_seen_p. Increase size of
1489 typespec_kind bit-field.
1490 (c_warn_unused_attributes): New declaration.
1491 (parser_xref_tag): Update prototype.
1492 * c-decl.c (c_warn_unused_attributes): New function.
1493 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1494 ctsk_tagref_attrs. Handle attribute declarations.
1495 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1496 (grokdeclarator): Handle standard attributes.
1497 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1498 attributes to incomplete type reference.
1499 (xref_tag): Update call to parser_xref_tag.
1500 (declspecs_add_addrspace, declspecs_add_type)
1501 (declspecs_add_scspec, declspecs_add_attrs): Set
1502 non_std_attrs_seen_p.
1503 (finish_declspecs): Apply postfix standard attributes to type.
1504 * c-parser.c (c_token_starts_declspecs)
1505 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1506 (c_parser_next_tokens_start_declaration): Update comments.
1507 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1508 parser->tokens[2] to parser->tokens[1].
1509 (c_parser_nth_token_starts_std_attributes)
1510 (c_parser_std_attribute_specifier_sequence): New functions.
1511 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1512 attrs. All callers changed. Handle standard attributes.
1513 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1514 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1515 All callers changed.
1516 (c_parser_declspecs): Add arguments start_std_attr_ok and
1517 end_std_attr_ok. All callers changed. Handle standard
1519 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1520 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1521 (c_parser_compound_statement_nostart, c_parser_all_labels)
1522 (c_parser_label, c_parser_statement, c_parser_for_statement):
1523 Handle standard attributes.
1524 * c-parser.h (c_parser_declspecs): Update prototype.
1525 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1528 2019-11-12 Martin Liska <mliska@suse.cz>
1530 * gimple-parser.c: Do not include params.h.
1532 2019-11-12 Martin Liska <mliska@suse.cz>
1534 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1535 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1538 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1539 Frederik Harwath <frederik@codesourcery.com>
1542 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1543 (c_parser_oacc_kernels_parallel): Rename function to...
1544 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1545 (c_parser_omp_construct): Update accordingly.
1548 2019-11-11 Jakub Jelinek <jakub@redhat.com>
1550 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1551 without corresponding end declare target.
1553 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1555 * c-convert.c (convert): Only handle vector conversions if one of
1556 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1558 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1559 vectors satisfy gnu_vector_type_p.
1560 (build_unary_op): Only allow unary operators to be applied to
1561 vectors if they satisfy gnu_vector_type_p.
1562 (digest_init): Only allow by-element initialization of vectors
1563 if they satisfy gnu_vector_type_p.
1564 (really_start_incremental_init): Likewise.
1565 (push_init_level): Likewise.
1566 (pop_init_level): Likewise.
1567 (process_init_element): Likewise.
1568 (build_binary_op): Only allow binary operators to be applied to
1569 vectors if they satisfy gnu_vector_type_p.
1571 2019-11-08 Joseph Myers <joseph@codesourcery.com>
1573 * c-decl.c (grokparms): Convert () in a function definition to
1575 (store_parm_decls_oldstyle): Pedwarn for C2x.
1576 (store_parm_decls): Update comment about () not generating a
1579 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1581 * c-parser.c (c_parser_attribute_arguments): New function.
1582 Factored out of c_parser_gnu_attribute.
1583 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1584 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1585 (c_parser_std_attribute_specifier): New functions.
1586 (c_parser_transaction_attributes): Use
1587 c_parser_std_attribute_specifier.
1589 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1591 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1592 lex_joined_string and translate_strings_p.
1593 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1595 (c_parser_string_literal): New function.
1596 (c_parser_static_assert_declaration_no_semi): Use
1597 c_parser_string_literal. Do not set lex_untranslated_string.
1598 (c_parser_asm_string_literal): Use c_parser_string_literal.
1599 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1600 (c_parser_gnu_attributes): Set and restore translate_strings_p
1601 instead of lex_untranslated_string.
1602 (c_parser_asm_statement): Do not set lex_untranslated_string.
1603 (c_parser_asm_operands): Likewise.
1604 (c_parser_has_attribute_expression): Set and restore
1605 translate_strings_p instead of lex_untranslated_string.
1606 (c_parser_postfix_expression): Use c_parser_string_literal.
1607 (pragma_lex): Likewise.
1608 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1609 (c_parse_file): Set translate_strings_p.
1610 * gimple-parser.c (c_parser_gimple_postfix_expression)
1611 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1612 * c-parser.c (c_parser_string_literal): Declare function.
1614 2019-11-02 Jakub Jelinek <jakub@redhat.com>
1616 * c-parser.c (c_finish_omp_declare_variant): Use
1617 omp_get_context_selector instead of c_omp_get_context_selector.
1619 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1621 * c-tree.h (c_simulate_enum_decl): Declare.
1622 * c-decl.c (c_simulate_enum_decl): New function.
1623 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1625 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1627 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1628 * c-decl.c (c_simulate_builtin_function_decl): New function.
1629 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1632 2019-10-28 Martin Sebor <msebor@redhat.com>
1635 * c-decl.c (names_builtin_p): Define a new function.
1637 2019-10-28 Richard Biener <rguenther@suse.de>
1640 * gimple-parser.c (c_parser_parse_gimple_body): Make
1641 current_bb the entry block initially to easier recover
1643 (c_parser_gimple_compound_statement): Adjust.
1645 2019-10-24 Jakub Jelinek <jakub@redhat.com>
1647 * c-parser.c (c_finish_omp_declare_variant): Use
1648 omp_context_selector_matches instead of
1649 c_omp_context_selector_matches.
1650 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1651 attribute in between declare target and end declare target
1654 2019-10-15 Joseph Myers <joseph@codesourcery.com>
1656 * c-parser.c (c_parser_attribute_any_word): Rename to
1657 c_parser_gnu_attribute_any_word. All callers changed.
1658 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1660 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1662 (c_parser_declaration_or_fndef, c_parser_declspecs)
1663 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1664 (c_parser_struct_declaration, c_parser_declarator)
1665 (c_parser_gnu_attribute, c_parser_compound_statement)
1666 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1667 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1668 attribute-related syntax productions.
1670 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1672 * c-objc-common.c (useful_aka_type_p): Replace with...
1673 (get_aka_type): ...this new function. Given the original type,
1674 decide which aka type to print (if any). Only look through typedefs
1675 if user_facing_original_type_p.
1676 (print_type): Update accordingly.
1678 2019-10-14 Jakub Jelinek <jakub@redhat.com>
1680 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1681 into int NESTED, if it is 2, diagnose missing commas in between
1683 (c_parser_omp_context_selector): Pass 2 as last argument to
1684 c_parser_omp_all_clauses.
1686 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1688 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1689 For simd properties, put them directly into TREE_VALUE.
1690 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1691 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1692 add "omp declare variant base" attribute rather than
1693 "omp declare variant".
1695 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1697 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1699 2019-10-10 Jakub Jelinek <jakub@redhat.com>
1701 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1702 true, terminate processing on closing paren and don't skip to end of
1704 (c_parser_omp_declare_simd): Handle also declare variant.
1705 (omp_construct_selectors, omp_device_selectors,
1706 omp_implementation_selectors, omp_user_selectors): New variables.
1707 (c_parser_omp_context_selector,
1708 c_parser_omp_context_selector_specification,
1709 c_finish_omp_declare_variant): New functions.
1710 (c_finish_omp_declare_simd): Handle both declare simd and
1712 (c_parser_omp_declare): Handle declare variant.
1714 2019-10-02 Joseph Myers <joseph@codesourcery.com>
1716 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1719 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1721 * c-objc-common.c (useful_aka_type_p): New function.
1722 (print_type): Use it to decide whether an aka type is worth printing.
1724 2019-09-27 Jakub Jelinek <jakub@redhat.com>
1727 * c-parser.c (c_parser_predefined_identifier): New function.
1728 (c_parser_postfix_expression): Use it.
1729 (c_parser_omp_variable_list): Parse predefined identifiers.
1730 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1731 in shared and firstprivate clauses, even when they are predetermined
1734 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1736 * c-typeck.c (build_function_call_vec): Take the original function
1737 decl as an optional final parameter. Pass all built-in calls to
1738 check_builtin_function_arguments.
1740 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1743 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1744 of identifiers in the external scope only for variables and functions.
1746 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1749 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1751 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1754 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1755 after determining that the first token is not
1756 PRAGMA_GCC_PCH_PREPROCESS.
1758 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1760 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1761 FUNCTION_DECL to the right value in the presence of nested declarators.
1763 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1766 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1768 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1771 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1772 of a built_in_function.
1773 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1775 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1777 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1778 (c_parser_omp_clause_device_type): New function.
1779 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1780 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1781 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1782 diagnostics for declare target with clauses nested in clause-less
1783 declare target declaration-definition-seq.
1784 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1786 2019-08-09 Jakub Jelinek <jakub@redhat.com>
1788 * c-parser.c (check_no_duplicate_clause): Simplify using
1790 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1791 directive name modifiers.
1792 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1795 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1796 check_no_duplicate_clause call. Comment it out, instead emit a
1797 warning for duplicate dist_schedule clauses.
1799 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1801 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1803 2019-08-08 Jakub Jelinek <jakub@redhat.com>
1805 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1806 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1807 instead of generic_head to track duplicates.
1809 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1811 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1812 (c_parser_omp_clause_use_device_addr): New function.
1813 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1814 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1815 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1816 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1817 map or use_device_* clauses.
1818 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1819 in OpenMP, require pointer type rather than pointer or array type.
1820 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1822 2019-07-31 Jakub Jelinek <jakub@redhat.com>
1825 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1826 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1829 2019-07-25 Martin Liska <mliska@suse.cz>
1830 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1833 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1835 2019-07-25 Martin Liska <mliska@suse.cz>
1837 * c-decl.c (merge_decls): Use new macros
1838 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1840 2019-07-23 Richard Biener <rguenther@suse.de>
1842 PR tree-optimization/83518
1843 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1844 a CFG also rebuild cgraph edges.
1846 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1848 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1849 (c_parser_omp_clause_bind): New function.
1850 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1851 (OMP_LOOP_CLAUSE_MASK): Define.
1852 (c_parser_omp_loop): New function.
1853 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1854 loop combined with parallel or teams.
1855 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1856 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1858 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1861 * c-decl.c (finish_function): Check targetm.warn_func_return
1862 before issuing a -Wreturn-type warning.
1864 2019-07-12 Alexandre Oliva <oliva@adacore.com>
1866 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1867 (c_parser_compound_statement): Call it.
1869 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1871 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1872 (c_parser_omp_clause_order): New function.
1873 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1874 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1875 PRAGMA_OMP_CLAUSE_ORDER.
1876 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1878 2019-07-10 Richard Biener <rguenther@suse.de>
1880 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1881 _Literal (int *) &x for address literals.
1883 2019-07-09 Martin Sebor <msebor@redhat.com>
1886 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1888 (field_decl_cmp): Same.
1889 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1891 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1893 2019-07-09 Martin Sebor <msebor@redhat.com>
1896 * c-decl.c: Change class-key from class to struct and vice versa
1897 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1898 * gimple-parser.c: Same.
1900 2019-07-01 Richard Biener <rguenther@suse.de>
1902 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1903 _Literal (char *) &"foo" for address literals pointing to
1906 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1908 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1909 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1910 C incompatibility if alternate "__intN__" form is used.
1912 2019-06-24 Martin Sebor <msebor@redhat.com>
1914 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1916 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1918 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1919 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1920 (c_parser_omp_scan_loop_body): New function.
1921 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1922 inscan reduction clauses.
1923 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1924 non-inscan reductions on the same construct, or inscan reductions with
1925 ordered or schedule clauses, or inscan array reductions.
1927 2019-06-05 Martin Sebor <msebor@redhat.com>
1930 * c-typeck.c (c_finish_return): Only consider functions returning
1931 pointers as candidates for -Wreturn-local-addr.
1933 2019-06-05 Martin Sebor <msebor@redhat.com>
1935 * c-decl.c (start_decl): Adjust quoting and hyphenation
1937 (finish_decl): Same.
1938 (finish_enum): Same.
1939 (start_function): Same.
1940 (declspecs_add_type): Same.
1941 * c-parser.c (warn_for_abs): Same.
1942 * c-typeck.c (build_binary_op): Same.
1944 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1947 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1948 marked with an OpenACC 'routine' directive.
1951 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1952 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1955 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1956 clauses from "omp declare target" attribute.
1958 2019-05-16 Martin Sebor <msebor@redhat.com>
1960 * c-decl.c (start_decl): Quote keywords, operators, and
1961 types in diagnostics.
1962 (finish_decl): Same.
1963 * c-parser.c (c_parser_asm_statement): Same.
1964 (c_parser_conditional_expression): Same.
1965 (c_parser_transaction_cancel): Same.
1966 * c-typeck.c (c_common_type): Same.
1967 (build_conditional_expr): Same.
1968 (digest_init): Same.
1969 (process_init_element): Same.
1970 (build_binary_op): Same.
1972 2019-05-17 Richard Biener <rguenther@suse.de>
1974 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1975 (c_parser_gimple_unary_expression): Likewise.
1976 (c_parser_gimple_parentized_ternary_expression): New function.
1978 2019-05-16 Richard Biener <rguenther@suse.de>
1980 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1981 (c_parser_gimple_unary_expression): Likewise.
1983 2019-05-15 Richard Biener <rguenther@suse.de>
1985 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1988 2019-05-14 Richard Biener <rguenther@suse.de>
1990 * gimple-parser.c (c_parser_gimple_statement): Remove
1991 questionable auto-promotion to VIEW_CONVERT_EXPR.
1992 (c_parser_gimple_typespec): Split out from __MEM parsing.
1993 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1994 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1995 as __VIEW_CONVERT with -gimple.
1997 2019-05-09 Martin Liska <mliska@suse.cz>
1999 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2001 (c_parser_gimple_unary_expression): Parse also binary expression
2003 (c_parser_gimple_parentized_binary_expression): New function.
2005 2019-05-09 Martin Liska <mliska@suse.cz>
2007 * gimple-parser.c (struct gimple_parser): Add probability.
2008 for gimple_parser_edge.
2009 (gimple_parser::push_edge): Add new argument probability.
2010 (c_parser_gimple_parse_bb_spec): Parse also probability
2012 (c_parser_parse_gimple_body): Set edge probability.
2013 (c_parser_gimple_compound_statement): Consume token
2014 before calling c_parser_gimple_goto_stmt.
2016 (c_parser_gimple_statement): Pass new argument.
2017 (c_parser_gimple_goto_stmt): Likewise.
2018 (c_parser_gimple_if_stmt): Likewise.
2019 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2020 * c-parser.c (c_parser_declaration_or_fndef): Pass
2021 hot_bb_threshold argument.
2022 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2024 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2026 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2029 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2030 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2031 (c_parser_do_statement): Likewise.
2032 (c_parser_for_statement): Likewise. Formatting fixes.
2033 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2034 emit DEBUG_BEGIN_STMTs if needed.
2036 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2039 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2040 (c_start_case): Don't clear it.
2041 (do_case): Adjust c_add_case_label caller.
2042 (c_finish_case): Adjust c_do_switch_warnings caller.
2045 * c-decl.c (merge_decls): If remove is main variant and
2046 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2047 variant that has newdecl as TYPE_NAME if any.
2049 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2052 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2053 don't try to remove it from the variant list, but instead assert
2056 2019-04-01 Richard Biener <rguenther@suse.de>
2059 * c-tree.h (c_get_alias_set): Declare.
2060 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2061 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2062 as the underlying integer type.
2064 2019-03-19 Martin Sebor <msebor@redhat.com>
2066 PR tree-optimization/89688
2067 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2068 kinds of initializers.
2070 2019-03-19 Jakub Jelinek <jakub@redhat.com>
2073 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2074 return type even if quals_used is 0. Formatting fixes.
2076 2019-03-14 Richard Biener <rguenther@suse.de>
2078 * c-tree.h (enum c_declspec_il): New.
2079 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2081 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2082 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2083 (c_parser_declspecs): Adjust.
2084 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2085 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2087 (struct gimple_parser): New.
2088 (gimple_parser::push_edge): New method.
2089 (c_parser_gimple_parse_bb_spec): New helper.
2090 (c_parser_parse_gimple_body): Get start pass and IL specification.
2091 Initialize SSA and CFG.
2092 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2093 Build a gimple_parser parsing state and pass it along.
2094 (c_parser_gimple_statement): Change intermittend __PHI internal
2095 function argument for the edge.
2096 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2097 (c_parser_gimple_goto_stmt): Record edges to build.
2098 (c_parser_gimple_if_stmt): Likewise.
2099 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2100 (c_parser_gimple_or_rtl_pass_list): Likewise.
2102 2019-03-11 Martin Liska <mliska@suse.cz>
2104 * c-decl.c (check_for_loop_decls): Wrap an option name
2105 in a string format message and fix GNU coding style.
2106 * c-parser.c (c_parser_declspecs): Likewise.
2108 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2110 PR tree-optimization/89550
2111 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2113 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2114 or warning returned true.
2116 2019-02-28 Jakub Jelinek <jakub@redhat.com>
2119 * c-typeck.c (convert_arguments): Call inform_declaration only if
2120 the previous warning_at call returned true.
2122 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2124 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2125 parameter. Adjust all users.
2126 (c_parser_oacc_simple_clause): Replace parser with loc formal
2127 parameter. Adjust all users.
2129 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
2132 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2133 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2135 2019-02-15 Jakub Jelinek <jakub@redhat.com>
2138 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2139 before c_decl_attributes rather than after it.
2141 2019-02-06 Jakub Jelinek <jakub@redhat.com>
2144 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2145 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2146 instead of 3 nested ifs.
2148 2019-02-06 Joseph Myers <joseph@codesourcery.com>
2151 * c-decl.c (finish_decl): Do not complete array types for arrays
2152 with external linkage not at file scope.
2154 2019-02-05 Richard Biener <rguenther@suse.de>
2157 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2158 all type variants when not supported.
2160 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2163 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2164 * c-decl.c (decl_jump_unsafe): Return false for
2165 C_DECL_COMPOUND_LITERAL_P decls.
2166 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2168 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2171 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2175 * c-decl.c (last_fileptr_type): Remove.
2176 (last_structptr_types): New variable.
2177 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2178 {old,new}rettype instead of the types themselves. Assert
2179 last_structptr_types array has the same number of elements
2180 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2181 argument oldtype and newtype. Instead of handling
2182 just fileptr_type_node specially, handle all builtin_structptr_types
2183 pointer nodes. Formatting fix.
2185 2019-01-24 Martin Sebor <msebor@redhat.com>
2190 * c-decl.c (match_builtin_function_types): Add arguments.
2191 (diagnose_mismatched_decls): Diagnose mismatched declarations
2192 of built-ins more strictly.
2194 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2197 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2198 on #pragma omp cancel with different modifiers.
2200 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2204 * c-typeck.c (convert_for_assignment): Upate the
2205 warn_for_address_or_pointer_of_packed_member call.
2207 2019-01-16 Tom Honermann <tom@honermann.net>
2208 Jason Merrill <jason@redhat.com>
2210 * c-typeck.c (digest_init): Revised the error message produced for
2211 ill-formed cases of array initialization with a string literal.
2212 (error_init): Make variadic.
2214 2019-01-12 Jakub Jelinek <jakub@redhat.com>
2216 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2218 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2221 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2222 if current_function_decl is non-NULL.
2224 2019-01-07 Joseph Myers <joseph@codesourcery.com>
2228 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2229 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2230 functions declared but never defined only for external scope, not
2233 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2236 * c-parser.c (c_parser_postfix_expression): Parse
2237 __builtin_convertvector.
2239 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2241 Update copyright years.
2243 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2246 * c-typeck.c (convert_for_assignment): Call
2247 warn_for_address_or_pointer_of_packed_member.
2249 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2251 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2252 a more specific error message (instead of just falling through).
2254 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2256 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2257 asm qualifier is first seen; use that to give nicer "duplicate asm
2258 qualifier" messages. Delete 'quals" variable, instead pass the
2259 "is_volatile_ flag to build_asm_stmt directly.
2260 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2261 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2263 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2265 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2266 "done" boolean variable.
2268 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2271 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2272 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2273 (build_binary_op): Use struct op_location_t and
2274 class binary_op_rich_location.
2276 2018-12-11 Jakub Jelinek <jakub@redhat.com>
2279 * c-convert.c (convert): Call c_fully_fold before calling
2280 ubsan_instrument_float_cast.
2282 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2284 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2287 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2289 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2290 after asm. Pass a flag for it to build_asm_expr.
2291 * c-tree.h (build_asm_expr): Update declaration.
2292 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2295 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2298 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2299 combination of volatile and goto, in any order, without repetitions.
2301 2018-12-04 James Norris <jnorris@codesourcery.com>
2302 Cesar Philippidis <cesar@codesourcery.com>
2303 Julian Brown <julian@codesourcery.com>
2305 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2308 2018-11-30 Richard Biener <rguenther@suse.de>
2310 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2311 _Literal (type) { ... } as empty aggregate or vector constructor.
2313 2018-11-29 Martin Sebor <msebor@redhat.com>
2316 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2317 (convert_arguments): Add comments. Pass additional argument to
2320 2018-11-29 Martin Sebor <msebor@redhat.com>
2324 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2326 2018-11-23 Martin Sebor <msebor@redhat.com>
2329 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2330 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2332 2018-11-20 Martin Sebor <msebor@redhat.com>
2334 * c-parser.c (c_parser_has_attribute_expression): New function.
2335 (c_parser_attribute): New function.
2336 (c_parser_attributes): Move code into c_parser_attribute.
2337 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2339 2018-11-15 Martin Sebor <msebor@redhat.com>
2342 * c-decl.c (header_for_builtin_fn): Declare.
2343 (diagnose_mismatched_decls): Diagnose declarations of built-in
2344 functions without a prototype.
2345 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2346 (convert_argument): Same.
2347 (convert_arguments): Factor code out into convert_argument.
2348 Detect mismatches between built-in formal arguments in calls
2349 to built-in without prototype.
2350 (build_conditional_expr): Same.
2351 (type_or_builtin_type): New function.
2352 (convert_for_assignment): Add argument. Conditionally issue
2353 warnings instead of errors for mismatches.
2355 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2357 * c-decl.c: Replace "source_location" with "location_t".
2358 * c-tree.h: Likewise.
2359 * c-typeck.c: Likewise.
2360 * gimple-parser.c: Likewise.
2362 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2364 * c-parser.c (c_parser_omp_clause_final): Use
2365 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2366 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2367 parsing instead of c_parser_paren_condition.
2368 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2369 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2370 c_fully_fold instead of c_parser_condition.
2371 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2372 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2373 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2374 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2375 c_parser_expr_no_commas instead of c_parser_expression.
2377 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2378 reduction clause with inscan modifier.
2380 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2381 clauses other than atomic_default_mem_order.
2383 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2385 * c-parser.c: Include memmode.h.
2386 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2387 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2388 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2389 task_reduction clauses.
2390 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2391 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2392 section, or lvalue assignment expression.
2393 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2394 (c_parser_omp_clause_lastprivate): Parse optional
2395 conditional: modifier.
2396 (c_parser_omp_clause_hint): Require constant integer expression rather
2397 than just integer expression.
2398 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2400 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2401 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2402 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2404 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2405 iterators. Parse mutexinoutset and depobj kinds.
2406 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2408 (c_parser_omp_all_clauses): Likewise. Handle
2409 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2410 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2411 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2412 default memory order from requires directive if any. Adjust
2413 c_finish_omp_atomic caller.
2414 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2415 (c_parser_omp_flush): Parse flush with memory-order-clause.
2416 (c_parser_omp_for_loop): Allow NE_EXPR even in
2417 OpenMP loops, adjust c_finish_omp_for caller.
2418 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2419 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2420 Allow to be called while parsing combined parallel master.
2421 Parse combined master taskloop{, simd}.
2422 (c_parser_omp_parallel): Parse combined
2423 parallel master{, taskloop{, simd}} constructs.
2424 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2425 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2426 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2427 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2428 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2429 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2430 around teams body. Use SET_EXPR_LOCATION.
2431 (c_parser_omp_target_data): Allow target data
2432 with only use_device_ptr clauses.
2433 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2434 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2435 (c_parser_omp_requires): New function.
2436 (c_finish_taskloop_clauses): New function.
2437 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2438 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2439 declaration. Disallow in_reduction clause when combined with parallel
2441 (c_parser_omp_construct): Adjust c_parser_omp_master and
2442 c_parser_omp_taskgroup callers.
2443 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2445 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2446 like OMP_CLAUSE_REDUCTION.
2447 (handle_omp_array_sections): Likewise. Call save_expr on array
2448 reductions before calling build_index_type. Handle depend clauses
2450 (struct c_find_omp_var_s): New type.
2451 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2452 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2453 with static, runtime or auto schedule kinds. Call save_expr for whole
2454 array reduction sizes. Diagnose reductions with zero sized elements
2455 or variable length structures. Diagnose nogroup clause used with
2456 reduction clause(s). Handle depend clause with
2457 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2458 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2459 some different type for other kinds. Use build_unary_op with
2460 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2461 Handle depend clauses with iterators. Remove no longer needed special
2462 case that predetermined const qualified vars may be specified in
2463 firstprivate clause. Complain if const qualified vars are mentioned
2464 in data-sharing clauses other than firstprivate or shared. Use
2465 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2466 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2467 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2468 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2470 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2472 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2473 logic for change to name_hint::operator bool.
2474 (undeclared_variable): Likewise.
2475 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2476 (c_parser_parameter_declaration): Likewise.
2478 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2480 * c-errors.c (pedwarn_c11): New function.
2481 * c-parser.c (disable_extension_diagnostics): Save
2482 warn_c11_c2x_compat and set it to 0.
2483 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2484 (c_parser_static_assert_declaration_no_semi): Handle
2485 _Static_assert without string constant.
2486 * c-tree.h (pedwarn_c11): New prototype.
2488 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2490 * Make-lang.in (selftest-c): New.
2491 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2492 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2493 from gcc/Makefile.in.
2495 2018-10-02 Richard Biener <rguenther@suse.de>
2497 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2499 2018-09-26 Joseph Myers <joseph@codesourcery.com>
2502 * c-typeck.c (build_binary_op): Use excess precision for
2503 comparisons of integers and floating-point for C11 and later.
2505 2018-09-26 Martin Jambor <mjambor@suse.cz>
2508 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
2511 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2513 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2514 Update for new param.
2515 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2518 2018-09-17 Martin Jambor <mjambor@suse.cz>
2521 * c-parser.c: (warn_for_abs): New function.
2522 (c_parser_postfix_expression_after_primary): Call it.
2524 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2526 * c-typeck.c (digest_init): Shorten overlength strings.
2528 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2530 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2532 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2534 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2535 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2537 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
2539 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2540 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2542 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2545 * c-decl.c (implicitly_declare): Update call to
2546 maybe_add_include_fixit to suggest overriding the location, as it
2548 * c-objc-common.c (c_tree_printer): Update for conversion of
2549 show_caret_p to a tri-state.
2551 2018-08-27 Martin Liska <mliska@suse.cz>
2553 * c-decl.c (locate_old_decl): Use new function
2554 fndecl_built_in_p and remove check for FUNCTION_DECL if
2556 (diagnose_mismatched_decls): Likewise.
2557 (merge_decls): Likewise.
2558 (warn_if_shadowing): Likewise.
2559 (pushdecl): Likewise.
2560 (implicitly_declare): Likewise.
2561 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2562 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2563 * c-typeck.c (build_function_call_vec): Likewise.
2564 (convert_arguments): Likewise.
2566 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2569 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2570 (diagnose_mismatched_decls): Likewise, in various places.
2571 (warn_if_shadowing): Likewise.
2572 (implicit_decl_warning): Likewise.
2573 (implicitly_declare): Likewise.
2574 (undeclared_variable): Likewise.
2575 (declare_label): Likewise.
2576 (grokdeclarator): Likewise.
2577 (start_function): Likewise.
2578 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2579 (c_parser_parameter_declaration): Likewise.
2580 (c_parser_binary_expression): Likewise.
2581 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2582 (parser_build_binary_op): Likewise.
2583 (build_unary_op): Likewise.
2584 (error_init): Likewise.
2585 (pedwarn_init): Likewise.
2586 (warning_init): Likewise.
2587 (convert_for_assignment): Likewise.
2589 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2591 * c-objc-common.c: Include "gcc-rich-location.h".
2592 (c_tree_printer): Move implemenation of '%T' to...
2593 (print_type): ...this new function.
2594 (range_label_for_type_mismatch::get_text): New function.
2595 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2596 range for the various ic_argpass cases.
2597 (class maybe_range_label_for_tree_type_mismatch): New class.
2598 (build_binary_op): Use it when calling binary_op_error.
2600 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2602 * c-decl.c (start_decl): Do not warn if variables is named as main
2603 and is a local variable.
2605 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2608 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2609 objects of unknown size.
2611 2018-08-13 Martin Sebor <msebor@redhat.com>
2613 PR tree-optimization/71625
2614 * c-parser.c (c_parser_declaration_or_fndef): Call
2615 braced_list_to_string.
2617 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2620 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2623 2018-08-01 Martin Sebor <msebor@redhat.com>
2625 PR tree-optimization/86650
2626 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2627 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2629 2018-08-01 Jakub Jelinek <jakub@redhat.com>
2632 * c-typeck.c (init_field_decl_cmp): New function.
2633 (output_pending_init_elements): Use it for field comparisons
2634 instead of pure bit_position comparisons.
2636 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2638 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2639 type here, instead add "omp declare target implicit" attribute.
2640 (finish_decl): Diagnose vars without mappable type here.
2642 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2643 Thomas Schwinge <thomas@codesourcery.com>
2644 Cesar Philippidis <cesar@codesourcery.com>
2646 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2647 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2648 to their non-present_or_* counterparts. Make 'self' an alias to
2649 PRAGMA_OACC_CLAUSE_HOST.
2650 (c_parser_oacc_data_clause): Update GOMP mappings for
2651 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2652 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2653 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2654 Remove support for present_or_* clauses.
2655 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2656 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2657 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2658 (OACC_DATA_CLAUSE_MASK): Likewise.
2659 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2660 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2661 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2662 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2663 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2665 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2667 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2668 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2669 (c_parser_gimple_unary_expression): Likewise.
2671 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2674 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2675 before doing POINTER_DIFF_EXPR.
2677 2018-06-07 Marek Polacek <polacek@redhat.com>
2680 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2681 for loop initial declarations.
2683 2018-05-30 David Pagan <dave.pagan@oracle.com>
2686 * c-decl.c (grokdeclarator): Update check for return type warnings.
2687 (start_function): Likewise.
2688 (finish_function): Likewise.
2689 * c-typeck.c (c_finish_return): Update check for return type warnings.
2690 Pass OPT_Wreturn_type to pedwarn when appropriate.
2692 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2694 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2697 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2699 * gimple-parser.c: Include internal-fn.h.
2700 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2701 (c_parser_gimple_call_internal): New function.
2702 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2703 Fix typos in comment.
2705 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2708 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2709 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2711 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2712 fold_offsetof_1, pass argtype as TYPE to it and drop the
2715 2018-05-02 David Pagan <dave.pagan@oracle.com>
2718 * c-decl.c (old_style_parameter_scope): New function.
2719 * c-parser.c (c_parser_postfix_expression): Check for statement
2720 expressions in old-style function parameter list declarations.
2721 * c-parser.h (old_style_parameter_scope): New extern declaration.
2723 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2726 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2727 it is not TREE_STATIC.
2728 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2729 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2730 its COMPOUND_LITERAL_EXPR_DECL.
2732 2018-03-21 Joseph Myers <joseph@codesourcery.com>
2734 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2735 where all functions return the same _FloatN or _FloatNx type,
2736 treat integer types as _Float64 instead of double.
2738 2018-03-21 Jakub Jelinek <jakub@redhat.com>
2741 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2742 building vector comparison, diagnose it and return error_mark_node.
2744 2018-03-15 Jakub Jelinek <jakub@redhat.com>
2747 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2748 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2749 INTEGER_TYPE element type.
2751 2018-03-13 David Pagan <dave.pagan@oracle.com>
2754 * c-typeck.c (output_init_element): Ensure field initializer
2755 expression is always evaluated if there are side effects.
2757 2018-03-06 Jakub Jelinek <jakub@redhat.com>
2760 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2761 !building_stmt_list_p ().
2763 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2766 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2767 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2768 and include the BIND_EXPR in the list of things that need to be
2771 2018-02-09 Nathan Sidwell <nathan@acm.org>
2774 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2775 to strict_aliasing_warning.
2777 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2779 * c-typeck.c (really_start_incremental_init, push_init_level,
2780 set_nonincremental_init, output_init_element, process_init_element):
2781 Use DECL_UNNAMED_BIT_FIELD.
2783 2018-01-31 Marek Polacek <polacek@redhat.com>
2786 * c-parser.c (c_parser_compound_statement_nostart): Call
2787 expansion_point_location_if_in_system_header.
2789 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2792 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2795 2018-01-13 Jakub Jelinek <jakub@redhat.com>
2798 * c-tree.h (decl_constant_value_1): Add a bool argument.
2799 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2800 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2801 (decl_constant_value): Adjust caller.
2802 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2803 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2804 decl_constant_value returns initializer that has BLKmode or
2806 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2808 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2809 Alan Hayward <alan.hayward@arm.com>
2810 David Sherwood <david.sherwood@arm.com>
2812 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2813 TYPE_VECTOR_SUBPARTS.
2815 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2817 Update copyright years.
2819 2018-01-01 Jakub Jelinek <jakub@redhat.com>
2822 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2823 c_parser_conditional_expression, c_parser_cast_expression,
2824 c_parser_sizeof_expression, c_parser_alignof_expression,
2825 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2826 c_parser_transaction_expression): Use set_error () method instead
2827 of setting value member to error_mark_node.
2829 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2831 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2832 and _Float<N>X built-in functions.
2834 2017-12-22 Jakub Jelinek <jakub@redhat.com>
2837 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2838 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2839 incomplete vars rather than after it.
2842 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2843 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2844 and consider empty ones if there are no other stmts. For
2845 -Wunused-value walk all statements before the one only followed by
2848 2017-12-22 Mike Stump <mikestump@comcast.net>
2849 Eric Botcazou <ebotcazou@adacore.com>
2851 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2852 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2853 (c_parser_do_statement): Likewise.
2854 (c_parser_for_statement): Likewise.
2855 (c_parser_statement_after_labels): Adjust calls to above.
2856 (c_parse_pragma_ivdep): New static function.
2857 (c_parser_pragma_unroll): Likewise.
2858 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2859 <PRAGMA_UNROLL>: New case.
2861 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2863 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2864 perform_integral_promotions, digest_init): Replace Yoda conditions
2865 with typical order conditions.
2866 * c-decl.c (check_bitfield_type_and_width): Likewise.
2868 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2870 * c-typeck.c (c_safe_arg_type_equiv_p,
2871 c_safe_function_type_cast_p): New function.
2872 (build_c_cast): Implement -Wcast-function-type.
2874 2017-12-14 Richard Biener <rguenther@suse.de>
2877 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2878 like REALPART_EXPR for the behavior of whether its operand
2881 2017-12-12 Marek Polacek <polacek@redhat.com>
2884 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2886 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2888 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2889 * c-parser.c (add_debug_begin_stmt): New.
2890 (c_parser_declaration_or_fndef): Call it.
2891 (c_parser_compound_statement_nostart): Likewise.
2892 (c_parser_statement_after_labels): Likewise.
2893 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2895 2017-12-07 Joseph Myers <joseph@codesourcery.com>
2897 * c-decl.c (build_compound_literal): Add parameter alignas_align
2898 and set alignment of decl if nonzero.
2899 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2900 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2902 (c_parser_struct_declaration): Update syntax comment.
2903 (c_parser_type_name): Add alignas_ok argument and pass it to
2905 (c_parser_cast_expression): Pass true to c_parser_type_name and
2906 give error if a cast used an _Alignas specifier.
2907 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2908 give error if sizeof (type-name) used an _Alignas specifier.
2909 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2910 give error if _Alignof (type-name) used an _Alignas specifier.
2911 (c_parser_postfix_expression_after_paren_type): Check specified
2912 alignment for a compound literal and pass it to
2913 build_compound_literal.
2914 * c-parser.h (c_parser_type_name): Update prototype.
2915 * c-tree.h (build_compound_literal): Update prototype.
2917 2017-12-07 Martin Sebor <msebor@redhat.com>
2920 * c-decl.c (c_decl_attributes): Look up existing declaration and
2921 pass it to decl_attributes.
2923 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2926 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2927 reserved for use by the implementation.
2929 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2931 * c-decl.c: Include "c-family/c-spellcheck.h".
2933 2017-12-05 Martin Liska <mliska@suse.cz>
2934 Jakub Jelinek <jakub@redhat.com>
2936 * c-typeck.c (pointer_diff): Add new argument and instrument
2937 pointer subtraction.
2938 (build_binary_op): Similar for pointer comparison.
2940 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2943 * c-parser.c: Include tree-iterator.h.
2944 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2945 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2949 * c-tree.h (decl_constant_value_1): Declare.
2950 * c-typeck.c (decl_constant_value_1): New function.
2951 (decl_constant_value): Use it.
2952 * c-fold.c (c_fully_fold_internal): If in_init, use
2953 decl_constant_value_1 instead of decl_constant_value.
2955 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2957 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2959 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2962 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2963 c_switch_covers_all_cases_p returns true.
2965 2017-11-28 Julia Koval <julia.koval@intel.com>
2966 Sebastian Peryt <sebastian.peryt@intel.com>
2968 * Make-lang.in (c/c-array-notation.o): Remove.
2969 * c-array-notation.c: Delete.
2970 * c-decl.c: Remove cilkplus condition.
2971 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2972 c_parser_cilk_verify_simd, c_parser_array_notation,
2973 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2974 c_parser_cilk_simd_fn_vector_attrs,
2975 c_finish_cilk_simd_fn_tokens): Delete.
2976 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2977 (c_parser_direct_declarator_inner): Ditto.
2978 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2979 (c_parser_attributes, c_parser_compound_statement,
2980 c_parser_statement_after_labels, c_parser_if_statement,
2981 c_parser_switch_statement, c_parser_while_statement,
2982 c_parser_do_statement, c_parser_for_statement,
2983 c_parser_unary_expression, c_parser_postfix_expression,
2984 c_parser_postfix_expression_after_primary,
2985 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2986 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2988 * c-typeck.c (build_array_ref, build_function_call_vec,
2990 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2991 c_finish_loop, build_binary_op): Remove cilkplus support.
2993 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2995 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2998 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
3000 * Make-lang.in (c.install-plugin): Install backend import library.
3002 2017-11-23 Jakub Jelinek <jakub@redhat.com>
3004 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3005 pragma_stmt context.
3007 2017-11-23 Mike Stump <mikestump@comcast.net>
3008 Eric Botcazou <ebotcazou@adacore.com>
3010 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3012 (c_parser_do_statement): Likewise.
3013 (c_parser_for_statement): Likewise.
3015 2017-11-22 David Malcolm <dmalcolm@redhat.com>
3018 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3019 bool to bool *. Within '%T' handling, if showing an "aka", use
3020 "quoted" param to add appropriate quoting.
3022 2017-11-22 Marek Polacek <polacek@redhat.com>
3027 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3029 2017-11-21 David Malcolm <dmalcolm@redhat.com>
3032 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3033 earlier failed lookups.
3035 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
3037 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3038 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3040 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3043 * c-decl.c: Include "c-family/known-headers.h".
3044 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3045 to known-headers.cc.
3046 (class suggest_missing_header): Move to known-header.h.
3047 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3048 than get_c_name_hint.
3050 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3052 * c-decl.c (get_c_name_hint): New function.
3053 (class suggest_missing_header): New class.
3054 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3055 suggest missing headers to the user.
3057 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3059 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3060 Include "c-family/name-hint.h"
3061 (implicit_decl_warning): Convert "hint" from
3062 const char * to name_hint. Pass location to
3063 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3064 warning was not printed.
3065 (undeclared_variable): Likewise for "guessed_id".
3066 (lookup_name_fuzzy): Convert return type from const char *
3067 to name_hint. Add location_t param.
3068 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3069 Include "c-family/name-hint.h"
3070 (c_parser_declaration_or_fndef): Convert "hint" from
3071 const char * to name_hint. Pass location to lookup_name_fuzzy.
3072 (c_parser_parameter_declaration): Likewise.
3074 2017-11-19 Jakub Jelinek <jakub@redhat.com>
3078 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3080 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3081 handle_omp_array_sections): Likewise.
3082 (digest_init): Don't call decl_constant_value_for_optimization.
3083 * c-tree.h (decl_constant_value_for_optimization): Removed.
3084 * c-fold.c (c_fold_array_ref): New function.
3085 (c_fully_fold_internal): Add LVAL argument, propagate it through
3086 recursive calls. For VAR_P call decl_constant_value and
3087 unshare if not LVAL and either optimizing or IN_INIT. Remove
3088 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3089 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3090 (c_fully_fold): Add LVAL argument, pass it through to
3091 c_fully_fold_internal.
3092 (decl_constant_value_for_optimization): Removed.
3094 2017-11-15 Joseph Myers <joseph@codesourcery.com>
3097 * c-parser.c (check_tgmath_function): New function.
3098 (enum tgmath_parm_kind): New enum.
3099 (c_parser_postfix_expression): Handle __builtin_tgmath.
3101 2017-10-31 David Malcolm <dmalcolm@redhat.com>
3103 * c-decl.c (implicit_decl_warning): Update for renaming of
3104 pedwarn_at_rich_loc and warning_at_rich_loc.
3105 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3106 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3107 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3108 (c_parser_struct_or_union_specifier): Likewise for renaming of
3109 pedwarn_at_rich_loc.
3110 (c_parser_parameter_declaration): Likewise for renaming of
3112 * c-typeck.c (build_component_ref): Likewise.
3113 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3114 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3115 (set_init_label): Likewise for renaming of error_at_rich_loc.
3117 2017-10-30 Richard Biener <rguenther@suse.de>
3119 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3122 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3124 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3125 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3127 2017-10-25 David Malcolm <dmalcolm@redhat.com>
3130 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3133 2017-10-25 Jakub Jelinek <jakub@redhat.com>
3136 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3137 newdecl to corresponding __builtin_ if any.
3139 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3142 * c-decl.c (diagnose_mismatched_decls): Use
3143 OPT_Wbuiltin_declaration_mismatch.
3145 2017-10-12 David Malcolm <dmalcolm@redhat.com>
3147 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3148 use it to guard calls to maybe_suggest_missing_token_insertion.
3149 (c_parser_parms_list_declarator): Override default value of new
3150 "type_is_unique" param to c_parser_require.
3151 (c_parser_asm_statement): Likewise.
3152 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3155 2017-10-11 Nathan Sidwell <nathan@acm.org>
3157 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3159 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3161 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3162 operating on trees as wide_ints.
3163 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3164 (c_tree_equal): Likewise.
3166 2017-10-04 David Malcolm <dmalcolm@redhat.com>
3168 * c-decl.c (push_parm_decl): Store c_parm's location into the
3170 (build_c_parm): Add "loc" param and store it within the c_parm.
3171 * c-parser.c (struct c_parser): Add "last_token_location" field.
3172 (c_parser_consume_token): Store location of the token into the
3174 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3175 when handling a FUNCTION_DECL, if it doesn't already have them.
3176 (c_parser_parameter_declaration): Generate a location for the
3177 parameter, and pass it to the call to build_c_parm.
3178 * c-tree.h (struct c_parm): Add field "loc".
3179 (build_c_parm): Add location_t param.
3180 * c-typeck.c (get_fndecl_argument_location): New function.
3181 (inform_for_arg): New function.
3182 (convert_for_assignment): Use inform_for_arg when dealing with
3185 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3187 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3189 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3190 don't SET_DECL_C_BIT_FIELD here.
3193 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3194 instead of trying to set just TREE_READONLY manually.
3196 2017-09-16 Tom de Vries <tom@codesourcery.com>
3199 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3202 2017-09-15 Joseph Myers <joseph@codesourcery.com>
3205 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3207 (build_conditional_expr): For C11, generate result with excess
3208 precision when one argument is an integer and the other is of a
3209 type using excess precision.
3211 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3213 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3215 2017-09-13 Marek Polacek <polacek@redhat.com>
3218 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3219 than expr.original_type.
3221 2017-09-12 Nathan Sidwell <nathan@acm.org>
3223 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3224 resort_sorted_fields): Moved from c-family/c-common.c.
3225 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3227 2017-09-01 Joseph Myers <joseph@codesourcery.com>
3230 * c-typeck.c (build_atomic_assign): Handle argument with excess
3231 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3232 argument passed to build_binary_op and convert_for_assignment but
3233 not for call to c_fully_fold.
3234 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3235 Ensure build_binary_op is called with argument with original
3236 semantic type. Avoid calling c_fully_fold with an
3237 EXCESS_PRECISION_EXPR from build_binary_op.
3239 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3242 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3244 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3245 Alan Hayward <alan.hayward@arm.com>
3246 David Sherwood <david.sherwood@arm.com>
3248 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3249 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3250 m1 and m2 to the signed equivalent of a fixed-point
3253 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3255 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3256 than CAN_HAVE_LOCATION_P when determining whether to use the
3257 location_t value within "value".
3259 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3261 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3262 rather than peeking the location of the first token.
3263 * c-tree.h (c_expr::get_location): New method.
3265 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3267 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3268 to check_function_arguments.
3270 2017-08-18 Marek Polacek <polacek@redhat.com>
3272 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3275 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3278 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3279 (check_bitfield_type_and_width): Don't allow bit-field with
3280 warn_if_not_aligned type.
3282 2017-08-14 Martin Sebor <msebor@redhat.com>
3285 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3287 2017-08-11 Marek Polacek <polacek@redhat.com>
3290 * c-decl.c (pushtag): Only print inform if the warning was printed.
3291 (grokdeclarator): Likewise.
3293 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3295 * c-parser.c (c_parser_error): Rename to...
3296 (c_parser_error_richloc): ...this, making static, and adding
3297 "richloc" parameter, passing it to the c_parse_error call,
3298 rather than calling c_parser_set_source_position_from_token.
3299 (c_parser_error): Reintroduce, reimplementing in terms of the
3300 above, converting return type from void to bool.
3301 (class token_pair): New class.
3302 (struct matching_paren_traits): New struct.
3303 (matching_parens): New typedef.
3304 (struct matching_brace_traits): New struct.
3305 (matching_braces): New typedef.
3306 (get_matching_symbol): New function.
3307 (c_parser_require): Add param MATCHING_LOCATION, using it to
3308 highlight matching "opening" tokens for missing "closing" tokens.
3309 (c_parser_skip_until_found): Likewise.
3310 (c_parser_static_assert_declaration_no_semi): Convert explicit
3311 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3312 class matching_parens, so that the pertinent open parenthesis is
3313 highlighted when there are problems locating the close
3315 (c_parser_struct_or_union_specifier): Likewise.
3316 (c_parser_typeof_specifier): Likewise.
3317 (c_parser_alignas_specifier): Likewise.
3318 (c_parser_simple_asm_expr): Likewise.
3319 (c_parser_braced_init): Likewise, for matching_braces.
3320 (c_parser_paren_condition): Likewise, for matching_parens.
3321 (c_parser_switch_statement): Likewise.
3322 (c_parser_for_statement): Likewise.
3323 (c_parser_asm_statement): Likewise.
3324 (c_parser_asm_operands): Likewise.
3325 (c_parser_cast_expression): Likewise.
3326 (c_parser_sizeof_expression): Likewise.
3327 (c_parser_alignof_expression): Likewise.
3328 (c_parser_generic_selection): Likewise.
3329 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3330 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3331 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3332 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3333 c_parser_skip_until_found call.
3334 (c_parser_objc_class_definition): Use class matching_parens as
3336 (c_parser_objc_method_decl): Likewise.
3337 (c_parser_objc_try_catch_finally_statement): Likewise.
3338 (c_parser_objc_synchronized_statement): Likewise.
3339 (c_parser_objc_at_property_declaration): Likewise.
3340 (c_parser_oacc_wait_list): Likewise.
3341 (c_parser_omp_var_list_parens): Likewise.
3342 (c_parser_omp_clause_collapse): Likewise.
3343 (c_parser_omp_clause_default): Likewise.
3344 (c_parser_omp_clause_if): Likewise.
3345 (c_parser_omp_clause_num_threads): Likewise.
3346 (c_parser_omp_clause_num_tasks): Likewise.
3347 (c_parser_omp_clause_grainsize): Likewise.
3348 (c_parser_omp_clause_priority): Likewise.
3349 (c_parser_omp_clause_hint): Likewise.
3350 (c_parser_omp_clause_defaultmap): Likewise.
3351 (c_parser_oacc_single_int_clause): Likewise.
3352 (c_parser_omp_clause_ordered): Likewise.
3353 (c_parser_omp_clause_reduction): Likewise.
3354 (c_parser_omp_clause_schedule): Likewise.
3355 (c_parser_omp_clause_num_teams): Likewise.
3356 (c_parser_omp_clause_thread_limit): Likewise.
3357 (c_parser_omp_clause_aligned): Likewise.
3358 (c_parser_omp_clause_linear): Likewise.
3359 (c_parser_omp_clause_safelen): Likewise.
3360 (c_parser_omp_clause_simdlen): Likewise.
3361 (c_parser_omp_clause_depend): Likewise.
3362 (c_parser_omp_clause_map): Likewise.
3363 (c_parser_omp_clause_device): Likewise.
3364 (c_parser_omp_clause_dist_schedule): Likewise.
3365 (c_parser_omp_clause_proc_bind): Likewise.
3366 (c_parser_omp_clause_uniform): Likewise.
3367 (c_parser_omp_for_loop): Likewise.
3368 (c_parser_cilk_clause_vectorlength): Likewise.
3369 (c_parser_cilk_clause_linear): Likewise.
3370 (c_parser_transaction_expression): Likewise.
3371 * c-parser.h (c_parser_require): Add param matching_location with
3372 default UNKNOWN_LOCATION.
3373 (c_parser_error): Convert return type from void to bool.
3374 (c_parser_skip_until_found): Add param matching_location with
3375 default UNKNOWN_LOCATION.
3377 2017-08-09 Marek Polacek <polacek@redhat.com>
3379 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3380 * c-tree.h (build_external_ref): Update declaration.
3381 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3382 (build_external_ref): Change the type of a parameter to bool.
3383 (parser_build_binary_op): Use true/false instead of 1/0.
3384 (pointer_diff): Likewise.
3385 (build_modify_expr): Likewise.
3386 (set_designator): Change the type of a parameter to bool.
3387 (set_init_index): Use true/false instead of 1/0.
3388 (set_init_label): Likewise.
3389 (output_init_element): Change the type of a parameter to bool.
3390 (output_pending_init_elements): Use true/false instead of 1/0.
3391 (process_init_element): Likewise.
3392 (build_binary_op): Change the type of a parameter to bool.
3394 2017-08-09 Marek Polacek <polacek@redhat.com>
3397 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3398 Call emit_diagnostic_valist instead of pedwarn.
3399 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3400 Print the relevant types in diagnostics.
3402 2017-08-09 Marek Polacek <polacek@redhat.com>
3405 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
3406 build_conditional_expr.
3407 * c-parser.c (c_parser_conditional_expression): Create locations for
3408 EXP1 and EXP2 from their source ranges. Pass the locations down to
3409 build_conditional_expr.
3410 * c-tree.h (build_conditional_expr): Update declaration.
3411 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3412 For -Wsign-compare, also print the types.
3414 2017-08-08 Martin Liska <mliska@suse.cz>
3416 * c-convert.c: Include header files.
3417 * c-typeck.c: Likewise.
3419 2017-08-07 Martin Liska <mliska@suse.cz>
3421 * c-parser.c (c_parser_attributes): Canonicalize name of an
3424 2017-08-02 Marek Polacek <polacek@redhat.com>
3427 * c-parser.c (c_parser_unary_expression): Use set_error.
3431 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3432 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3434 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
3435 Martin Liska <mliska@suse.cz>
3437 * c-typeck.c (c_finish_goto_label): Build gimple predict
3440 2017-07-31 Martin Liska <mliska@suse.cz>
3443 * c-convert.c (convert): Guard condition with flag_sanitize_p
3444 also with current_function_decl non-null equality.
3445 * c-decl.c (grokdeclarator): Likewise.
3446 * c-typeck.c (build_binary_op): Likewise.
3448 2017-07-25 Marek Polacek <polacek@redhat.com>
3450 * c-decl.c (grokfield): Remove local variable.
3452 2017-07-25 Marek Polacek <polacek@redhat.com>
3455 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3456 macro expansion if the body is in { }.
3457 (c_parser_while_statement): Likewise.
3458 (c_parser_for_statement): Likewise.
3460 2017-07-18 Nathan Sidwell <nathan@acm.org>
3462 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3464 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3466 * c-decl.c (implicitly_declare): When suggesting a missing
3467 #include, provide a fix-it hint.
3469 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3471 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3472 and call that instead.
3473 * c-tree.h (selftest::run_c_tests): New decl.
3475 2017-06-26 Marek Polacek <polacek@redhat.com>
3478 * c-parser.c (c_parser_if_body): Set the location of the
3479 body of the conditional after parsing all the labels. Call
3480 warn_for_multistatement_macros.
3481 (c_parser_else_body): Likewise.
3482 (c_parser_switch_statement): Likewise.
3483 (c_parser_while_statement): Likewise.
3484 (c_parser_for_statement): Likewise.
3485 (c_parser_statement): Add a default argument. Save the location
3486 after labels have been parsed.
3487 (c_parser_c99_block_statement): Likewise.
3489 2017-06-19 Richard Biener <rguenther@suse.de>
3491 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3492 negated _Literals to parse _Literal (int) -1.
3494 2017-06-13 Martin Liska <mliska@suse.cz>
3497 * c-convert.c (convert): Use sanitize_flags_p.
3498 * c-decl.c (grokdeclarator): Likewise.
3499 * c-typeck.c (convert_for_assignment): Likewise.
3500 (c_finish_return): Likewise.
3501 (build_binary_op): Likewise.
3503 2017-06-08 Jakub Jelinek <jakub@redhat.com>
3506 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3507 to sizetype before size_binop.
3509 2017-06-07 Jakub Jelinek <jakub@redhat.com>
3511 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3514 2017-06-06 Marek Polacek <polacek@redhat.com>
3517 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3519 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3521 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3523 * c-parser.c (c_parser_binary_expression): Implement the
3524 -Wsizeof_pointer_div warning.
3525 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3526 from a parenthesized expression.
3527 (c_parser_expr_list): Use c_last_sizeof_loc.
3528 * c-tree.h (c_last_sizeof_loc): New external.
3529 * c-typeck.c (c_last_sizeof_loc): New variable.
3530 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3532 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3535 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3537 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3539 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3542 2017-05-24 Martin Sebor <msebor@redhat.com>
3545 * c-fold.c (c_fully_fold_internal): Adjust.
3546 * c-typeck.c (parser_build_unary_op): Adjust.
3548 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3550 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3551 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3554 2017-05-23 Marek Polacek <polacek@redhat.com>
3556 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3559 2017-05-22 Jakub Jelinek <jakub@redhat.com>
3561 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3562 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3563 it returned invariant. Call tree_invariant_p unconditionally
3564 afterwards to decide whether to return expr or op0.
3566 2017-05-22 Nathan Sidwell <nathan@acm.org>
3568 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3570 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3572 * c-parser.c (c_parser_omp_clause_default): Handle
3573 "OMP_CLAUSE_DEFAULT_PRESENT".
3575 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3577 * config-lang.in (gtfiles): Add c-family/c-format.c.
3579 2017-05-18 Nathan Sidwell <nathan@acm.org>
3581 * c-decl.c (pushdecl_top_level): Delete unused function.
3583 2017-05-18 Marek Polacek <polacek@redhat.com>
3585 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3586 (check_earlier_gotos): Likewise.
3587 (define_label): Likewise.
3588 (pending_xref_error): Likewise.
3589 (smallest_type_quals_location): Likewise.
3590 (grokdeclarator): Likewise.
3591 (grokparms): Likewise.
3592 (identifier_global_value): Likewise.
3593 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3594 (find_init_member): Likewise.
3596 2017-05-18 Marek Polacek <polacek@redhat.com>
3598 * c-decl.c (start_decl): Use false/true instead of 0/1.
3599 (grokdeclarator): Likewise.
3600 (finish_struct): Likewise.
3601 (start_function): Change the return type to bool. Use false/true
3603 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3604 * c-tree.h (start_function): Update.
3605 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3606 (set_designator): Change the return type to bool. Use false/true
3609 2017-05-17 Marek Polacek <polacek@redhat.com>
3611 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3612 * c-typeck.c: Likewise.
3614 2017-05-17 Marek Polacek <polacek@redhat.com>
3617 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3618 DECL_IGNORED_P even for non-static compound literals.
3620 2017-05-17 Martin Liska <mliska@suse.cz>
3622 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3623 use it instead of int type.
3625 2017-05-17 Marek Polacek <polacek@redhat.com>
3627 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3629 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
3630 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
3631 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3632 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3634 (c_parser_conditional_expression): Likewise.
3635 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3636 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3637 (process_init_element): Likewise.
3638 (build_binary_op): Likewise.
3639 (handle_omp_array_sections_1): Likewise.
3641 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3643 * c-parser.c (c_parser_omp_clause_num_gangs)
3644 (c_parser_omp_clause_num_workers)
3645 (c_parser_omp_clause_vector_length): Merge functions into...
3646 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3649 2017-05-11 Nathan Sidwell <nathan@acm.org>
3651 * gimple-parser.c: Don't #include tree-dump.h.
3653 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3656 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3658 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3661 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3662 incorrect __MEM syntax.
3664 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3667 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3670 2017-05-09 Nathan Sidwell <nathan@acm.org>
3672 * c-tree.h (pushdecl): Declare.
3674 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3676 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3677 with diagnostic_report_diagnostic.
3678 * c-errors.c (pedwarn_c99): Likewise.
3679 (pedwarn_c90): Likewise.
3681 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3684 * c-gimplify.c (c_gimplify_expr): Remove calls to
3685 cilk_gimplifY_call_params_in_spawned_fn.
3687 2017-04-25 David Malcolm <dmalcolm@redhat.com>
3689 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3690 hint for removing extra semicolon.
3692 2017-04-21 Jakub Jelinek <jakub@redhat.com>
3695 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3696 enabled, set specs->type to integer_type_node.
3698 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3700 * c-array-notation.c: Fix typo in comment.
3702 2017-03-29 Marek Polacek <polacek@redhat.com>
3705 * c-decl.c (finish_decl): Check VAR_P.
3707 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3710 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3711 * c-typeck.c (c_mark_addressable): Likewise. Look through
3712 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3714 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3716 2017-03-23 Marek Polacek <polacek@redhat.com>
3718 * c-tree.h: Remove a C_RID_YYCODE reference.
3720 2017-03-21 Jakub Jelinek <jakub@redhat.com>
3723 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3724 optional COMPOUND_EXPR with ubsan instrumentation.
3726 2017-03-17 Marek Polacek <polacek@redhat.com>
3728 * c-parser.c: Add C11 references.
3730 2017-03-15 Marek Polacek <polacek@redhat.com>
3732 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3734 2017-03-11 Marek Polacek <polacek@redhat.com>
3736 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3738 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3740 PR translation/79848
3741 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3743 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3745 2017-03-09 Marek Polacek <polacek@redhat.com>
3748 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3749 parameter declarations with initializers.
3751 2017-03-09 Jakub Jelinek <jakub@redhat.com>
3754 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3757 2017-03-07 Jakub Jelinek <jakub@redhat.com>
3760 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3761 for "may only be used in compound statements" diagnostics, change it
3762 such that the same translatable string is used for all pragmas. For
3763 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3765 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3766 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3767 "may only be used in compound statements" diagnostics, such that the
3768 same translatable string is used for all pragmas.
3770 2017-03-04 Marek Polacek <polacek@redhat.com>
3773 * c-decl.c (implicit_decl_warning): Add missing space.
3775 2017-03-03 Marek Polacek <polacek@redhat.com>
3778 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3779 current_function_prototype_arg_types is error_mark_node. Fix
3780 formatting. Use TREE_VALUE instead of TREE_TYPE.
3782 2017-03-03 Jakub Jelinek <jakub@redhat.com>
3785 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3786 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3787 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3791 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3792 instead of %<_Generic>.
3793 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3794 (c_parser_omp_target_exit_data): Use %<release%> instead of
3797 2017-02-28 Jakub Jelinek <jakub@redhat.com>
3799 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3800 instead of just cond ? "..." : "...".
3801 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3802 for "enter"/"exit" keyword.
3803 (c_finish_oacc_routine): Don't use %s to supply portions of the
3806 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3809 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3810 handle -Wrestrict here.
3811 * c-typeck.c (build_function_call_vec): Adjust
3812 check_function_arguments caller.
3814 2017-02-23 Richard Biener <rguenther@suse.de>
3817 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3818 to initialize c_exprs to return.
3819 (c_parser_gimple_binary_expression): Likewise.
3820 (c_parser_gimple_unary_expression): Likewise.
3821 (c_parser_gimple_postfix_expression): Likewise.
3823 2017-02-22 Marek Polacek <polacek@redhat.com>
3826 * c-typeck.c (convert_arguments): Handle error_mark_node.
3828 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3830 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3831 value of c_parser_parse_ssa_name against error_mark_node and emit
3832 error if ssa name is anonymous and written as default definition.
3834 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3836 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3839 2017-02-16 Jakub Jelinek <jakub@redhat.com>
3842 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3843 ignore #pragma omp target even when not followed by identifier.
3845 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3847 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3848 (c_parser_gimple_unary_expression): Likewise.
3850 2017-02-13 Jakub Jelinek <jakub@redhat.com>
3852 * c-parser.c (c_parser_oacc_declare): Add missing space in
3855 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3858 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3859 set_c_expr_source_range when parsing ssa-name.
3861 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
3862 Richard Biener <rguenther@suse.de>
3864 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3865 building IL when arguments are error_mark_node.
3866 (c_parser_gimple_unary_expression): Likewise.
3867 (c_parser_gimple_if_stmt): Likewise.
3868 (c_parser_gimple_switch_stmt): Likewise.
3869 (c_parser_gimple_return_stmt): Likewise.
3870 (c_parser_parse_ssa_name): When name lookup fails do not build
3871 an SSA name. Use undeclared rather than not declared in error
3874 2017-02-09 Marek Polacek <polacek@redhat.com>
3877 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3878 instead of c_parser_skip_until_found.
3880 2017-02-09 Jakub Jelinek <jakub@redhat.com>
3883 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3884 symtab_node::get on automatic variables.
3886 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3887 Chung-Lin Tang <cltang@codesourcery.com>
3889 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3890 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3892 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3894 2017-02-07 Richard Biener <rguenther@suse.de>
3896 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3897 (c_parser_gimple_postfix_expression_after_primary):
3898 Do not use c_build_function_call_vec to avoid folding and promotion.
3901 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3904 * c-decl.c (pop_scope): Pass main_input_filename to
3905 build_translation_unit_decl.
3907 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3909 * c-parser.c: Include "read-rtl-function.h" and
3911 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3912 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3913 production. Update for renaming of field "gimple_pass" to
3914 "gimple_or_rtl_pass". If __RTL was seen, call
3915 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3916 to an auto_timevar, to cope with early exit.
3917 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3918 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3919 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3921 (c_parser_parse_rtl_body): New function.
3922 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3923 (struct c_declspecs): Rename field "gimple_pass" to
3924 "gimple_or_rtl_pass". Add field "rtl_p".
3925 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3926 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3927 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3928 (c_parser_gimple_or_rtl_pass_list): ...this.
3930 2017-01-20 Marek Polacek <polacek@redhat.com>
3933 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3935 2017-01-13 Richard Biener <rguenther@suse.de>
3937 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3940 2017-01-13 Richard Biener <rguenther@suse.de>
3942 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3943 _Literal ( type-name ) number.
3945 2017-01-12 Richard Biener <rguenther@suse.de>
3947 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3950 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3953 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3956 2017-01-11 Richard Biener <rguenther@suse.de>
3959 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3960 returns on parse errors.
3962 2017-01-04 Marek Polacek <polacek@redhat.com>
3965 * c-parser.c (c_parser_postfix_expression): Mark zero character
3966 constants by setting original_type in c_expr.
3967 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3968 with a zero character constant.
3969 (char_type_p): New function.
3971 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3973 * c-parser.c (c_parser_declaration_or_fndef): Create a
3974 rich_location at init_loc and parse it to start_init.
3975 (last_init_list_comma): New global.
3976 (c_parser_braced_init): Update last_init_list_comma when parsing
3977 commas. Pass it to pop_init_level. Pass location of closing
3978 brace to pop_init_level.
3979 (c_parser_postfix_expression_after_paren_type): Create a
3980 rich_location at type_loc and parse it to start_init.
3981 (c_parser_omp_declare_reduction): Likewise for loc.
3982 * c-tree.h (start_init): Add rich_location * param.
3983 (pop_init_level): Add location_t param.
3984 * c-typeck.c (struct initializer_stack): Add field
3985 "missing_brace_richloc".
3986 (start_init): Add richloc param, use it to initialize
3987 the stack node's missing_brace_richloc.
3988 (last_init_list_comma): New decl.
3989 (finish_implicit_inits): Pass last_init_list_comma to
3991 (push_init_level): When finding missing open braces, add fix-it
3992 hints to the richloc.
3993 (pop_init_level): Add "insert_before" param and pass it
3994 when calling pop_init_level. Add fixits about missing
3995 close braces to any richloc. Use the richloc for the
3996 -Wmissing-braces warning.
3997 (set_designator): Pass last_init_list_comma to pop_init_level.
3998 (process_init_element): Likewise.
4000 2017-01-01 Jakub Jelinek <jakub@redhat.com>
4002 Update copyright years.
4004 2016-12-21 Jakub Jelinek <jakub@redhat.com>
4007 * c-typeck.c (build_function_call_vec): If check_function_arguments
4008 returns true, set TREE_NO_WARNING on CALL_EXPR.
4011 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4012 to *expr instead of overwriting it.
4014 2016-12-20 Richard Biener <rguenther@suse.de>
4016 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4018 (c_parser_gimple_statement): Only build assigns for non-error
4020 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4022 2016-12-14 Martin Jambor <mjambor@suse.cz>
4024 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4026 (c_finish_oacc_routine): Adjusted call to
4027 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4028 to use their new names.
4029 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4031 (c_parser_oacc_update): Likewise.
4032 (c_parser_omp_simd): Likewise.
4033 (c_parser_omp_target_update): Likewise.
4034 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4035 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4037 (c_finish_omp_cancellation_point): Likewise.
4038 * gimple-parser.c: Do not include omp-low.h
4040 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4041 James Norris <jnorris@codesourcery.com>
4043 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4044 EXIT_DATA,WAIT} are not used in compound statements.
4045 (c_parser_oacc_enter_exit_data): Update diagnostics.
4047 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4050 * c-decl.c (diagnose_mismatched_decls): Use
4051 OPT_Wbuiltin_declaration_mismatch here too.
4053 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
4054 Alan Hayward <alan.hayward@arm.com>
4055 David Sherwood <david.sherwood@arm.com>
4057 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4058 (make_label, finish_struct): Likewise.
4060 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4061 Richard Biener <rguenther@suse.de>
4063 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4064 * config-lang.in (gtfiles): Add c/c-parser.h.
4065 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4066 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4067 * c-parser.c (enum c_id_kind, struct c_token,
4068 c_parser_next_token_is, c_parser_next_token_is_not,
4069 c_parser_next_token_is_keyword,
4070 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4072 * c-parser.h: ... new header.
4073 * c-parser.c: Include c-parser.h and gimple-parser.h.
4074 (c_parser_peek_token, c_parser_peek_2nd_token,
4075 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4076 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4077 c_parser_error, c_parser_require, c_parser_skip_until_found,
4078 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4079 c_parser_type_name): Export.
4080 (c_parser_tokens_buf): New function.
4081 (c_parser_error): Likewise.
4082 (c_parser_set_error): Likewise.
4083 (c_parser_declspecs): Handle RID_GIMPLE.
4084 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4085 via c_parser_parse_gimple_body.
4086 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4087 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4088 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4089 c_parser_error, c_parser_require, c_parser_skip_until_found,
4090 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4091 c_parser_type_name): Declare.
4092 (struct c_parser): Declare forward.
4093 (c_parser_tokens_buf): Declare.
4094 (c_parser_error): Likewise.
4095 (c_parser_set_error): Likewise.
4096 * gimple-parser.c: New file.
4097 * gimple-parser.h: Likewise.
4099 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4102 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4105 2016-09-11 Le-Chun Wu <lcwu@google.com>
4106 Mark Wielaard <mjw@redhat.com>
4108 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4109 to the given -Wshadow= variant.
4111 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4113 * c-typeck.c: Include memmodel.h.
4115 2016-10-13 Jakub Jelinek <jakub@redhat.com>
4118 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4119 instead of lhd_return_null_tree_v.
4121 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4124 * c-decl.c (smallest_type_quals_location): New static function.
4125 (grokdeclarator): Try to find the correct location for an ignored
4128 2016-09-26 Marek Polacek <polacek@redhat.com>
4131 * c-decl.c (pop_scope): Add gcc_fallthrough.
4133 2016-09-26 Marek Polacek <polacek@redhat.com>
4136 * c-parser.c (struct c_token): Add flags field.
4137 (c_lex_one_token): Pass it to c_lex_with_flags.
4138 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4139 into IFN_FALLTHROUGH.
4140 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4141 attribute fallthrough after a case label or default label.
4142 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4144 2016-09-24 Marek Polacek <polacek@redhat.com>
4147 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4148 have boolean value. Warn about ++/-- on booleans.
4150 2016-09-23 Jakub Jelinek <jakub@redhat.com>
4152 * c-parser.c (incomplete_record_decls): Remove unnecessary
4153 = vNULL initialization of file scope vec.
4155 2016-09-16 Marek Polacek <polacek@redhat.com>
4157 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4159 2016-09-14 Marek Polacek <polacek@redhat.com>
4161 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4162 (fix_array_notation_expr): Likewise.
4163 * c-decl.c (finish_decl): Likewise.
4164 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4165 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4166 (function_to_pointer_conversion): Use false instead of 0.
4167 (convert_lvalue_to_rvalue): Likewise.
4168 (parser_build_unary_op): Likewise.
4169 (build_atomic_assign): Likewise.
4170 (build_unary_op): Change nonconvert parameter type to bool, use
4171 true/false instead of 1/0.
4172 (build_binary_op): Use true instead of 1.
4174 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4176 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4177 of add_fixit_insert to add_fixit_insert_before.
4179 2016-09-13 Marek Polacek <polacek@redhat.com>
4181 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4184 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4187 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4188 COMPOUND_EXPR to warn_for_omitted_condop.
4190 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4192 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4193 c_get_substring_location for this new langhook.
4195 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4198 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4200 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4201 instead of mark_exp_read on low_bound/length expression.
4202 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4203 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4204 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4205 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4206 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4207 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4208 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4209 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4210 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4211 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4212 instead of mark_expr_read.
4213 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4214 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4215 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4216 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4217 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4218 array section bases outside of depend clause, for depend clause
4219 use convert_lvalue_to_rvalue on the base.
4220 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4221 linear, aligned, map, to and from clauses.
4222 (c_omp_clause_copy_ctor): New function.
4224 2016-09-01 Marek Polacek <polacek@redhat.com>
4227 * c-typeck.c (composite_type): Add FALLTHRU comment.
4229 2016-08-31 David Malcolm <dmalcolm@redhat.com>
4231 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4232 to the insertion fixits for "struct", "union", and "enum".
4234 2016-08-30 David Malcolm <dmalcolm@redhat.com>
4236 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4237 rather than add_fixit_misspelled_id.
4238 (undeclared_variable): Likewise.
4239 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4240 now-redundant "here" params from add_fixit_insert method calls.
4241 (c_parser_parameter_declaration): Likewise.
4242 * c-typeck.c (build_component_ref): Remove now-redundant range
4243 param from add_fixit_replace method calls.
4245 2016-08-25 Marek Polacek <polacek@redhat.com>
4247 * c-typeck.c (parser_build_binary_op): Pass LHS to
4248 warn_logical_not_parentheses.
4250 2016-08-25 Marek Polacek <polacek@redhat.com>
4253 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4254 or _FloatN or _FloatNx is not supported.
4255 (finish_declspecs): Set type to integer_type_node when _FloatN or
4256 _FloatNx is not supported.
4258 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4261 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4262 (struct c_declspecs): Add field floatn_nx_idx.
4263 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4264 and _FloatNx type specifiers.
4265 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4266 (c_parser_declspecs, c_parser_attribute_any_word)
4267 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4268 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4269 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4270 narrower than double.
4272 2016-08-12 Jakub Jelinek <jakub@redhat.com>
4273 Martin Liska <mliska@suse.cz>
4276 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4277 % to determine val element to change. Assert that
4278 wchar_bytes * charwidth fits into val array.
4280 2016-08-12 Marek Polacek <polacek@redhat.com>
4283 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4284 (c_parser_postfix_expression): Likewise.
4285 * c-typeck.c (build_unary_op): Adjust fall through comment.
4286 (c_mark_addressable): Likewise.
4288 2016-08-11 Jakub Jelinek <jakub@redhat.com>
4291 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4292 array member through typedef, for orig_qual_indirect == 0 clear
4295 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4298 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4299 this up to selftest::run_c_tests.
4300 (selftest::run_c_tests): New function.
4302 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4304 * c-parser.c (struct oacc_routine_data): Add error_seen and
4305 fndecl_seen members.
4306 (c_finish_oacc_routine): Use these.
4307 (c_parser_declaration_or_fndef): Adjust.
4308 (c_parser_oacc_routine): Likewise. Support more C language
4309 constructs, and improve diagnostics. Move pragma context
4311 (c_parser_pragma): ... here.
4313 * c-parser.c (struct oacc_routine_data): New.
4314 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4316 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4317 declare target" attribute.
4319 2016-08-01 Jan Beulich <jbeulich@suse.com>
4321 * c-fold.c (c_fully_fold_internal): Also emit shift count
4322 warnings for vector types.
4323 * c-typeck.c (build_binary_op): Likewise.
4325 2016-07-29 Marek Polacek <polacek@redhat.com>
4328 * c-decl.c (finish_struct): Rephrase an error message.
4331 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4332 to error node for invalid code.
4335 * c-decl.c (implicitly_declare): Return decl early not only for
4336 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4338 2016-07-29 Jakub Jelinek <jakub@redhat.com>
4341 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4342 on GNU extern inline functions.
4344 2016-07-29 Marek Polacek <polacek@redhat.com>
4347 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4350 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4352 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4354 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4356 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4358 (best_macro_match): Likewise, converting from a typedef to a
4360 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4361 (lookup_name_fuzzy): Update for change of best_macro_match to a
4362 subclass with a ctor that calls cpp_forall_identifiers.
4364 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4366 * c-decl.c (implicit_decl_warning): Update for conversion of
4367 return type of lookup_name_fuzzy to const char *.
4368 (undeclared_variable): Likewise.
4369 (lookup_name_fuzzy): Convert return type from tree to
4371 * c-parser.c (c_parser_declaration_or_fndef): Update for
4372 conversion of return type of lookup_name_fuzzy to const char *.
4373 (c_parser_parameter_declaration): Likewise.
4375 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4377 * c-parser.c (c_parser_oacc_declare): Don't scan for
4379 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4380 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4381 zero-length subarrays.
4383 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4386 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4387 instead of FUZZY_LOOKUP_NAME.
4388 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4389 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4391 2016-07-14 Jakub Jelinek <jakub@redhat.com>
4394 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4396 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4398 * c-parser.c (c_parser_generic_selection): Make type of variable
4400 (c_parser_omp_declare_simd): Likewise.
4402 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4404 * c-decl.c (struct c_struct_parse_info): Change member types
4405 from vec to auto_vec.
4406 (start_struct): Adjust.
4407 (finish_struct): Likewise.
4409 2016-07-02 Jakub Jelinek <jakub@redhat.com>
4412 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4414 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4416 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4417 Move pragma context checking into...
4418 (c_parser_omp_cancellation_point): ... here, and improve
4419 diagnostic messages.
4420 * c-typeck.c (c_finish_omp_cancel)
4421 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4423 2016-06-29 Jakub Jelinek <jakub@redhat.com>
4426 * c-typeck.c (c_build_qualified_type): Don't clear
4427 C_TYPE_INCOMPLETE_VARS for the main variant.
4429 2016-06-28 Martin Sebor <msebor@redhat.com>
4432 * c-typeck.c (output_init_element): Diagnose incompatible types
4433 before non-constant initializers.
4435 2016-06-28 Jakub Jelinek <jakub@redhat.com>
4437 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4439 2016-06-23 Andi Kleen <ak@linux.intel.com>
4441 * Make-lang.in: Add support for autofdo.
4443 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4446 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4447 (implicit_decl_warning): When issuing warnings for implicit
4448 declarations, attempt to provide a suggestion via
4450 (undeclared_variable): Likewise when issuing errors.
4451 (lookup_name_in_scope): Likewise.
4452 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4453 (best_macro_match): New typedef.
4454 (find_closest_macro_cpp_cb): New function.
4455 (lookup_name_fuzzy): New function.
4456 * c-parser.c: Include gcc-rich-location.h.
4457 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4458 (c_keyword_starts_typename): ...this new function.
4459 (c_parser_declaration_or_fndef): When issuing errors about
4460 missing "struct" etc, add a fixit. For other kinds of errors,
4461 attempt to provide a suggestion via lookup_name_fuzzy.
4462 (c_parser_parms_declarator): When looking ahead to detect typos in
4463 type names, also reject CPP_KEYWORD.
4464 (c_parser_parameter_declaration): When issuing errors about
4465 unknown type names, attempt to provide a suggestion via
4467 * c-tree.h (c_keyword_starts_typename): New prototype.
4469 2016-06-20 Joseph Myers <joseph@codesourcery.com>
4472 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4473 c_common_type returns error_mark_node.
4475 2016-06-19 Martin Sebor <msebor@redhat.com>
4478 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4479 __alignof__ (expression).
4481 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4483 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4485 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4487 * c-typeck.c (build_component_ref): Simplify fixit code by
4488 using gcc_rich_location::add_fixit_misspelled_id.
4489 (set_init_label): Likewise.
4491 2016-06-13 David Malcolm <dmalcolm@redhat.com>
4493 * c-parser.c (c_parser_initelt): Provide location of name for new
4494 location_t param of set_init_label.
4495 * c-tree.h (set_init_label): Add location_t param.
4496 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4497 param and use it when issuing error messages about unrecognized
4498 field names. Attempt to provide a fixit hint if appropriate,
4499 otherwise update the error message to provide the type name.
4501 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4504 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4507 2016-06-08 Martin Sebor <msebor@redhat.com>
4508 Jakub Jelinek <jakub@redhat.com>
4512 * c-typeck.c (convert_arguments): Don't promote last argument
4513 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4515 2016-06-08 Marek Polacek <polacek@redhat.com>
4518 * c-decl.c (grokdeclarator): Check TYPE_P.
4521 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4524 2016-06-07 David Malcolm <dmalcolm@redhat.com>
4526 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4527 and structure element reference, capture the location of the
4528 element name token and pass it to build_component_ref.
4529 (c_parser_postfix_expression_after_primary): Likewise for
4530 structure element dereference.
4531 (c_parser_omp_variable_list): Likewise for
4532 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4533 * c-tree.h (build_component_ref): Add location_t param.
4534 * c-typeck.c (build_component_ref): Add location_t param
4535 COMPONENT_LOC. Use it, if available, when issuing hints about
4536 mispelled member names to provide a fixit replacement hint.
4538 2016-06-06 Marek Polacek <polacek@redhat.com>
4541 * c-parser.c (c_parser_direct_declarator): Set location.
4543 2016-06-06 Marek Polacek <polacek@redhat.com>
4545 * c-typeck.c (comptypes_internal): Handle comparisons of
4546 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4547 TYPE_REF_CAN_ALIAS_ALL.
4549 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4551 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4552 arguments as addressable when async clause exists.
4554 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4557 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4558 when combined with target construct.
4560 2016-05-26 Jakub Jelinek <jakub@redhat.com>
4562 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4563 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4565 2016-05-25 Marek Polacek <polacek@redhat.com>
4568 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4571 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4573 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4575 * c-parser.c (c_parser_oacc_declare): Add support for
4576 GOMP_MAP_FIRSTPRIVATE_POINTER.
4577 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4578 argument with enum c_omp_region_type ort.
4579 (handle_omp_array_sections): Likewise. Update call to
4580 handle_omp_array_sections_1.
4581 (c_finish_omp_clauses): Add specific errors and warning messages for
4582 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4583 call to handle_omp_array_sections.
4585 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4587 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4589 2016-05-24 Richard Biener <rguenther@suse.de>
4593 * c-typeck.c (build_array_ref): Do not complain about indexing
4594 non-lvalue vectors. Adjust for function name change.
4596 2016-05-20 Martin Sebor <msebor@redhat.com>
4599 * c-typeck.c (error_init): Use
4600 expansion_point_location_if_in_system_header.
4601 (warning_init): Same.
4603 2016-05-19 David Malcolm <dmalcolm@redhat.com>
4606 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4608 (c_parser_postfix_expression): Likewise.
4609 * c-tree.h (c_expr::set_error): New method.
4610 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4611 that result's range is initialized.
4613 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4615 * c-typeck.c (parser_build_unary_op): Fix formatting.
4617 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4619 * c-decl.c (grokdeclarator): Remove errmsg and use of
4620 targetm.invalid_return_type.
4621 (grokparms): Remove errmsg and use of
4622 targetm.invalid_parameter_type.
4624 2016-05-13 Joseph Myers <joseph@codesourcery.com>
4626 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4627 function return type.
4629 2016-05-12 Marek Polacek <polacek@redhat.com>
4632 * c-decl.c (build_compound_literal): Pass LOC down to
4633 c_incomplete_type_error.
4634 * c-tree.h (require_complete_type): Adjust declaration.
4635 (c_incomplete_type_error): Likewise.
4636 * c-typeck.c (require_complete_type): Add location parameter, pass it
4637 down to c_incomplete_type_error.
4638 (c_incomplete_type_error): Add location parameter, pass it down to
4640 (build_component_ref): Pass location down to c_incomplete_type_error.
4641 (default_conversion): Pass location down to require_complete_type.
4642 (build_array_ref): Likewise.
4643 (build_function_call_vec): Likewise.
4644 (convert_arguments): Likewise.
4645 (build_unary_op): Likewise.
4646 (build_c_cast): Likewise.
4647 (build_modify_expr): Likewise.
4648 (convert_for_assignment): Likewise.
4649 (c_finish_omp_clauses): Likewise.
4651 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4654 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4656 * c-errors.c (pedwarn_c90): Return true if warned.
4657 * c-tree.h (pedwarn_c90): Change return type to bool.
4658 (enum c_declspec_word): Add new enumerator cdw_atomic.
4660 2016-05-11 Marek Polacek <polacek@redhat.com>
4663 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4664 diagnose_mismatched_attributes and call it.
4666 2016-05-10 Marek Polacek <polacek@redhat.com>
4669 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4670 on a declaration following the definition.
4672 2016-05-05 Jakub Jelinek <jakub@redhat.com>
4674 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4675 parse it through to c_parser_c99_block_statement.
4676 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4679 2016-05-04 Marek Polacek <polacek@redhat.com>
4681 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4684 2016-05-04 Marek Polacek <polacek@redhat.com>
4687 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4688 for macro expansions.
4690 2016-05-03 Marek Polacek <polacek@redhat.com>
4693 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4694 check_builtin_function_arguments.
4696 2016-05-03 Richard Biener <rguenther@suse.de>
4698 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4699 the checksum from the previous stage.
4701 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4703 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4704 c_finish_omp_clauses.
4705 (c_parser_omp_all_clauses): Likewise.
4706 (c_parser_oacc_cache): Likewise.
4707 (c_parser_oacc_loop): Likewise.
4708 (omp_split_clauses): Likewise.
4709 (c_parser_omp_declare_target): Likewise.
4710 (c_parser_cilk_all_clauses): Likewise.
4711 (c_parser_cilk_for): Likewise.
4712 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4713 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4715 2016-05-02 Marek Polacek <polacek@redhat.com>
4718 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4721 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4724 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4725 OACC_LOOP_CLAUSE_MASK.
4726 (c_parser_oacc_kernels_parallel): Update call to
4727 c_oacc_split_loop_clauses.
4729 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
4731 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4732 argument to build_modify_expr in two cases.
4734 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4736 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4737 warn_for_memset instead of warning directly here.
4739 2016-04-26 Marek Polacek <polacek@redhat.com>
4742 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4744 (c_parser_for_statement): ... here.
4745 (c_parser_if_statement): Use it.
4746 (c_parser_switch_statement): Use it.
4747 (c_parser_while_statement): Use it.
4750 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4752 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4755 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4756 instead of c_finish_cilk_clauses.
4757 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4758 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4759 floating-point variables in the linear clause for Cilk Plus.
4761 2016-04-18 Michael Matz <matz@suse.de>
4763 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4764 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4766 2016-04-15 Marek Polacek <polacek@redhat.com>
4769 * c-typeck.c (build_unary_op): Pass location down to error and
4772 2016-04-15 Jakub Jelinek <jakub@redhat.com>
4775 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4777 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4778 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4779 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4780 Adjust c_parser_pragma callers.
4781 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4783 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4785 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4786 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4787 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4788 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4789 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4790 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4791 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4792 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4794 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4795 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4798 2016-04-13 Marek Polacek <polacek@redhat.com>
4801 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4803 (c_parser_statement): Likewise.
4804 (c_parser_c99_block_statement): Likewise.
4805 (c_parser_while_statement): Likewise.
4806 (c_parser_for_statement): Likewise.
4807 (c_parser_if_body): Don't set IF_P here.
4808 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4809 about dangling else here.
4810 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4811 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4812 warn about dangling else here.
4814 2016-04-04 Marek Polacek <polacek@redhat.com>
4817 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4819 2016-03-31 Marek Polacek <polacek@redhat.com>
4822 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4824 2016-03-18 David Malcolm <dmalcolm@redhat.com>
4827 * c-parser.c (c_parser_postfix_expression): Set the source range
4828 for uses of "__builtin_types_compatible_p".
4830 2016-03-17 Jakub Jelinek <jakub@redhat.com>
4833 * c-typeck.c (composite_type): Don't count void_list_node
4834 into len, if the list is terminated by void_list_node, start
4835 with void_list_node instead of NULL for newargs. Stop
4838 2016-03-16 Marek Polacek <polacek@redhat.com>
4841 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4842 nested functions returning VM types.
4844 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4846 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4847 when calling c_finish_omp_clauses.
4849 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4852 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4855 2016-03-04 Marek Polacek <polacek@redhat.com>
4858 * c-parser.c (c_parser_postfix_expression): Call
4859 c_parser_cast_expression rather than c_parser_postfix_expression.
4861 2016-03-01 Jakub Jelinek <jakub@redhat.com>
4865 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4866 of incomplete decls to error_mark_node.
4868 2016-02-24 Marek Polacek <polacek@redhat.com>
4871 * c-decl.c (finish_decl): Don't update the copy of the type of a
4872 different decl type.
4874 2016-02-23 Jakub Jelinek <jakub@redhat.com>
4877 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4878 in id_kind reclassification.
4880 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4883 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4885 2016-02-16 James Norris <jnorris@codesourcery.com>
4888 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4890 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4892 * c-decl.c (build_null_declspecs): Zero the entire struct.
4895 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4896 callers changed. If nested_p is true, use it to call
4897 finish_implicit_inits.
4898 * c-tree.h (finish_implicit_inits): Declare.
4899 * c-typeck.c (finish_implicit_inits): New function. Move code
4901 (push_init_level): ... here.
4902 (set_designator, process_init_element): Call finish_implicit_inits.
4904 2016-02-11 Jakub Jelinek <jakub@redhat.com>
4907 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4908 arguments for -Waddress warning.
4910 2016-02-04 Jakub Jelinek <jakub@redhat.com>
4913 * c-decl.c (finish_enum): When honoring mode attribute,
4914 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4916 2016-01-29 Jakub Jelinek <jakub@redhat.com>
4919 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4920 all type variants, not just TYPE_MAIN_VARIANT.
4922 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4925 * c-decl.c (c_write_global_declarations_1): Warn with
4926 warn_unused_function if static prototype without definition
4929 2016-01-27 Marek Polacek <polacek@redhat.com>
4932 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4933 to unsigned, if needed. Add -Wsign-compare warning.
4935 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4937 PR tree-optimization/69483
4938 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4940 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4943 * c-tree.h (incomplete_record_decls): Declare.
4944 * c-parser.c (incomplete_record_decls): Define.
4945 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4946 report error if any decl has zero size.
4947 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4948 or enum type to incomplete_record_decls.
4950 2016-01-14 Tom de Vries <tom@codesourcery.com>
4952 PR tree-optimization/68773
4953 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4956 2016-01-14 Marek Polacek <polacek@redhat.com>
4959 * c-decl.c (grokdeclarator): Provide more information for invalid
4962 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4964 * c-parser.c (c_parser_unary_expression): For dereferences, build
4965 a combined location before calling build_indirect_ref, so that
4966 error reports cover the full range, manually updating the c_expr
4969 2016-01-06 Marek Polacek <polacek@redhat.com>
4972 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4973 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4976 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4978 Update copyright years.
4980 2016-01-04 Marek Polacek <polacek@redhat.com>
4983 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4984 optimization to use __atomic_fetch_* built-in if possible.
4986 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4988 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4990 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4993 2015-12-22 Marek Polacek <polacek@redhat.com>
4996 * c-typeck.c (build_component_ref): Warn when acessing elements of
4997 atomic structures or unions.
4999 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5001 * c-typeck.c: Include "gcc-rich-location.h".
5002 (build_binary_op): In the two places that call binary_op_error,
5003 create a gcc_rich_location and populate it with the location of
5004 the binary op and its two operands.
5006 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5008 * c-parser.c (c_parser_statement_after_labels): When calling
5009 c_finish_return, Use the return expression's location if it has
5010 one, falling back to the location of the first token within it.
5011 * c-typeck.c (c_finish_return): When issuing warnings about
5012 the incorrect presence/absence of a return value, issue a note
5013 showing the declaration of the function.
5015 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5017 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5019 (c_parser_peek_nth_token): New function.
5020 (c_parser_peek_conflict_marker): New function.
5021 (c_parser_error): Detect conflict markers and report them as such.
5023 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5025 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5026 to preserve range information for the primary expression
5027 in the call to c_parser_postfix_expression_after_primary.
5029 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5031 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5032 expression location, falling back on the first token location,
5033 rather than always using the latter.
5035 2015-12-16 Marek Polacek <polacek@redhat.com>
5038 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5041 2015-12-15 Marek Polacek <polacek@redhat.com>
5044 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5047 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5049 * c-parser.c (c_parser_alignof_expression): Capture location of
5050 closing parenthesis (if any), or of end of unary expression, and
5051 use it to build a src_range for the expression.
5053 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5056 * c-parser.c (c_parser_get_builtin_args): Add
5057 "out_close_paren_loc" param, and write back to it.
5058 (c_parser_postfix_expression): Capture the closing
5059 parenthesis location for RID_CHOOSE_EXPR,
5060 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5061 RID_BUILTIN_SHUFFLE and use it to set the source range
5062 for such expressions; within RID_BUILTIN_COMPLEX set
5063 the underlying location.
5065 2015-12-07 Marek Polacek <polacek@redhat.com>
5068 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5069 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5071 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5073 * c-tree.h (c_build_va_arg): Adjust prototype.
5074 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5075 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5076 parameter, adjust throughout and issue an error if EXPR is a component
5077 with reverse storage order.
5079 2015-12-02 Jason Merrill <jason@redhat.com>
5081 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5082 (c_fully_fold_internal, decl_constant_value_for_optimization):
5083 Move from c-common.c.
5084 * c-tree.h: Declare decl_constant_value_for_optimization.
5085 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5087 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5090 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5091 following link from declarator to next declarator. Track original
5092 qualified type and pass it to c_build_qualified_type.
5093 * c-typeck.c (c_build_qualified_type): Add arguments
5094 orig_qual_type and orig_qual_indirect.
5096 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5098 * c-parser.c (c_parser_omp_clause_name)
5099 (c_parser_oacc_all_clauses): Alphabetical sorting.
5101 2015-12-02 Jakub Jelinek <jakub@redhat.com>
5104 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5107 2015-12-01 Julian Brown <julian@codesourcery.com>
5108 Cesar Philippidis <cesar@codesourcery.com>
5109 James Norris <James_Norris@mentor.com>
5111 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5112 (c_parser_oacc_clause_use_device): New function.
5113 (c_parser_oacc_all_clauses): Add use_device support.
5114 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5115 (c_parser_oacc_host_data): New function.
5116 (c_parser_omp_construct): Add host_data support.
5117 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5118 * c-typeck.c (c_finish_oacc_host_data): New function.
5119 (c_finish_omp_clauses): Add use_device support.
5121 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5124 * c-decl.c: Set TYPE_PACKED in variants.
5126 2015-11-27 Martin Liska <mliska@suse.cz>
5129 * c-array-notation.c (fix_builtin_array_notation_fn):
5130 Use release_vec_vec instead of vec::release.
5131 (build_array_notation_expr): Likewise.
5132 (fix_conditional_array_notations_1): Likewise.
5133 (fix_array_notation_expr): Likewise.
5134 (fix_array_notation_call_expr): Likewise.
5136 2015-11-27 Jakub Jelinek <jakub@redhat.com>
5139 * c-parser.c (c_parser_compound_statement_nostart): If
5140 last_label is true, use pragma_stmt instead of pragma_compound
5141 as second c_parser_pragma argument.
5142 (c_parser_omp_ordered, c_parser_omp_target_update,
5143 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5144 false as second argument to c_parser_skip_to_pragma_eol after
5145 diagnosing standalone directives used in pragma_stmt context.
5147 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5149 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5150 with "if (ENABLE_OFFLOADING)".
5152 2015-11-23 David Malcolm <dmalcolm@redhat.com>
5155 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5156 for various Objective-C constructs: Class.name syntax,
5157 @selector(), @protocol(), @encode(), and [] message syntax.
5159 2015-11-20 David Malcolm <dmalcolm@redhat.com>
5162 * c-typeck.c (should_suggest_deref_p): New function.
5163 (build_component_ref): Special-case POINTER_TYPE when
5164 generating a "not a structure of union" error message, and
5165 suggest a "->" rather than a ".", providing a fix-it hint.
5167 2015-11-19 David Malcolm <dmalcolm@redhat.com>
5169 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5170 candidate into a new function, find_closest_identifier.
5172 2015-11-19 Marek Polacek <polacek@redhat.com>
5175 * c-typeck.c (parser_build_binary_op): Properly handle
5176 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5178 2015-11-17 David Malcolm <dmalcolm@redhat.com>
5180 * c-parser.c (set_c_expr_source_range): Bulletproof both
5181 overloaded implementations against NULL expr->value.
5182 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5184 (c_parser_unary_expression): Likewise when handling addresses of
5186 (c_parser_postfix_expression): Likewise for statement expressions,
5187 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5188 __builtin_va_arg, and for __builtin_offset_of.
5189 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5190 src_range using the range of the braced initializer.
5191 (c_parser_transaction_expression): Set src_range for "ret" to a
5192 sane pair of values.
5194 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5196 * c-parser.c (c_finish_omp_declare_simd): Look for
5197 "simd" attribute as well. Update error message.
5199 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5201 * c-parser.c (c_parser_omp_declare_target): Adjust.
5203 2015-11-14 Jakub Jelinek <jakub@redhat.com>
5205 * c-typeck.c (c_finish_omp_clauses): Don't mark
5206 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5208 2015-11-14 Marek Polacek <polacek@redhat.com>
5210 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5211 * c-typeck.c: Likewise.
5213 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5215 * c-decl.c (warn_defaults_to): Pass line_table to
5217 * c-errors.c (pedwarn_c99): Likewise.
5218 (pedwarn_c90): Likewise.
5219 * c-parser.c (set_c_expr_source_range): New functions.
5220 (c_token::get_range): New method.
5221 (c_token::get_finish): New method.
5222 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5223 based on the range from the start of the LHS to the end of the
5225 (c_parser_conditional_expression): Likewise, based on the range
5226 from the start of the cond.value to the end of exp2.value.
5227 (c_parser_binary_expression): Call set_c_expr_source_range on
5228 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5229 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5230 based on the cast_loc through to the end of the expr.
5231 (c_parser_unary_expression): Likewise, based on the
5232 op_loc through to the end of op.
5233 (c_parser_sizeof_expression) Likewise, based on the start of the
5234 sizeof token through to either the closing paren or the end of
5236 (c_parser_postfix_expression): Likewise, using the token range,
5237 or from the open paren through to the close paren for
5238 parenthesized expressions.
5239 (c_parser_postfix_expression_after_primary): Likewise, for
5240 various kinds of expression.
5241 * c-tree.h (struct c_expr): Add field "src_range".
5242 (c_expr::get_start): New method.
5243 (c_expr::get_finish): New method.
5244 (set_c_expr_source_range): New decls.
5245 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5246 on ret for prefix unary ops.
5247 (parser_build_binary_op): Likewise, running from the start of
5248 arg1.value through to the end of arg2.value.
5250 2015-11-13 Marek Polacek <polacek@redhat.com>
5253 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5255 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5257 * c-typeck.c: Include spellcheck.h.
5258 (lookup_field_fuzzy_find_candidates): New function.
5259 (lookup_field_fuzzy): New function.
5260 (build_component_ref): If the field was not found, try using
5261 lookup_field_fuzzy and potentially offer a suggestion.
5263 2015-11-12 James Norris <jnorris@codesourcery.com>
5264 Joseph Myers <joseph@codesourcery.com>
5266 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5267 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5268 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5269 and PRAGMA_OMP_CLAUSE_LINK.
5270 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5271 and PRAGMA_OACC_CLAUSE_LINK.
5272 (OACC_DECLARE_CLAUSE_MASK): New definition.
5273 (c_parser_oacc_declare): New function.
5275 2015-11-12 Marek Polacek <polacek@redhat.com>
5278 * c-parser.c (c_parser_for_statement): Reclassify the token in
5281 2015-11-11 Marek Polacek <polacek@redhat.com>
5285 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5286 checking the size of an array.
5288 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5290 * c-array-notation.c: Remove unused header files.
5291 * c-aux-info.c: Likewise.
5292 * c-convert.c: Likewise.
5293 * c-decl.c: Likewise.
5294 * c-errors.c: Likewise.
5295 * c-lang.c: Likewise.
5296 * c-objc-common.c: Likewise.
5297 * c-parser.c: Likewise.
5298 * c-typeck.c: Likewise.
5299 * gccspec.c: Likewise.
5301 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5302 Cesar Philippidis <cesar@codesourcery.com>
5303 James Norris <jnorris@codesourcery.com>
5304 Julian Brown <julian@codesourcery.com>
5305 Nathan Sidwell <nathan@codesourcery.com>
5307 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5309 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5310 (c_parser_pragma): Parse 'acc routine'.
5311 (OACC_ROUTINE_CLAUSE_MARK): Define.
5312 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5314 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5317 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5318 location of the backward-goto to the start of the loop body.
5320 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5323 * c-parser.c (c_parser_while_statement): Finish the loop before
5324 parsing ahead for misleading indentation.
5325 (c_parser_for_statement): Likewise.
5327 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5329 * c-decl.c (finish_struct): If the structure has reverse storage
5330 order, rewrite the type of array fields with scalar component. Call
5331 maybe_apply_pragma_scalar_storage_order on entry.
5332 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5333 errors on bit-fields and reverse SSO here and not...
5334 (c_mark_addressable): ...here.
5335 (output_init_element): Adjust call to initializer_constant_valid_p.
5336 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5338 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5340 * c-decl.c (warn_defaults_to): Update for change in signature
5341 of diagnostic_set_info.
5342 * c-errors.c (pedwarn_c99): Likewise.
5343 (pedwarn_c90): Likewise.
5344 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5345 for textinfo::set_location.
5347 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5348 Thomas Schwinge <thomas@codesourcery.com>
5349 James Norris <jnorris@codesourcery.com>
5351 * c-parser.c (c_parser_omp_clause_name): Add support for
5352 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5353 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5354 default(none) in OpenACC.
5355 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5357 (c_parser_oacc_clause_tile): New function.
5358 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5359 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5360 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5362 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5363 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5365 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5366 (c_parser_oacc_update): Update the error message for missing clauses.
5367 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5368 and OMP_CLAUSE_INDEPENDENT.
5370 2015-11-05 Marek Polacek <polacek@redhat.com>
5373 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5374 deal with pre-evaluation on invalid types.
5376 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5377 Ilya Verbin <ilya.verbin@intel.com>
5379 * c-parser.c: Include context.h and gimple-expr.h.
5380 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5381 monotonic together with nonmonotonic.
5382 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5383 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5384 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5385 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5386 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5387 expressions on combined target teams before the target.
5388 (c_parser_omp_declare_target): If decl has "omp declare target" or
5389 "omp declare target link" attribute, and cgraph or varpool node already
5390 exists, then set corresponding flags. Call c_finish_omp_clauses
5391 in the parenthesized extended-list syntax case.
5392 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5394 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5395 on OMP_CLAUSE_REDUCTION array sections.
5396 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5397 into the constant offset, or for variable low-bound using
5398 POINTER_PLUS_EXPR. For structure element based array sections use
5399 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5400 (c_finish_omp_clauses): Drop generic_field_head, structure
5401 elements are now always mapped even as array section bases,
5402 diagnose same var in data sharing and mapping clauses. Diagnose if
5403 linear step on declare simd is neither a constant nor a uniform
5404 parameter. Look through POINTER_PLUS_EXPR for array section
5405 reductions. Diagnose the same var or function appearing multiple
5406 times on the same directive. Fix up wording for the to clause if t
5407 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5408 modifier on kinds other than dynamic or guided or nonmonotonic
5409 modifier together with ordered clause.
5411 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5412 Chung-Lin Tang <cltang@codesourcery.com>
5414 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5416 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5418 * c-array-notation.c: Reorder #include's and remove duplicates.
5419 * c-aux-info.c: Likewise.
5420 * c-convert.c: Likewise.
5421 * c-decl.c: Likewise.
5422 * c-errors.c: Likewise.
5423 * c-lang.c: Likewise.
5424 * c-objc-common.c: Likewise.
5425 * c-parser.c: Likewise.
5426 * c-typeck.c: Likewise.
5428 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
5431 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5432 after calling build_qualified_type.
5434 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5435 Thomas Schwinge <thomas@codesourcery.com>
5436 James Norris <jnorris@codesourcery.com>
5437 Joseph Myers <joseph@codesourcery.com>
5438 Julian Brown <julian@codesourcery.com>
5439 Bernd Schmidt <bschmidt@redhat.com>
5441 * c-parser.c (c_parser_oacc_shape_clause): New.
5442 (c_parser_oacc_simple_clause): New.
5443 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5444 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5446 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5447 James Norris <jnorris@codesourcery.com>
5448 Cesar Philippidis <cesar@codesourcery.com>
5452 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5453 parameters, and handle these. Adjust all users.
5454 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5456 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5458 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5460 (c_finish_omp_construct): Declare function.
5461 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5462 Merge functions into...
5463 (c_finish_omp_construct): ... this new function.
5465 2015-10-22 Richard Biener <rguenther@suse.de>
5467 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5468 before folding a MINUS_EXPR.
5470 2015-10-21 Marek Polacek <polacek@redhat.com>
5473 * c-decl.c (start_function): Warn about vararg functions without
5476 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5478 * c-typeck.c (build_conditional_expr): Use boolean vector
5479 type for vector comparison.
5480 (build_vec_cmp): New.
5481 (build_binary_op): Use build_vec_cmp for comparison.
5483 2015-10-20 Marek Polacek <polacek@redhat.com>
5485 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5487 2015-10-20 Marek Polacek <polacek@redhat.com>
5490 * c-parser.c (c_parser_attributes): Break out of the loop if the
5491 token after an attribute isn't a comma.
5493 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5494 Aldy Hernandez <aldyh@redhat.com>
5496 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5497 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5498 (c_parser_omp_variable_list): Handle structure elements for
5499 map, to and from clauses. Handle array sections in reduction
5500 clause. Formatting fixes.
5501 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5502 if clause modifiers.
5503 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5504 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5505 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5506 c_parser_omp_clause_is_device_ptr): New functions.
5507 (c_parser_omp_clause_ordered): Parse optional parameter.
5508 (c_parser_omp_clause_reduction): Handle array reductions.
5509 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5510 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5512 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5513 (c_parser_omp_clause_depend_sink): New function.
5514 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5515 (c_parser_omp_clause_map): Parse release/delete map kinds and
5516 optional always modifier.
5517 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5518 and c_finish_omp_clauses callers.
5519 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5520 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5521 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5522 (OMP_CRITICAL_CLAUSE_MASK): Define.
5523 (c_parser_omp_critical): Parse critical clauses.
5524 (c_parser_omp_for_loop): Handle doacross loops, adjust
5525 c_finish_omp_for and c_finish_omp_clauses callers.
5526 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5527 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5528 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5529 (c_parser_omp_for): Disallow ordered clause when combined with
5530 distribute. Disallow linear clause when combined with distribute
5531 and not combined with simd.
5532 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5533 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5534 parse clauses and if depend clause is found, don't parse a body.
5535 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5536 Allow target parallel without for after it.
5537 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5538 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5539 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5541 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5542 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5543 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5544 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5546 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5547 defaultmap and is_device_ptr clauses.
5548 (c_parser_omp_target): Parse target parallel and target simd. Set
5549 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5550 and target exit data. Diagnose invalid map kinds.
5551 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5552 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5554 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5556 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5557 (c_parser_omp_taskloop): New function.
5558 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5559 handle PRAGMA_OMP_TASKLOOP.
5560 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5561 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5562 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5563 Add IS_OMP argument, handle structure element bases, diagnose
5564 bitfields, pass IS_OMP recursively, diagnose known zero length
5565 array sections in depend clauses, handle array sections in reduction
5566 clause, diagnose negative length even for pointers.
5567 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5568 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5569 array sections in reduction clause, set
5570 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5571 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5572 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5573 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5575 2015-10-06 Marek Polacek <polacek@redhat.com>
5577 * c-parser.c (c_parser_statement_after_labels): Use
5578 protected_set_expr_location.
5579 (c_parser_omp_clause_num_gangs): Likewise.
5580 (c_parser_omp_clause_num_threads): Likewise.
5581 (c_parser_omp_clause_num_workers): Likewise.
5582 (c_parser_omp_clause_vector_length): Likewise.
5583 (c_parser_omp_clause_num_teams): Likewise.
5584 (c_parser_omp_clause_thread_limit): Likewise.
5585 * c-typeck.c (build_c_cast): Likewise.
5586 (c_cast_expr): Likewise.
5588 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5590 * c-typeck.c (c_tree_equal): Use real_equal instead of
5593 2015-10-04 Jason Merrill <jason@redhat.com>
5595 * c-parser.c (c_lex_one_token): Handle @synchronized.
5596 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5597 can change whether the function is transaction_safe.
5599 2015-10-02 Marek Polacek <polacek@redhat.com>
5602 * c-typeck.c (convert_for_assignment): Use the expansion point
5603 location throughout.
5605 2015-10-02 Marek Polacek <polacek@redhat.com>
5608 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5609 and pass it down to c_parser_if_statement.
5610 (c_parser_else_body): Add CHAIN parameter and pass it down to
5611 c_parser_statement_after_labels.
5612 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5613 duplicated if-else-if conditions.
5615 2015-10-01 Marek Polacek <polacek@redhat.com>
5617 * c-typeck.c (convert_for_assignment): Improve commentary.
5619 2015-09-30 Marek Polacek <polacek@redhat.com>
5622 * c-typeck.c (c_finish_return): Use the expansion point location for
5623 certain "return with value" warnings.
5625 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5627 * c-parser.c (pragma_lex): Add loc argument.
5629 2015-09-15 Marek Polacek <polacek@redhat.com>
5632 * c-decl.c (tag_exists_p): New function.
5633 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5634 struct/union/enum keywords are missing.
5635 * c-tree.h (tag_exists_p): Declare.
5637 2015-09-15 Marek Polacek <polacek@redhat.com>
5639 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5640 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5641 Return NULL_TREE instead of 0.
5642 (lookup_name): Return NULL_TREE instead of 0.
5643 (lookup_name_in_scope): Likewise.
5644 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5645 (parser_xref_tag): Use false instead of 0.
5646 (start_struct): Use true instead of 1.
5647 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5649 2015-09-14 Marek Polacek <polacek@redhat.com>
5651 * c-typeck.c (set_nonincremental_init_from_string): Use
5652 HOST_WIDE_INT_M1U when shifting a negative value.
5654 2015-09-09 Mark Wielaard <mjw@redhat.com>
5656 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5659 2015-09-10 Jakub Jelinek <jakub@redhat.com>
5662 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5663 into OMP_FOR_PRE_BODY rather than before the loop.
5665 2015-09-09 Jakub Jelinek <jakub@redhat.com>
5668 * c-parser.c (c_parser_oacc_all_clauses,
5669 c_parser_omp_all_clauses): Remove invalid clause from
5670 list of clauses even if parser->error is set.
5673 * c-parser.c (c_parser_omp_clause_aligned,
5674 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5676 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5680 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5681 instead of c_parser_unary_expression. If the result is !lvalue_p,
5682 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5684 2015-09-04 Marek Polacek <polacek@redhat.com>
5687 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5689 2015-09-03 Martin Sebor <msebor@redhat.com>
5692 * c-typeck.c (convert_arguments, parser_build_unary_op,
5693 build_conditional_expr, c_cast_expr, convert_for_assignment,
5694 build_binary_op, _objc_common_truthvalue_conversion): Call
5696 (c_decl_implicit): Define.
5698 2015-09-02 Marek Polacek <polacek@redhat.com>
5701 * c-parser.c (c_parser_enum_specifier): Give a better error for
5704 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5706 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5708 2015-08-12 Marek Polacek <polacek@redhat.com>
5710 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5713 2015-08-03 Marek Polacek <polacek@redhat.com>
5716 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5718 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5720 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5722 * c-parser.c (c_parser_if_body): Take token_indent_info
5723 argument. Call warn_for_misleading_indentation even when the
5724 body is a semicolon. Extract token_indent_infos corresponding
5725 to the guard, body and next tokens. Adjust call to
5726 warn_for_misleading_indentation accordingly.
5727 (c_parser_else_body): Likewise.
5728 (c_parser_if_statement): Likewise.
5729 (c_parser_while_statement): Likewise.
5730 (c_parser_for_statement): Likewise.
5732 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5733 Manuel López-Ibáñez <manu@gcc.gnu.org>
5735 * c-decl.c (get_parm_info): Remove static var. Update warning
5738 2015-07-27 Marek Polacek <polacek@redhat.com>
5742 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5744 2015-07-20 Marek Polacek <polacek@redhat.com>
5747 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5748 (build_binary_op): Warn about left shift overflows.
5750 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5752 * c-array-notation.c: Adjust includes for flags.h changes.
5753 * c-objc-common.c: Likewise.
5755 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5757 * c-array-notation.c: Adjust includes.
5758 * c-aux-info.c: Likewise.
5759 * c-convert.c: Likewise.
5760 * c-decl.c: Likewise.
5761 * c-errors.c: Likewise.
5762 * c-lang.c: Likewise.
5763 * c-objc-common.c: Likewise.
5764 * c-parser.c: Likewise.
5765 * c-typeck.c: Likewise.
5767 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5770 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5772 2015-06-29 Marek Polacek <polacek@redhat.com>
5775 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5776 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5777 about -Wswitch-bool here.
5778 (do_case): Update c_add_case_label call.
5779 (c_finish_case): Update c_do_switch_warnings call.
5781 2015-06-27 Marek Polacek <polacek@redhat.com>
5783 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5785 2015-06-26 Marek Polacek <polacek@redhat.com>
5787 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5789 * c-typeck.c (array_to_pointer_conversion): Likewise.
5790 (build_unary_op): Likewise.
5791 (c_finish_return): Likewise.
5793 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5795 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5796 * c-parser.c: Likewise.
5798 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5800 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5801 instead of pointer_hash.
5802 (detect_field_duplicates): Likewise.
5804 2015-06-25 Marek Polacek <polacek@redhat.com>
5806 * c-array-notation.c: Use VAR_P throughout.
5807 * c-decl.c: Likewise.
5808 * c-objc-common.c: Likewise.
5809 * c-parser.c: Likewise.
5810 * c-typeck.c: Likewise.
5812 2015-06-25 Marek Polacek <polacek@redhat.com>
5814 * c-decl.c: Use is_global_var throughout.
5815 * c-parser.c: Likewise.
5816 * c-typeck.c: Likewise.
5818 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5820 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5821 * c-aux-info.c: Likewise.
5822 * c-convert.c: Likewise.
5823 * c-decl.c: Likewise.
5824 * c-errors.c: Likewise.
5825 * c-lang.c: Likewise.
5826 * c-objc-common.c: Likewise.
5827 * c-parser.c: Likewise.
5828 * c-typeck.c: Likewise.
5830 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
5833 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5836 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5838 * c-decl.c (pop_scope): Register the main translation unit
5839 through the new debug hook.
5841 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5843 * c-array-notation.c : Adjust include files.
5844 * c-aux-info.c : Likewise.
5845 * c-convert.c : Likewise.
5846 * c-decl.c : Likewise.
5847 * c-errors.c : Likewise.
5848 * c-lang.c : Likewise.
5849 * c-lang.h : Likewise.
5850 * c-objc-common.c : Likewise.
5851 * c-parser.c : Likewise.
5852 * c-typeck.c : Likewise.
5854 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5856 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5857 immediately clobber it.
5858 (c_write_global_declarations_1): Remove call to
5859 check_global_declaration_1.
5860 (c_write_global_declarations_2): Remove.
5861 (c_write_final_cleanups): Rename from c_write_global_declarations.
5862 Remove call to finalize_compilation_unit.
5863 Remove calls to debugging hooks.
5864 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5865 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5866 * c-tree.h: Remove c_write_global_declarations.
5868 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5870 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5871 * c-aux-info.c: Likewise.
5872 * c-convert.c: Likewise.
5873 * c-decl.c: Likewise.
5874 * c-errors.c: Likewise.
5875 * c-lang.c: Likewise.
5876 * c-objc-common.c: Likewise.
5877 * c-parser.c: Likewise.
5878 * c-typeck.c: Likewise.
5880 2015-06-04 Marek Polacek <polacek@redhat.com>
5883 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5886 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5888 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5889 Warn for empty struct.
5890 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5892 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5894 * c-decl.c (start_function): Call plugin before parsing.
5895 (finish_function): Call plugin after parsing.
5897 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5900 * c-decl.c (merge_decls): Merge DECL_COMMON.
5902 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
5904 * Make-lang.in (check_gcc_pallelize): Define.
5906 2015-05-22 Marek Polacek <polacek@redhat.com>
5909 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5912 2015-05-21 Marek Polacek <polacek@redhat.com>
5914 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5917 2015-05-20 Marek Polacek <polacek@redhat.com>
5919 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5920 * c-typeck.c: Likewise.
5922 2015-05-19 Marek Polacek <polacek@redhat.com>
5924 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5926 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5929 * c-parser.c (c_parser_omp_for_loop): Don't add
5930 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5931 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5932 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5935 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5937 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5940 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5943 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5946 2015-05-14 Marek Polacek <polacek@redhat.com>
5950 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5953 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5955 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5956 to add a call to warn_for_misleading_indentation.
5957 (c_parser_else_body): Likewise, adding param "else_loc".
5958 (c_parser_if_statement): Check for misleading indentation.
5959 (c_parser_while_statement): Likewise.
5960 (c_parser_for_statement): Likewise.
5962 2015-05-08 Marek Polacek <polacek@redhat.com>
5965 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5966 (output_init_element): Likewise.
5968 2015-05-07 Marek Polacek <polacek@redhat.com>
5971 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5974 2015-04-30 Marek Polacek <polacek@redhat.com>
5976 * c-typeck.c (set_init_label): Call error_at instead of error and
5979 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5982 * c-typeck.c (c_build_va_arg): Clarify the error message.
5984 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5986 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5987 OMP_STANDALONE_CLAUSES.
5989 2015-04-28 Marek Polacek <polacek@redhat.com>
5991 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5993 2015-04-28 Marek Polacek <polacek@redhat.com>
5996 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5998 2015-04-25 Marek Polacek <polacek@redhat.com>
6001 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6004 2015-04-23 Marek Polacek <polacek@redhat.com>
6007 * c-decl.c (set_labels_context_r): New function.
6008 (store_parm_decls): Call it via walk_tree_without_duplicates.
6009 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6010 instead of create_tmp_var. Build TARGET_EXPR instead of
6012 (build_atomic_assign): Use create_tmp_var_raw instead of
6013 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6015 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6017 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6018 (c_parser_omp_target_update): Add missed %> to error_at ().
6020 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6023 * c-decl.c (c_default_pointer_mode): Remove definition.
6024 * c-tree.h (c_default_pointer_mode): Remove declaration.
6026 2015-03-27 Tobias Burnus <burnus@net-b.de>
6029 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6031 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6032 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6033 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6035 2015-03-19 Jakub Jelinek <jakub@redhat.com>
6037 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6038 attribute for DECL_EXTERNAL VAR_DECLs.
6040 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6042 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6045 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6048 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6049 before preparing arguments to warn_logical_not_parentheses.
6051 2015-03-09 Jakub Jelinek <jakub@redhat.com>
6054 * c-typeck.c (parser_build_binary_op): Don't warn for
6055 !!x == y or !b == y where b is _Bool.
6057 2015-03-09 Marek Polacek <polacek@redhat.com>
6059 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6060 * c-decl.c (grokdeclarator): Likewise.
6061 * c-typeck.c (build_binary_op): Likewise.
6063 2015-02-27 Marek Polacek <polacek@redhat.com>
6066 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6068 2015-02-14 Marek Polacek <polacek@redhat.com>
6071 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6072 declared through a typedef name.
6074 2015-02-13 Marek Polacek <polacek@redhat.com>
6077 * c-decl.c (grokdeclarator): Print also the type when giving
6078 the error message about array's incomplete element type.
6080 2015-02-11 Jakub Jelinek <jakub@redhat.com>
6083 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6084 check in the POP macro.
6086 2015-02-09 Marek Polacek <polacek@redhat.com>
6089 * c-typeck.c (process_init_element): Don't always wrap
6090 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6091 initializing a range of elements.
6093 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6097 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6099 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
6101 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6102 processing enum declaration.
6104 2015-01-29 Marek Polacek <polacek@redhat.com>
6107 * c-typeck.c (pop_init_level): If constructor_elements has
6108 exactly one element with integer_zerop value, set constructor_zeroinit
6109 to 1. Remove braces around warning_init call.
6111 2015-01-27 Jakub Jelinek <jakub@redhat.com>
6114 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6115 of FUNCTION_DECLs with error_mark_node.
6117 2015-01-26 Jakub Jelinek <jakub@redhat.com>
6120 * c-typeck.c (convert_arguments): Return -1 if there are
6121 error_args, even if we've diagnosed too many arguments.
6123 2015-01-21 Richard Biener <rguenther@suse.de>
6126 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6127 for builtins the user declared correctly.
6129 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6130 Bernd Schmidt <bernds@codesourcery.com>
6131 Cesar Philippidis <cesar@codesourcery.com>
6132 James Norris <jnorris@codesourcery.com>
6133 Jakub Jelinek <jakub@redhat.com>
6134 Ilmir Usmanov <i.usmanov@samsung.com>
6136 * c-parser.c: Include "gomp-constants.h".
6137 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6138 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6139 Use OMP_CLAUSE_SET_MAP_KIND.
6140 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6141 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6142 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6143 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6144 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6145 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6146 "copyout", "create", "delete", "deviceptr", "gang", "host",
6147 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6148 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6149 "present_or_create", "pcreate", "seq", "self", "vector",
6150 "vector_length", "wait", "worker".
6151 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6152 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6153 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6154 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6155 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6156 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6157 (c_parser_oacc_data_clause_deviceptr)
6158 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6159 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6160 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6161 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6162 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6163 (c_parser_oacc_parallel, c_parser_oacc_update)
6164 (c_parser_oacc_wait): New functions.
6165 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6166 (c_finish_oacc_data): New prototypes.
6167 * c-typeck.c: Include "gomp-constants.h".
6168 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6169 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6170 OMP_CLAUSE_SET_MAP_KIND.
6171 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6172 (c_finish_oacc_data): New functions.
6173 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6174 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6175 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6176 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6177 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6178 GOMP_MAP_FORCE_DEVICEPTR.
6180 2015-01-09 Michael Collison <michael.collison@linaro.org>
6182 * c-array-notation.c: Include hash-set.h, machmode.h,
6183 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6184 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6185 * c-aux-info.c: Ditto.
6186 * c-convert.c: Ditto.
6188 * c-errors.c: Ditto.
6189 * c-lang.c: Dittoxs.
6190 * c-objc-common.c: Ditto.
6191 * c-parser.c: Ditto.
6192 * c-typeck.c: Include hash-set.h, machmode.h,
6193 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6194 fold-const.h, wide-int.h, inchash.h, real.h and
6195 fixed-value.h due to flattening of tree.h.
6197 2015-01-07 Marek Polacek <polacek@redhat.com>
6200 * c-typeck.c (process_init_element): Disallow initialization of
6201 a flexible array member with a string constant if the structure
6204 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6207 * c-typeck.c (convert_for_assignment, c_finish_return): For
6208 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6209 types also set in_late_binary_op around convert call.
6210 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6211 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6212 result on expr as last argument to ubsan_instrument_float_cast,
6213 if in_late_binary_op, don't use c_save_expr but save_expr.
6215 Update copyright years.
6217 2015-01-05 Marek Polacek <polacek@redhat.com>
6220 * c-typeck.c (build_array_ref): Pass loc down to
6221 warn_array_subscript_with_type_char.
6223 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6225 * c-typeck.c: New behavious for pointers to arrays with qualifiers
6226 (common-pointer-type): For pointers to arrays take qualifiers from
6228 (build_conditional_expr): Add warnings for lost qualifiers.
6229 (comp-target-types): Allow pointers to arrays with different qualifiers.
6230 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
6231 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
6232 to PEDWARN_FOR_QUALIFIERS.
6234 2014-12-17 Jakub Jelinek <jakub@redhat.com>
6237 * c-convert.c: Include ubsan.h.
6238 (convert): For real -> integral casts and
6239 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6240 instead instrument the float cast directly.
6242 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6244 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6245 c_finish_stmt_expr): Remove NULL last argument from
6246 create_tmp_var_raw and create_tmp_var calls.
6247 * c-array-notation.c (fix_builtin_array_notation_fn,
6248 build_array_notation_expr, fix_conditional_array_notations_1,
6249 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6251 2014-11-28 Marek Polacek <polacek@redhat.com>
6254 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6255 convert the right operand to integer type.
6257 2014-11-25 Marek Polacek <polacek@redhat.com>
6260 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6261 for inline functions.
6263 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6266 * c-typeck.c (build_array_ref): Adjust
6267 convert_vector_to_pointer_for_subscript caller. If it returns true,
6268 call non_lvalue_loc on the result.
6270 2014-11-11 Richard Biener <rguenther@suse.de>
6272 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6275 2014-11-10 Andi Kleen <ak@linux.intel.com>
6278 * c-parser.c (c_parser_statement_after_labels): Call
6280 (c_parser_if_statement): Dito.
6281 (c_parser_switch_statement): Dito.
6282 (c_parser_while_statement): Dito.
6283 (c_parser_do_statement): Dito.
6284 (c_parser_for_statement): Dito.
6285 * c-typeck.c (c_finish_loop): Dito.
6287 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6289 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6290 OPT_Wshift_count_overflow in the warnings.
6292 2014-10-30 Marek Polacek <polacek@redhat.com>
6294 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6295 print the stripped version as well, if they're not the same.
6297 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6299 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6302 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6304 * c-decl.c: Adjust include files.
6305 * c-parser.c: Ditto.
6307 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6308 Tom Tromey <tromey@redhat.com>
6310 * c-tree.h (enum c_oracle_request): New.
6311 (c_binding_oracle_function): New typedef.
6312 (c_binding_oracle, c_pushtag, c_bind): Declare.
6313 * c-decl.c (c_binding_oracle): New global.
6314 (I_SYMBOL_CHECKED): New macro.
6315 (i_symbol_binding): New function.
6316 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6317 (I_TAG_CHECKED): New macro.
6318 (i_tag_binding): New function.
6319 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6320 (I_LABEL_CHECKED): New macro.
6321 (i_label_binding): New function.
6322 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6323 (c_print_identifier): Save and restore c_binding_oracle.
6324 (c_pushtag, c_bind): New functions.
6326 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6328 * c-typeck.c: Adjust include files.
6330 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6333 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6334 initialization here...
6335 (c_initialize_diagnostics): ... but here. Set defaults after
6336 building pretty-printer.
6338 2014-10-23 Marek Polacek <polacek@redhat.com>
6341 * c-decl.c (pop_scope): Don't print warning in external_scope.
6343 2014-10-19 Marek Polacek <polacek@redhat.com>
6346 * c-typeck.c (output_init_element): Allow initializing objects with
6347 static storage duration with compound literals even in C99 and add
6350 2014-10-17 Marek Polacek <polacek@redhat.com>
6353 * c-typeck.c (digest_init): Allow initializing objects with static
6354 storage duration with compound literals even in C99 and add pedwarn
6357 2014-10-17 Marek Polacek <polacek@redhat.com>
6360 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6361 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6362 error multiple times. Print the type.
6364 2014-10-17 Marek Polacek <polacek@redhat.com>
6367 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6370 2014-10-17 Marek Polacek <polacek@redhat.com>
6372 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6373 (start_function): Use OPT_Wimplicit_int instead of 0.
6374 (store_parm_decls_oldstyle): Likewise.
6376 2014-10-17 Alan Modra <amodra@gmail.com>
6379 * c-decl.c (merge_decls): Don't merge section name or tls model
6380 to newdecl symtab node, instead merge to olddecl. Override
6381 existing olddecl section name. Set tls_model for all thread-local
6382 vars, not just OMP thread-private ones. Remove incorrect comment.
6384 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6386 * c-decl.c: Adjust include files.
6388 2014-10-14 DJ Delorie <dj@redhat.com>
6390 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6391 (c_token_starts_typename): Check all __intN, not just __int128.
6392 (c_token_starts_declspecs): Likewise.
6393 (c_parser_declspecs): Likewise.
6394 (c_parser_attribute_any_word): Likewise.
6395 (c_parser_objc_selector): Likewise.
6396 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6397 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6399 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6401 (finish_declspecs): Likewise.
6403 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6405 * c-parser.c (c_parser_all_labels): New function to replace
6407 (c_parser_statement): Call the new function.
6409 2014-10-09 Marek Polacek <polacek@redhat.com>
6412 * c-typeck.c (pop_init_level): Don't warn about initializing
6415 2014-10-07 Marek Polacek <polacek@redhat.com>
6418 * c-decl.c (header_for_builtin_fn): New function.
6419 (implicitly_declare): Suggest which header to include.
6421 2014-10-07 Marek Polacek <polacek@redhat.com>
6423 * c-convert.c (convert): Use error_operand_p.
6424 * c-typeck.c (require_complete_type): Likewise.
6425 (really_atomic_lvalue): Likewise.
6426 (digest_init): Likewise.
6427 (handle_omp_array_sections_1): Likewise.
6429 2014-10-03 Marek Polacek <polacek@redhat.com>
6432 * c-decl.c (pop_scope): Don't warn about "inline function declared
6433 but never defined" for functions marked with gnu_inline attribute.
6435 2014-09-25 Jakub Jelinek <jakub@redhat.com>
6438 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6439 on low_bound and length.
6441 2014-09-24 Marek Polacek <polacek@redhat.com>
6445 * c-parser.c: Don't define CPP_KEYWORD.
6446 (c_parser_switch_statement): Pass original type to c_finish_case.
6447 * c-tree.h (c_finish_case): Update declaration.
6448 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6449 conditionally to c_do_switch_warnings.
6451 2014-09-03 Marek Polacek <polacek@redhat.com>
6454 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6457 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6458 Balaji V. Iyer <balaji.v.iyer@intel.com>
6459 Igor Zamyatin <igor.zamyatin@intel.com>
6461 * c-parser.c (c_parser_cilk_for): New function.
6462 (c_parser_cilk_grainsize): Likewise.
6463 (c_get_temp_regvar): Likewise.
6464 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6465 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6466 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6467 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6470 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6472 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6473 with using HOST_WIDE_INT without truncation to 'int'
6475 2014-08-22 Marek Polacek <polacek@redhat.com>
6478 * c-typeck.c (parser_build_binary_op): Adjust call to
6479 warn_logical_not_parentheses.
6481 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6484 * c-parser.c (c_parser_array_notation): Check for correct
6485 type of an array added.
6487 2014-08-19 Marek Polacek <polacek@redhat.com>
6490 * c-typeck.c (build_binary_op): If either operand of a comparison
6491 is a boolean expression, call maybe_warn_bool_compare.
6493 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6496 * c-typeck.c (build_c_cast): Do a conversion even when the
6497 TYPE_MAIN_VARIANTs are the same.
6499 2014-08-19 Marek Polacek <polacek@redhat.com>
6501 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6502 pedwarn_c99 instead of pedwarn.
6503 (grokfield): Likewise.
6504 (warn_defaults_to): New function.
6505 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6506 Unconditionally call pedwarn_c99 instead of pedwarn.
6507 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6508 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6509 check flag_isoc11 before.
6510 * c-errors.c (pedwarn_c99): Change the return type to bool.
6511 Handle -Wc99-c11-compat.
6512 * c-parser.c (disable_extension_diagnostics): Handle
6513 warn_c99_c11_compat.
6514 (restore_extension_diagnostics): Likewise.
6515 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6516 instead of pedwarn, don't check flag_isoc11 before.
6517 (c_parser_declspecs): Likewise.
6518 (c_parser_alignas_specifier): Likewise.
6519 (c_parser_alignof_expression): Likewise.
6520 (c_parser_generic_selection): Likewise.
6521 * c-tree.h (pedwarn_c99): Update declaration.
6522 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6525 2014-08-19 Marek Polacek <polacek@redhat.com>
6527 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6529 * c-errors.c: Include "opts.h".
6530 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6531 * c-parser.c (disable_extension_diagnostics): Handle negative value
6532 of warn_c90_c99_compat, too.
6533 (restore_extension_diagnostics): Likewise.
6534 (c_parser_compound_statement_nostart): Pass
6535 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6537 2014-08-12 Marek Polacek <polacek@redhat.com>
6539 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6541 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6543 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6545 2014-08-10 Marek Polacek <polacek@redhat.com>
6548 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6549 Call pedwarn_c90 instead of pedwarn.
6550 (check_bitfield_type_and_width): Likewise.
6551 (declspecs_add_qual): Likewise.
6552 (declspecs_add_type): Likewise.
6553 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6554 Adjust to only call pedwarn_c90.
6555 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6556 pedwarn_c90 instead of pedwarn.
6557 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6558 * c-parser.c (disable_extension_diagnostics): Handle
6559 warn_c90_c99_compat.
6560 (restore_extension_diagnostics): Likewise.
6561 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6562 pedwarn_c90 instead of pedwarn.
6563 (c_parser_initelt): Likewise.
6564 (c_parser_postfix_expression): Likewise.
6565 (c_parser_postfix_expression_after_paren_type): Likewise.
6566 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6567 * c-tree.h: Fix formatting.
6568 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6569 pedwarn_c90 instead of pedwarn.
6571 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6573 * c-typeck.c: Remove include of pointer-set.h.
6575 2014-08-07 Marek Polacek <polacek@redhat.com>
6577 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6579 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6581 * c-typeck.c: Use hash_map instead of pointer_map.
6583 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6585 * c-decl.c: Use hash_set instead of pointer_set.
6587 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6590 * c-array-notation.c (expand_array_notations): Handling
6593 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
6596 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6599 2014-07-30 Tom Tromey <tromey@redhat.com>
6601 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6603 (really_start_incremental_init, push_init_level): Initialize
6605 (pop_init_level): Set global designator_depth.
6606 (process_init_element): Check for designated_init attribute.
6608 2014-07-20 Marek Polacek <polacek@redhat.com>
6611 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6612 (implicitly_declare): Pass location to implicit_decl_warning.
6614 2014-07-14 Jakub Jelinek <jakub@redhat.com>
6617 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6618 If non-NULL, call c_parser_check_literal_zero.
6619 (c_parser_check_literal_zero): New function.
6620 (c_parser_postfix_expression_after_primary): Adjust
6621 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6623 2014-07-06 Marek Polacek <polacek@redhat.com>
6626 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6627 * c-tree.h (C_ARRAY_PARAMETER): Define.
6628 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6631 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
6632 Chen Gang <gang.chen.5i5j@gmail.com>
6634 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6637 2014-07-01 Marek Polacek <polacek@redhat.com>
6639 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6640 instead of 0 to WARN_FOR_ASSIGNMENT.
6642 2014-07-01 Marek Polacek <polacek@redhat.com>
6645 * c-typeck.c (convert_for_assignment): Pass
6646 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6648 2014-06-30 Marek Polacek <polacek@redhat.com>
6650 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6651 has no_sanitize_undefined attribute.
6653 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6656 * c-array-notation.c (fix_builtin_array_notation_fn):
6657 Check for 0 arguments in builtin call. Check that bultin argument is
6659 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6662 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6664 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6665 qualifiers in __auto_type for atomic types.
6666 (c_parser_typeof_specifier): Discard all type qualifiers in
6667 __typeof__ for atomic types.
6669 2014-06-25 Marek Polacek <polacek@redhat.com>
6672 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6673 the return expression to c_finish_return.
6675 2014-06-25 Jakub Jelinek <jakub@redhat.com>
6677 * c-typeck.c (c_finish_omp_clauses): Make sure
6678 OMP_CLAUSE_LINEAR_STEP has correct type.
6680 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6684 2014-06-24 Jakub Jelinek <jakub@redhat.com>
6686 * c-parser.c (c_parser_omp_for_loop): For
6687 #pragma omp parallel for simd move lastprivate clause from parallel
6688 to for rather than simd.
6690 2014-06-23 Marek Polacek <polacek@redhat.com>
6692 * c-typeck.c (parser_build_binary_op): Don't call
6693 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6695 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6697 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6698 * c-decl.c (merge_decls): Likewise.
6700 2014-06-09 Marek Polacek <polacek@redhat.com>
6703 * c-typeck.c (error_init): Call inform instead of error_at.
6704 (pedwarn_init): Call inform instead of pedwarn.
6705 (warning_init): Call inform instead of warning_at.
6707 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
6709 * c-decl.c (merge_decls): Use set_decl_section_name.
6710 (duplicate_decls): Remove node if it exists.
6712 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6715 * c-typeck.c (push_init_level, process_init_element,
6716 pop_init_level): Correct check for zero initialization, move
6717 missing brace warning to respect zero initialization.
6719 2014-06-05 Marek Polacek <polacek@redhat.com>
6722 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6724 2014-06-05 Marek Polacek <polacek@redhat.com>
6727 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6728 on the left hand side operand of a comparison.
6730 2014-06-05 Marek Polacek <polacek@redhat.com>
6733 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6734 Print note only if the warning was printed.
6736 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6739 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6742 2014-06-03 Marek Polacek <polacek@redhat.com>
6745 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6747 * c-tree.h (c_start_case): Update.
6748 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6749 switch condition has boolean value.
6751 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
6753 * c-decl.c: Include builtins.h.
6754 * c-parser.c: Likewise.
6756 2014-05-27 Marek Polacek <polacek@redhat.com>
6759 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6760 error and warning calls to error_at and warning_at. Pass location of
6761 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6762 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6763 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6765 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6768 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6769 function parameters.
6771 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
6773 * c-decl.c (merge_decls): Preserve symtab node pointers.
6774 (duplicate_decls): Free new decl.
6776 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6778 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6781 * c-parser.c (c_parser_omp_target): Return bool values.
6783 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6785 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6786 num_teams_loc variable to num_thread_limit_loc.
6788 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6790 * c-array-notation.c (expand_array_notations): Use void_node
6791 instead of void_zero_node.
6793 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6795 * c-decl.c (finish_struct): Adjust.
6796 (finish_enum): Likewise.
6798 (record_inline_static): Likewise.
6799 (push_scope): Likewise.
6800 (make_label): Likewise.
6801 (lookup_label_for_goto): Likewise.
6802 (finish_struct): Likewise.
6803 (finish_enum): Likewise.
6804 (store_parm_decls): Likewise.
6805 (c_push_function_context): Likewise.
6806 * c-lang.h: Remove usage of variable_size gty attribute.
6807 * c-parser.c (c_parse_init): Adjust.
6808 (c_parse_file): Likewise.
6810 2014-05-13 Marek Polacek <polacek@redhat.com>
6813 * c-typeck.c (convert_for_assignment): Pass location to
6814 WARN_FOR_ASSIGNMENT instead of input_location.
6816 2014-05-10 Marek Polacek <polacek@redhat.com>
6818 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6819 maybe_warn_string_init.
6820 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6821 maybe_warn_string_init.
6822 * c-tree.h (maybe_warn_string_init): Update declaration.
6823 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6824 Call pedwarn_init with loc instead of with input_location.
6825 (digest_init): Pass init_loc to maybe_warn_string_init.
6826 (pop_init_level): Call pedwarn_init with loc instead of with
6828 (set_init_index): Likewise.
6829 (process_init_element): Likewise.
6831 2014-05-09 Marek Polacek <polacek@redhat.com>
6834 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6835 (c_parser_initelt): Pass location to set_init_label. Pass array index
6836 location to set_init_index.
6837 * c-tree.h (push_init_level): Update declaration.
6838 (pop_init_level): Likewise.
6839 (set_init_index): Likewise.
6840 (set_init_label): Likewise.
6841 * c-typeck.c (error_init): Add location parameter. Call error_at
6843 (digest_init): Pass init_loc to error_init.
6844 (really_start_incremental_init):
6845 (push_init_level): Add location parameter. Pass loc to pop_init_level
6847 (pop_init_level): Likewise.
6848 (set_designator): Add location parameter. Pass loc to pop_init_level,
6849 push_init_level, and error_init.
6850 (set_init_index): Add location parameter. Pass loc to error_init and
6852 (set_init_label): Likewise.
6853 (output_init_element): Pass loc to error_init.
6854 (process_init_element): Pass loc to error_init, pop_init_level,
6855 pedwarn_init, and push_init_level.
6857 2014-05-09 Marek Polacek <polacek@redhat.com>
6860 * c-parser.c (c_parser_attributes): Parse the arguments as an
6861 expression-list if the attribute takes identifier.
6863 2014-05-08 Marek Polacek <polacek@redhat.com>
6866 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6869 2014-05-08 Marek Polacek <polacek@redhat.com>
6872 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6875 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6876 Mike Stump <mikestump@comcast.net>
6877 Richard Sandiford <rdsandiford@googlemail.com>
6879 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6880 (finish_enum): Use wide-int interfaces.
6881 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6882 * c-typeck.c (build_c_cast): Likewise.
6883 (set_nonincremental_init_from_string): Likewise.
6884 (c_tree_equal): Likewise.
6886 2014-05-02 Marek Polacek <polacek@redhat.com>
6889 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6890 Return size_one_node when the type is not complete.
6891 (pointer_diff): Remove comment.
6892 (build_unary_op): Improve error messages.
6894 2014-05-02 Marek Polacek <polacek@redhat.com>
6896 * c-typeck.c (c_finish_return): Separate warning_at calls.
6898 2014-05-02 Marek Polacek <polacek@redhat.com>
6900 * c-tree.h (error_init): Remove declaration.
6901 (pedwarn_init): Likewise.
6902 * c-typeck.c (error_init): Make static and move above.
6903 (pedwarn_init): Likewise.
6904 (warning_init): Move above.
6905 (maybe_warn_string_init): Likewise.
6907 2014-05-01 Jeff Law <law@redhat.com>
6911 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6912 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6915 2014-05-02 Marek Polacek <polacek@redhat.com>
6918 * c-typeck.c (push_init_level): Set constructor_designated to
6919 p->designated for structures.
6921 2014-05-01 Marek Polacek <polacek@redhat.com>
6924 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6925 function-definition has an attribute after the declarator.
6927 2014-05-01 Marek Polacek <polacek@redhat.com>
6930 * c-typeck.c (warning_init): Add location_t parameter. Call
6931 warning_at instead of warning.
6932 (push_init_level): Pass input_location to warning_init.
6933 (add_pending_init): Add location_t parameter. Pass loc to
6935 (set_nonincremental_init): Pass input_location to add_pending_init.
6936 (set_nonincremental_init_from_string): Likewise.
6937 (output_init_element): Pass loc to warning_init and to
6940 2014-05-01 Marek Polacek <polacek@redhat.com>
6943 * c-typeck.c (c_finish_return): Distinguish between label and variable
6944 when warning about returning local address.
6946 2014-05-01 Marek Polacek <polacek@redhat.com>
6949 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6952 2014-05-01 Marek Polacek <polacek@redhat.com>
6955 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6956 instead of 0 to WARN_FOR_QUALIFIERS.
6958 2014-05-01 Marek Polacek <polacek@redhat.com>
6961 * c-typeck.c (default_conversion): Use better location for
6964 2014-04-30 Marek Polacek <polacek@redhat.com>
6966 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6967 also when SANITIZE_FLOAT_DIVIDE is on.
6969 2014-04-30 Marek Polacek <polacek@redhat.com>
6972 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6973 and pedwarn_init. Use loc insted of input_location.
6975 2014-04-30 Marek Polacek <polacek@redhat.com>
6978 * c-typeck.c (build_binary_op): Use location when warning about
6981 2014-04-25 Marek Polacek <polacek@redhat.com>
6984 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6985 always_inline/noinline and hot/cold attributes.
6987 2014-04-25 Marek Polacek <polacek@redhat.com>
6990 * c-parser.c (c_parser_initelt): Pass input_location to
6991 process_init_element.
6992 (c_parser_initval): Pass loc to process_init_element.
6993 * c-tree.h (process_init_element): Adjust declaration.
6994 * c-typeck.c (push_init_level): Pass input_location to
6995 process_init_element.
6996 (pop_init_level): Likewise.
6997 (set_designator): Likewise.
6998 (output_init_element): Add location_t parameter. Pass loc to
7000 (output_pending_init_elements): Pass input_location to
7001 output_init_element.
7002 (process_init_element): Add location_t parameter. Pass loc to
7003 output_init_element.
7005 2014-04-24 Jakub Jelinek <jakub@redhat.com>
7007 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7008 atomic-clause, allow comma in between atomic-clause and
7011 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7014 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7015 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7017 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7020 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7021 create_tmp_var instead build_decl for creating temps.
7022 (build_array_notation_expr): Likewise.
7023 (fix_conditional_array_notations_1): Likewise.
7024 (fix_array_notation_expr): Likewise.
7025 (fix_array_notation_call_expr): Likewise.
7027 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7030 * c-tree.h (c_build_function_call_vec): New prototype.
7031 * c-typeck.c (build_function_call_vec): Don't call
7032 resolve_overloaded_builtin here.
7033 (c_build_function_call_vec): New wrapper function around
7034 build_function_call_vec. Call resolve_overloaded_builtin here.
7035 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7036 Call c_build_function_call_vec instead of build_function_call_vec.
7037 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7038 * c-decl.c (finish_decl): Likewise.
7040 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7043 * c-typeck.c: Use correct format string in cast-qual warning
7045 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7047 * c-decl.c (c_decl_attributes): Use
7048 lang_hooks.types.omp_mappable_type.
7049 * c-typeck.c (c_finish_omp_clauses): Likewise.
7051 2014-03-06 Marek Polacek <polacek@redhat.com>
7054 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7055 of checking tree code.
7057 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7059 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7060 (c_parser_parameter_declaration): Likewise.
7062 2014-02-19 Marek Polacek <polacek@redhat.com>
7065 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7066 Call mark_exp_read on exp.value.
7067 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7068 TREE_ADDRESSABLE on old instead of val.
7069 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7071 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7073 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7074 C_EXPR_APPEND by vec_safe_push.
7075 * c-tree.h (C_EXPR_APPEND): Remove.
7077 2014-01-31 Marek Polacek <polacek@redhat.com>
7080 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7081 build_function_call_vec.
7082 (build_function_call): Likewise.
7083 (build_atomic_assign): Likewise.
7084 (build_function_call_vec): Add arg_loc parameter. Use it.
7085 (convert_arguments): Likewise.
7086 (convert_for_assignment): Rename rhs_loc to expr_loc.
7087 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7088 (c_parser_objc_keywordexpr): Likewise.
7089 (c_parser_postfix_expression_after_primary): Call
7090 build_function_call_vec with expr_loc rather than op_loc.
7091 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7092 build_function_call_vec.
7093 (c_parser_expr_list): Add locations parameter. Fill it with locations
7094 of function arguments.
7095 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7097 2014-01-30 Marek Polacek <polacek@redhat.com>
7100 * c-typeck.c (build_function_call_vec): Use loc parameter.
7101 (convert_arguments): Add location parameter. Use it.
7102 (ep_convert_and_check): Likewise.
7103 (build_atomic_assign): Adjust convert_for_assignment call.
7104 (build_modify_expr): Likewise.
7105 (digest_init): Likewise.
7106 (c_finish_return): Likewise.
7107 (build_conditional_expr): Adjust ep_convert_and_check calls.
7108 (convert_for_assignment): Add rhs_loc parameter. Use it.
7109 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7112 2014-01-30 Richard Biener <rguenther@suse.de>
7115 * c-typeck.c (build_function_call_vec): Do not replace calls
7116 to a function via an incompatible type with a runtime abort.
7118 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7120 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7121 flag_enable_cilkplus with flag_cilkplus.
7122 (c_parser_direct_declarator_inner): Likewise.
7123 (c_parser_attribute_any_word): Likewise.
7124 (c_parser_attributes): Likewise.
7125 (c_parser_compound_statement): Likewise.
7126 (c_parser_statement_after_labels): Likewise.
7127 (c_parser_if_statement): Likewise.
7128 (c_parser_switch_statement): Likewise.
7129 (c_parser_do_statement): Likewise.
7130 (c_parser_for_statement): Likewise.
7131 (c_parser_unary_expression): Likewise.
7132 (c_parser_postfix_expression): Likewise.
7133 (c_parser_postfix_expression_after_primary): Likewise.
7134 (c_parser_postfix_expression_after_primary): Likewise.
7135 (c_parser_omp_clause_name): Likewise.
7136 (c_finish_omp_declare_simd): Likewise.
7137 (c_parser_cilk_verify_simd): Likewise.
7138 * c-typeck.c (build_array_ref): Likewise.
7139 (build_function_call_vec): Likewise.
7140 (convert_arguments): Likewise.
7141 (build_compound_expr): Likewise.
7142 (c_finish_return): Likewise.
7143 (c_finish_if_stmt): Likewise.
7144 (c_finish_loop): Likewise.
7145 (build_binary_op): Likewise.
7147 2014-01-23 Marek Polacek <polacek@redhat.com>
7150 * c-typeck.c (parser_build_binary_op): Use location instead of
7152 (build_binary_op): Pass location to shorten_compare.
7154 2014-01-23 Marek Polacek <polacek@redhat.com>
7157 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7160 2014-01-23 Marek Polacek <polacek@redhat.com>
7163 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7164 of a comma expression.
7165 (emit_side_effect_warnings): Likewise.
7167 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7170 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7171 function to use walk_tree and moved a lot of its functionality to
7172 expand_array_notations.
7173 (expand_array_notations): New function.
7175 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7177 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7178 attribute an attribute without value.
7180 2014-01-23 Jakub Jelinek <jakub@redhat.com>
7183 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7184 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7186 2014-01-22 Marek Polacek <polacek@redhat.com>
7189 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7190 of remove_c_maybe_const_expr on op1 and op2.
7192 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7195 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7196 effects, preevaluate rhs using SAVE_EXPR first.
7198 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7201 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7202 statements with if-elseif statements.
7204 2014-01-06 Marek Polacek <polacek@redhat.com>
7207 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7208 defined bit-field types only in ISO C.
7210 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7212 Update copyright years
7214 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7216 * c-array-notation.c: Use the standard form for the copyright notice.
7218 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7220 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7221 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7222 field in parser is not empty. If not-empty, call the function
7223 c_parser_finish_omp_declare_simd.
7224 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7225 between SIMD-enabled functions and #pragma simd. Added new parameter.
7226 (c_parser_cilk_all_clauses): Modified the usage of the function
7227 c_parser_cilk_clause_vectorlength as mentioned above.
7228 (c_parser_cilk_simd_fn_vector_attrs): New function.
7229 (c_finish_cilk_simd_fn_tokens): Likewise.
7230 (is_cilkplus_vector_p): Likewise.
7231 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7232 "nomask," and "mask" strings in clause name.
7233 (c_parser_omp_all_clauses): Added 3 new case statements:
7234 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7235 PRAGMA_CILK_CLAUSE_NOMASK.
7236 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7237 check for vector attribute and if so call the function
7238 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7239 called the function c_finish_cilk_simd_fn_tokens.
7240 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7241 parser field is non-empty. If so, parse them as you would parse
7242 the omp declare simd pragma.
7243 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7244 Added a check when step is a parameter and flag it as error.
7245 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7246 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7249 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7251 * c-parser.c (c_parser_omp_parallel): Fix description.
7253 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7255 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7256 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7257 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7258 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7260 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7263 * c-parser.c (c_parser_alignas_specifier): Use
7264 c_sizeof_or_alignof_type instead of c_alignof.
7265 (c_parser_alignof_expression): Likewise, with min_alignof
7266 parameter depending on alignof spelling used.
7268 2013-12-04 Marek Polacek <polacek@redhat.com>
7271 * c-decl.c (start_function): Don't warn for missing prototype for
7274 2013-12-03 Marek Polacek <polacek@redhat.com>
7277 * c-decl.c (build_compound_literal): Allow compound literals with
7278 empty initial value.
7280 2013-12-02 Joseph Myers <joseph@codesourcery.com>
7283 * c-typeck.c (build_modify_expr): Diagnose assignment to
7284 expression with array type.
7286 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7289 * c-typeck.c (process_init_element): Do not treat a string as
7290 initializing a whole array when used with a designator for an
7293 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7296 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7297 an inline function following a static declaration.
7299 2013-11-28 Jakub Jelinek <jakub@redhat.com>
7302 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7303 to p_name before calling c_parser_omp_teams instead of after.
7304 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7305 argument. Remove unused p_name variable.
7307 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
7308 Jakub Jelinek <jakub@redhat.com>
7310 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7311 external_scope is NULL.
7313 2013-11-27 Tom de Vries <tom@codesourcery.com>
7314 Marc Glisse <marc.glisse@inria.fr>
7317 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7319 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7321 * c-typeck.c: Add required include files from gimple.h.
7323 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7325 * c-decl.c (define_label, shadow_tag_warned)
7326 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7327 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7328 (declspecs_add_type): Remove use of in_system_header macro.
7329 * c-parser.c (c_parser_unary_expression): Likewise.
7330 * c-typeck.c (store_init_value, process_init_element)
7331 (c_start_case): Likewise.
7333 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7336 * c-parser.c (c_parser_set_source_position_from_token): Remove
7337 reference to in_system_header from comment.
7339 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7341 * c-decl.c (grokdeclarator): Update comment to refer to
7342 tree_to_[su]hwi rather than tree_low_cst.
7344 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7346 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7347 tree_to_uhwi throughout.
7349 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7351 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7354 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7356 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7359 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7361 * c-parser.c (c_parser_cilk_simd): New.
7362 (c_parser_cilk_verify_simd): New.
7363 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7364 (c_parser_omp_for_loop): Add case for NE_EXPR.
7365 Set c_break_label for CILK_SIMD.
7366 (c_parser_cilk_clause_vectorlength): New.
7367 (c_parser_cilk_clause_linear): New.
7368 (c_parser_cilk_clause_name): New.
7369 (c_parser_cilk_all_clauses): New.
7370 * c-typeck.c (build_unary_op): Pass location argument to
7372 (build_modify_expr): Same.
7373 (build_asm_expr): Same.
7374 (c_finish_bc_stmt): Error on break/continue in loops.
7376 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7378 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7380 2013-11-14 Diego Novillo <dnovillo@google.com>
7382 * c-decl.c: Include print-tree.h.
7383 Include stor-layout.h.
7386 Include stringpool.h.
7387 * c-lang.c: Include fold-const.h.
7388 * c-parser.c: Include stringpool.h.
7390 Include stor-layout.h.
7392 Include trans-mem.h.
7393 * c-typeck.c: Include stor-layout.h.
7394 Include trans-mem.h.
7398 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7400 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7401 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7403 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7404 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7406 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7407 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7408 (c_parser_declarator, c_parser_direct_declarator_inner)
7409 (c_parser_parameter_declaration, c_parser_type_name): All callers
7411 (c_parser_declaration_or_fndef): Handle declarations with type
7412 determined from the initializer.
7414 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7416 * c-typeck.c: Include gimplify.h.
7418 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7420 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7421 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7423 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7424 or _Thread_local as appropriate in diagnostics.
7425 (build_null_declspecs): Initialize ret->thread_gnu_p.
7426 (declspecs_add_scspec): Handle either __thread or _Thread_local
7427 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7428 pedantic. Do not disallow _Thread_local extern and _Thread_local
7431 2013-11-07 Joseph Myers <joseph@codesourcery.com>
7432 Andrew MacLeod <amacleod@redhat.com>
7434 * c-aux-info.c (gen_type): Handle atomic qualifier.
7435 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7436 qualifiers when compating types.
7437 (shadow_tag_warned): Handle atomic_p in declspecs.
7438 (quals_from_declspecs): Likewise.
7439 (start_decl): Use c_type_promotes_to when promoting argument
7441 (grokdeclarator): Handle _Atomic.
7442 (get_parm_info): Diagnose any qualifier on "void" as only
7444 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7445 comparing types. Use c_type_promotes_to when promoting argument
7447 (finish_function): Use c_type_promotes_to when promoting argument
7449 (build_null_declspecs): Handle atomic_p in declspecs.
7450 (declspecs_add_qual): Handle RID_ATOMIC.
7451 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7452 (c_token_starts_declspecs): Handle RID_ATOMIC.
7453 (c_parser_declspecs): Handle atomic type specifiers and
7455 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7456 from types of expressions with atomic type.
7457 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7458 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7459 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7460 (c_parser_statement_after_labels, c_parser_switch_statement)
7461 (c_parser_for_statement, c_parser_expr_no_commas)
7462 (c_parser_conditional_expression, c_parser_binary_expression)
7463 (c_parser_cast_expression, c_parser_unary_expression)
7464 (c_parser_postfix_expression)
7465 (c_parser_postfix_expression_after_primary, c_parser_expression):
7466 Use convert_lvalue_to_rvalue.
7467 (c_parser_expression_conv, c_parser_expr_list): Document
7468 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7469 (c_parser_objc_synchronized_statement): Use
7470 convert_lvalue_to_rvalue.
7471 (c_parser_objc_selector): Handle RID_ATOMIC.
7472 (c_parser_objc_receiver, c_parser_array_notation): Use
7473 convert_lvalue_to_rvalue.
7474 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7475 _Atomic (type-name).
7476 (struct c_declspecs): Add atomic_p field.
7477 (convert_lvalue_to_rvalue): Declare.
7478 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7479 corresponding atomic types.
7480 (qualify_type): Don't add _Atomic qualifiers from second argument.
7481 (comp_target_types): Do not allow _Atomic mismatches.
7482 (type_lists_compatible_p): Do not remove atomic qualifiers when
7484 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7485 (build_atomic_assign): New functions.
7486 (build_unary_op): Use build_atomic_assign for atomic increment and
7488 (build_conditional_expr): Do not treat _Atomic void as a qualified
7490 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7491 (find_anonymous_field_with_type, convert_to_anonymous_field)
7492 (convert_for_assignment): Do not remove atomic qualifiers when
7494 (digest_init): Do not accept initialization of arrays of atomic
7495 elements by string constants.
7496 (build_asm_expr): Use convert_lvalue_to_rvalue.
7497 (build_binary_op): Do not treat _Atomic void as a qualified
7500 2013-11-06 DJ Delorie <dj@redhat.com>
7502 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7503 both explicit and builtin, print the location of the explicit one.
7505 2013-11-05 Tobias Burnus <burnus@net-b.de>
7507 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7508 c_parser_omp_distribute, c_parser_omp_teams,
7509 c_parser_omp_target, c_parser_omp_declare): Handle
7512 2013-11-03 Marek Polacek <polacek@redhat.com>
7514 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7516 2013-11-01 Jakub Jelinek <jakub@redhat.com>
7518 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7519 check_dup_generic at the end, unless remove is true.
7520 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7522 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7524 2013-10-31 Jakub Jelinek <jakub@redhat.com>
7526 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7527 with decl that is not pointer nor array.
7529 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7531 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7532 a spawning function is found.
7533 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7534 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7535 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7536 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7538 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7539 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7541 (c_finish_return): Added a check to reject _Cilk_spawn in return
7543 (build_cilk_spawn): New function.
7544 (build_cilk_sync): Likewise.
7545 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
7547 2013-10-27 Tobias Burnus <burnus@net-b.de>
7550 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7551 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7552 (c_parser_statement_after_labels): Update calls.
7554 2013-10-24 Tobias Burnus <burnus@net-b.de>
7557 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7558 Handle PRAGMA_IVDEP.
7559 (c_parser_statement_after_labels): Update call.
7561 2013-10-24 Marek Polacek <polacek@redhat.com>
7563 * c-parser.c (c_parser_struct_declaration): Add a comment.
7564 (c_parser_declarator): Don't allow _Alignas here.
7566 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
7568 * c-parser.c: Include omp-low.h.
7569 * c-typeck.c: Likewise.
7571 2013-10-17 Marek Polacek <polacek@redhat.com>
7574 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7575 Document syntax of the array-declarator.
7576 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7578 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7579 (c_parser_struct_declaration): Likewise.
7580 (c_parser_declarator): Likewise.
7581 (c_parser_direct_declarator_inner): Likewise.
7582 (c_parser_parameter_declaration): Likewise.
7583 (c_parser_type_name): Likewise.
7585 2013-10-11 Jakub Jelinek <jakub@redhat.com>
7587 * c-lang.h (current_omp_declare_target_attribute): New extern
7589 * c-parser.c: Include c-lang.h.
7590 (struct c_parser): Change tokens to c_token *.
7591 Add tokens_buf field. Change tokens_avail type to unsigned int.
7592 (c_parser_consume_token): If parser->tokens isn't
7593 &parser->tokens_buf[0], increment parser->tokens.
7594 (c_parser_consume_pragma): Likewise.
7595 (enum pragma_context): Add pragma_struct and pragma_param.
7596 (c_parser_external_declaration): Adjust
7597 c_parser_declaration_or_fndef caller.
7598 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7599 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7600 Adjust recursive call.
7601 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7603 (c_parser_parameter_declaration): Use pragma_param instead of
7605 (c_parser_compound_statement_nostart, c_parser_label,
7606 c_parser_for_statement): Adjust
7607 c_parser_declaration_or_fndef callers.
7608 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7609 it through to c_parser_conditional_expression.
7610 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7611 pass it through to c_parser_binary_expression. Adjust recursive
7613 (c_parser_binary_expression): Remove prec argument, add
7614 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7615 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7616 binop matches it, use build2 instead of parser_build_binary_op.
7617 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7618 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7619 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7620 Handle pragma_struct and pragma_param the same as pragma_external.
7621 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7622 (c_parser_omp_variable_list): Parse array sections for
7623 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7624 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7625 (c_parser_omp_clause_reduction): Handle user defined reductions.
7626 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7627 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7628 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7629 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7630 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7631 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7632 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7633 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7634 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7635 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7636 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7637 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7638 (c_parser_omp_for_loop): Add CODE argument, pass it through
7639 to c_finish_omp_for. Change last argument to cclauses,
7640 and adjust uses to grab parallel clauses from the array of all
7641 the split clauses. Adjust c_parser_binary_expression,
7642 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7643 (omp_split_clauses): New function.
7644 (c_parser_omp_simd): New function.
7645 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7646 Allow the function to be called also when parsing combined constructs,
7647 and call c_parser_omp_simd when parsing for simd.
7648 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7649 #pragma omp section, require exactly one structured-block instead of
7650 sequence of statements.
7651 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7652 Allow the function to be called also when parsing combined constructs.
7653 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7654 Allow the function to be called also when parsing combined
7656 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7657 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7658 c_parser_omp_teams, c_parser_omp_target_data,
7659 c_parser_omp_target_update, c_parser_omp_target,
7660 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7661 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7662 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7663 (c_parser_omp_construct): Add p_name and mask vars. Handle
7664 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7665 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7666 and c_parser_omp_sections callers.
7667 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7668 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7669 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7670 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7671 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7673 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7674 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7675 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7676 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7677 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7678 * c-typeck.c: Include tree-inline.h.
7679 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7680 handle_omp_array_sections_1, handle_omp_array_sections,
7681 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7682 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7683 user defined reductions.
7684 (c_tree_equal): New function.
7685 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7686 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7687 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7688 c_check_omp_declare_reduction_r): New prototypes.
7689 * c-decl.c (current_omp_declare_target_attribute): New variable.
7690 (c_decl_attributes): New function.
7691 (start_decl, start_function): Use it instead of decl_attributes.
7692 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7693 c_omp_reduction_decl, c_omp_reduction_lookup,
7694 c_check_omp_declare_reduction_r): New functions.
7696 2013-09-25 Tom Tromey <tromey@redhat.com>
7698 * Make-lang.in (c/gccspec.o): Remove.
7699 (CFLAGS-c/gccspec.o): New variable.
7700 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7701 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7702 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7704 2013-09-25 Tom Tromey <tromey@redhat.com>
7706 * Make-lang.in (c/gccspec.o): Don't use subshell.
7708 2013-09-18 Marek Polacek <polacek@redhat.com>
7711 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7712 Remove unnecessary check.
7714 2013-09-18 Marek Polacek <polacek@redhat.com>
7717 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7718 no_sanitize_undefined attribute.
7720 2013-09-13 Kai Tietz <ktietz@redhat.com>
7723 * c-decl.c (c_builtin_function_ext_scope): Remove
7724 wrong assumption that it is never called on prexisting
7727 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7729 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7731 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7733 * c-objc-common.c (c_tree_printer): Tidy.
7735 2013-08-30 Marek Polacek <polacek@redhat.com>
7737 * c-typeck.c (build_binary_op): Add division by zero and shift
7740 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
7741 Joseph Myers <joseph@codesourcery.com>
7744 * c-typeck.c (c_common_type): Prefer double_type_node over
7745 other REAL_TYPE types with the same precision.
7746 (convert_arguments): Likewise.
7748 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7750 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7751 (c_initialize_diagnostics): Call a destructor for the early printer.
7753 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7755 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7756 printer initialization.
7758 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
7761 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7762 check for truth values.
7763 (expand_array_notation_exprs): Added truth values case. Removed an
7764 unwanted else. Added for-loop to walk through subtrees in default
7767 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7769 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7771 2013-07-23 Joseph Myers <joseph@codesourcery.com>
7773 * c-parser.c (struct c_generic_association): Fix typo.
7775 2013-07-23 Tom Tromey <tromey@redhat.com>
7776 Joseph Myers <joseph@codesourcery.com>
7778 * c-parser.c (struct c_generic_association): New.
7779 (c_generic_association_d): New typedef.
7780 (c_parser_generic_selection): New function.
7781 (c_parser_postfix_expression): Handle RID_GENERIC.
7783 2013-07-13 Jason Merrill <jason@redhat.com>
7786 * c-decl.c (finish_struct): Check for too-large class.
7788 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7791 * c-typeck.c (set_init_index): When folding, check for index overflow.
7793 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7795 * c-parser.c (c_parser_array_notation): Removed rejection of array
7796 notations in an array of function pointers.
7798 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7800 * c-array-notation.c (make_triplet_val_inv): New function.
7801 (create_cmp_incr): Likewise.
7802 (create_array_refs): Likewise.
7803 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7804 Also modularized common parts between functions and called the function.
7805 (build_array_notation_expr): Likewise.
7806 (fix_conditional_array_notations_1): Likewise.
7807 (fix_array_notation_expr): Likewise.
7808 (fix_array_notation_call_expr): Likewise.
7810 2013-06-18 Marek Polacek <polacek@redhat.com>
7813 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7815 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7817 * c-array-notation.c (build_array_notation_expr): Reject array notation
7818 mismatch between LHS and RHS even inside a call_expr. Also, removed
7819 a couple while statements that were dead code.
7821 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7823 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7824 excessive precision expressions in function parameters. Also removed
7825 couple unwanted while statements.
7827 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7829 * c-array-notation.c (expand_array_notation_exprs): Added
7830 ARRAY_NOTATION_REF case.
7832 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7834 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7835 function to c-family/array-notation-common.c.
7836 (is_cilkplus_reduce_builtin): Likewise.
7837 (find_rank): Likewise.
7838 (extract_array_notation_exprs): Likewise.
7839 (replace_array_notations): Likewise.
7840 (find_inv_trees): Likewise.
7841 (replace_inv_trees): Likewise.
7842 (contains_array_notation_expr): Likewise.
7843 (find_correct_array_notation_type): Likewise.
7844 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7845 (struct inv_list): Moved this to c-family/array-notation-common.c.
7846 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7848 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7850 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7851 reduction functions outside the for-loop. Added a check if the fundecl
7852 is non-NULL. Finally, removed an unwanted if-statement, and made the
7855 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7857 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7858 condition of the if-statement matches the rank of else-block and then-
7859 block when array notations are used.
7860 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7861 expression after the entire function body is parsed.
7862 (c_parser_expr_no_commas): Delayed creating array notation expressions
7863 to the end of function parsing.
7864 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7865 whole if-statement instead of just the condition.
7866 (expand_array_notation_exprs): Added MODIFY_EXPR case.
7868 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7871 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7872 array to NULL_TREE if they are unused. Also added a check for the
7873 field to be NULL before its fields are used in future.
7875 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7878 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7879 (build_array_notation_expr): Likewise.
7881 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7883 * c-typeck.c (build_array_ref): Added a check to see if array's
7884 index is greater than one. If true, then emit an error.
7885 (build_function_call_vec): Exclude error reporting and checking
7886 for builtin array-notation functions.
7887 (convert_arguments): Likewise.
7888 (c_finish_return): Added a check for array notations as a return
7889 expression. If true, then emit an error.
7890 (c_finish_loop): Added a check for array notations in a loop
7891 condition. If true then emit an error.
7892 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7893 (build_binary_op): Added a check for array notation expr inside
7894 op1 and op0. If present, we call another function to find correct
7896 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7897 * c-parser.c (c_parser_compound_statement): Check if array
7898 notation code is used in tree, if so, then transform them into
7900 (c_parser_expr_no_commas): Check if array notation is used in LHS
7901 or RHS, if so, then build array notation expression instead of
7903 (c_parser_postfix_expression_after_primary): Added a check for
7904 colon(s) after square braces, if so then handle it like an array
7905 notation. Also, break up array notations in unary op if found.
7906 (c_parser_direct_declarator_inner): Added a check for array
7908 (c_parser_compound_statement): Added a check for array notation in
7909 a stmt. If one is present, then expand array notation expr.
7910 (c_parser_if_statement): Likewise.
7911 (c_parser_switch_statement): Added a check for array notations in
7912 a switch statement's condition. If true, then output an error.
7913 (c_parser_while_statement): Similarly, but for a while.
7914 (c_parser_do_statement): Similarly, but for a do-while.
7915 (c_parser_for_statement): Similarly, but for a for-loop.
7916 (c_parser_unary_expression): Check if array notation is used in a
7917 pre-increment or pre-decrement expression. If true, then expand
7919 (c_parser_array_notation): New function.
7920 * c-array-notation.c: New file.
7921 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7923 2013-05-23 Mike Stump <mikestump@comcast.net>
7925 * c-typeck.c (convert_for_assignment): Handle references to memory
7928 2013-05-16 Jason Merrill <jason@redhat.com>
7930 * Make-lang.in (cc1$(exeext)): Use link mutex.
7932 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7934 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7935 to simply use OPT_Wpointer_arith.
7936 (build_unary_op): Likewise.
7938 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7941 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7942 argument. If set, or it temporarily for parsing of the first
7943 argument into force_folding_builtin_constant_p.
7944 (c_parser_postfix_expression): Adjust callers.
7946 2013-03-21 Richard Biener <rguenther@suse.de>
7948 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7949 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7951 2013-02-12 Marek Polacek <polacek@redhat.com>
7954 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7957 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7960 * c-typeck.c (set_nonincremental_init_from_string): If
7961 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7963 (process_init_element): Likewise.
7965 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7968 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7969 argument, don't call default_function_array_conversion
7970 nor c_fully_fold here.
7971 (c_parser_asm_statement): Adjust callers.
7972 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7973 and outputs here, and call default_function_array_conversion
7974 on inputs that don't need to be addressable.
7976 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7979 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7980 warning require that both c_common_unsigned_type as well as
7981 c_common_signed_type is the same for both mvl and mvr types.
7983 2012-11-16 Diego Novillo <dnovillo@google.com>
7985 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7987 * c-common.c: Use new vec API in vec.h.
7988 * c-common.h: Likewise.
7989 * c-gimplify.c: Likewise.
7990 * c-pragma.c: Likewise.
7991 * c-pretty-print.c: Likewise.
7992 * c-pretty-print.h: Likewise.
7993 * c-semantics.c: Likewise.
7994 * c-decl.c: Likewise.
7995 * c-parser.c: Likewise.
7996 * c-tree.h: Likewise.
7997 * c-typeck.c: Likewise.
7999 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8002 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8004 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8007 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8008 shadows a function, unless the variable is a function or a
8009 pointer-to-function.
8011 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8014 * c-parser.c (struct c_tree_loc_pair): Removed.
8015 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8016 add location_t * and tree * arguments, fill in array of 3
8017 sizeof_arg trees and corresponding locs.
8018 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8019 c_parser_expr_list callers.
8020 (c_parser_postfix_expression_after_primary): Likewise. Pass
8021 array of 3 sizeof_arg trees and locs (corresponding to first
8022 3 arguments) to sizeof_pointer_memaccess_warning.
8024 2012-10-09 Lawrence Crowl <crowl@google.com>
8026 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8027 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8030 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8033 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8036 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8039 * c-typeck.c: Include c-common.h.
8040 (enum stv_conv): Moved to c-common.h.
8041 (scalar_to_vector): Moved to c-common.c.
8042 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8043 * Make-lang.in: c-typeck.c depends on c-common.h.
8045 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8047 * c-decl.c (c_write_global_declarations): Fix handling of
8050 2012-09-30 Sharad Singhai <singhai@google.com>
8052 * c-decl.c (c_write_global_declarations): Use a different method
8053 to determine if the dump has ben initialized.
8055 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8058 * c-typeck.c (c_cast_expr): When casting to a type requiring
8059 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8062 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8065 * c-typeck.c (build_unary_op): Pass original argument of
8066 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8067 any C_MAYBE_CONST_EXPR, if it has integer operands.
8068 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8069 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8070 to c_objc_common_truthvalue_conversion, then remove any
8071 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8072 c_objc_common_truthvalue_conversion not
8073 c_common_truthvalue_conversion.
8074 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8075 call note_integer_operands for arguments with integer operands
8076 that are not integer constants.
8078 2012-09-13 Jakub Jelinek <jakub@redhat.com>
8081 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8082 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8084 2012-08-31 Jakub Jelinek <jakub@redhat.com>
8087 * c-convert.c (convert): Don't call fold_convert_loc if
8088 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8089 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8090 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8092 2012-08-24 Jakub Jelinek <jakub@redhat.com>
8095 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8096 for nested and empty_ok arguments in the call to
8097 c_parser_declaration_or_fndef.
8099 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8101 * c-tree.h (c_last_sizeof_arg): Declare.
8102 * c-parser.c (struct c_tree_loc_pair): New type.
8103 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8105 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8106 (c_parser_postfix_expression_after_primary): Likewise. Call
8107 sizeof_pointer_memaccess_warning if needed.
8108 (sizeof_ptr_memacc_comptypes): New function.
8109 * c-typeck.c (c_last_sizeof_arg): New global variable.
8110 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8112 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
8114 * c-lang.h (lang_decl): Add variable_size GTY option.
8116 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8118 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8119 * Make-lang.in: Fix dependencies.
8121 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8123 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8124 and add language Makefile hooks.
8125 * config-lang.in: New file.
8126 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8127 add the required "normal" config-lang.in rules.
8128 * c-lang.h: Moved from gcc/ to here.
8129 * c-tree.h: Likewise.
8130 * c-objc-common.c: Likewise.
8131 * c-objc-common.h: Likewise.
8132 * c-typeck.c: Likewise.
8133 * c-convert.c: Likewise.
8134 * c-lang.c: Likewise.
8135 * c-aux-info.c: Likewise.
8136 * c-errors.c: Likewise.
8137 * gccspec.c: Likewise.
8138 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8139 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8141 Copyright (C) 2012-2021 Free Software Foundation, Inc.
8143 Copying and distribution of this file, with or without modification,
8144 are permitted in any medium without royalty provided the copyright
8145 notice and this notice are preserved.