1 2022-05-16 Martin Liska <mliska@suse.cz>
3 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
5 2022-05-12 Jakub Jelinek <jakub@redhat.com>
7 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
9 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
10 in postfix expressions.
11 (c_parser_omp_variable_list): Handle omp_all_memory in depend
13 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
14 keyword in depend clause as null_pointer_node, diagnose invalid
17 2022-05-09 Martin Liska <mliska@suse.cz>
19 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
21 (c_parser_binary_expression): Likewise.
23 2022-05-07 Marek Polacek <polacek@redhat.com>
27 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
29 2022-04-08 Jakub Jelinek <jakub@redhat.com>
32 * c-typeck.cc (c_build_va_arg): Reject function types.
34 2022-03-22 Marek Polacek <polacek@redhat.com>
38 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
40 (finish_init): Restore constructor_designated.
41 (push_init_level): Set constructor_designated to the value of
42 constructor_designated in the upper constructor_stack.
44 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
47 * c-typeck.cc (handle_omp_array_sections_1)
48 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
49 instead of 'c_omp_map_clause_name'.
51 2022-03-09 Joseph Myers <joseph@codesourcery.com>
53 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
54 differently from earlier standards for unprototyped function type
57 2022-03-09 Jakub Jelinek <jakub@redhat.com>
60 * c-fold.cc (c_fully_fold_internal): Don't emit
61 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
62 * c-typeck.cc (build_binary_op): Likewise.
64 2022-03-07 Jakub Jelinek <jakub@redhat.com>
66 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
69 2022-02-23 Richard Biener <rguenther@suse.de>
71 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
72 SSA names without definition.
73 (c_parser_gimple_declaration): Handle pointer typed SSA names.
75 2022-02-17 Jakub Jelinek <jakub@redhat.com>
78 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
79 convert_lvalue_to_rvalue and build_indirect_ref instead of
82 2022-02-11 Richard Biener <rguenther@suse.de>
84 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
87 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
89 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
91 (c_parser_omp_variable_list): Handle array sections.
92 (c_parser_omp_clause_has_device_addr): Added.
93 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
95 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
97 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
98 (c_finish_omp_clauses): Handle array sections.
100 2022-02-09 Jakub Jelinek <jakub@redhat.com>
103 * c-parser.cc (c_parser_postfix_expression)
104 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
105 instead of build1_loc to build PAREN_EXPR.
106 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
107 * c-fold.cc (c_fully_fold_internal): Likewise.
109 2022-01-17 Martin Liska <mliska@suse.cz>
111 * Make-lang.in: Rename .c names to .cc.
112 * c-convert.cc: Likewise.
113 * c-decl.cc (struct lang_identifier): Likewise.
114 (pop_scope): Likewise.
115 (finish_decl): Likewise.
116 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
117 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
118 * c-parser.h (GCC_C_PARSER_H): Likewise.
119 * c-tree.h (c_keyword_starts_typename): Likewise.
120 (finish_declspecs): Likewise.
121 (c_get_alias_set): Likewise.
122 (enum c_oracle_request): Likewise.
123 (tag_exists_p): Likewise.
124 (set_c_expr_source_range): Likewise.
125 * c-typeck.cc (c_common_type): Likewise.
126 (c_finish_omp_clauses): Likewise.
127 * config-lang.in: Likewise.
129 2022-01-17 Martin Liska <mliska@suse.cz>
131 * c-aux-info.c: Moved to...
132 * c-aux-info.cc: ...here.
133 * c-convert.c: Moved to...
134 * c-convert.cc: ...here.
135 * c-decl.c: Moved to...
136 * c-decl.cc: ...here.
137 * c-errors.c: Moved to...
138 * c-errors.cc: ...here.
139 * c-fold.c: Moved to...
140 * c-fold.cc: ...here.
141 * c-lang.c: Moved to...
142 * c-lang.cc: ...here.
143 * c-objc-common.c: Moved to...
144 * c-objc-common.cc: ...here.
145 * c-parser.c: Moved to...
146 * c-parser.cc: ...here.
147 * c-typeck.c: Moved to...
148 * c-typeck.cc: ...here.
149 * gccspec.c: Moved to...
150 * gccspec.cc: ...here.
151 * gimple-parser.c: Moved to...
152 * gimple-parser.cc: ...here.
154 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
156 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
158 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
161 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
162 outer node for ARRAY_REFs.
164 2022-01-01 Jakub Jelinek <jakub@redhat.com>
167 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
168 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
170 2021-12-17 Marek Polacek <polacek@redhat.com>
173 * c-decl.c (c_warn_unused_attributes): Don't warn for
175 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
176 arguments when the attribute is ignored.
178 2021-12-14 Jakub Jelinek <jakub@redhat.com>
181 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
182 consume the pragma and silently skip to the pragma eol.
184 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
186 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
187 * c-parser.c: Likewise.
189 2021-12-09 Jakub Jelinek <jakub@redhat.com>
192 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
193 to resort_data.new_value.
195 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
197 * c-parser.c (struct omp_dim): New struct type for use inside
198 c_parser_omp_variable_list.
199 (c_parser_omp_variable_list): Allow multiple levels of array and
200 component accesses in array section base-pointer expression.
201 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
202 c_parser_omp_var_list_parens.
203 (c_parser_omp_clause_from): Likewise.
204 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
205 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
207 (c_finish_omp_clauses): Extend allowed ranged of expressions
208 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
210 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
213 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
214 call to c_parser_omp_variable_list to 'true'.
215 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
217 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
219 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
221 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
222 orphan loop" checking.
224 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
225 Thomas Schwinge <thomas@codesourcery.com>
227 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
228 OpenACC gang reductions.
230 2021-11-30 Richard Biener <rguenther@suse.de>
232 * gimple-parser.c (c_parser_gimple_postfix_expression):
233 avoid unreachable code after break.
235 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
238 * Make-lang.in: Use ETAGS variable in TAGS target.
240 2021-11-29 Richard Biener <rguenther@suse.de>
242 * c-typeck.c (c_tree_equal): Remove unreachable return.
243 * c-parser.c (get_matching_symbol): Likewise.
245 2021-11-23 Jakub Jelinek <jakub@redhat.com>
247 * c-typeck.c (c_clone_omp_udr): Don't initialize
248 id.transform_lang_insert_block.
250 2021-11-19 Martin Sebor <msebor@redhat.com>
254 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
255 code resulting from macro expansion.
257 2021-11-19 Martin Liska <mliska@suse.cz>
260 2021-11-19 Martin Liska <mliska@suse.cz>
262 * c-parser.c (add_debug_begin_stmt): Use option directly.
264 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
266 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
267 * c-parser.c (c_parser_postfix_expression): Likewise.
269 2021-11-18 Martin Liska <mliska@suse.cz>
271 * c-parser.c (add_debug_begin_stmt): Use option directly.
273 2021-11-17 Martin Sebor <msebor@redhat.com>
276 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
277 bounds before deciding if they're constant.
279 2021-11-15 Jakub Jelinek <jakub@redhat.com>
281 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
282 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
284 2021-11-11 Jakub Jelinek <jakub@redhat.com>
286 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
287 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
288 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
289 OMP_CLAUSE_NUM_TEAMS_EXPR.
290 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
291 combined target teams even lower-bound expression.
293 2021-11-11 Richard Biener <rguenther@suse.de>
295 * gimple-parser.c: Shuffle bitmap.h include.
297 2021-11-03 Joseph Myers <joseph@codesourcery.com>
300 * c-convert.c (c_convert): New function, based on convert.
301 (convert): Make into wrapper of c_convert.
302 (convert_init): New function.
303 * c-typeck.c (enum impl_conv): Add ic_init_const.
304 (convert_for_assignment): Handle ic_init_const like ic_init. Add
305 new argument to convert_and_check call.
306 (digest_init): Pass ic_init_const to convert_for_assignment for
307 initializers required to be constant.
309 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
311 * c-tree.h (c_simulate_record_decl): Declare.
312 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
313 * c-decl.c (c_simulate_record_decl): New function.
315 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
318 * Make-lang.in: Add dummy c.install-dvi target.
320 2021-10-15 Richard Biener <rguenther@suse.de>
324 (c_parser_gimple_postfix_expression_after_primary): Check
325 for a pointer do be dereferenced by ->.
327 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
329 * c-parser.c (c_finish_omp_declare_variant): Change call from
330 c_omp_check_context_selector to omp_check_context_selector. Change
331 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
333 2021-10-09 Jakub Jelinek <jakub@redhat.com>
335 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
336 (c_parser_omp_scan_loop_body): Use it.
337 (c_parser_omp_sections_scope): Likewise.
339 2021-10-07 Richard Biener <rguenther@suse.de>
341 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
343 2021-10-05 Richard Biener <rguenther@suse.de>
346 * gimple-parser.c (c_parser_gimple_postfix_expression):
347 Accept more address _Literals.
349 2021-10-04 Marek Polacek <polacek@redhat.com>
352 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
354 2021-10-01 Martin Sebor <msebor@redhat.com>
357 * c-typeck.c (maybe_warn_for_null_address): New function.
358 (build_binary_op): Call it.
360 2021-10-01 Jakub Jelinek <jakub@redhat.com>
361 Richard Biener <rguenther@suse.de>
364 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
365 for division even for SANITIZE_SI_OVERFLOW.
367 2021-10-01 Jakub Jelinek <jakub@redhat.com>
369 * c-parser.c (c_parser_omp_clause_order): Set
370 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
372 2021-09-28 Andrew Pinski <apinski@marvell.com>
375 * c-parser.c (c_parser_statement_after_labels): Pass
376 the c_expr instead of the tree to c_finish_goto_ptr.
377 * c-typeck.c (c_finish_goto_ptr): Change the second
378 argument type to c_expr.
379 * c-tree.h (c_finish_goto_ptr): Likewise.
380 Error out if the expression was not of a pointer type.
382 2021-09-22 Jakub Jelinek <jakub@redhat.com>
384 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
387 2021-09-18 Jakub Jelinek <jakub@redhat.com>
389 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
390 and reproducible modifiers.
391 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
393 2021-09-18 Jakub Jelinek <jakub@redhat.com>
395 * c-parser.c (c_parser_omp_clause_default): Handle private and
396 firstprivate arguments, adjust diagnostics on unknown argument.
398 2021-09-17 Jakub Jelinek <jakub@redhat.com>
400 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
403 2021-09-10 Jakub Jelinek <jakub@redhat.com>
405 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
406 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
407 don't call build_conditional_expr, instead build a COND_EXPR directly.
408 (c_parser_binary_expression): Avoid calling parser_build_binary_op
409 if omp_atomic_lhs even in more cases for >, < or ==.
410 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
411 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
412 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
413 * c-typeck.c (build_binary_op): For flag_openmp only handle
416 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
418 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
421 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
423 * c-decl.c (enum deprecated_states): Add unavailable state.
424 (merge_decls): Copy unavailability.
425 (quals_from_declspecs): Handle unavailable case.
426 (start_decl): Amend the logic handling suppression of nested
427 deprecation states to include unavailability.
428 (smallest_type_quals_location): Amend comment.
429 (grokdeclarator): Handle the unavailable deprecation state.
430 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
431 * c-tree.h (struct c_declspecs): Add unavailable_p.
432 * c-typeck.c (build_component_ref): Handle unavailability.
433 (build_external_ref): Likewise.
435 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
436 Joseph Myers <joseph@codesourcery.com>
439 * c-decl.c (duplicate_decls): On significant mismatches, mark the
440 types of both (non-function) decls as error_mark_node, so that the
441 middle-end can see the code is malformed.
442 (free_attr_access_data): Don't process if the type has been set to
445 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
447 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
448 and 'ancestor' in 'target device' clauses.
450 2021-08-23 Jakub Jelinek <jakub@redhat.com>
452 * c-parser.c (c_parser_omp_clause_num_tasks,
453 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
455 2021-08-22 Martin Uecker <muecker@gwdg.de>
458 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
459 for pointers to arrays with qualifiers.
460 (build_conditional_expr): For C23 don't lose qualifiers for pointers
461 to arrays when the other pointer is a void pointer. Update warnings.
462 (convert_for_assignment): Update warnings for C2X when converting from
463 void* with qualifiers to a pointer to array with the same qualifiers.
465 2021-08-20 Jakub Jelinek <jakub@redhat.com>
467 * c-parser.c (c_parser_omp_error): New function.
468 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
470 2021-08-20 Jakub Jelinek <jakub@redhat.com>
472 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
473 comma at the end of list.
474 (c_parser_omp_requires): Likewise.
476 2021-08-19 Jakub Jelinek <jakub@redhat.com>
478 * c-parser.c (c_parser_omp_requires): Don't call
479 c_parser_peek_2nd_token and optionally consume token if current
480 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
482 2021-08-18 Jakub Jelinek <jakub@redhat.com>
484 * c-parser.c (c_parser_omp_nothing): New function.
485 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
487 2021-08-18 Jakub Jelinek <jakub@redhat.com>
489 * c-parser.c (c_parser_statement_after_labels): Add restart label
490 near the start of the function. If c_parser_pragma returns false,
492 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
493 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
494 return what c_parser_omp_declare returned. Return true instead of
495 false after emitting errors that the directive is not allowed in
497 (c_parser_omp_ordered): Return true instead of
498 false after emitting errors that the directive is not allowed in
500 (c_parser_omp_target_update): Likewise.
501 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
502 Change return type from tree to bool, return false if the
503 directive should be ignored in pragma_stmt contexts.
504 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
505 return their result directly.
506 (c_parser_omp_cancellation_point): Change return type from void to
507 bool, return false if the directive should be ignored in pragma_stmt
509 (c_parser_omp_declare): Likewise.
511 2021-08-17 Jakub Jelinek <jakub@redhat.com>
513 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
514 (c_parser_omp_scope): New function.
515 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
517 2021-08-12 Jakub Jelinek <jakub@redhat.com>
519 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
520 (c_parser_omp_clause_filter): New function.
521 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
522 (OMP_MASKED_CLAUSE_MASK): Define.
523 (c_parser_omp_masked): New function.
524 (c_parser_omp_parallel): Handle parallel masked.
525 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
526 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
528 2021-08-12 Martin Uecker <muecker@gwdg.de>
532 * c-typeck.c (c_expr_sizeof_type): Evaluate
533 size expressions for structs of variable size.
535 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
537 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
538 'primary' as alias for 'master'.
540 2021-08-10 Martin Uecker <muecker@gwdg.de>
543 * c-typeck.c (c_expr_sizeof_expr): Evaluate
544 size expressions for structs of variable size.
546 2021-08-06 Tamar Christina <tamar.christina@arm.com>
548 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
549 * c-tree.h (c_simulate_enum_decl): Likewise.
551 2021-08-06 Martin Sebor <msebor@redhat.com>
553 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
554 vec arguments to by-reference.
555 (c_finish_omp_declare_simd): Same.
556 (c_parser_compound_statement_nostart): Same.
557 (c_parser_for_statement): Same.
558 (c_parser_objc_methodprotolist): Same.
559 (c_parser_oacc_routine): Same.
560 (c_parser_omp_for_loop): Same.
561 (c_parser_omp_declare_simd): Same.
563 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
564 Joseph Myers <joseph@codesourcery.com>
565 Cesar Philippidis <cesar@codesourcery.com>
567 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
568 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
569 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
570 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
572 2021-07-20 Martin Sebor <msebor@redhat.com>
574 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
576 * c-typeck.c (c_build_function_call_vec): Same.
578 2021-07-15 Martin Sebor <msebor@redhat.com>
582 * c-decl.c (get_parm_array_spec): Strip nops.
584 2021-07-06 Martin Sebor <msebor@redhat.com>
586 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
588 2021-07-02 Jakub Jelinek <jakub@redhat.com>
591 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
592 appears before a CPP_NAME.
594 2021-06-25 Martin Sebor <msebor@redhat.com>
596 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
597 warning_suppressed_p, suppress_warning, and copy_no_warning.
598 (diagnose_mismatched_decls): Same.
599 (duplicate_decls): Same.
600 (grokdeclarator): Same.
601 (finish_function): Same.
602 (c_write_global_declarations_1): Same.
603 * c-fold.c (c_fully_fold_internal): Same.
604 * c-parser.c (c_parser_expr_no_commas): Same.
605 (c_parser_postfix_expression): Same.
606 * c-typeck.c (array_to_pointer_conversion): Same.
607 (function_to_pointer_conversion): Same.
608 (default_function_array_conversion): Same.
609 (convert_lvalue_to_rvalue): Same.
610 (default_conversion): Same.
611 (build_indirect_ref): Same.
612 (build_function_call_vec): Same.
613 (build_atomic_assign): Same.
614 (build_unary_op): Same.
615 (c_finish_return): Same.
616 (emit_side_effect_warnings): Same.
617 (c_finish_stmt_expr): Same.
618 (c_omp_clause_copy_ctor): Same.
620 2021-06-24 Jakub Jelinek <jakub@redhat.com>
623 * c-parser.c (c_parser_has_attribute_expression): Set source range for
626 2021-06-24 Jakub Jelinek <jakub@redhat.com>
629 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
632 2021-06-24 Jakub Jelinek <jakub@redhat.com>
634 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
635 C_ORT_OMP for clauses on target construct.
636 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
637 (c_parser_omp_target): For non-combined target add
638 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
639 C_ORT_OMP_TARGET to c_finish_omp_clauses.
640 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
641 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
642 never present on C_ORT_*DECLARE_SIMD.
643 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
644 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
645 corresponding map clauses.
647 2021-06-21 Jakub Jelinek <jakub@redhat.com>
650 * c-typeck.c (c_mark_addressable): Diagnose trying to make
651 bit-fields addressable.
653 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
655 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
658 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
661 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
662 var in the error case.
664 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
667 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
668 spot built-in functions.
670 2021-06-06 Jakub Jelinek <jakub@redhat.com>
673 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
674 even when target is combined with other constructs.
676 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
679 * c-decl.c (finish_struct): Fix thinko in previous change.
680 * c-typeck.c (convert_for_assignment): Do not warn on pointer
681 assignment and initialization for storage order purposes if the
682 RHS is a call to a DECL_IS_MALLOC function.
684 2021-06-04 Martin Sebor <msebor@redhat.com>
687 * c-objc-common.c (print_type): Handle erroneous types.
689 2021-06-03 Jakub Jelinek <jakub@redhat.com>
692 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
693 after depend only cases.
695 2021-05-31 Richard Biener <rguenther@suse.de>
698 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
699 * c-parser.c (c_parser_postfix_expression): Likewise.
701 2021-05-28 Richard Biener <rguenther@suse.de>
704 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
705 invalid if conditions.
707 2021-05-28 Jakub Jelinek <jakub@redhat.com>
710 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
711 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
712 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
713 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
714 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
715 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
716 if present in map_head, map_field_head or map_firstprivate_head
719 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
721 * c-parser.c (c_parser_omp_clause_affinity): New.
722 (c_parser_omp_clause_name, c_parser_omp_variable_list,
723 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
724 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
725 c_finish_omp_clauses): Likewise.
727 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
730 * c-decl.c (finish_struct): Warn for a union containing an aggregate
731 field with a differing scalar storage order.
733 2021-05-21 Jakub Jelinek <jakub@redhat.com>
736 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
737 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
738 if a decl is mentioned both in map clause and in such firstprivate
739 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
741 2021-05-19 Jakub Jelinek <jakub@redhat.com>
744 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
745 master when combined with taskloop.
746 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
747 parallel master when not combined with taskloop.
749 2021-05-18 Richard Biener <rguenther@suse.de>
752 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
753 Diagnose calls to non-functions.
754 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
756 2021-05-17 Richard Biener <rguenther@suse.de>
759 * gimple-parser.c (c_parser_gimple_label): Avoid building
760 a GIMPLE label with NULL label decl.
762 2021-05-13 Martin Sebor <msebor@redhat.com>
765 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
767 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
769 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
772 2021-05-10 Martin Liska <mliska@suse.cz>
774 * c-aux-info.c (affix_data_type): Use startswith
775 function instead of strncmp.
776 * c-typeck.c (build_function_call_vec): Likewise.
777 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
779 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
781 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
782 on the address of a pointer field in a record with reverse SSO.
784 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
786 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
787 for || and && reductions.
789 2021-04-29 Joseph Myers <joseph@codesourcery.com>
791 * c-typeck.c (function_types_compatible_p): For C2X, treat
792 unprototyped function as compatible with non-variadic prototyped
793 function even if some argument types are changed by the default
796 2021-04-15 Martin Sebor <msebor@redhat.com>
800 * c-decl.c (pushdecl): Always propagate type attribute.
802 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
805 * c-typeck.c (c_common_type): Do not drop attributes that
806 affect type identity.
808 2021-04-10 Jakub Jelinek <jakub@redhat.com>
811 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
814 2021-03-25 Jakub Jelinek <jakub@redhat.com>
817 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
820 2021-03-19 Jakub Jelinek <jakub@redhat.com>
823 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
824 with modifycode NOP_EXPR produces and mark the _Atomic var as read
826 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
827 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
828 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
830 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
833 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
834 ensure that the varpool node is marked as offloadable.
836 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
839 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
841 2021-02-24 Martin Sebor <msebor@redhat.com>
844 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
846 2021-02-18 Jakub Jelinek <jakub@redhat.com>
849 * c-typeck.c (c_finish_return): Don't wrap retval into
850 EXCESS_PRECISION_EXPR in functions that return void.
852 2021-02-11 Marek Polacek <polacek@redhat.com>
854 * c-parser.c (c_parser_if_statement): Use vec_free.
856 2021-02-04 Martin Sebor <msebor@redhat.com>
859 * c-decl.c (locate_old_decl): Add type to diagnostic output.
860 (diagnose_mismatched_decls): Same.
861 (start_function): Introduce temporaries for better readability.
862 * c-typeck.c (comptypes_internal): Only consider complete enum
863 types in comparisons with integers.
865 2021-02-01 Martin Sebor <msebor@redhat.com>
868 * c-decl.c (free_attr_access_data): New function.
869 (c_parse_final_cleanups): Call free_attr_access_data.
871 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
873 * c-parser.c (c_parser_omp_clause_detach): New.
874 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
875 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
876 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
877 clause. Prevent use of detach with mergeable and overriding the
878 data sharing mode of the event handle.
880 2021-01-15 Jakub Jelinek <jakub@redhat.com>
882 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
883 unqualified element type and then call c_build_qualified_type on the
886 2021-01-07 Richard Biener <rguenther@suse.de>
888 * gimple-parser.c (c_parser_gimple_compound_statement): Only
889 reallocate loop array if it is too small.
891 2020-12-16 Martin Uecker <muecker@gwdg.de>
894 * c-typeck.c (build_modify_expr): Drop qualifiers.
896 2020-12-16 Martin Uecker <muecker@gwdg.de>
899 * c-parser.c (c_parser_expression): Look into
900 nop expression when marking expressions as read.
902 2020-12-14 Martin Liska <mliska@suse.cz>
905 * c-typeck.c (pointer_diff): Do not emit a top-level
907 (build_binary_op): Likewise.
909 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
911 * c-parser.c (c_parser_omp_allocate): New.
912 (c_parser_omp_construct): Call it.
914 2020-12-09 Richard Biener <rguenther@suse.de>
917 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
920 2020-12-07 Martin Uecker <muecker@gwdg.de>
923 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
924 that drops qualifiers to the end of the function.
926 2020-11-26 Martin Uecker <muecker@gwdg.de>
930 * c-parser.c (c_parser_declaration_or_fndef): Remove
931 redundant code to drop qualifiers of _Atomic types for __auto_type.
932 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
933 types for __typeof__.
935 2020-11-24 Jakub Jelinek <jakub@redhat.com>
938 * c-parser.c (c_parser_binary_expression): For omp atomic binary
939 expressions, use make_node instead of build2 to avoid checking build2
942 2020-11-23 Joseph Myers <joseph@codesourcery.com>
945 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
946 for comparisons of complete and incomplete pointers.
948 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
950 * c-aux-info.c (gen_type): Support opaque types.
952 2020-11-20 Martin Sebor <msebor@redhat.com>
955 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
957 2020-11-20 Jakub Jelinek <jakub@redhat.com>
960 * Make-lang.in (c.serial): Change from goal to a variable.
961 (.PHONY): Drop c.serial.
963 2020-11-20 Martin Uecker <muecker@gwdg.de>
965 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
967 2020-11-19 Jakub Jelinek <jakub@redhat.com>
970 * c-decl.c (get_parm_array_spec): Bail out of nelts is
973 2020-11-18 Jakub Jelinek <jakub@redhat.com>
975 * Make-lang.in (c.serial): New goal.
976 (.PHONY): Add c.serial c.prev.
977 (cc1$(exeext)): Call LINK_PROGRESS.
979 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
981 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
983 * c-typeck.c (build_asm_expr): Remove an assert checking output
984 absence for asm goto.
986 2020-11-13 Jakub Jelinek <jakub@redhat.com>
988 * c-typeck.c (c_finish_omp_clauses): Don't clear
989 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
991 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
994 * c-parser.c (c_parser_objc_class_definition): Pass the
995 location of the class name to the interface declaration.
997 2020-11-10 Strager Neds <strager.nds@gmail.com>
999 * c-decl.c (merge_decls): Use new overload of
1000 set_decl_section_name.
1002 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1004 * c-parser.c (c_parser_omp_target_data): Add use of
1005 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1006 handled map clause kind.
1007 (c_parser_omp_target_enter_data): Likewise.
1008 (c_parser_omp_target_exit_data): Likewise.
1009 (c_parser_omp_target): Likewise.
1010 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1011 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1012 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1013 same struct field access to co-exist on OpenMP construct.
1015 2020-11-07 Martin Uecker <muecker@gwdg.de>
1017 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1018 (c_parser_all_labels): Likewise.
1020 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1022 * c-parser.c (c_parser_objc_at_property_declaration):
1023 Improve parsing fidelity. Associate better location info
1024 with @property attributes. Clean up the interface to
1025 objc_add_property_declaration ().
1027 2020-11-06 Nathan Sidwell <nathan@acm.org>
1029 * c-decl.c (diagnose_mismatched_decls): Rename
1030 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1031 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1032 (collect_source_refs): Likewise.
1033 * c-typeck.c (inform_declaration, inform_for_arg)
1034 (convert_for_assignment): Likewise.
1036 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
1038 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1040 (c_parser_omp_construct): Update call.
1042 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1045 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1046 find underlying decl to clear in the aligned_head bitmap.
1048 2020-11-04 Joseph Myers <joseph@codesourcery.com>
1050 * c-decl.c (handle_nodiscard_attribute): New.
1051 (std_attribute_table): Add nodiscard.
1052 * c-parser.c (c_parser_std_attribute): Expect argument to
1053 nodiscard attribute to be a string. Do not special-case ignoring
1055 * c-typeck.c (maybe_warn_nodiscard): New.
1056 (build_compound_expr, emit_side_effect_warnings): Call
1057 maybe_warn_nodiscard.
1058 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1059 emit_side_effect_warnings if warn_unused_result.
1061 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
1063 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1065 (finish_init): Likewise.
1066 (pop_init_level): Likewise.
1068 2020-10-28 Joseph Myers <joseph@codesourcery.com>
1070 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1071 error_at for omitted parameter name.
1073 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1075 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1076 (c_parser_omp_clause_allocate): New function.
1077 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1078 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1079 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1080 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1081 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1082 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1083 PRAGMA_OMP_CLAUSE_ALLOCATE.
1084 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1086 2020-10-27 Joseph Myers <joseph@codesourcery.com>
1088 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1089 standard attributes.
1091 2020-10-23 Marek Polacek <polacek@redhat.com>
1094 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1095 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1096 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1097 * c-tree.h (char_type_p): Declare.
1098 * c-typeck.c (char_type_p): No longer static.
1100 2020-10-23 Martin Sebor <msebor@redhat.com>
1103 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1105 2020-09-19 Martin Sebor <msebor@redhat.com>
1108 * c-decl.c (lookup_last_decl): Define new function.
1109 (c_decl_attributes): Call it.
1110 (start_decl): Add argument and use it.
1111 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1112 (get_parm_array_spec): Define new function.
1113 (push_parm_decl): Call get_parm_array_spec.
1114 (start_function): Call warn_parm_array_mismatch. Build attribute
1115 access and add it to current function.
1116 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1117 in forms of array parameters.
1118 * c-tree.h (start_decl): Add argument.
1120 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1122 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1124 (in_statement): New.
1125 (start_function): Adjust for above change.
1126 (c_push_function_context, c_pop_function_context): Likewise.
1127 * c-lang.h (struct language_function): Likewise.
1128 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1129 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1131 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1132 (c_parser_switch_statement): Adjust break/switch context handling
1133 and calls to renamed functions.
1134 (c_parser_while_statement): Adjust break/switch context handling and
1136 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1137 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1138 (c_parser_omp_for_loop): Adjust break/switch context handling.
1139 * c-tree.h (c_break_label, c_cont_label): Delete.
1140 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1141 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1142 (in_statement, switch_statement_break_seen_p): Declare.
1143 (c_start_case, c_finish_case): Renamed to...
1144 (c_start_switch, c_finish_switch).
1145 (c_finish_bc_stmt): Adjust arguments.
1146 * c-typeck.c (build_function_call_vec): Don't try to print
1147 statements with %qE format.
1148 (struct c_switch): Rename switch_expr field to switch_stmt.
1149 Add break_stmt_seen_p field.
1150 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1151 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1152 (do_case): Update for changes to struct c_switch.
1153 (c_finish_case): Rename to c_finish_switch. Update for changes to
1154 struct c_switch and change of representation from SWITCH_EXPR to
1156 (c_finish_loop): Delete.
1157 (c_finish_bc_stmt): Update to reflect changes to break/continue
1158 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1159 of a GOTO_EXPR except for objc foreach loops.
1161 2020-09-01 Jakub Jelinek <jakub@redhat.com>
1164 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1167 2020-08-28 Martin Sebor <msebor@redhat.com>
1170 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1173 2020-08-27 Martin Liska <mliska@suse.cz>
1175 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1176 growth function to true.
1178 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
1181 * c-typeck.c (handle_omp_array_sections_1): Talk about
1182 array function parameter in the error message.
1184 2020-08-18 Jakub Jelinek <jakub@redhat.com>
1187 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1188 to int, holding index of the match. Call mark_exp_read on the selector
1189 expression and on expressions other than the selected one.
1191 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1194 * c-typeck.c (process_init_element): Split test for whether to
1195 recurse into a record, union or array into...
1196 (initialize_elementwise_p): ...this new function. Don't recurse
1197 into a vector type if the initialization value is also a vector.
1199 2020-07-31 Richard Biener <rguenther@suse.de>
1202 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1203 Define to c_common_finalize_early_debug.
1205 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1207 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1208 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1209 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1211 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1214 * c-decl.c (finish_decl): Call target hook
1215 lower_local_decl_alignment to lower local decl alignment.
1217 2020-07-09 Julian Brown <julian@codesourcery.com>
1218 Thomas Schwinge <thomas@codesourcery.com>
1221 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1222 for standalone attach/detach clauses.
1224 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1226 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1227 set, warn for conversion between pointers that point to incompatible
1228 scalar storage orders.
1230 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1232 * c-parser.c (c_parser_statement_after_labels): Pass correct
1233 parameters to c_parser_do_statement.
1235 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1237 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1239 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1240 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1242 * c-tree.h (c_in_omp_for): Declare.
1243 * c-typeck.c (c_in_omp_for): Define.
1244 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1245 (digest_init): Likewise.
1246 (build_binary_op): Likewise.
1248 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1250 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1251 from kind by comma rather than colon.
1253 2020-06-05 Mark Wielaard <mark@klomp.org>
1255 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1256 an undeclared builtin, then add a fixit header hint, if found.
1257 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1258 warning_at about implicit builtin declaration type mismatch.
1260 2020-06-03 Mark Wielaard <mark@klomp.org>
1262 * c-parser.c (struct c_parser): Add seen_string_literal
1264 (c_parser_consume_token): Reset seen_string_literal.
1265 (c_parser_error_richloc): Add name_hint if seen_string_literal
1266 and next token is a CPP_NAME and we have a missing header
1267 suggestion for the name.
1268 (c_parser_string_literal): Set seen_string_literal.
1270 2020-06-03 Mark Wielaard <mark@klomp.org>
1272 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1273 scope with matching_parens after CPP_OPEN_PAREN.
1275 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1277 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1279 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1281 * Make-lang.in: Remove extra slash.
1283 2020-05-19 Martin Liska <mliska@suse.cz>
1285 * c-parser.c: Fix typo.
1287 2020-05-14 Jakub Jelinek <jakub@redhat.com>
1289 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1291 2020-05-07 Richard Biener <rguenther@suse.de>
1294 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1297 2020-04-30 Jakub Jelinek <jakub@redhat.com>
1300 * c-decl.c (set_labels_context_r): In addition to context-less
1301 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1302 parent function if any.
1303 (store_parm_decls): Adjust comment.
1305 2020-04-19 Jakub Jelinek <jakub@redhat.com>
1308 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1309 two CPP_COLON tokens.
1311 2020-04-17 Jakub Jelinek <jakub@redhat.com>
1314 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1317 2020-04-15 Jakub Jelinek <jakub@redhat.com>
1320 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1321 requires directive when not at file scope.
1323 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
1326 * c-decl.c (c_check_in_current_scope): New function.
1327 * c-tree.h (c_check_in_current_scope): Declare it.
1328 * c-parser.c (c_parser_oacc_declare): Add check that variables
1329 are declared in the same scope as the directive. Fix handling
1332 2020-04-07 Jakub Jelinek <jakub@redhat.com>
1335 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1336 if c_parser_omp_master succeeded.
1338 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1340 PR gcov-profile/94029
1342 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1343 the function_start_locus location. Don't do that afterwards for the
1344 __GIMPLE body parsing.
1346 2020-03-19 Jakub Jelinek <jakub@redhat.com>
1348 PR gcov-profile/94029
1349 * c-tree.h (finish_function): Add location_t argument defaulted to
1351 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1352 set it to the locus of closing } if non-NULL.
1353 (c_parser_compound_statement_nostart): Return locus of closing }.
1354 (c_parser_parse_rtl_body): Likewise.
1355 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1357 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1358 input_location to set function_end_locus.
1360 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1363 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1364 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1365 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1366 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1368 (finish_incomplete_vars): New function, moved from finish_struct. Use
1369 relayout_decl instead of layout_decl.
1370 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1371 being TYPE_VFIELD. Use finish_incomplete_vars.
1372 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1373 finish_incomplete_vars.
1374 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1375 also on ENUMERAL_TYPEs.
1377 2020-03-16 Jakub Jelinek <jakub@redhat.com>
1380 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1382 2020-03-13 Martin Sebor <msebor@redhat.com>
1385 * c-decl.c (builtin_structptr_type_count): New constant.
1386 (match_builtin_function_types): Reject decls that are incompatible
1387 in types pointed to by pointers.
1388 (diagnose_mismatched_decls): Adjust comments.
1390 2020-03-05 Joseph Myers <joseph@codesourcery.com>
1393 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1394 empty when initialized type is error_mark_node.
1395 (set_designator, process_init_element): Ignore initializers for
1396 elements of a variable-size type or of error_mark_node.
1398 2020-03-01 Martin Sebor <msebor@redhat.com>
1401 * c-decl.c (types_close_enough_to_match): New function.
1402 (match_builtin_function_types):
1403 (diagnose_mismatched_decls): Add missing inform call to a warning.
1405 2020-03-01 Martin Sebor <msebor@redhat.com>
1408 * c-typeck.c (build_functype_attribute_variant): New function.
1409 (composite_type): Call it.
1411 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1414 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1415 Rename last argument from probablity to probability.
1417 2020-02-13 Jakub Jelinek <jakub@redhat.com>
1420 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1421 *expr if it has side effects.
1423 2020-01-30 Jeff Law <law@redhat.com>
1426 * c-parser.c (c_parser_switch_statement): Make sure to request
1427 marking the switch expr as used.
1429 2020-01-22 Joseph Myers <joseph@codesourcery.com>
1432 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1433 argument with integer operands.
1435 2020-01-16 Kerem Kat <keremkat@gmail.com>
1438 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1439 to support 4 available tokens.
1441 2020-01-15 Joseph Myers <joseph@codesourcery.com>
1444 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1445 determine whether to set DECL_CONTEXT.
1447 2020-01-13 Joseph Myers <joseph@codesourcery.com>
1450 * c-typeck.c (build_c_cast): Check for expressions with integer
1451 operands that can occur in an unevaluated part of an integer
1452 constant expression and call note_integer_operands as needed.
1454 2019-01-08 Richard Biener <rguenther@suse.de>
1457 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1460 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1462 Update copyright years.
1464 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1466 * c-decl.c (collect_source_ref_cb): Delete.
1467 (for_each_global_decl): Rename into...
1468 (collect_source_refs): ...this. Call collect_source_ref directly.
1469 (c_parse_final_cleanups): Always call collect_source_ref on the main
1472 2019-12-19 Julian Brown <julian@codesourcery.com>
1473 Cesar Philippidis <cesar@codesourcery.com>
1475 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1477 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1478 Allow deref (->) in variable lists if true.
1479 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1480 Pass to c_parser_omp_variable_list.
1481 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1482 call to c_parser_omp_variable_list.
1483 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1484 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1485 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1486 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1487 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1488 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1489 and detach. Support deref.
1490 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1491 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1492 (c_oacc_check_attachments): New function.
1493 (c_finish_omp_clauses): Check attach/detach arguments for being
1494 pointers using above. Support deref.
1496 2019-12-19 Julian Brown <julian@codesourcery.com>
1497 Maciej W. Rozycki <macro@codesourcery.com>
1498 Tobias Burnus <tobias@codesourcery.com>
1499 Thomas Schwinge <thomas@codesourcery.com>
1501 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1502 (c_parser_oacc_data_clause): Likewise.
1503 (c_parser_oacc_all_clauses): Likewise.
1504 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1505 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1506 PRAGMA_OACC_CLAUSE_NO_CREATE.
1507 * c-typeck.c (handle_omp_array_sections): Support
1510 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1512 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1513 Replace label_text ctor calls.
1515 2019-12-04 Joseph Myers <joseph@codesourcery.com>
1519 * c-typeck.c (convert_lvalue_to_rvalue): Call
1520 require_complete_type for arguments not of void types.
1521 (build_indirect_ref): Do not diagnose dereferencing pointers to
1523 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1525 2019-12-03 Joseph Myers <joseph@codesourcery.com>
1528 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1529 old-style parameter definitions.
1531 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1535 * c-decl.c (flexible_array_type_p): Move to common code.
1537 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1539 * c-decl.c (start_decl): Allow initialization of variables whose
1540 size is a POLY_INT_CST.
1541 (finish_decl): Use verify_type_context to check whether the target
1542 allows variables with a particular type to have static or thread-local
1543 storage duration. Don't raise a second error if such variables do
1544 not have a constant size.
1545 (grokdeclarator): Use verify_type_context to check whether the
1546 target allows fields or array elements to have a particular type.
1547 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1548 the target allows pointer difference for the types involved.
1549 (build_unary_op): Likewise for pointer increment and decrement.
1551 2019-11-29 Joseph Myers <joseph@codesourcery.com>
1553 * c-parser.c (struct c_parser): Add members raw_tokens and
1555 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1556 using previously-lexed raw tokens.
1557 (c_parser_peek_nth_token_raw)
1558 (c_parser_check_balanced_raw_token_sequence): New functions.
1559 (c_parser_nth_token_starts_std_attributes): Use
1560 c_parser_check_balanced_raw_token_sequence for Objective-C.
1562 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1565 * c-decl.c (finish_declspecs): Use int instead of decimal
1566 floating-point types if decimal floating-point not supported.
1568 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1570 * c-tree.h (struct c_declarator): Use a structure for id member.
1571 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1572 declarators at the start, not when handling individual declarators
1573 later. Use u.id.id instead of u.id.
1574 (grokfield): Use u.id.id instead of u.id.
1575 (build_id_declarator): Set u.id.id and u.id.attrs.
1576 (finish_declspecs): Handle postfix attributes in case of typedef
1577 name or typeof used.
1578 * c-parser.c (c_parser_direct_declarator)
1579 (c_parser_direct_declarator_inner): Place declarator for
1580 attributes inside that for function or array, not outside. Set
1581 u.id.attrs for identifiers.
1582 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1583 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1586 2019-11-22 Jakub Jelinek <jakub@redhat.com>
1589 * c-decl.c (identifier_global_tag): Define.
1591 2019-11-20 Richard Biener <rguenther@suse.de>
1594 * c-decl.c (grokdeclarator): Prevent inlining of nested
1595 function with VLA arguments.
1597 2019-11-20 Joseph Myers <joseph@codesourcery.com>
1599 * c-decl.c (c_warn_type_attributes): New function.
1600 (groktypename, grokdeclarator, finish_declspecs): Call
1601 c_warn_type_attributes before applying attributes to types.
1602 * c-tree.h (c_warn_type_attributes): Declare.
1604 2019-11-19 Joseph Myers <joseph@codesourcery.com>
1606 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1607 standard attributes.
1608 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1609 pedwarn for unknown standard attributes and return error_mark_node
1612 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1614 * c-parser.c (c_parser_parse_rtl_body): Always call
1615 run_rtl_passes, even if startwith pass is not provided.
1617 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1619 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1620 duplicate standard attributes.
1622 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1624 * c-decl.c (std_attribute_table): Add maybe_unused.
1626 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1628 * c-decl.c (std_attribute_table): Add fallthrough.
1629 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1630 attribute at top level.
1632 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1634 * c-decl.c (std_attribute_table): New.
1635 (c_init_decl_processing): Register attributes from
1636 std_attribute_table.
1637 * c-parser.c (c_parser_attribute_arguments): Add arguments
1638 require_string and allow_empty_args. All callers changed.
1639 (c_parser_std_attribute): Set require_string argument for
1640 "deprecated" attribute.
1642 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1644 * c-parser.c (c_parser_postfix_expression)
1645 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1646 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1648 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1650 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1651 of build_same_sized_truth_vector_type.
1652 (build_vec_cmp): Likewise.
1654 2019-11-14 Jakub Jelinek <jakub@redhat.com>
1656 * c-parser.c (c_parser_omp_context_selector): Don't require score
1657 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1660 * c-parser.c (c_parser_omp_context_selector): Rename
1661 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1662 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1663 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1664 and string literals.
1666 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1668 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1669 ctsk_tagfirstref_attrs.
1670 (struct c_declspecs): Update description of attrs. Add
1671 postfix_attrs and non_std_attrs_seen_p. Increase size of
1672 typespec_kind bit-field.
1673 (c_warn_unused_attributes): New declaration.
1674 (parser_xref_tag): Update prototype.
1675 * c-decl.c (c_warn_unused_attributes): New function.
1676 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1677 ctsk_tagref_attrs. Handle attribute declarations.
1678 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1679 (grokdeclarator): Handle standard attributes.
1680 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1681 attributes to incomplete type reference.
1682 (xref_tag): Update call to parser_xref_tag.
1683 (declspecs_add_addrspace, declspecs_add_type)
1684 (declspecs_add_scspec, declspecs_add_attrs): Set
1685 non_std_attrs_seen_p.
1686 (finish_declspecs): Apply postfix standard attributes to type.
1687 * c-parser.c (c_token_starts_declspecs)
1688 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1689 (c_parser_next_tokens_start_declaration): Update comments.
1690 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1691 parser->tokens[2] to parser->tokens[1].
1692 (c_parser_nth_token_starts_std_attributes)
1693 (c_parser_std_attribute_specifier_sequence): New functions.
1694 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1695 attrs. All callers changed. Handle standard attributes.
1696 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1697 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1698 All callers changed.
1699 (c_parser_declspecs): Add arguments start_std_attr_ok and
1700 end_std_attr_ok. All callers changed. Handle standard
1702 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1703 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1704 (c_parser_compound_statement_nostart, c_parser_all_labels)
1705 (c_parser_label, c_parser_statement, c_parser_for_statement):
1706 Handle standard attributes.
1707 * c-parser.h (c_parser_declspecs): Update prototype.
1708 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1711 2019-11-12 Martin Liska <mliska@suse.cz>
1713 * gimple-parser.c: Do not include params.h.
1715 2019-11-12 Martin Liska <mliska@suse.cz>
1717 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1718 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1721 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1722 Frederik Harwath <frederik@codesourcery.com>
1725 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1726 (c_parser_oacc_kernels_parallel): Rename function to...
1727 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1728 (c_parser_omp_construct): Update accordingly.
1731 2019-11-11 Jakub Jelinek <jakub@redhat.com>
1733 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1734 without corresponding end declare target.
1736 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1738 * c-convert.c (convert): Only handle vector conversions if one of
1739 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1741 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1742 vectors satisfy gnu_vector_type_p.
1743 (build_unary_op): Only allow unary operators to be applied to
1744 vectors if they satisfy gnu_vector_type_p.
1745 (digest_init): Only allow by-element initialization of vectors
1746 if they satisfy gnu_vector_type_p.
1747 (really_start_incremental_init): Likewise.
1748 (push_init_level): Likewise.
1749 (pop_init_level): Likewise.
1750 (process_init_element): Likewise.
1751 (build_binary_op): Only allow binary operators to be applied to
1752 vectors if they satisfy gnu_vector_type_p.
1754 2019-11-08 Joseph Myers <joseph@codesourcery.com>
1756 * c-decl.c (grokparms): Convert () in a function definition to
1758 (store_parm_decls_oldstyle): Pedwarn for C2x.
1759 (store_parm_decls): Update comment about () not generating a
1762 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1764 * c-parser.c (c_parser_attribute_arguments): New function.
1765 Factored out of c_parser_gnu_attribute.
1766 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1767 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1768 (c_parser_std_attribute_specifier): New functions.
1769 (c_parser_transaction_attributes): Use
1770 c_parser_std_attribute_specifier.
1772 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1774 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1775 lex_joined_string and translate_strings_p.
1776 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1778 (c_parser_string_literal): New function.
1779 (c_parser_static_assert_declaration_no_semi): Use
1780 c_parser_string_literal. Do not set lex_untranslated_string.
1781 (c_parser_asm_string_literal): Use c_parser_string_literal.
1782 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1783 (c_parser_gnu_attributes): Set and restore translate_strings_p
1784 instead of lex_untranslated_string.
1785 (c_parser_asm_statement): Do not set lex_untranslated_string.
1786 (c_parser_asm_operands): Likewise.
1787 (c_parser_has_attribute_expression): Set and restore
1788 translate_strings_p instead of lex_untranslated_string.
1789 (c_parser_postfix_expression): Use c_parser_string_literal.
1790 (pragma_lex): Likewise.
1791 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1792 (c_parse_file): Set translate_strings_p.
1793 * gimple-parser.c (c_parser_gimple_postfix_expression)
1794 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1795 * c-parser.c (c_parser_string_literal): Declare function.
1797 2019-11-02 Jakub Jelinek <jakub@redhat.com>
1799 * c-parser.c (c_finish_omp_declare_variant): Use
1800 omp_get_context_selector instead of c_omp_get_context_selector.
1802 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1804 * c-tree.h (c_simulate_enum_decl): Declare.
1805 * c-decl.c (c_simulate_enum_decl): New function.
1806 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1808 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1810 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1811 * c-decl.c (c_simulate_builtin_function_decl): New function.
1812 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1815 2019-10-28 Martin Sebor <msebor@redhat.com>
1818 * c-decl.c (names_builtin_p): Define a new function.
1820 2019-10-28 Richard Biener <rguenther@suse.de>
1823 * gimple-parser.c (c_parser_parse_gimple_body): Make
1824 current_bb the entry block initially to easier recover
1826 (c_parser_gimple_compound_statement): Adjust.
1828 2019-10-24 Jakub Jelinek <jakub@redhat.com>
1830 * c-parser.c (c_finish_omp_declare_variant): Use
1831 omp_context_selector_matches instead of
1832 c_omp_context_selector_matches.
1833 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1834 attribute in between declare target and end declare target
1837 2019-10-15 Joseph Myers <joseph@codesourcery.com>
1839 * c-parser.c (c_parser_attribute_any_word): Rename to
1840 c_parser_gnu_attribute_any_word. All callers changed.
1841 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1843 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1845 (c_parser_declaration_or_fndef, c_parser_declspecs)
1846 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1847 (c_parser_struct_declaration, c_parser_declarator)
1848 (c_parser_gnu_attribute, c_parser_compound_statement)
1849 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1850 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1851 attribute-related syntax productions.
1853 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1855 * c-objc-common.c (useful_aka_type_p): Replace with...
1856 (get_aka_type): ...this new function. Given the original type,
1857 decide which aka type to print (if any). Only look through typedefs
1858 if user_facing_original_type_p.
1859 (print_type): Update accordingly.
1861 2019-10-14 Jakub Jelinek <jakub@redhat.com>
1863 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1864 into int NESTED, if it is 2, diagnose missing commas in between
1866 (c_parser_omp_context_selector): Pass 2 as last argument to
1867 c_parser_omp_all_clauses.
1869 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1871 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1872 For simd properties, put them directly into TREE_VALUE.
1873 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1874 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1875 add "omp declare variant base" attribute rather than
1876 "omp declare variant".
1878 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1880 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1882 2019-10-10 Jakub Jelinek <jakub@redhat.com>
1884 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1885 true, terminate processing on closing paren and don't skip to end of
1887 (c_parser_omp_declare_simd): Handle also declare variant.
1888 (omp_construct_selectors, omp_device_selectors,
1889 omp_implementation_selectors, omp_user_selectors): New variables.
1890 (c_parser_omp_context_selector,
1891 c_parser_omp_context_selector_specification,
1892 c_finish_omp_declare_variant): New functions.
1893 (c_finish_omp_declare_simd): Handle both declare simd and
1895 (c_parser_omp_declare): Handle declare variant.
1897 2019-10-02 Joseph Myers <joseph@codesourcery.com>
1899 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1902 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1904 * c-objc-common.c (useful_aka_type_p): New function.
1905 (print_type): Use it to decide whether an aka type is worth printing.
1907 2019-09-27 Jakub Jelinek <jakub@redhat.com>
1910 * c-parser.c (c_parser_predefined_identifier): New function.
1911 (c_parser_postfix_expression): Use it.
1912 (c_parser_omp_variable_list): Parse predefined identifiers.
1913 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1914 in shared and firstprivate clauses, even when they are predetermined
1917 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1919 * c-typeck.c (build_function_call_vec): Take the original function
1920 decl as an optional final parameter. Pass all built-in calls to
1921 check_builtin_function_arguments.
1923 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1926 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1927 of identifiers in the external scope only for variables and functions.
1929 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1932 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1934 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1937 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1938 after determining that the first token is not
1939 PRAGMA_GCC_PCH_PREPROCESS.
1941 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1943 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1944 FUNCTION_DECL to the right value in the presence of nested declarators.
1946 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1949 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1951 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1954 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1955 of a built_in_function.
1956 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1958 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1960 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1961 (c_parser_omp_clause_device_type): New function.
1962 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1963 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1964 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1965 diagnostics for declare target with clauses nested in clause-less
1966 declare target declaration-definition-seq.
1967 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1969 2019-08-09 Jakub Jelinek <jakub@redhat.com>
1971 * c-parser.c (check_no_duplicate_clause): Simplify using
1973 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1974 directive name modifiers.
1975 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1978 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1979 check_no_duplicate_clause call. Comment it out, instead emit a
1980 warning for duplicate dist_schedule clauses.
1982 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1984 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1986 2019-08-08 Jakub Jelinek <jakub@redhat.com>
1988 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1989 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1990 instead of generic_head to track duplicates.
1992 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1994 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1995 (c_parser_omp_clause_use_device_addr): New function.
1996 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1997 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1998 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1999 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2000 map or use_device_* clauses.
2001 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2002 in OpenMP, require pointer type rather than pointer or array type.
2003 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2005 2019-07-31 Jakub Jelinek <jakub@redhat.com>
2008 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2009 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2012 2019-07-25 Martin Liska <mliska@suse.cz>
2013 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2016 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2018 2019-07-25 Martin Liska <mliska@suse.cz>
2020 * c-decl.c (merge_decls): Use new macros
2021 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2023 2019-07-23 Richard Biener <rguenther@suse.de>
2025 PR tree-optimization/83518
2026 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2027 a CFG also rebuild cgraph edges.
2029 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2031 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2032 (c_parser_omp_clause_bind): New function.
2033 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2034 (OMP_LOOP_CLAUSE_MASK): Define.
2035 (c_parser_omp_loop): New function.
2036 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2037 loop combined with parallel or teams.
2038 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2039 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2041 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2044 * c-decl.c (finish_function): Check targetm.warn_func_return
2045 before issuing a -Wreturn-type warning.
2047 2019-07-12 Alexandre Oliva <oliva@adacore.com>
2049 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2050 (c_parser_compound_statement): Call it.
2052 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2054 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2055 (c_parser_omp_clause_order): New function.
2056 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2057 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2058 PRAGMA_OMP_CLAUSE_ORDER.
2059 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2061 2019-07-10 Richard Biener <rguenther@suse.de>
2063 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2064 _Literal (int *) &x for address literals.
2066 2019-07-09 Martin Sebor <msebor@redhat.com>
2069 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2071 (field_decl_cmp): Same.
2072 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2074 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2076 2019-07-09 Martin Sebor <msebor@redhat.com>
2079 * c-decl.c: Change class-key from class to struct and vice versa
2080 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2081 * gimple-parser.c: Same.
2083 2019-07-01 Richard Biener <rguenther@suse.de>
2085 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2086 _Literal (char *) &"foo" for address literals pointing to
2089 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2091 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2092 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2093 C incompatibility if alternate "__intN__" form is used.
2095 2019-06-24 Martin Sebor <msebor@redhat.com>
2097 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2099 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2101 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2102 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2103 (c_parser_omp_scan_loop_body): New function.
2104 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2105 inscan reduction clauses.
2106 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2107 non-inscan reductions on the same construct, or inscan reductions with
2108 ordered or schedule clauses, or inscan array reductions.
2110 2019-06-05 Martin Sebor <msebor@redhat.com>
2113 * c-typeck.c (c_finish_return): Only consider functions returning
2114 pointers as candidates for -Wreturn-local-addr.
2116 2019-06-05 Martin Sebor <msebor@redhat.com>
2118 * c-decl.c (start_decl): Adjust quoting and hyphenation
2120 (finish_decl): Same.
2121 (finish_enum): Same.
2122 (start_function): Same.
2123 (declspecs_add_type): Same.
2124 * c-parser.c (warn_for_abs): Same.
2125 * c-typeck.c (build_binary_op): Same.
2127 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2130 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2131 marked with an OpenACC 'routine' directive.
2134 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2135 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2138 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2139 clauses from "omp declare target" attribute.
2141 2019-05-16 Martin Sebor <msebor@redhat.com>
2143 * c-decl.c (start_decl): Quote keywords, operators, and
2144 types in diagnostics.
2145 (finish_decl): Same.
2146 * c-parser.c (c_parser_asm_statement): Same.
2147 (c_parser_conditional_expression): Same.
2148 (c_parser_transaction_cancel): Same.
2149 * c-typeck.c (c_common_type): Same.
2150 (build_conditional_expr): Same.
2151 (digest_init): Same.
2152 (process_init_element): Same.
2153 (build_binary_op): Same.
2155 2019-05-17 Richard Biener <rguenther@suse.de>
2157 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2158 (c_parser_gimple_unary_expression): Likewise.
2159 (c_parser_gimple_parentized_ternary_expression): New function.
2161 2019-05-16 Richard Biener <rguenther@suse.de>
2163 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2164 (c_parser_gimple_unary_expression): Likewise.
2166 2019-05-15 Richard Biener <rguenther@suse.de>
2168 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2171 2019-05-14 Richard Biener <rguenther@suse.de>
2173 * gimple-parser.c (c_parser_gimple_statement): Remove
2174 questionable auto-promotion to VIEW_CONVERT_EXPR.
2175 (c_parser_gimple_typespec): Split out from __MEM parsing.
2176 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2177 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2178 as __VIEW_CONVERT with -gimple.
2180 2019-05-09 Martin Liska <mliska@suse.cz>
2182 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2184 (c_parser_gimple_unary_expression): Parse also binary expression
2186 (c_parser_gimple_parentized_binary_expression): New function.
2188 2019-05-09 Martin Liska <mliska@suse.cz>
2190 * gimple-parser.c (struct gimple_parser): Add probability.
2191 for gimple_parser_edge.
2192 (gimple_parser::push_edge): Add new argument probability.
2193 (c_parser_gimple_parse_bb_spec): Parse also probability
2195 (c_parser_parse_gimple_body): Set edge probability.
2196 (c_parser_gimple_compound_statement): Consume token
2197 before calling c_parser_gimple_goto_stmt.
2199 (c_parser_gimple_statement): Pass new argument.
2200 (c_parser_gimple_goto_stmt): Likewise.
2201 (c_parser_gimple_if_stmt): Likewise.
2202 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2203 * c-parser.c (c_parser_declaration_or_fndef): Pass
2204 hot_bb_threshold argument.
2205 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2207 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2209 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2212 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2213 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2214 (c_parser_do_statement): Likewise.
2215 (c_parser_for_statement): Likewise. Formatting fixes.
2216 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2217 emit DEBUG_BEGIN_STMTs if needed.
2219 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2222 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2223 (c_start_case): Don't clear it.
2224 (do_case): Adjust c_add_case_label caller.
2225 (c_finish_case): Adjust c_do_switch_warnings caller.
2228 * c-decl.c (merge_decls): If remove is main variant and
2229 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2230 variant that has newdecl as TYPE_NAME if any.
2232 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2235 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2236 don't try to remove it from the variant list, but instead assert
2239 2019-04-01 Richard Biener <rguenther@suse.de>
2242 * c-tree.h (c_get_alias_set): Declare.
2243 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2244 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2245 as the underlying integer type.
2247 2019-03-19 Martin Sebor <msebor@redhat.com>
2249 PR tree-optimization/89688
2250 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2251 kinds of initializers.
2253 2019-03-19 Jakub Jelinek <jakub@redhat.com>
2256 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2257 return type even if quals_used is 0. Formatting fixes.
2259 2019-03-14 Richard Biener <rguenther@suse.de>
2261 * c-tree.h (enum c_declspec_il): New.
2262 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2264 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2265 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2266 (c_parser_declspecs): Adjust.
2267 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2268 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2270 (struct gimple_parser): New.
2271 (gimple_parser::push_edge): New method.
2272 (c_parser_gimple_parse_bb_spec): New helper.
2273 (c_parser_parse_gimple_body): Get start pass and IL specification.
2274 Initialize SSA and CFG.
2275 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2276 Build a gimple_parser parsing state and pass it along.
2277 (c_parser_gimple_statement): Change intermittend __PHI internal
2278 function argument for the edge.
2279 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2280 (c_parser_gimple_goto_stmt): Record edges to build.
2281 (c_parser_gimple_if_stmt): Likewise.
2282 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2283 (c_parser_gimple_or_rtl_pass_list): Likewise.
2285 2019-03-11 Martin Liska <mliska@suse.cz>
2287 * c-decl.c (check_for_loop_decls): Wrap an option name
2288 in a string format message and fix GNU coding style.
2289 * c-parser.c (c_parser_declspecs): Likewise.
2291 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2293 PR tree-optimization/89550
2294 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2296 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2297 or warning returned true.
2299 2019-02-28 Jakub Jelinek <jakub@redhat.com>
2302 * c-typeck.c (convert_arguments): Call inform_declaration only if
2303 the previous warning_at call returned true.
2305 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2307 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2308 parameter. Adjust all users.
2309 (c_parser_oacc_simple_clause): Replace parser with loc formal
2310 parameter. Adjust all users.
2312 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
2315 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2316 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2318 2019-02-15 Jakub Jelinek <jakub@redhat.com>
2321 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2322 before c_decl_attributes rather than after it.
2324 2019-02-06 Jakub Jelinek <jakub@redhat.com>
2327 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2328 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2329 instead of 3 nested ifs.
2331 2019-02-06 Joseph Myers <joseph@codesourcery.com>
2334 * c-decl.c (finish_decl): Do not complete array types for arrays
2335 with external linkage not at file scope.
2337 2019-02-05 Richard Biener <rguenther@suse.de>
2340 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2341 all type variants when not supported.
2343 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2346 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2347 * c-decl.c (decl_jump_unsafe): Return false for
2348 C_DECL_COMPOUND_LITERAL_P decls.
2349 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2351 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2354 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2358 * c-decl.c (last_fileptr_type): Remove.
2359 (last_structptr_types): New variable.
2360 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2361 {old,new}rettype instead of the types themselves. Assert
2362 last_structptr_types array has the same number of elements
2363 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2364 argument oldtype and newtype. Instead of handling
2365 just fileptr_type_node specially, handle all builtin_structptr_types
2366 pointer nodes. Formatting fix.
2368 2019-01-24 Martin Sebor <msebor@redhat.com>
2373 * c-decl.c (match_builtin_function_types): Add arguments.
2374 (diagnose_mismatched_decls): Diagnose mismatched declarations
2375 of built-ins more strictly.
2377 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2380 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2381 on #pragma omp cancel with different modifiers.
2383 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2387 * c-typeck.c (convert_for_assignment): Upate the
2388 warn_for_address_or_pointer_of_packed_member call.
2390 2019-01-16 Tom Honermann <tom@honermann.net>
2391 Jason Merrill <jason@redhat.com>
2393 * c-typeck.c (digest_init): Revised the error message produced for
2394 ill-formed cases of array initialization with a string literal.
2395 (error_init): Make variadic.
2397 2019-01-12 Jakub Jelinek <jakub@redhat.com>
2399 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2401 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2404 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2405 if current_function_decl is non-NULL.
2407 2019-01-07 Joseph Myers <joseph@codesourcery.com>
2411 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2412 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2413 functions declared but never defined only for external scope, not
2416 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2419 * c-parser.c (c_parser_postfix_expression): Parse
2420 __builtin_convertvector.
2422 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2424 Update copyright years.
2426 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2429 * c-typeck.c (convert_for_assignment): Call
2430 warn_for_address_or_pointer_of_packed_member.
2432 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2434 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2435 a more specific error message (instead of just falling through).
2437 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2439 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2440 asm qualifier is first seen; use that to give nicer "duplicate asm
2441 qualifier" messages. Delete 'quals" variable, instead pass the
2442 "is_volatile_ flag to build_asm_stmt directly.
2443 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2444 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2446 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2448 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2449 "done" boolean variable.
2451 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2454 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2455 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2456 (build_binary_op): Use struct op_location_t and
2457 class binary_op_rich_location.
2459 2018-12-11 Jakub Jelinek <jakub@redhat.com>
2462 * c-convert.c (convert): Call c_fully_fold before calling
2463 ubsan_instrument_float_cast.
2465 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2467 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2470 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2472 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2473 after asm. Pass a flag for it to build_asm_expr.
2474 * c-tree.h (build_asm_expr): Update declaration.
2475 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2478 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2481 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2482 combination of volatile and goto, in any order, without repetitions.
2484 2018-12-04 James Norris <jnorris@codesourcery.com>
2485 Cesar Philippidis <cesar@codesourcery.com>
2486 Julian Brown <julian@codesourcery.com>
2488 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2491 2018-11-30 Richard Biener <rguenther@suse.de>
2493 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2494 _Literal (type) { ... } as empty aggregate or vector constructor.
2496 2018-11-29 Martin Sebor <msebor@redhat.com>
2499 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2500 (convert_arguments): Add comments. Pass additional argument to
2503 2018-11-29 Martin Sebor <msebor@redhat.com>
2507 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2509 2018-11-23 Martin Sebor <msebor@redhat.com>
2512 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2513 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2515 2018-11-20 Martin Sebor <msebor@redhat.com>
2517 * c-parser.c (c_parser_has_attribute_expression): New function.
2518 (c_parser_attribute): New function.
2519 (c_parser_attributes): Move code into c_parser_attribute.
2520 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2522 2018-11-15 Martin Sebor <msebor@redhat.com>
2525 * c-decl.c (header_for_builtin_fn): Declare.
2526 (diagnose_mismatched_decls): Diagnose declarations of built-in
2527 functions without a prototype.
2528 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2529 (convert_argument): Same.
2530 (convert_arguments): Factor code out into convert_argument.
2531 Detect mismatches between built-in formal arguments in calls
2532 to built-in without prototype.
2533 (build_conditional_expr): Same.
2534 (type_or_builtin_type): New function.
2535 (convert_for_assignment): Add argument. Conditionally issue
2536 warnings instead of errors for mismatches.
2538 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2540 * c-decl.c: Replace "source_location" with "location_t".
2541 * c-tree.h: Likewise.
2542 * c-typeck.c: Likewise.
2543 * gimple-parser.c: Likewise.
2545 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2547 * c-parser.c (c_parser_omp_clause_final): Use
2548 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2549 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2550 parsing instead of c_parser_paren_condition.
2551 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2552 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2553 c_fully_fold instead of c_parser_condition.
2554 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2555 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2556 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2557 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2558 c_parser_expr_no_commas instead of c_parser_expression.
2560 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2561 reduction clause with inscan modifier.
2563 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2564 clauses other than atomic_default_mem_order.
2566 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2568 * c-parser.c: Include memmode.h.
2569 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2570 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2571 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2572 task_reduction clauses.
2573 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2574 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2575 section, or lvalue assignment expression.
2576 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2577 (c_parser_omp_clause_lastprivate): Parse optional
2578 conditional: modifier.
2579 (c_parser_omp_clause_hint): Require constant integer expression rather
2580 than just integer expression.
2581 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2583 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2584 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2585 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2587 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2588 iterators. Parse mutexinoutset and depobj kinds.
2589 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2591 (c_parser_omp_all_clauses): Likewise. Handle
2592 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2593 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2594 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2595 default memory order from requires directive if any. Adjust
2596 c_finish_omp_atomic caller.
2597 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2598 (c_parser_omp_flush): Parse flush with memory-order-clause.
2599 (c_parser_omp_for_loop): Allow NE_EXPR even in
2600 OpenMP loops, adjust c_finish_omp_for caller.
2601 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2602 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2603 Allow to be called while parsing combined parallel master.
2604 Parse combined master taskloop{, simd}.
2605 (c_parser_omp_parallel): Parse combined
2606 parallel master{, taskloop{, simd}} constructs.
2607 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2608 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2609 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2610 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2611 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2612 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2613 around teams body. Use SET_EXPR_LOCATION.
2614 (c_parser_omp_target_data): Allow target data
2615 with only use_device_ptr clauses.
2616 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2617 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2618 (c_parser_omp_requires): New function.
2619 (c_finish_taskloop_clauses): New function.
2620 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2621 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2622 declaration. Disallow in_reduction clause when combined with parallel
2624 (c_parser_omp_construct): Adjust c_parser_omp_master and
2625 c_parser_omp_taskgroup callers.
2626 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2628 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2629 like OMP_CLAUSE_REDUCTION.
2630 (handle_omp_array_sections): Likewise. Call save_expr on array
2631 reductions before calling build_index_type. Handle depend clauses
2633 (struct c_find_omp_var_s): New type.
2634 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2635 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2636 with static, runtime or auto schedule kinds. Call save_expr for whole
2637 array reduction sizes. Diagnose reductions with zero sized elements
2638 or variable length structures. Diagnose nogroup clause used with
2639 reduction clause(s). Handle depend clause with
2640 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2641 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2642 some different type for other kinds. Use build_unary_op with
2643 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2644 Handle depend clauses with iterators. Remove no longer needed special
2645 case that predetermined const qualified vars may be specified in
2646 firstprivate clause. Complain if const qualified vars are mentioned
2647 in data-sharing clauses other than firstprivate or shared. Use
2648 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2649 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2650 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2651 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2653 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2655 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2656 logic for change to name_hint::operator bool.
2657 (undeclared_variable): Likewise.
2658 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2659 (c_parser_parameter_declaration): Likewise.
2661 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2663 * c-errors.c (pedwarn_c11): New function.
2664 * c-parser.c (disable_extension_diagnostics): Save
2665 warn_c11_c2x_compat and set it to 0.
2666 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2667 (c_parser_static_assert_declaration_no_semi): Handle
2668 _Static_assert without string constant.
2669 * c-tree.h (pedwarn_c11): New prototype.
2671 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2673 * Make-lang.in (selftest-c): New.
2674 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2675 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2676 from gcc/Makefile.in.
2678 2018-10-02 Richard Biener <rguenther@suse.de>
2680 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2682 2018-09-26 Joseph Myers <joseph@codesourcery.com>
2685 * c-typeck.c (build_binary_op): Use excess precision for
2686 comparisons of integers and floating-point for C11 and later.
2688 2018-09-26 Martin Jambor <mjambor@suse.cz>
2691 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
2694 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2696 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2697 Update for new param.
2698 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2701 2018-09-17 Martin Jambor <mjambor@suse.cz>
2704 * c-parser.c: (warn_for_abs): New function.
2705 (c_parser_postfix_expression_after_primary): Call it.
2707 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2709 * c-typeck.c (digest_init): Shorten overlength strings.
2711 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2713 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2715 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2717 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2718 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2720 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
2722 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2723 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2725 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2728 * c-decl.c (implicitly_declare): Update call to
2729 maybe_add_include_fixit to suggest overriding the location, as it
2731 * c-objc-common.c (c_tree_printer): Update for conversion of
2732 show_caret_p to a tri-state.
2734 2018-08-27 Martin Liska <mliska@suse.cz>
2736 * c-decl.c (locate_old_decl): Use new function
2737 fndecl_built_in_p and remove check for FUNCTION_DECL if
2739 (diagnose_mismatched_decls): Likewise.
2740 (merge_decls): Likewise.
2741 (warn_if_shadowing): Likewise.
2742 (pushdecl): Likewise.
2743 (implicitly_declare): Likewise.
2744 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2745 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2746 * c-typeck.c (build_function_call_vec): Likewise.
2747 (convert_arguments): Likewise.
2749 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2752 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2753 (diagnose_mismatched_decls): Likewise, in various places.
2754 (warn_if_shadowing): Likewise.
2755 (implicit_decl_warning): Likewise.
2756 (implicitly_declare): Likewise.
2757 (undeclared_variable): Likewise.
2758 (declare_label): Likewise.
2759 (grokdeclarator): Likewise.
2760 (start_function): Likewise.
2761 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2762 (c_parser_parameter_declaration): Likewise.
2763 (c_parser_binary_expression): Likewise.
2764 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2765 (parser_build_binary_op): Likewise.
2766 (build_unary_op): Likewise.
2767 (error_init): Likewise.
2768 (pedwarn_init): Likewise.
2769 (warning_init): Likewise.
2770 (convert_for_assignment): Likewise.
2772 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2774 * c-objc-common.c: Include "gcc-rich-location.h".
2775 (c_tree_printer): Move implemenation of '%T' to...
2776 (print_type): ...this new function.
2777 (range_label_for_type_mismatch::get_text): New function.
2778 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2779 range for the various ic_argpass cases.
2780 (class maybe_range_label_for_tree_type_mismatch): New class.
2781 (build_binary_op): Use it when calling binary_op_error.
2783 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2785 * c-decl.c (start_decl): Do not warn if variables is named as main
2786 and is a local variable.
2788 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2791 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2792 objects of unknown size.
2794 2018-08-13 Martin Sebor <msebor@redhat.com>
2796 PR tree-optimization/71625
2797 * c-parser.c (c_parser_declaration_or_fndef): Call
2798 braced_list_to_string.
2800 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2803 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2806 2018-08-01 Martin Sebor <msebor@redhat.com>
2808 PR tree-optimization/86650
2809 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2810 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2812 2018-08-01 Jakub Jelinek <jakub@redhat.com>
2815 * c-typeck.c (init_field_decl_cmp): New function.
2816 (output_pending_init_elements): Use it for field comparisons
2817 instead of pure bit_position comparisons.
2819 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2821 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2822 type here, instead add "omp declare target implicit" attribute.
2823 (finish_decl): Diagnose vars without mappable type here.
2825 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2826 Thomas Schwinge <thomas@codesourcery.com>
2827 Cesar Philippidis <cesar@codesourcery.com>
2829 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2830 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2831 to their non-present_or_* counterparts. Make 'self' an alias to
2832 PRAGMA_OACC_CLAUSE_HOST.
2833 (c_parser_oacc_data_clause): Update GOMP mappings for
2834 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2835 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2836 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2837 Remove support for present_or_* clauses.
2838 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2839 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2840 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2841 (OACC_DATA_CLAUSE_MASK): Likewise.
2842 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2843 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2844 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2845 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2846 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2848 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2850 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2851 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2852 (c_parser_gimple_unary_expression): Likewise.
2854 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2857 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2858 before doing POINTER_DIFF_EXPR.
2860 2018-06-07 Marek Polacek <polacek@redhat.com>
2863 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2864 for loop initial declarations.
2866 2018-05-30 David Pagan <dave.pagan@oracle.com>
2869 * c-decl.c (grokdeclarator): Update check for return type warnings.
2870 (start_function): Likewise.
2871 (finish_function): Likewise.
2872 * c-typeck.c (c_finish_return): Update check for return type warnings.
2873 Pass OPT_Wreturn_type to pedwarn when appropriate.
2875 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2877 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2880 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2882 * gimple-parser.c: Include internal-fn.h.
2883 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2884 (c_parser_gimple_call_internal): New function.
2885 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2886 Fix typos in comment.
2888 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2891 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2892 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2894 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2895 fold_offsetof_1, pass argtype as TYPE to it and drop the
2898 2018-05-02 David Pagan <dave.pagan@oracle.com>
2901 * c-decl.c (old_style_parameter_scope): New function.
2902 * c-parser.c (c_parser_postfix_expression): Check for statement
2903 expressions in old-style function parameter list declarations.
2904 * c-parser.h (old_style_parameter_scope): New extern declaration.
2906 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2909 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2910 it is not TREE_STATIC.
2911 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2912 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2913 its COMPOUND_LITERAL_EXPR_DECL.
2915 2018-03-21 Joseph Myers <joseph@codesourcery.com>
2917 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2918 where all functions return the same _FloatN or _FloatNx type,
2919 treat integer types as _Float64 instead of double.
2921 2018-03-21 Jakub Jelinek <jakub@redhat.com>
2924 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2925 building vector comparison, diagnose it and return error_mark_node.
2927 2018-03-15 Jakub Jelinek <jakub@redhat.com>
2930 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2931 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2932 INTEGER_TYPE element type.
2934 2018-03-13 David Pagan <dave.pagan@oracle.com>
2937 * c-typeck.c (output_init_element): Ensure field initializer
2938 expression is always evaluated if there are side effects.
2940 2018-03-06 Jakub Jelinek <jakub@redhat.com>
2943 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2944 !building_stmt_list_p ().
2946 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2949 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2950 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2951 and include the BIND_EXPR in the list of things that need to be
2954 2018-02-09 Nathan Sidwell <nathan@acm.org>
2957 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2958 to strict_aliasing_warning.
2960 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2962 * c-typeck.c (really_start_incremental_init, push_init_level,
2963 set_nonincremental_init, output_init_element, process_init_element):
2964 Use DECL_UNNAMED_BIT_FIELD.
2966 2018-01-31 Marek Polacek <polacek@redhat.com>
2969 * c-parser.c (c_parser_compound_statement_nostart): Call
2970 expansion_point_location_if_in_system_header.
2972 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2975 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2978 2018-01-13 Jakub Jelinek <jakub@redhat.com>
2981 * c-tree.h (decl_constant_value_1): Add a bool argument.
2982 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2983 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2984 (decl_constant_value): Adjust caller.
2985 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2986 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2987 decl_constant_value returns initializer that has BLKmode or
2989 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2991 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2992 Alan Hayward <alan.hayward@arm.com>
2993 David Sherwood <david.sherwood@arm.com>
2995 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2996 TYPE_VECTOR_SUBPARTS.
2998 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3000 Update copyright years.
3002 2018-01-01 Jakub Jelinek <jakub@redhat.com>
3005 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3006 c_parser_conditional_expression, c_parser_cast_expression,
3007 c_parser_sizeof_expression, c_parser_alignof_expression,
3008 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3009 c_parser_transaction_expression): Use set_error () method instead
3010 of setting value member to error_mark_node.
3012 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3014 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3015 and _Float<N>X built-in functions.
3017 2017-12-22 Jakub Jelinek <jakub@redhat.com>
3020 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3021 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3022 incomplete vars rather than after it.
3025 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3026 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3027 and consider empty ones if there are no other stmts. For
3028 -Wunused-value walk all statements before the one only followed by
3031 2017-12-22 Mike Stump <mikestump@comcast.net>
3032 Eric Botcazou <ebotcazou@adacore.com>
3034 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3035 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3036 (c_parser_do_statement): Likewise.
3037 (c_parser_for_statement): Likewise.
3038 (c_parser_statement_after_labels): Adjust calls to above.
3039 (c_parse_pragma_ivdep): New static function.
3040 (c_parser_pragma_unroll): Likewise.
3041 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3042 <PRAGMA_UNROLL>: New case.
3044 2017-12-19 Jakub Jelinek <jakub@redhat.com>
3046 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3047 perform_integral_promotions, digest_init): Replace Yoda conditions
3048 with typical order conditions.
3049 * c-decl.c (check_bitfield_type_and_width): Likewise.
3051 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3053 * c-typeck.c (c_safe_arg_type_equiv_p,
3054 c_safe_function_type_cast_p): New function.
3055 (build_c_cast): Implement -Wcast-function-type.
3057 2017-12-14 Richard Biener <rguenther@suse.de>
3060 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3061 like REALPART_EXPR for the behavior of whether its operand
3064 2017-12-12 Marek Polacek <polacek@redhat.com>
3067 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3069 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
3071 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3072 * c-parser.c (add_debug_begin_stmt): New.
3073 (c_parser_declaration_or_fndef): Call it.
3074 (c_parser_compound_statement_nostart): Likewise.
3075 (c_parser_statement_after_labels): Likewise.
3076 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3078 2017-12-07 Joseph Myers <joseph@codesourcery.com>
3080 * c-decl.c (build_compound_literal): Add parameter alignas_align
3081 and set alignment of decl if nonzero.
3082 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3083 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3085 (c_parser_struct_declaration): Update syntax comment.
3086 (c_parser_type_name): Add alignas_ok argument and pass it to
3088 (c_parser_cast_expression): Pass true to c_parser_type_name and
3089 give error if a cast used an _Alignas specifier.
3090 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3091 give error if sizeof (type-name) used an _Alignas specifier.
3092 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3093 give error if _Alignof (type-name) used an _Alignas specifier.
3094 (c_parser_postfix_expression_after_paren_type): Check specified
3095 alignment for a compound literal and pass it to
3096 build_compound_literal.
3097 * c-parser.h (c_parser_type_name): Update prototype.
3098 * c-tree.h (build_compound_literal): Update prototype.
3100 2017-12-07 Martin Sebor <msebor@redhat.com>
3103 * c-decl.c (c_decl_attributes): Look up existing declaration and
3104 pass it to decl_attributes.
3106 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3109 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3110 reserved for use by the implementation.
3112 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3114 * c-decl.c: Include "c-family/c-spellcheck.h".
3116 2017-12-05 Martin Liska <mliska@suse.cz>
3117 Jakub Jelinek <jakub@redhat.com>
3119 * c-typeck.c (pointer_diff): Add new argument and instrument
3120 pointer subtraction.
3121 (build_binary_op): Similar for pointer comparison.
3123 2017-12-01 Jakub Jelinek <jakub@redhat.com>
3126 * c-parser.c: Include tree-iterator.h.
3127 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3128 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3132 * c-tree.h (decl_constant_value_1): Declare.
3133 * c-typeck.c (decl_constant_value_1): New function.
3134 (decl_constant_value): Use it.
3135 * c-fold.c (c_fully_fold_internal): If in_init, use
3136 decl_constant_value_1 instead of decl_constant_value.
3138 2017-11-30 Jakub Jelinek <jakub@redhat.com>
3140 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3142 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3145 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3146 c_switch_covers_all_cases_p returns true.
3148 2017-11-28 Julia Koval <julia.koval@intel.com>
3149 Sebastian Peryt <sebastian.peryt@intel.com>
3151 * Make-lang.in (c/c-array-notation.o): Remove.
3152 * c-array-notation.c: Delete.
3153 * c-decl.c: Remove cilkplus condition.
3154 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3155 c_parser_cilk_verify_simd, c_parser_array_notation,
3156 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3157 c_parser_cilk_simd_fn_vector_attrs,
3158 c_finish_cilk_simd_fn_tokens): Delete.
3159 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3160 (c_parser_direct_declarator_inner): Ditto.
3161 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3162 (c_parser_attributes, c_parser_compound_statement,
3163 c_parser_statement_after_labels, c_parser_if_statement,
3164 c_parser_switch_statement, c_parser_while_statement,
3165 c_parser_do_statement, c_parser_for_statement,
3166 c_parser_unary_expression, c_parser_postfix_expression,
3167 c_parser_postfix_expression_after_primary,
3168 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3169 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3171 * c-typeck.c (build_array_ref, build_function_call_vec,
3173 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3174 c_finish_loop, build_binary_op): Remove cilkplus support.
3176 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3178 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3181 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
3183 * Make-lang.in (c.install-plugin): Install backend import library.
3185 2017-11-23 Jakub Jelinek <jakub@redhat.com>
3187 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3188 pragma_stmt context.
3190 2017-11-23 Mike Stump <mikestump@comcast.net>
3191 Eric Botcazou <ebotcazou@adacore.com>
3193 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3195 (c_parser_do_statement): Likewise.
3196 (c_parser_for_statement): Likewise.
3198 2017-11-22 David Malcolm <dmalcolm@redhat.com>
3201 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3202 bool to bool *. Within '%T' handling, if showing an "aka", use
3203 "quoted" param to add appropriate quoting.
3205 2017-11-22 Marek Polacek <polacek@redhat.com>
3210 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3212 2017-11-21 David Malcolm <dmalcolm@redhat.com>
3215 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3216 earlier failed lookups.
3218 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
3220 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3221 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3223 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3226 * c-decl.c: Include "c-family/known-headers.h".
3227 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3228 to known-headers.cc.
3229 (class suggest_missing_header): Move to known-header.h.
3230 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3231 than get_c_name_hint.
3233 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3235 * c-decl.c (get_c_name_hint): New function.
3236 (class suggest_missing_header): New class.
3237 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3238 suggest missing headers to the user.
3240 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3242 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3243 Include "c-family/name-hint.h"
3244 (implicit_decl_warning): Convert "hint" from
3245 const char * to name_hint. Pass location to
3246 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3247 warning was not printed.
3248 (undeclared_variable): Likewise for "guessed_id".
3249 (lookup_name_fuzzy): Convert return type from const char *
3250 to name_hint. Add location_t param.
3251 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3252 Include "c-family/name-hint.h"
3253 (c_parser_declaration_or_fndef): Convert "hint" from
3254 const char * to name_hint. Pass location to lookup_name_fuzzy.
3255 (c_parser_parameter_declaration): Likewise.
3257 2017-11-19 Jakub Jelinek <jakub@redhat.com>
3261 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3263 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3264 handle_omp_array_sections): Likewise.
3265 (digest_init): Don't call decl_constant_value_for_optimization.
3266 * c-tree.h (decl_constant_value_for_optimization): Removed.
3267 * c-fold.c (c_fold_array_ref): New function.
3268 (c_fully_fold_internal): Add LVAL argument, propagate it through
3269 recursive calls. For VAR_P call decl_constant_value and
3270 unshare if not LVAL and either optimizing or IN_INIT. Remove
3271 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3272 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3273 (c_fully_fold): Add LVAL argument, pass it through to
3274 c_fully_fold_internal.
3275 (decl_constant_value_for_optimization): Removed.
3277 2017-11-15 Joseph Myers <joseph@codesourcery.com>
3280 * c-parser.c (check_tgmath_function): New function.
3281 (enum tgmath_parm_kind): New enum.
3282 (c_parser_postfix_expression): Handle __builtin_tgmath.
3284 2017-10-31 David Malcolm <dmalcolm@redhat.com>
3286 * c-decl.c (implicit_decl_warning): Update for renaming of
3287 pedwarn_at_rich_loc and warning_at_rich_loc.
3288 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3289 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3290 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3291 (c_parser_struct_or_union_specifier): Likewise for renaming of
3292 pedwarn_at_rich_loc.
3293 (c_parser_parameter_declaration): Likewise for renaming of
3295 * c-typeck.c (build_component_ref): Likewise.
3296 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3297 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3298 (set_init_label): Likewise for renaming of error_at_rich_loc.
3300 2017-10-30 Richard Biener <rguenther@suse.de>
3302 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3305 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3307 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3308 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3310 2017-10-25 David Malcolm <dmalcolm@redhat.com>
3313 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3316 2017-10-25 Jakub Jelinek <jakub@redhat.com>
3319 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3320 newdecl to corresponding __builtin_ if any.
3322 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3325 * c-decl.c (diagnose_mismatched_decls): Use
3326 OPT_Wbuiltin_declaration_mismatch.
3328 2017-10-12 David Malcolm <dmalcolm@redhat.com>
3330 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3331 use it to guard calls to maybe_suggest_missing_token_insertion.
3332 (c_parser_parms_list_declarator): Override default value of new
3333 "type_is_unique" param to c_parser_require.
3334 (c_parser_asm_statement): Likewise.
3335 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3338 2017-10-11 Nathan Sidwell <nathan@acm.org>
3340 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3342 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3344 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3345 operating on trees as wide_ints.
3346 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3347 (c_tree_equal): Likewise.
3349 2017-10-04 David Malcolm <dmalcolm@redhat.com>
3351 * c-decl.c (push_parm_decl): Store c_parm's location into the
3353 (build_c_parm): Add "loc" param and store it within the c_parm.
3354 * c-parser.c (struct c_parser): Add "last_token_location" field.
3355 (c_parser_consume_token): Store location of the token into the
3357 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3358 when handling a FUNCTION_DECL, if it doesn't already have them.
3359 (c_parser_parameter_declaration): Generate a location for the
3360 parameter, and pass it to the call to build_c_parm.
3361 * c-tree.h (struct c_parm): Add field "loc".
3362 (build_c_parm): Add location_t param.
3363 * c-typeck.c (get_fndecl_argument_location): New function.
3364 (inform_for_arg): New function.
3365 (convert_for_assignment): Use inform_for_arg when dealing with
3368 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3370 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3372 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3373 don't SET_DECL_C_BIT_FIELD here.
3376 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3377 instead of trying to set just TREE_READONLY manually.
3379 2017-09-16 Tom de Vries <tom@codesourcery.com>
3382 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3385 2017-09-15 Joseph Myers <joseph@codesourcery.com>
3388 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3390 (build_conditional_expr): For C11, generate result with excess
3391 precision when one argument is an integer and the other is of a
3392 type using excess precision.
3394 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3396 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3398 2017-09-13 Marek Polacek <polacek@redhat.com>
3401 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3402 than expr.original_type.
3404 2017-09-12 Nathan Sidwell <nathan@acm.org>
3406 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3407 resort_sorted_fields): Moved from c-family/c-common.c.
3408 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3410 2017-09-01 Joseph Myers <joseph@codesourcery.com>
3413 * c-typeck.c (build_atomic_assign): Handle argument with excess
3414 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3415 argument passed to build_binary_op and convert_for_assignment but
3416 not for call to c_fully_fold.
3417 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3418 Ensure build_binary_op is called with argument with original
3419 semantic type. Avoid calling c_fully_fold with an
3420 EXCESS_PRECISION_EXPR from build_binary_op.
3422 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3425 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3427 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3428 Alan Hayward <alan.hayward@arm.com>
3429 David Sherwood <david.sherwood@arm.com>
3431 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3432 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3433 m1 and m2 to the signed equivalent of a fixed-point
3436 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3438 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3439 than CAN_HAVE_LOCATION_P when determining whether to use the
3440 location_t value within "value".
3442 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3444 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3445 rather than peeking the location of the first token.
3446 * c-tree.h (c_expr::get_location): New method.
3448 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3450 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3451 to check_function_arguments.
3453 2017-08-18 Marek Polacek <polacek@redhat.com>
3455 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3458 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3461 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3462 (check_bitfield_type_and_width): Don't allow bit-field with
3463 warn_if_not_aligned type.
3465 2017-08-14 Martin Sebor <msebor@redhat.com>
3468 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3470 2017-08-11 Marek Polacek <polacek@redhat.com>
3473 * c-decl.c (pushtag): Only print inform if the warning was printed.
3474 (grokdeclarator): Likewise.
3476 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3478 * c-parser.c (c_parser_error): Rename to...
3479 (c_parser_error_richloc): ...this, making static, and adding
3480 "richloc" parameter, passing it to the c_parse_error call,
3481 rather than calling c_parser_set_source_position_from_token.
3482 (c_parser_error): Reintroduce, reimplementing in terms of the
3483 above, converting return type from void to bool.
3484 (class token_pair): New class.
3485 (struct matching_paren_traits): New struct.
3486 (matching_parens): New typedef.
3487 (struct matching_brace_traits): New struct.
3488 (matching_braces): New typedef.
3489 (get_matching_symbol): New function.
3490 (c_parser_require): Add param MATCHING_LOCATION, using it to
3491 highlight matching "opening" tokens for missing "closing" tokens.
3492 (c_parser_skip_until_found): Likewise.
3493 (c_parser_static_assert_declaration_no_semi): Convert explicit
3494 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3495 class matching_parens, so that the pertinent open parenthesis is
3496 highlighted when there are problems locating the close
3498 (c_parser_struct_or_union_specifier): Likewise.
3499 (c_parser_typeof_specifier): Likewise.
3500 (c_parser_alignas_specifier): Likewise.
3501 (c_parser_simple_asm_expr): Likewise.
3502 (c_parser_braced_init): Likewise, for matching_braces.
3503 (c_parser_paren_condition): Likewise, for matching_parens.
3504 (c_parser_switch_statement): Likewise.
3505 (c_parser_for_statement): Likewise.
3506 (c_parser_asm_statement): Likewise.
3507 (c_parser_asm_operands): Likewise.
3508 (c_parser_cast_expression): Likewise.
3509 (c_parser_sizeof_expression): Likewise.
3510 (c_parser_alignof_expression): Likewise.
3511 (c_parser_generic_selection): Likewise.
3512 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3513 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3514 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3515 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3516 c_parser_skip_until_found call.
3517 (c_parser_objc_class_definition): Use class matching_parens as
3519 (c_parser_objc_method_decl): Likewise.
3520 (c_parser_objc_try_catch_finally_statement): Likewise.
3521 (c_parser_objc_synchronized_statement): Likewise.
3522 (c_parser_objc_at_property_declaration): Likewise.
3523 (c_parser_oacc_wait_list): Likewise.
3524 (c_parser_omp_var_list_parens): Likewise.
3525 (c_parser_omp_clause_collapse): Likewise.
3526 (c_parser_omp_clause_default): Likewise.
3527 (c_parser_omp_clause_if): Likewise.
3528 (c_parser_omp_clause_num_threads): Likewise.
3529 (c_parser_omp_clause_num_tasks): Likewise.
3530 (c_parser_omp_clause_grainsize): Likewise.
3531 (c_parser_omp_clause_priority): Likewise.
3532 (c_parser_omp_clause_hint): Likewise.
3533 (c_parser_omp_clause_defaultmap): Likewise.
3534 (c_parser_oacc_single_int_clause): Likewise.
3535 (c_parser_omp_clause_ordered): Likewise.
3536 (c_parser_omp_clause_reduction): Likewise.
3537 (c_parser_omp_clause_schedule): Likewise.
3538 (c_parser_omp_clause_num_teams): Likewise.
3539 (c_parser_omp_clause_thread_limit): Likewise.
3540 (c_parser_omp_clause_aligned): Likewise.
3541 (c_parser_omp_clause_linear): Likewise.
3542 (c_parser_omp_clause_safelen): Likewise.
3543 (c_parser_omp_clause_simdlen): Likewise.
3544 (c_parser_omp_clause_depend): Likewise.
3545 (c_parser_omp_clause_map): Likewise.
3546 (c_parser_omp_clause_device): Likewise.
3547 (c_parser_omp_clause_dist_schedule): Likewise.
3548 (c_parser_omp_clause_proc_bind): Likewise.
3549 (c_parser_omp_clause_uniform): Likewise.
3550 (c_parser_omp_for_loop): Likewise.
3551 (c_parser_cilk_clause_vectorlength): Likewise.
3552 (c_parser_cilk_clause_linear): Likewise.
3553 (c_parser_transaction_expression): Likewise.
3554 * c-parser.h (c_parser_require): Add param matching_location with
3555 default UNKNOWN_LOCATION.
3556 (c_parser_error): Convert return type from void to bool.
3557 (c_parser_skip_until_found): Add param matching_location with
3558 default UNKNOWN_LOCATION.
3560 2017-08-09 Marek Polacek <polacek@redhat.com>
3562 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3563 * c-tree.h (build_external_ref): Update declaration.
3564 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3565 (build_external_ref): Change the type of a parameter to bool.
3566 (parser_build_binary_op): Use true/false instead of 1/0.
3567 (pointer_diff): Likewise.
3568 (build_modify_expr): Likewise.
3569 (set_designator): Change the type of a parameter to bool.
3570 (set_init_index): Use true/false instead of 1/0.
3571 (set_init_label): Likewise.
3572 (output_init_element): Change the type of a parameter to bool.
3573 (output_pending_init_elements): Use true/false instead of 1/0.
3574 (process_init_element): Likewise.
3575 (build_binary_op): Change the type of a parameter to bool.
3577 2017-08-09 Marek Polacek <polacek@redhat.com>
3580 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3581 Call emit_diagnostic_valist instead of pedwarn.
3582 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3583 Print the relevant types in diagnostics.
3585 2017-08-09 Marek Polacek <polacek@redhat.com>
3588 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
3589 build_conditional_expr.
3590 * c-parser.c (c_parser_conditional_expression): Create locations for
3591 EXP1 and EXP2 from their source ranges. Pass the locations down to
3592 build_conditional_expr.
3593 * c-tree.h (build_conditional_expr): Update declaration.
3594 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3595 For -Wsign-compare, also print the types.
3597 2017-08-08 Martin Liska <mliska@suse.cz>
3599 * c-convert.c: Include header files.
3600 * c-typeck.c: Likewise.
3602 2017-08-07 Martin Liska <mliska@suse.cz>
3604 * c-parser.c (c_parser_attributes): Canonicalize name of an
3607 2017-08-02 Marek Polacek <polacek@redhat.com>
3610 * c-parser.c (c_parser_unary_expression): Use set_error.
3614 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3615 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3617 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
3618 Martin Liska <mliska@suse.cz>
3620 * c-typeck.c (c_finish_goto_label): Build gimple predict
3623 2017-07-31 Martin Liska <mliska@suse.cz>
3626 * c-convert.c (convert): Guard condition with flag_sanitize_p
3627 also with current_function_decl non-null equality.
3628 * c-decl.c (grokdeclarator): Likewise.
3629 * c-typeck.c (build_binary_op): Likewise.
3631 2017-07-25 Marek Polacek <polacek@redhat.com>
3633 * c-decl.c (grokfield): Remove local variable.
3635 2017-07-25 Marek Polacek <polacek@redhat.com>
3638 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3639 macro expansion if the body is in { }.
3640 (c_parser_while_statement): Likewise.
3641 (c_parser_for_statement): Likewise.
3643 2017-07-18 Nathan Sidwell <nathan@acm.org>
3645 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3647 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3649 * c-decl.c (implicitly_declare): When suggesting a missing
3650 #include, provide a fix-it hint.
3652 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3654 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3655 and call that instead.
3656 * c-tree.h (selftest::run_c_tests): New decl.
3658 2017-06-26 Marek Polacek <polacek@redhat.com>
3661 * c-parser.c (c_parser_if_body): Set the location of the
3662 body of the conditional after parsing all the labels. Call
3663 warn_for_multistatement_macros.
3664 (c_parser_else_body): Likewise.
3665 (c_parser_switch_statement): Likewise.
3666 (c_parser_while_statement): Likewise.
3667 (c_parser_for_statement): Likewise.
3668 (c_parser_statement): Add a default argument. Save the location
3669 after labels have been parsed.
3670 (c_parser_c99_block_statement): Likewise.
3672 2017-06-19 Richard Biener <rguenther@suse.de>
3674 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3675 negated _Literals to parse _Literal (int) -1.
3677 2017-06-13 Martin Liska <mliska@suse.cz>
3680 * c-convert.c (convert): Use sanitize_flags_p.
3681 * c-decl.c (grokdeclarator): Likewise.
3682 * c-typeck.c (convert_for_assignment): Likewise.
3683 (c_finish_return): Likewise.
3684 (build_binary_op): Likewise.
3686 2017-06-08 Jakub Jelinek <jakub@redhat.com>
3689 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3690 to sizetype before size_binop.
3692 2017-06-07 Jakub Jelinek <jakub@redhat.com>
3694 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3697 2017-06-06 Marek Polacek <polacek@redhat.com>
3700 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3702 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3704 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3706 * c-parser.c (c_parser_binary_expression): Implement the
3707 -Wsizeof_pointer_div warning.
3708 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3709 from a parenthesized expression.
3710 (c_parser_expr_list): Use c_last_sizeof_loc.
3711 * c-tree.h (c_last_sizeof_loc): New external.
3712 * c-typeck.c (c_last_sizeof_loc): New variable.
3713 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3715 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3718 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3720 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3722 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3725 2017-05-24 Martin Sebor <msebor@redhat.com>
3728 * c-fold.c (c_fully_fold_internal): Adjust.
3729 * c-typeck.c (parser_build_unary_op): Adjust.
3731 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3733 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3734 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3737 2017-05-23 Marek Polacek <polacek@redhat.com>
3739 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3742 2017-05-22 Jakub Jelinek <jakub@redhat.com>
3744 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3745 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3746 it returned invariant. Call tree_invariant_p unconditionally
3747 afterwards to decide whether to return expr or op0.
3749 2017-05-22 Nathan Sidwell <nathan@acm.org>
3751 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3753 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3755 * c-parser.c (c_parser_omp_clause_default): Handle
3756 "OMP_CLAUSE_DEFAULT_PRESENT".
3758 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3760 * config-lang.in (gtfiles): Add c-family/c-format.c.
3762 2017-05-18 Nathan Sidwell <nathan@acm.org>
3764 * c-decl.c (pushdecl_top_level): Delete unused function.
3766 2017-05-18 Marek Polacek <polacek@redhat.com>
3768 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3769 (check_earlier_gotos): Likewise.
3770 (define_label): Likewise.
3771 (pending_xref_error): Likewise.
3772 (smallest_type_quals_location): Likewise.
3773 (grokdeclarator): Likewise.
3774 (grokparms): Likewise.
3775 (identifier_global_value): Likewise.
3776 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3777 (find_init_member): Likewise.
3779 2017-05-18 Marek Polacek <polacek@redhat.com>
3781 * c-decl.c (start_decl): Use false/true instead of 0/1.
3782 (grokdeclarator): Likewise.
3783 (finish_struct): Likewise.
3784 (start_function): Change the return type to bool. Use false/true
3786 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3787 * c-tree.h (start_function): Update.
3788 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3789 (set_designator): Change the return type to bool. Use false/true
3792 2017-05-17 Marek Polacek <polacek@redhat.com>
3794 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3795 * c-typeck.c: Likewise.
3797 2017-05-17 Marek Polacek <polacek@redhat.com>
3800 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3801 DECL_IGNORED_P even for non-static compound literals.
3803 2017-05-17 Martin Liska <mliska@suse.cz>
3805 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3806 use it instead of int type.
3808 2017-05-17 Marek Polacek <polacek@redhat.com>
3810 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3812 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
3813 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
3814 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3815 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3817 (c_parser_conditional_expression): Likewise.
3818 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3819 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3820 (process_init_element): Likewise.
3821 (build_binary_op): Likewise.
3822 (handle_omp_array_sections_1): Likewise.
3824 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3826 * c-parser.c (c_parser_omp_clause_num_gangs)
3827 (c_parser_omp_clause_num_workers)
3828 (c_parser_omp_clause_vector_length): Merge functions into...
3829 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3832 2017-05-11 Nathan Sidwell <nathan@acm.org>
3834 * gimple-parser.c: Don't #include tree-dump.h.
3836 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3839 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3841 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3844 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3845 incorrect __MEM syntax.
3847 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3850 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3853 2017-05-09 Nathan Sidwell <nathan@acm.org>
3855 * c-tree.h (pushdecl): Declare.
3857 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3859 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3860 with diagnostic_report_diagnostic.
3861 * c-errors.c (pedwarn_c99): Likewise.
3862 (pedwarn_c90): Likewise.
3864 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3867 * c-gimplify.c (c_gimplify_expr): Remove calls to
3868 cilk_gimplifY_call_params_in_spawned_fn.
3870 2017-04-25 David Malcolm <dmalcolm@redhat.com>
3872 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3873 hint for removing extra semicolon.
3875 2017-04-21 Jakub Jelinek <jakub@redhat.com>
3878 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3879 enabled, set specs->type to integer_type_node.
3881 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3883 * c-array-notation.c: Fix typo in comment.
3885 2017-03-29 Marek Polacek <polacek@redhat.com>
3888 * c-decl.c (finish_decl): Check VAR_P.
3890 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3893 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3894 * c-typeck.c (c_mark_addressable): Likewise. Look through
3895 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3897 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3899 2017-03-23 Marek Polacek <polacek@redhat.com>
3901 * c-tree.h: Remove a C_RID_YYCODE reference.
3903 2017-03-21 Jakub Jelinek <jakub@redhat.com>
3906 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3907 optional COMPOUND_EXPR with ubsan instrumentation.
3909 2017-03-17 Marek Polacek <polacek@redhat.com>
3911 * c-parser.c: Add C11 references.
3913 2017-03-15 Marek Polacek <polacek@redhat.com>
3915 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3917 2017-03-11 Marek Polacek <polacek@redhat.com>
3919 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3921 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3923 PR translation/79848
3924 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3926 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3928 2017-03-09 Marek Polacek <polacek@redhat.com>
3931 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3932 parameter declarations with initializers.
3934 2017-03-09 Jakub Jelinek <jakub@redhat.com>
3937 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3940 2017-03-07 Jakub Jelinek <jakub@redhat.com>
3943 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3944 for "may only be used in compound statements" diagnostics, change it
3945 such that the same translatable string is used for all pragmas. For
3946 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3948 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3949 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3950 "may only be used in compound statements" diagnostics, such that the
3951 same translatable string is used for all pragmas.
3953 2017-03-04 Marek Polacek <polacek@redhat.com>
3956 * c-decl.c (implicit_decl_warning): Add missing space.
3958 2017-03-03 Marek Polacek <polacek@redhat.com>
3961 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3962 current_function_prototype_arg_types is error_mark_node. Fix
3963 formatting. Use TREE_VALUE instead of TREE_TYPE.
3965 2017-03-03 Jakub Jelinek <jakub@redhat.com>
3968 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3969 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3970 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3974 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3975 instead of %<_Generic>.
3976 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3977 (c_parser_omp_target_exit_data): Use %<release%> instead of
3980 2017-02-28 Jakub Jelinek <jakub@redhat.com>
3982 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3983 instead of just cond ? "..." : "...".
3984 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3985 for "enter"/"exit" keyword.
3986 (c_finish_oacc_routine): Don't use %s to supply portions of the
3989 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3992 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3993 handle -Wrestrict here.
3994 * c-typeck.c (build_function_call_vec): Adjust
3995 check_function_arguments caller.
3997 2017-02-23 Richard Biener <rguenther@suse.de>
4000 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4001 to initialize c_exprs to return.
4002 (c_parser_gimple_binary_expression): Likewise.
4003 (c_parser_gimple_unary_expression): Likewise.
4004 (c_parser_gimple_postfix_expression): Likewise.
4006 2017-02-22 Marek Polacek <polacek@redhat.com>
4009 * c-typeck.c (convert_arguments): Handle error_mark_node.
4011 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4013 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4014 value of c_parser_parse_ssa_name against error_mark_node and emit
4015 error if ssa name is anonymous and written as default definition.
4017 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4019 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4022 2017-02-16 Jakub Jelinek <jakub@redhat.com>
4025 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4026 ignore #pragma omp target even when not followed by identifier.
4028 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4030 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4031 (c_parser_gimple_unary_expression): Likewise.
4033 2017-02-13 Jakub Jelinek <jakub@redhat.com>
4035 * c-parser.c (c_parser_oacc_declare): Add missing space in
4038 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4041 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4042 set_c_expr_source_range when parsing ssa-name.
4044 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
4045 Richard Biener <rguenther@suse.de>
4047 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4048 building IL when arguments are error_mark_node.
4049 (c_parser_gimple_unary_expression): Likewise.
4050 (c_parser_gimple_if_stmt): Likewise.
4051 (c_parser_gimple_switch_stmt): Likewise.
4052 (c_parser_gimple_return_stmt): Likewise.
4053 (c_parser_parse_ssa_name): When name lookup fails do not build
4054 an SSA name. Use undeclared rather than not declared in error
4057 2017-02-09 Marek Polacek <polacek@redhat.com>
4060 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4061 instead of c_parser_skip_until_found.
4063 2017-02-09 Jakub Jelinek <jakub@redhat.com>
4066 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4067 symtab_node::get on automatic variables.
4069 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4070 Chung-Lin Tang <cltang@codesourcery.com>
4072 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4073 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4075 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4077 2017-02-07 Richard Biener <rguenther@suse.de>
4079 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4080 (c_parser_gimple_postfix_expression_after_primary):
4081 Do not use c_build_function_call_vec to avoid folding and promotion.
4084 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4087 * c-decl.c (pop_scope): Pass main_input_filename to
4088 build_translation_unit_decl.
4090 2017-01-24 David Malcolm <dmalcolm@redhat.com>
4092 * c-parser.c: Include "read-rtl-function.h" and
4094 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4095 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4096 production. Update for renaming of field "gimple_pass" to
4097 "gimple_or_rtl_pass". If __RTL was seen, call
4098 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4099 to an auto_timevar, to cope with early exit.
4100 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4101 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4102 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4104 (c_parser_parse_rtl_body): New function.
4105 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4106 (struct c_declspecs): Rename field "gimple_pass" to
4107 "gimple_or_rtl_pass". Add field "rtl_p".
4108 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4109 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4110 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4111 (c_parser_gimple_or_rtl_pass_list): ...this.
4113 2017-01-20 Marek Polacek <polacek@redhat.com>
4116 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4118 2017-01-13 Richard Biener <rguenther@suse.de>
4120 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4123 2017-01-13 Richard Biener <rguenther@suse.de>
4125 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4126 _Literal ( type-name ) number.
4128 2017-01-12 Richard Biener <rguenther@suse.de>
4130 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4133 2017-01-11 Jakub Jelinek <jakub@redhat.com>
4136 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4139 2017-01-11 Richard Biener <rguenther@suse.de>
4142 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4143 returns on parse errors.
4145 2017-01-04 Marek Polacek <polacek@redhat.com>
4148 * c-parser.c (c_parser_postfix_expression): Mark zero character
4149 constants by setting original_type in c_expr.
4150 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4151 with a zero character constant.
4152 (char_type_p): New function.
4154 2017-01-04 David Malcolm <dmalcolm@redhat.com>
4156 * c-parser.c (c_parser_declaration_or_fndef): Create a
4157 rich_location at init_loc and parse it to start_init.
4158 (last_init_list_comma): New global.
4159 (c_parser_braced_init): Update last_init_list_comma when parsing
4160 commas. Pass it to pop_init_level. Pass location of closing
4161 brace to pop_init_level.
4162 (c_parser_postfix_expression_after_paren_type): Create a
4163 rich_location at type_loc and parse it to start_init.
4164 (c_parser_omp_declare_reduction): Likewise for loc.
4165 * c-tree.h (start_init): Add rich_location * param.
4166 (pop_init_level): Add location_t param.
4167 * c-typeck.c (struct initializer_stack): Add field
4168 "missing_brace_richloc".
4169 (start_init): Add richloc param, use it to initialize
4170 the stack node's missing_brace_richloc.
4171 (last_init_list_comma): New decl.
4172 (finish_implicit_inits): Pass last_init_list_comma to
4174 (push_init_level): When finding missing open braces, add fix-it
4175 hints to the richloc.
4176 (pop_init_level): Add "insert_before" param and pass it
4177 when calling pop_init_level. Add fixits about missing
4178 close braces to any richloc. Use the richloc for the
4179 -Wmissing-braces warning.
4180 (set_designator): Pass last_init_list_comma to pop_init_level.
4181 (process_init_element): Likewise.
4183 2017-01-01 Jakub Jelinek <jakub@redhat.com>
4185 Update copyright years.
4187 2016-12-21 Jakub Jelinek <jakub@redhat.com>
4190 * c-typeck.c (build_function_call_vec): If check_function_arguments
4191 returns true, set TREE_NO_WARNING on CALL_EXPR.
4194 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4195 to *expr instead of overwriting it.
4197 2016-12-20 Richard Biener <rguenther@suse.de>
4199 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4201 (c_parser_gimple_statement): Only build assigns for non-error
4203 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4205 2016-12-14 Martin Jambor <mjambor@suse.cz>
4207 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4209 (c_finish_oacc_routine): Adjusted call to
4210 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4211 to use their new names.
4212 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4214 (c_parser_oacc_update): Likewise.
4215 (c_parser_omp_simd): Likewise.
4216 (c_parser_omp_target_update): Likewise.
4217 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4218 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4220 (c_finish_omp_cancellation_point): Likewise.
4221 * gimple-parser.c: Do not include omp-low.h
4223 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4224 James Norris <jnorris@codesourcery.com>
4226 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4227 EXIT_DATA,WAIT} are not used in compound statements.
4228 (c_parser_oacc_enter_exit_data): Update diagnostics.
4230 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4233 * c-decl.c (diagnose_mismatched_decls): Use
4234 OPT_Wbuiltin_declaration_mismatch here too.
4236 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
4237 Alan Hayward <alan.hayward@arm.com>
4238 David Sherwood <david.sherwood@arm.com>
4240 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4241 (make_label, finish_struct): Likewise.
4243 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4244 Richard Biener <rguenther@suse.de>
4246 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4247 * config-lang.in (gtfiles): Add c/c-parser.h.
4248 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4249 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4250 * c-parser.c (enum c_id_kind, struct c_token,
4251 c_parser_next_token_is, c_parser_next_token_is_not,
4252 c_parser_next_token_is_keyword,
4253 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4255 * c-parser.h: ... new header.
4256 * c-parser.c: Include c-parser.h and gimple-parser.h.
4257 (c_parser_peek_token, c_parser_peek_2nd_token,
4258 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4259 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4260 c_parser_error, c_parser_require, c_parser_skip_until_found,
4261 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4262 c_parser_type_name): Export.
4263 (c_parser_tokens_buf): New function.
4264 (c_parser_error): Likewise.
4265 (c_parser_set_error): Likewise.
4266 (c_parser_declspecs): Handle RID_GIMPLE.
4267 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4268 via c_parser_parse_gimple_body.
4269 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4270 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4271 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4272 c_parser_error, c_parser_require, c_parser_skip_until_found,
4273 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4274 c_parser_type_name): Declare.
4275 (struct c_parser): Declare forward.
4276 (c_parser_tokens_buf): Declare.
4277 (c_parser_error): Likewise.
4278 (c_parser_set_error): Likewise.
4279 * gimple-parser.c: New file.
4280 * gimple-parser.h: Likewise.
4282 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4285 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4288 2016-09-11 Le-Chun Wu <lcwu@google.com>
4289 Mark Wielaard <mjw@redhat.com>
4291 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4292 to the given -Wshadow= variant.
4294 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4296 * c-typeck.c: Include memmodel.h.
4298 2016-10-13 Jakub Jelinek <jakub@redhat.com>
4301 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4302 instead of lhd_return_null_tree_v.
4304 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4307 * c-decl.c (smallest_type_quals_location): New static function.
4308 (grokdeclarator): Try to find the correct location for an ignored
4311 2016-09-26 Marek Polacek <polacek@redhat.com>
4314 * c-decl.c (pop_scope): Add gcc_fallthrough.
4316 2016-09-26 Marek Polacek <polacek@redhat.com>
4319 * c-parser.c (struct c_token): Add flags field.
4320 (c_lex_one_token): Pass it to c_lex_with_flags.
4321 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4322 into IFN_FALLTHROUGH.
4323 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4324 attribute fallthrough after a case label or default label.
4325 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4327 2016-09-24 Marek Polacek <polacek@redhat.com>
4330 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4331 have boolean value. Warn about ++/-- on booleans.
4333 2016-09-23 Jakub Jelinek <jakub@redhat.com>
4335 * c-parser.c (incomplete_record_decls): Remove unnecessary
4336 = vNULL initialization of file scope vec.
4338 2016-09-16 Marek Polacek <polacek@redhat.com>
4340 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4342 2016-09-14 Marek Polacek <polacek@redhat.com>
4344 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4345 (fix_array_notation_expr): Likewise.
4346 * c-decl.c (finish_decl): Likewise.
4347 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4348 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4349 (function_to_pointer_conversion): Use false instead of 0.
4350 (convert_lvalue_to_rvalue): Likewise.
4351 (parser_build_unary_op): Likewise.
4352 (build_atomic_assign): Likewise.
4353 (build_unary_op): Change nonconvert parameter type to bool, use
4354 true/false instead of 1/0.
4355 (build_binary_op): Use true instead of 1.
4357 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4359 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4360 of add_fixit_insert to add_fixit_insert_before.
4362 2016-09-13 Marek Polacek <polacek@redhat.com>
4364 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4367 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4370 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4371 COMPOUND_EXPR to warn_for_omitted_condop.
4373 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4375 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4376 c_get_substring_location for this new langhook.
4378 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4381 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4383 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4384 instead of mark_exp_read on low_bound/length expression.
4385 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4386 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4387 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4388 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4389 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4390 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4391 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4392 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4393 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4394 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4395 instead of mark_expr_read.
4396 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4397 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4398 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4399 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4400 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4401 array section bases outside of depend clause, for depend clause
4402 use convert_lvalue_to_rvalue on the base.
4403 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4404 linear, aligned, map, to and from clauses.
4405 (c_omp_clause_copy_ctor): New function.
4407 2016-09-01 Marek Polacek <polacek@redhat.com>
4410 * c-typeck.c (composite_type): Add FALLTHRU comment.
4412 2016-08-31 David Malcolm <dmalcolm@redhat.com>
4414 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4415 to the insertion fixits for "struct", "union", and "enum".
4417 2016-08-30 David Malcolm <dmalcolm@redhat.com>
4419 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4420 rather than add_fixit_misspelled_id.
4421 (undeclared_variable): Likewise.
4422 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4423 now-redundant "here" params from add_fixit_insert method calls.
4424 (c_parser_parameter_declaration): Likewise.
4425 * c-typeck.c (build_component_ref): Remove now-redundant range
4426 param from add_fixit_replace method calls.
4428 2016-08-25 Marek Polacek <polacek@redhat.com>
4430 * c-typeck.c (parser_build_binary_op): Pass LHS to
4431 warn_logical_not_parentheses.
4433 2016-08-25 Marek Polacek <polacek@redhat.com>
4436 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4437 or _FloatN or _FloatNx is not supported.
4438 (finish_declspecs): Set type to integer_type_node when _FloatN or
4439 _FloatNx is not supported.
4441 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4444 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4445 (struct c_declspecs): Add field floatn_nx_idx.
4446 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4447 and _FloatNx type specifiers.
4448 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4449 (c_parser_declspecs, c_parser_attribute_any_word)
4450 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4451 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4452 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4453 narrower than double.
4455 2016-08-12 Jakub Jelinek <jakub@redhat.com>
4456 Martin Liska <mliska@suse.cz>
4459 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4460 % to determine val element to change. Assert that
4461 wchar_bytes * charwidth fits into val array.
4463 2016-08-12 Marek Polacek <polacek@redhat.com>
4466 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4467 (c_parser_postfix_expression): Likewise.
4468 * c-typeck.c (build_unary_op): Adjust fall through comment.
4469 (c_mark_addressable): Likewise.
4471 2016-08-11 Jakub Jelinek <jakub@redhat.com>
4474 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4475 array member through typedef, for orig_qual_indirect == 0 clear
4478 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4481 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4482 this up to selftest::run_c_tests.
4483 (selftest::run_c_tests): New function.
4485 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4487 * c-parser.c (struct oacc_routine_data): Add error_seen and
4488 fndecl_seen members.
4489 (c_finish_oacc_routine): Use these.
4490 (c_parser_declaration_or_fndef): Adjust.
4491 (c_parser_oacc_routine): Likewise. Support more C language
4492 constructs, and improve diagnostics. Move pragma context
4494 (c_parser_pragma): ... here.
4496 * c-parser.c (struct oacc_routine_data): New.
4497 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4499 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4500 declare target" attribute.
4502 2016-08-01 Jan Beulich <jbeulich@suse.com>
4504 * c-fold.c (c_fully_fold_internal): Also emit shift count
4505 warnings for vector types.
4506 * c-typeck.c (build_binary_op): Likewise.
4508 2016-07-29 Marek Polacek <polacek@redhat.com>
4511 * c-decl.c (finish_struct): Rephrase an error message.
4514 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4515 to error node for invalid code.
4518 * c-decl.c (implicitly_declare): Return decl early not only for
4519 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4521 2016-07-29 Jakub Jelinek <jakub@redhat.com>
4524 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4525 on GNU extern inline functions.
4527 2016-07-29 Marek Polacek <polacek@redhat.com>
4530 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4533 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4535 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4537 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4539 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4541 (best_macro_match): Likewise, converting from a typedef to a
4543 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4544 (lookup_name_fuzzy): Update for change of best_macro_match to a
4545 subclass with a ctor that calls cpp_forall_identifiers.
4547 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4549 * c-decl.c (implicit_decl_warning): Update for conversion of
4550 return type of lookup_name_fuzzy to const char *.
4551 (undeclared_variable): Likewise.
4552 (lookup_name_fuzzy): Convert return type from tree to
4554 * c-parser.c (c_parser_declaration_or_fndef): Update for
4555 conversion of return type of lookup_name_fuzzy to const char *.
4556 (c_parser_parameter_declaration): Likewise.
4558 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4560 * c-parser.c (c_parser_oacc_declare): Don't scan for
4562 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4563 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4564 zero-length subarrays.
4566 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4569 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4570 instead of FUZZY_LOOKUP_NAME.
4571 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4572 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4574 2016-07-14 Jakub Jelinek <jakub@redhat.com>
4577 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4579 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4581 * c-parser.c (c_parser_generic_selection): Make type of variable
4583 (c_parser_omp_declare_simd): Likewise.
4585 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4587 * c-decl.c (struct c_struct_parse_info): Change member types
4588 from vec to auto_vec.
4589 (start_struct): Adjust.
4590 (finish_struct): Likewise.
4592 2016-07-02 Jakub Jelinek <jakub@redhat.com>
4595 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4597 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4599 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4600 Move pragma context checking into...
4601 (c_parser_omp_cancellation_point): ... here, and improve
4602 diagnostic messages.
4603 * c-typeck.c (c_finish_omp_cancel)
4604 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4606 2016-06-29 Jakub Jelinek <jakub@redhat.com>
4609 * c-typeck.c (c_build_qualified_type): Don't clear
4610 C_TYPE_INCOMPLETE_VARS for the main variant.
4612 2016-06-28 Martin Sebor <msebor@redhat.com>
4615 * c-typeck.c (output_init_element): Diagnose incompatible types
4616 before non-constant initializers.
4618 2016-06-28 Jakub Jelinek <jakub@redhat.com>
4620 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4622 2016-06-23 Andi Kleen <ak@linux.intel.com>
4624 * Make-lang.in: Add support for autofdo.
4626 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4629 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4630 (implicit_decl_warning): When issuing warnings for implicit
4631 declarations, attempt to provide a suggestion via
4633 (undeclared_variable): Likewise when issuing errors.
4634 (lookup_name_in_scope): Likewise.
4635 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4636 (best_macro_match): New typedef.
4637 (find_closest_macro_cpp_cb): New function.
4638 (lookup_name_fuzzy): New function.
4639 * c-parser.c: Include gcc-rich-location.h.
4640 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4641 (c_keyword_starts_typename): ...this new function.
4642 (c_parser_declaration_or_fndef): When issuing errors about
4643 missing "struct" etc, add a fixit. For other kinds of errors,
4644 attempt to provide a suggestion via lookup_name_fuzzy.
4645 (c_parser_parms_declarator): When looking ahead to detect typos in
4646 type names, also reject CPP_KEYWORD.
4647 (c_parser_parameter_declaration): When issuing errors about
4648 unknown type names, attempt to provide a suggestion via
4650 * c-tree.h (c_keyword_starts_typename): New prototype.
4652 2016-06-20 Joseph Myers <joseph@codesourcery.com>
4655 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4656 c_common_type returns error_mark_node.
4658 2016-06-19 Martin Sebor <msebor@redhat.com>
4661 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4662 __alignof__ (expression).
4664 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4666 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4668 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4670 * c-typeck.c (build_component_ref): Simplify fixit code by
4671 using gcc_rich_location::add_fixit_misspelled_id.
4672 (set_init_label): Likewise.
4674 2016-06-13 David Malcolm <dmalcolm@redhat.com>
4676 * c-parser.c (c_parser_initelt): Provide location of name for new
4677 location_t param of set_init_label.
4678 * c-tree.h (set_init_label): Add location_t param.
4679 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4680 param and use it when issuing error messages about unrecognized
4681 field names. Attempt to provide a fixit hint if appropriate,
4682 otherwise update the error message to provide the type name.
4684 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4687 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4690 2016-06-08 Martin Sebor <msebor@redhat.com>
4691 Jakub Jelinek <jakub@redhat.com>
4695 * c-typeck.c (convert_arguments): Don't promote last argument
4696 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4698 2016-06-08 Marek Polacek <polacek@redhat.com>
4701 * c-decl.c (grokdeclarator): Check TYPE_P.
4704 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4707 2016-06-07 David Malcolm <dmalcolm@redhat.com>
4709 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4710 and structure element reference, capture the location of the
4711 element name token and pass it to build_component_ref.
4712 (c_parser_postfix_expression_after_primary): Likewise for
4713 structure element dereference.
4714 (c_parser_omp_variable_list): Likewise for
4715 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4716 * c-tree.h (build_component_ref): Add location_t param.
4717 * c-typeck.c (build_component_ref): Add location_t param
4718 COMPONENT_LOC. Use it, if available, when issuing hints about
4719 mispelled member names to provide a fixit replacement hint.
4721 2016-06-06 Marek Polacek <polacek@redhat.com>
4724 * c-parser.c (c_parser_direct_declarator): Set location.
4726 2016-06-06 Marek Polacek <polacek@redhat.com>
4728 * c-typeck.c (comptypes_internal): Handle comparisons of
4729 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4730 TYPE_REF_CAN_ALIAS_ALL.
4732 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4734 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4735 arguments as addressable when async clause exists.
4737 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4740 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4741 when combined with target construct.
4743 2016-05-26 Jakub Jelinek <jakub@redhat.com>
4745 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4746 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4748 2016-05-25 Marek Polacek <polacek@redhat.com>
4751 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4754 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4756 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4758 * c-parser.c (c_parser_oacc_declare): Add support for
4759 GOMP_MAP_FIRSTPRIVATE_POINTER.
4760 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4761 argument with enum c_omp_region_type ort.
4762 (handle_omp_array_sections): Likewise. Update call to
4763 handle_omp_array_sections_1.
4764 (c_finish_omp_clauses): Add specific errors and warning messages for
4765 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4766 call to handle_omp_array_sections.
4768 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4770 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4772 2016-05-24 Richard Biener <rguenther@suse.de>
4776 * c-typeck.c (build_array_ref): Do not complain about indexing
4777 non-lvalue vectors. Adjust for function name change.
4779 2016-05-20 Martin Sebor <msebor@redhat.com>
4782 * c-typeck.c (error_init): Use
4783 expansion_point_location_if_in_system_header.
4784 (warning_init): Same.
4786 2016-05-19 David Malcolm <dmalcolm@redhat.com>
4789 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4791 (c_parser_postfix_expression): Likewise.
4792 * c-tree.h (c_expr::set_error): New method.
4793 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4794 that result's range is initialized.
4796 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4798 * c-typeck.c (parser_build_unary_op): Fix formatting.
4800 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4802 * c-decl.c (grokdeclarator): Remove errmsg and use of
4803 targetm.invalid_return_type.
4804 (grokparms): Remove errmsg and use of
4805 targetm.invalid_parameter_type.
4807 2016-05-13 Joseph Myers <joseph@codesourcery.com>
4809 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4810 function return type.
4812 2016-05-12 Marek Polacek <polacek@redhat.com>
4815 * c-decl.c (build_compound_literal): Pass LOC down to
4816 c_incomplete_type_error.
4817 * c-tree.h (require_complete_type): Adjust declaration.
4818 (c_incomplete_type_error): Likewise.
4819 * c-typeck.c (require_complete_type): Add location parameter, pass it
4820 down to c_incomplete_type_error.
4821 (c_incomplete_type_error): Add location parameter, pass it down to
4823 (build_component_ref): Pass location down to c_incomplete_type_error.
4824 (default_conversion): Pass location down to require_complete_type.
4825 (build_array_ref): Likewise.
4826 (build_function_call_vec): Likewise.
4827 (convert_arguments): Likewise.
4828 (build_unary_op): Likewise.
4829 (build_c_cast): Likewise.
4830 (build_modify_expr): Likewise.
4831 (convert_for_assignment): Likewise.
4832 (c_finish_omp_clauses): Likewise.
4834 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4837 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4839 * c-errors.c (pedwarn_c90): Return true if warned.
4840 * c-tree.h (pedwarn_c90): Change return type to bool.
4841 (enum c_declspec_word): Add new enumerator cdw_atomic.
4843 2016-05-11 Marek Polacek <polacek@redhat.com>
4846 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4847 diagnose_mismatched_attributes and call it.
4849 2016-05-10 Marek Polacek <polacek@redhat.com>
4852 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4853 on a declaration following the definition.
4855 2016-05-05 Jakub Jelinek <jakub@redhat.com>
4857 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4858 parse it through to c_parser_c99_block_statement.
4859 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4862 2016-05-04 Marek Polacek <polacek@redhat.com>
4864 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4867 2016-05-04 Marek Polacek <polacek@redhat.com>
4870 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4871 for macro expansions.
4873 2016-05-03 Marek Polacek <polacek@redhat.com>
4876 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4877 check_builtin_function_arguments.
4879 2016-05-03 Richard Biener <rguenther@suse.de>
4881 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4882 the checksum from the previous stage.
4884 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4886 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4887 c_finish_omp_clauses.
4888 (c_parser_omp_all_clauses): Likewise.
4889 (c_parser_oacc_cache): Likewise.
4890 (c_parser_oacc_loop): Likewise.
4891 (omp_split_clauses): Likewise.
4892 (c_parser_omp_declare_target): Likewise.
4893 (c_parser_cilk_all_clauses): Likewise.
4894 (c_parser_cilk_for): Likewise.
4895 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4896 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4898 2016-05-02 Marek Polacek <polacek@redhat.com>
4901 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4904 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4907 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4908 OACC_LOOP_CLAUSE_MASK.
4909 (c_parser_oacc_kernels_parallel): Update call to
4910 c_oacc_split_loop_clauses.
4912 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
4914 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4915 argument to build_modify_expr in two cases.
4917 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4919 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4920 warn_for_memset instead of warning directly here.
4922 2016-04-26 Marek Polacek <polacek@redhat.com>
4925 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4927 (c_parser_for_statement): ... here.
4928 (c_parser_if_statement): Use it.
4929 (c_parser_switch_statement): Use it.
4930 (c_parser_while_statement): Use it.
4933 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4935 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4938 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4939 instead of c_finish_cilk_clauses.
4940 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4941 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4942 floating-point variables in the linear clause for Cilk Plus.
4944 2016-04-18 Michael Matz <matz@suse.de>
4946 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4947 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4949 2016-04-15 Marek Polacek <polacek@redhat.com>
4952 * c-typeck.c (build_unary_op): Pass location down to error and
4955 2016-04-15 Jakub Jelinek <jakub@redhat.com>
4958 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4960 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4961 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4962 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4963 Adjust c_parser_pragma callers.
4964 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4966 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4968 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4969 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4970 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4971 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4972 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4973 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4974 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4975 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4977 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4978 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4981 2016-04-13 Marek Polacek <polacek@redhat.com>
4984 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4986 (c_parser_statement): Likewise.
4987 (c_parser_c99_block_statement): Likewise.
4988 (c_parser_while_statement): Likewise.
4989 (c_parser_for_statement): Likewise.
4990 (c_parser_if_body): Don't set IF_P here.
4991 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4992 about dangling else here.
4993 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4994 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4995 warn about dangling else here.
4997 2016-04-04 Marek Polacek <polacek@redhat.com>
5000 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5002 2016-03-31 Marek Polacek <polacek@redhat.com>
5005 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5007 2016-03-18 David Malcolm <dmalcolm@redhat.com>
5010 * c-parser.c (c_parser_postfix_expression): Set the source range
5011 for uses of "__builtin_types_compatible_p".
5013 2016-03-17 Jakub Jelinek <jakub@redhat.com>
5016 * c-typeck.c (composite_type): Don't count void_list_node
5017 into len, if the list is terminated by void_list_node, start
5018 with void_list_node instead of NULL for newargs. Stop
5021 2016-03-16 Marek Polacek <polacek@redhat.com>
5024 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5025 nested functions returning VM types.
5027 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5029 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5030 when calling c_finish_omp_clauses.
5032 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5035 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5038 2016-03-04 Marek Polacek <polacek@redhat.com>
5041 * c-parser.c (c_parser_postfix_expression): Call
5042 c_parser_cast_expression rather than c_parser_postfix_expression.
5044 2016-03-01 Jakub Jelinek <jakub@redhat.com>
5048 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5049 of incomplete decls to error_mark_node.
5051 2016-02-24 Marek Polacek <polacek@redhat.com>
5054 * c-decl.c (finish_decl): Don't update the copy of the type of a
5055 different decl type.
5057 2016-02-23 Jakub Jelinek <jakub@redhat.com>
5060 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5061 in id_kind reclassification.
5063 2016-02-16 Jakub Jelinek <jakub@redhat.com>
5066 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5068 2016-02-16 James Norris <jnorris@codesourcery.com>
5071 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5073 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5075 * c-decl.c (build_null_declspecs): Zero the entire struct.
5078 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5079 callers changed. If nested_p is true, use it to call
5080 finish_implicit_inits.
5081 * c-tree.h (finish_implicit_inits): Declare.
5082 * c-typeck.c (finish_implicit_inits): New function. Move code
5084 (push_init_level): ... here.
5085 (set_designator, process_init_element): Call finish_implicit_inits.
5087 2016-02-11 Jakub Jelinek <jakub@redhat.com>
5090 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5091 arguments for -Waddress warning.
5093 2016-02-04 Jakub Jelinek <jakub@redhat.com>
5096 * c-decl.c (finish_enum): When honoring mode attribute,
5097 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5099 2016-01-29 Jakub Jelinek <jakub@redhat.com>
5102 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5103 all type variants, not just TYPE_MAIN_VARIANT.
5105 2016-01-27 Jakub Jelinek <jakub@redhat.com>
5108 * c-decl.c (c_write_global_declarations_1): Warn with
5109 warn_unused_function if static prototype without definition
5112 2016-01-27 Marek Polacek <polacek@redhat.com>
5115 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5116 to unsigned, if needed. Add -Wsign-compare warning.
5118 2016-01-26 Jakub Jelinek <jakub@redhat.com>
5120 PR tree-optimization/69483
5121 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5123 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5126 * c-tree.h (incomplete_record_decls): Declare.
5127 * c-parser.c (incomplete_record_decls): Define.
5128 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5129 report error if any decl has zero size.
5130 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5131 or enum type to incomplete_record_decls.
5133 2016-01-14 Tom de Vries <tom@codesourcery.com>
5135 PR tree-optimization/68773
5136 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5139 2016-01-14 Marek Polacek <polacek@redhat.com>
5142 * c-decl.c (grokdeclarator): Provide more information for invalid
5145 2016-01-06 David Malcolm <dmalcolm@redhat.com>
5147 * c-parser.c (c_parser_unary_expression): For dereferences, build
5148 a combined location before calling build_indirect_ref, so that
5149 error reports cover the full range, manually updating the c_expr
5152 2016-01-06 Marek Polacek <polacek@redhat.com>
5155 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5156 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5159 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5161 Update copyright years.
5163 2016-01-04 Marek Polacek <polacek@redhat.com>
5166 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5167 optimization to use __atomic_fetch_* built-in if possible.
5169 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5171 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5173 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5176 2015-12-22 Marek Polacek <polacek@redhat.com>
5179 * c-typeck.c (build_component_ref): Warn when acessing elements of
5180 atomic structures or unions.
5182 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5184 * c-typeck.c: Include "gcc-rich-location.h".
5185 (build_binary_op): In the two places that call binary_op_error,
5186 create a gcc_rich_location and populate it with the location of
5187 the binary op and its two operands.
5189 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5191 * c-parser.c (c_parser_statement_after_labels): When calling
5192 c_finish_return, Use the return expression's location if it has
5193 one, falling back to the location of the first token within it.
5194 * c-typeck.c (c_finish_return): When issuing warnings about
5195 the incorrect presence/absence of a return value, issue a note
5196 showing the declaration of the function.
5198 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5200 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5202 (c_parser_peek_nth_token): New function.
5203 (c_parser_peek_conflict_marker): New function.
5204 (c_parser_error): Detect conflict markers and report them as such.
5206 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5208 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5209 to preserve range information for the primary expression
5210 in the call to c_parser_postfix_expression_after_primary.
5212 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5214 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5215 expression location, falling back on the first token location,
5216 rather than always using the latter.
5218 2015-12-16 Marek Polacek <polacek@redhat.com>
5221 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5224 2015-12-15 Marek Polacek <polacek@redhat.com>
5227 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5230 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5232 * c-parser.c (c_parser_alignof_expression): Capture location of
5233 closing parenthesis (if any), or of end of unary expression, and
5234 use it to build a src_range for the expression.
5236 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5239 * c-parser.c (c_parser_get_builtin_args): Add
5240 "out_close_paren_loc" param, and write back to it.
5241 (c_parser_postfix_expression): Capture the closing
5242 parenthesis location for RID_CHOOSE_EXPR,
5243 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5244 RID_BUILTIN_SHUFFLE and use it to set the source range
5245 for such expressions; within RID_BUILTIN_COMPLEX set
5246 the underlying location.
5248 2015-12-07 Marek Polacek <polacek@redhat.com>
5251 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5252 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5254 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5256 * c-tree.h (c_build_va_arg): Adjust prototype.
5257 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5258 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5259 parameter, adjust throughout and issue an error if EXPR is a component
5260 with reverse storage order.
5262 2015-12-02 Jason Merrill <jason@redhat.com>
5264 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5265 (c_fully_fold_internal, decl_constant_value_for_optimization):
5266 Move from c-common.c.
5267 * c-tree.h: Declare decl_constant_value_for_optimization.
5268 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5270 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5273 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5274 following link from declarator to next declarator. Track original
5275 qualified type and pass it to c_build_qualified_type.
5276 * c-typeck.c (c_build_qualified_type): Add arguments
5277 orig_qual_type and orig_qual_indirect.
5279 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5281 * c-parser.c (c_parser_omp_clause_name)
5282 (c_parser_oacc_all_clauses): Alphabetical sorting.
5284 2015-12-02 Jakub Jelinek <jakub@redhat.com>
5287 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5290 2015-12-01 Julian Brown <julian@codesourcery.com>
5291 Cesar Philippidis <cesar@codesourcery.com>
5292 James Norris <James_Norris@mentor.com>
5294 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5295 (c_parser_oacc_clause_use_device): New function.
5296 (c_parser_oacc_all_clauses): Add use_device support.
5297 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5298 (c_parser_oacc_host_data): New function.
5299 (c_parser_omp_construct): Add host_data support.
5300 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5301 * c-typeck.c (c_finish_oacc_host_data): New function.
5302 (c_finish_omp_clauses): Add use_device support.
5304 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5307 * c-decl.c: Set TYPE_PACKED in variants.
5309 2015-11-27 Martin Liska <mliska@suse.cz>
5312 * c-array-notation.c (fix_builtin_array_notation_fn):
5313 Use release_vec_vec instead of vec::release.
5314 (build_array_notation_expr): Likewise.
5315 (fix_conditional_array_notations_1): Likewise.
5316 (fix_array_notation_expr): Likewise.
5317 (fix_array_notation_call_expr): Likewise.
5319 2015-11-27 Jakub Jelinek <jakub@redhat.com>
5322 * c-parser.c (c_parser_compound_statement_nostart): If
5323 last_label is true, use pragma_stmt instead of pragma_compound
5324 as second c_parser_pragma argument.
5325 (c_parser_omp_ordered, c_parser_omp_target_update,
5326 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5327 false as second argument to c_parser_skip_to_pragma_eol after
5328 diagnosing standalone directives used in pragma_stmt context.
5330 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5332 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5333 with "if (ENABLE_OFFLOADING)".
5335 2015-11-23 David Malcolm <dmalcolm@redhat.com>
5338 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5339 for various Objective-C constructs: Class.name syntax,
5340 @selector(), @protocol(), @encode(), and [] message syntax.
5342 2015-11-20 David Malcolm <dmalcolm@redhat.com>
5345 * c-typeck.c (should_suggest_deref_p): New function.
5346 (build_component_ref): Special-case POINTER_TYPE when
5347 generating a "not a structure of union" error message, and
5348 suggest a "->" rather than a ".", providing a fix-it hint.
5350 2015-11-19 David Malcolm <dmalcolm@redhat.com>
5352 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5353 candidate into a new function, find_closest_identifier.
5355 2015-11-19 Marek Polacek <polacek@redhat.com>
5358 * c-typeck.c (parser_build_binary_op): Properly handle
5359 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5361 2015-11-17 David Malcolm <dmalcolm@redhat.com>
5363 * c-parser.c (set_c_expr_source_range): Bulletproof both
5364 overloaded implementations against NULL expr->value.
5365 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5367 (c_parser_unary_expression): Likewise when handling addresses of
5369 (c_parser_postfix_expression): Likewise for statement expressions,
5370 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5371 __builtin_va_arg, and for __builtin_offset_of.
5372 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5373 src_range using the range of the braced initializer.
5374 (c_parser_transaction_expression): Set src_range for "ret" to a
5375 sane pair of values.
5377 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5379 * c-parser.c (c_finish_omp_declare_simd): Look for
5380 "simd" attribute as well. Update error message.
5382 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5384 * c-parser.c (c_parser_omp_declare_target): Adjust.
5386 2015-11-14 Jakub Jelinek <jakub@redhat.com>
5388 * c-typeck.c (c_finish_omp_clauses): Don't mark
5389 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5391 2015-11-14 Marek Polacek <polacek@redhat.com>
5393 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5394 * c-typeck.c: Likewise.
5396 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5398 * c-decl.c (warn_defaults_to): Pass line_table to
5400 * c-errors.c (pedwarn_c99): Likewise.
5401 (pedwarn_c90): Likewise.
5402 * c-parser.c (set_c_expr_source_range): New functions.
5403 (c_token::get_range): New method.
5404 (c_token::get_finish): New method.
5405 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5406 based on the range from the start of the LHS to the end of the
5408 (c_parser_conditional_expression): Likewise, based on the range
5409 from the start of the cond.value to the end of exp2.value.
5410 (c_parser_binary_expression): Call set_c_expr_source_range on
5411 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5412 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5413 based on the cast_loc through to the end of the expr.
5414 (c_parser_unary_expression): Likewise, based on the
5415 op_loc through to the end of op.
5416 (c_parser_sizeof_expression) Likewise, based on the start of the
5417 sizeof token through to either the closing paren or the end of
5419 (c_parser_postfix_expression): Likewise, using the token range,
5420 or from the open paren through to the close paren for
5421 parenthesized expressions.
5422 (c_parser_postfix_expression_after_primary): Likewise, for
5423 various kinds of expression.
5424 * c-tree.h (struct c_expr): Add field "src_range".
5425 (c_expr::get_start): New method.
5426 (c_expr::get_finish): New method.
5427 (set_c_expr_source_range): New decls.
5428 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5429 on ret for prefix unary ops.
5430 (parser_build_binary_op): Likewise, running from the start of
5431 arg1.value through to the end of arg2.value.
5433 2015-11-13 Marek Polacek <polacek@redhat.com>
5436 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5438 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5440 * c-typeck.c: Include spellcheck.h.
5441 (lookup_field_fuzzy_find_candidates): New function.
5442 (lookup_field_fuzzy): New function.
5443 (build_component_ref): If the field was not found, try using
5444 lookup_field_fuzzy and potentially offer a suggestion.
5446 2015-11-12 James Norris <jnorris@codesourcery.com>
5447 Joseph Myers <joseph@codesourcery.com>
5449 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5450 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5451 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5452 and PRAGMA_OMP_CLAUSE_LINK.
5453 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5454 and PRAGMA_OACC_CLAUSE_LINK.
5455 (OACC_DECLARE_CLAUSE_MASK): New definition.
5456 (c_parser_oacc_declare): New function.
5458 2015-11-12 Marek Polacek <polacek@redhat.com>
5461 * c-parser.c (c_parser_for_statement): Reclassify the token in
5464 2015-11-11 Marek Polacek <polacek@redhat.com>
5468 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5469 checking the size of an array.
5471 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5473 * c-array-notation.c: Remove unused header files.
5474 * c-aux-info.c: Likewise.
5475 * c-convert.c: Likewise.
5476 * c-decl.c: Likewise.
5477 * c-errors.c: Likewise.
5478 * c-lang.c: Likewise.
5479 * c-objc-common.c: Likewise.
5480 * c-parser.c: Likewise.
5481 * c-typeck.c: Likewise.
5482 * gccspec.c: Likewise.
5484 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5485 Cesar Philippidis <cesar@codesourcery.com>
5486 James Norris <jnorris@codesourcery.com>
5487 Julian Brown <julian@codesourcery.com>
5488 Nathan Sidwell <nathan@codesourcery.com>
5490 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5492 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5493 (c_parser_pragma): Parse 'acc routine'.
5494 (OACC_ROUTINE_CLAUSE_MARK): Define.
5495 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5497 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5500 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5501 location of the backward-goto to the start of the loop body.
5503 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5506 * c-parser.c (c_parser_while_statement): Finish the loop before
5507 parsing ahead for misleading indentation.
5508 (c_parser_for_statement): Likewise.
5510 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5512 * c-decl.c (finish_struct): If the structure has reverse storage
5513 order, rewrite the type of array fields with scalar component. Call
5514 maybe_apply_pragma_scalar_storage_order on entry.
5515 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5516 errors on bit-fields and reverse SSO here and not...
5517 (c_mark_addressable): ...here.
5518 (output_init_element): Adjust call to initializer_constant_valid_p.
5519 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5521 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5523 * c-decl.c (warn_defaults_to): Update for change in signature
5524 of diagnostic_set_info.
5525 * c-errors.c (pedwarn_c99): Likewise.
5526 (pedwarn_c90): Likewise.
5527 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5528 for textinfo::set_location.
5530 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5531 Thomas Schwinge <thomas@codesourcery.com>
5532 James Norris <jnorris@codesourcery.com>
5534 * c-parser.c (c_parser_omp_clause_name): Add support for
5535 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5536 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5537 default(none) in OpenACC.
5538 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5540 (c_parser_oacc_clause_tile): New function.
5541 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5542 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5543 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5545 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5546 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5548 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5549 (c_parser_oacc_update): Update the error message for missing clauses.
5550 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5551 and OMP_CLAUSE_INDEPENDENT.
5553 2015-11-05 Marek Polacek <polacek@redhat.com>
5556 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5557 deal with pre-evaluation on invalid types.
5559 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5560 Ilya Verbin <ilya.verbin@intel.com>
5562 * c-parser.c: Include context.h and gimple-expr.h.
5563 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5564 monotonic together with nonmonotonic.
5565 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5566 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5567 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5568 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5569 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5570 expressions on combined target teams before the target.
5571 (c_parser_omp_declare_target): If decl has "omp declare target" or
5572 "omp declare target link" attribute, and cgraph or varpool node already
5573 exists, then set corresponding flags. Call c_finish_omp_clauses
5574 in the parenthesized extended-list syntax case.
5575 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5577 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5578 on OMP_CLAUSE_REDUCTION array sections.
5579 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5580 into the constant offset, or for variable low-bound using
5581 POINTER_PLUS_EXPR. For structure element based array sections use
5582 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5583 (c_finish_omp_clauses): Drop generic_field_head, structure
5584 elements are now always mapped even as array section bases,
5585 diagnose same var in data sharing and mapping clauses. Diagnose if
5586 linear step on declare simd is neither a constant nor a uniform
5587 parameter. Look through POINTER_PLUS_EXPR for array section
5588 reductions. Diagnose the same var or function appearing multiple
5589 times on the same directive. Fix up wording for the to clause if t
5590 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5591 modifier on kinds other than dynamic or guided or nonmonotonic
5592 modifier together with ordered clause.
5594 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5595 Chung-Lin Tang <cltang@codesourcery.com>
5597 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5599 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5601 * c-array-notation.c: Reorder #include's and remove duplicates.
5602 * c-aux-info.c: Likewise.
5603 * c-convert.c: Likewise.
5604 * c-decl.c: Likewise.
5605 * c-errors.c: Likewise.
5606 * c-lang.c: Likewise.
5607 * c-objc-common.c: Likewise.
5608 * c-parser.c: Likewise.
5609 * c-typeck.c: Likewise.
5611 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
5614 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5615 after calling build_qualified_type.
5617 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5618 Thomas Schwinge <thomas@codesourcery.com>
5619 James Norris <jnorris@codesourcery.com>
5620 Joseph Myers <joseph@codesourcery.com>
5621 Julian Brown <julian@codesourcery.com>
5622 Bernd Schmidt <bschmidt@redhat.com>
5624 * c-parser.c (c_parser_oacc_shape_clause): New.
5625 (c_parser_oacc_simple_clause): New.
5626 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5627 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5629 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5630 James Norris <jnorris@codesourcery.com>
5631 Cesar Philippidis <cesar@codesourcery.com>
5635 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5636 parameters, and handle these. Adjust all users.
5637 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5639 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5641 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5643 (c_finish_omp_construct): Declare function.
5644 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5645 Merge functions into...
5646 (c_finish_omp_construct): ... this new function.
5648 2015-10-22 Richard Biener <rguenther@suse.de>
5650 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5651 before folding a MINUS_EXPR.
5653 2015-10-21 Marek Polacek <polacek@redhat.com>
5656 * c-decl.c (start_function): Warn about vararg functions without
5659 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5661 * c-typeck.c (build_conditional_expr): Use boolean vector
5662 type for vector comparison.
5663 (build_vec_cmp): New.
5664 (build_binary_op): Use build_vec_cmp for comparison.
5666 2015-10-20 Marek Polacek <polacek@redhat.com>
5668 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5670 2015-10-20 Marek Polacek <polacek@redhat.com>
5673 * c-parser.c (c_parser_attributes): Break out of the loop if the
5674 token after an attribute isn't a comma.
5676 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5677 Aldy Hernandez <aldyh@redhat.com>
5679 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5680 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5681 (c_parser_omp_variable_list): Handle structure elements for
5682 map, to and from clauses. Handle array sections in reduction
5683 clause. Formatting fixes.
5684 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5685 if clause modifiers.
5686 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5687 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5688 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5689 c_parser_omp_clause_is_device_ptr): New functions.
5690 (c_parser_omp_clause_ordered): Parse optional parameter.
5691 (c_parser_omp_clause_reduction): Handle array reductions.
5692 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5693 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5695 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5696 (c_parser_omp_clause_depend_sink): New function.
5697 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5698 (c_parser_omp_clause_map): Parse release/delete map kinds and
5699 optional always modifier.
5700 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5701 and c_finish_omp_clauses callers.
5702 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5703 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5704 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5705 (OMP_CRITICAL_CLAUSE_MASK): Define.
5706 (c_parser_omp_critical): Parse critical clauses.
5707 (c_parser_omp_for_loop): Handle doacross loops, adjust
5708 c_finish_omp_for and c_finish_omp_clauses callers.
5709 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5710 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5711 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5712 (c_parser_omp_for): Disallow ordered clause when combined with
5713 distribute. Disallow linear clause when combined with distribute
5714 and not combined with simd.
5715 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5716 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5717 parse clauses and if depend clause is found, don't parse a body.
5718 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5719 Allow target parallel without for after it.
5720 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5721 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5722 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5724 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5725 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5726 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5727 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5729 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5730 defaultmap and is_device_ptr clauses.
5731 (c_parser_omp_target): Parse target parallel and target simd. Set
5732 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5733 and target exit data. Diagnose invalid map kinds.
5734 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5735 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5737 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5739 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5740 (c_parser_omp_taskloop): New function.
5741 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5742 handle PRAGMA_OMP_TASKLOOP.
5743 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5744 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5745 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5746 Add IS_OMP argument, handle structure element bases, diagnose
5747 bitfields, pass IS_OMP recursively, diagnose known zero length
5748 array sections in depend clauses, handle array sections in reduction
5749 clause, diagnose negative length even for pointers.
5750 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5751 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5752 array sections in reduction clause, set
5753 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5754 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5755 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5756 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5758 2015-10-06 Marek Polacek <polacek@redhat.com>
5760 * c-parser.c (c_parser_statement_after_labels): Use
5761 protected_set_expr_location.
5762 (c_parser_omp_clause_num_gangs): Likewise.
5763 (c_parser_omp_clause_num_threads): Likewise.
5764 (c_parser_omp_clause_num_workers): Likewise.
5765 (c_parser_omp_clause_vector_length): Likewise.
5766 (c_parser_omp_clause_num_teams): Likewise.
5767 (c_parser_omp_clause_thread_limit): Likewise.
5768 * c-typeck.c (build_c_cast): Likewise.
5769 (c_cast_expr): Likewise.
5771 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5773 * c-typeck.c (c_tree_equal): Use real_equal instead of
5776 2015-10-04 Jason Merrill <jason@redhat.com>
5778 * c-parser.c (c_lex_one_token): Handle @synchronized.
5779 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5780 can change whether the function is transaction_safe.
5782 2015-10-02 Marek Polacek <polacek@redhat.com>
5785 * c-typeck.c (convert_for_assignment): Use the expansion point
5786 location throughout.
5788 2015-10-02 Marek Polacek <polacek@redhat.com>
5791 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5792 and pass it down to c_parser_if_statement.
5793 (c_parser_else_body): Add CHAIN parameter and pass it down to
5794 c_parser_statement_after_labels.
5795 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5796 duplicated if-else-if conditions.
5798 2015-10-01 Marek Polacek <polacek@redhat.com>
5800 * c-typeck.c (convert_for_assignment): Improve commentary.
5802 2015-09-30 Marek Polacek <polacek@redhat.com>
5805 * c-typeck.c (c_finish_return): Use the expansion point location for
5806 certain "return with value" warnings.
5808 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5810 * c-parser.c (pragma_lex): Add loc argument.
5812 2015-09-15 Marek Polacek <polacek@redhat.com>
5815 * c-decl.c (tag_exists_p): New function.
5816 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5817 struct/union/enum keywords are missing.
5818 * c-tree.h (tag_exists_p): Declare.
5820 2015-09-15 Marek Polacek <polacek@redhat.com>
5822 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5823 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5824 Return NULL_TREE instead of 0.
5825 (lookup_name): Return NULL_TREE instead of 0.
5826 (lookup_name_in_scope): Likewise.
5827 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5828 (parser_xref_tag): Use false instead of 0.
5829 (start_struct): Use true instead of 1.
5830 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5832 2015-09-14 Marek Polacek <polacek@redhat.com>
5834 * c-typeck.c (set_nonincremental_init_from_string): Use
5835 HOST_WIDE_INT_M1U when shifting a negative value.
5837 2015-09-09 Mark Wielaard <mjw@redhat.com>
5839 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5842 2015-09-10 Jakub Jelinek <jakub@redhat.com>
5845 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5846 into OMP_FOR_PRE_BODY rather than before the loop.
5848 2015-09-09 Jakub Jelinek <jakub@redhat.com>
5851 * c-parser.c (c_parser_oacc_all_clauses,
5852 c_parser_omp_all_clauses): Remove invalid clause from
5853 list of clauses even if parser->error is set.
5856 * c-parser.c (c_parser_omp_clause_aligned,
5857 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5859 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5863 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5864 instead of c_parser_unary_expression. If the result is !lvalue_p,
5865 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5867 2015-09-04 Marek Polacek <polacek@redhat.com>
5870 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5872 2015-09-03 Martin Sebor <msebor@redhat.com>
5875 * c-typeck.c (convert_arguments, parser_build_unary_op,
5876 build_conditional_expr, c_cast_expr, convert_for_assignment,
5877 build_binary_op, _objc_common_truthvalue_conversion): Call
5879 (c_decl_implicit): Define.
5881 2015-09-02 Marek Polacek <polacek@redhat.com>
5884 * c-parser.c (c_parser_enum_specifier): Give a better error for
5887 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5889 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5891 2015-08-12 Marek Polacek <polacek@redhat.com>
5893 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5896 2015-08-03 Marek Polacek <polacek@redhat.com>
5899 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5901 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5903 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5905 * c-parser.c (c_parser_if_body): Take token_indent_info
5906 argument. Call warn_for_misleading_indentation even when the
5907 body is a semicolon. Extract token_indent_infos corresponding
5908 to the guard, body and next tokens. Adjust call to
5909 warn_for_misleading_indentation accordingly.
5910 (c_parser_else_body): Likewise.
5911 (c_parser_if_statement): Likewise.
5912 (c_parser_while_statement): Likewise.
5913 (c_parser_for_statement): Likewise.
5915 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5916 Manuel López-Ibáñez <manu@gcc.gnu.org>
5918 * c-decl.c (get_parm_info): Remove static var. Update warning
5921 2015-07-27 Marek Polacek <polacek@redhat.com>
5925 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5927 2015-07-20 Marek Polacek <polacek@redhat.com>
5930 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5931 (build_binary_op): Warn about left shift overflows.
5933 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5935 * c-array-notation.c: Adjust includes for flags.h changes.
5936 * c-objc-common.c: Likewise.
5938 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5940 * c-array-notation.c: Adjust includes.
5941 * c-aux-info.c: Likewise.
5942 * c-convert.c: Likewise.
5943 * c-decl.c: Likewise.
5944 * c-errors.c: Likewise.
5945 * c-lang.c: Likewise.
5946 * c-objc-common.c: Likewise.
5947 * c-parser.c: Likewise.
5948 * c-typeck.c: Likewise.
5950 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5953 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5955 2015-06-29 Marek Polacek <polacek@redhat.com>
5958 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5959 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5960 about -Wswitch-bool here.
5961 (do_case): Update c_add_case_label call.
5962 (c_finish_case): Update c_do_switch_warnings call.
5964 2015-06-27 Marek Polacek <polacek@redhat.com>
5966 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5968 2015-06-26 Marek Polacek <polacek@redhat.com>
5970 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5972 * c-typeck.c (array_to_pointer_conversion): Likewise.
5973 (build_unary_op): Likewise.
5974 (c_finish_return): Likewise.
5976 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5978 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5979 * c-parser.c: Likewise.
5981 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5983 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5984 instead of pointer_hash.
5985 (detect_field_duplicates): Likewise.
5987 2015-06-25 Marek Polacek <polacek@redhat.com>
5989 * c-array-notation.c: Use VAR_P throughout.
5990 * c-decl.c: Likewise.
5991 * c-objc-common.c: Likewise.
5992 * c-parser.c: Likewise.
5993 * c-typeck.c: Likewise.
5995 2015-06-25 Marek Polacek <polacek@redhat.com>
5997 * c-decl.c: Use is_global_var throughout.
5998 * c-parser.c: Likewise.
5999 * c-typeck.c: Likewise.
6001 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
6003 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6004 * c-aux-info.c: Likewise.
6005 * c-convert.c: Likewise.
6006 * c-decl.c: Likewise.
6007 * c-errors.c: Likewise.
6008 * c-lang.c: Likewise.
6009 * c-objc-common.c: Likewise.
6010 * c-parser.c: Likewise.
6011 * c-typeck.c: Likewise.
6013 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
6016 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6019 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6021 * c-decl.c (pop_scope): Register the main translation unit
6022 through the new debug hook.
6024 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
6026 * c-array-notation.c : Adjust include files.
6027 * c-aux-info.c : Likewise.
6028 * c-convert.c : Likewise.
6029 * c-decl.c : Likewise.
6030 * c-errors.c : Likewise.
6031 * c-lang.c : Likewise.
6032 * c-lang.h : Likewise.
6033 * c-objc-common.c : Likewise.
6034 * c-parser.c : Likewise.
6035 * c-typeck.c : Likewise.
6037 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6039 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6040 immediately clobber it.
6041 (c_write_global_declarations_1): Remove call to
6042 check_global_declaration_1.
6043 (c_write_global_declarations_2): Remove.
6044 (c_write_final_cleanups): Rename from c_write_global_declarations.
6045 Remove call to finalize_compilation_unit.
6046 Remove calls to debugging hooks.
6047 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6048 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6049 * c-tree.h: Remove c_write_global_declarations.
6051 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6053 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6054 * c-aux-info.c: Likewise.
6055 * c-convert.c: Likewise.
6056 * c-decl.c: Likewise.
6057 * c-errors.c: Likewise.
6058 * c-lang.c: Likewise.
6059 * c-objc-common.c: Likewise.
6060 * c-parser.c: Likewise.
6061 * c-typeck.c: Likewise.
6063 2015-06-04 Marek Polacek <polacek@redhat.com>
6066 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6069 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6071 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6072 Warn for empty struct.
6073 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6075 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6077 * c-decl.c (start_function): Call plugin before parsing.
6078 (finish_function): Call plugin after parsing.
6080 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6083 * c-decl.c (merge_decls): Merge DECL_COMMON.
6085 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
6087 * Make-lang.in (check_gcc_pallelize): Define.
6089 2015-05-22 Marek Polacek <polacek@redhat.com>
6092 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6095 2015-05-21 Marek Polacek <polacek@redhat.com>
6097 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6100 2015-05-20 Marek Polacek <polacek@redhat.com>
6102 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6103 * c-typeck.c: Likewise.
6105 2015-05-19 Marek Polacek <polacek@redhat.com>
6107 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6109 2015-05-19 Jakub Jelinek <jakub@redhat.com>
6112 * c-parser.c (c_parser_omp_for_loop): Don't add
6113 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6114 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6115 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6118 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6120 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
6123 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6126 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6129 2015-05-14 Marek Polacek <polacek@redhat.com>
6133 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6136 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6138 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6139 to add a call to warn_for_misleading_indentation.
6140 (c_parser_else_body): Likewise, adding param "else_loc".
6141 (c_parser_if_statement): Check for misleading indentation.
6142 (c_parser_while_statement): Likewise.
6143 (c_parser_for_statement): Likewise.
6145 2015-05-08 Marek Polacek <polacek@redhat.com>
6148 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6149 (output_init_element): Likewise.
6151 2015-05-07 Marek Polacek <polacek@redhat.com>
6154 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6157 2015-04-30 Marek Polacek <polacek@redhat.com>
6159 * c-typeck.c (set_init_label): Call error_at instead of error and
6162 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6165 * c-typeck.c (c_build_va_arg): Clarify the error message.
6167 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6169 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6170 OMP_STANDALONE_CLAUSES.
6172 2015-04-28 Marek Polacek <polacek@redhat.com>
6174 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6176 2015-04-28 Marek Polacek <polacek@redhat.com>
6179 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6181 2015-04-25 Marek Polacek <polacek@redhat.com>
6184 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6187 2015-04-23 Marek Polacek <polacek@redhat.com>
6190 * c-decl.c (set_labels_context_r): New function.
6191 (store_parm_decls): Call it via walk_tree_without_duplicates.
6192 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6193 instead of create_tmp_var. Build TARGET_EXPR instead of
6195 (build_atomic_assign): Use create_tmp_var_raw instead of
6196 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6198 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6200 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6201 (c_parser_omp_target_update): Add missed %> to error_at ().
6203 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6206 * c-decl.c (c_default_pointer_mode): Remove definition.
6207 * c-tree.h (c_default_pointer_mode): Remove declaration.
6209 2015-03-27 Tobias Burnus <burnus@net-b.de>
6212 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6214 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6215 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6216 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6218 2015-03-19 Jakub Jelinek <jakub@redhat.com>
6220 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6221 attribute for DECL_EXTERNAL VAR_DECLs.
6223 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6225 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6228 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6231 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6232 before preparing arguments to warn_logical_not_parentheses.
6234 2015-03-09 Jakub Jelinek <jakub@redhat.com>
6237 * c-typeck.c (parser_build_binary_op): Don't warn for
6238 !!x == y or !b == y where b is _Bool.
6240 2015-03-09 Marek Polacek <polacek@redhat.com>
6242 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6243 * c-decl.c (grokdeclarator): Likewise.
6244 * c-typeck.c (build_binary_op): Likewise.
6246 2015-02-27 Marek Polacek <polacek@redhat.com>
6249 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6251 2015-02-14 Marek Polacek <polacek@redhat.com>
6254 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6255 declared through a typedef name.
6257 2015-02-13 Marek Polacek <polacek@redhat.com>
6260 * c-decl.c (grokdeclarator): Print also the type when giving
6261 the error message about array's incomplete element type.
6263 2015-02-11 Jakub Jelinek <jakub@redhat.com>
6266 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6267 check in the POP macro.
6269 2015-02-09 Marek Polacek <polacek@redhat.com>
6272 * c-typeck.c (process_init_element): Don't always wrap
6273 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6274 initializing a range of elements.
6276 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6280 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6282 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
6284 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6285 processing enum declaration.
6287 2015-01-29 Marek Polacek <polacek@redhat.com>
6290 * c-typeck.c (pop_init_level): If constructor_elements has
6291 exactly one element with integer_zerop value, set constructor_zeroinit
6292 to 1. Remove braces around warning_init call.
6294 2015-01-27 Jakub Jelinek <jakub@redhat.com>
6297 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6298 of FUNCTION_DECLs with error_mark_node.
6300 2015-01-26 Jakub Jelinek <jakub@redhat.com>
6303 * c-typeck.c (convert_arguments): Return -1 if there are
6304 error_args, even if we've diagnosed too many arguments.
6306 2015-01-21 Richard Biener <rguenther@suse.de>
6309 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6310 for builtins the user declared correctly.
6312 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6313 Bernd Schmidt <bernds@codesourcery.com>
6314 Cesar Philippidis <cesar@codesourcery.com>
6315 James Norris <jnorris@codesourcery.com>
6316 Jakub Jelinek <jakub@redhat.com>
6317 Ilmir Usmanov <i.usmanov@samsung.com>
6319 * c-parser.c: Include "gomp-constants.h".
6320 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6321 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6322 Use OMP_CLAUSE_SET_MAP_KIND.
6323 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6324 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6325 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6326 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6327 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6328 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6329 "copyout", "create", "delete", "deviceptr", "gang", "host",
6330 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6331 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6332 "present_or_create", "pcreate", "seq", "self", "vector",
6333 "vector_length", "wait", "worker".
6334 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6335 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6336 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6337 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6338 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6339 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6340 (c_parser_oacc_data_clause_deviceptr)
6341 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6342 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6343 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6344 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6345 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6346 (c_parser_oacc_parallel, c_parser_oacc_update)
6347 (c_parser_oacc_wait): New functions.
6348 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6349 (c_finish_oacc_data): New prototypes.
6350 * c-typeck.c: Include "gomp-constants.h".
6351 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6352 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6353 OMP_CLAUSE_SET_MAP_KIND.
6354 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6355 (c_finish_oacc_data): New functions.
6356 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6357 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6358 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6359 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6360 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6361 GOMP_MAP_FORCE_DEVICEPTR.
6363 2015-01-09 Michael Collison <michael.collison@linaro.org>
6365 * c-array-notation.c: Include hash-set.h, machmode.h,
6366 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6367 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6368 * c-aux-info.c: Ditto.
6369 * c-convert.c: Ditto.
6371 * c-errors.c: Ditto.
6372 * c-lang.c: Dittoxs.
6373 * c-objc-common.c: Ditto.
6374 * c-parser.c: Ditto.
6375 * c-typeck.c: Include hash-set.h, machmode.h,
6376 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6377 fold-const.h, wide-int.h, inchash.h, real.h and
6378 fixed-value.h due to flattening of tree.h.
6380 2015-01-07 Marek Polacek <polacek@redhat.com>
6383 * c-typeck.c (process_init_element): Disallow initialization of
6384 a flexible array member with a string constant if the structure
6387 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6390 * c-typeck.c (convert_for_assignment, c_finish_return): For
6391 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6392 types also set in_late_binary_op around convert call.
6393 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6394 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6395 result on expr as last argument to ubsan_instrument_float_cast,
6396 if in_late_binary_op, don't use c_save_expr but save_expr.
6398 Update copyright years.
6400 2015-01-05 Marek Polacek <polacek@redhat.com>
6403 * c-typeck.c (build_array_ref): Pass loc down to
6404 warn_array_subscript_with_type_char.
6406 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6408 * c-typeck.c: New behavious for pointers to arrays with qualifiers
6409 (common-pointer-type): For pointers to arrays take qualifiers from
6411 (build_conditional_expr): Add warnings for lost qualifiers.
6412 (comp-target-types): Allow pointers to arrays with different qualifiers.
6413 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
6414 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
6415 to PEDWARN_FOR_QUALIFIERS.
6417 2014-12-17 Jakub Jelinek <jakub@redhat.com>
6420 * c-convert.c: Include ubsan.h.
6421 (convert): For real -> integral casts and
6422 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6423 instead instrument the float cast directly.
6425 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6427 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6428 c_finish_stmt_expr): Remove NULL last argument from
6429 create_tmp_var_raw and create_tmp_var calls.
6430 * c-array-notation.c (fix_builtin_array_notation_fn,
6431 build_array_notation_expr, fix_conditional_array_notations_1,
6432 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6434 2014-11-28 Marek Polacek <polacek@redhat.com>
6437 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6438 convert the right operand to integer type.
6440 2014-11-25 Marek Polacek <polacek@redhat.com>
6443 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6444 for inline functions.
6446 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6449 * c-typeck.c (build_array_ref): Adjust
6450 convert_vector_to_pointer_for_subscript caller. If it returns true,
6451 call non_lvalue_loc on the result.
6453 2014-11-11 Richard Biener <rguenther@suse.de>
6455 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6458 2014-11-10 Andi Kleen <ak@linux.intel.com>
6461 * c-parser.c (c_parser_statement_after_labels): Call
6463 (c_parser_if_statement): Dito.
6464 (c_parser_switch_statement): Dito.
6465 (c_parser_while_statement): Dito.
6466 (c_parser_do_statement): Dito.
6467 (c_parser_for_statement): Dito.
6468 * c-typeck.c (c_finish_loop): Dito.
6470 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6472 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6473 OPT_Wshift_count_overflow in the warnings.
6475 2014-10-30 Marek Polacek <polacek@redhat.com>
6477 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6478 print the stripped version as well, if they're not the same.
6480 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6482 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6485 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6487 * c-decl.c: Adjust include files.
6488 * c-parser.c: Ditto.
6490 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6491 Tom Tromey <tromey@redhat.com>
6493 * c-tree.h (enum c_oracle_request): New.
6494 (c_binding_oracle_function): New typedef.
6495 (c_binding_oracle, c_pushtag, c_bind): Declare.
6496 * c-decl.c (c_binding_oracle): New global.
6497 (I_SYMBOL_CHECKED): New macro.
6498 (i_symbol_binding): New function.
6499 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6500 (I_TAG_CHECKED): New macro.
6501 (i_tag_binding): New function.
6502 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6503 (I_LABEL_CHECKED): New macro.
6504 (i_label_binding): New function.
6505 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6506 (c_print_identifier): Save and restore c_binding_oracle.
6507 (c_pushtag, c_bind): New functions.
6509 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6511 * c-typeck.c: Adjust include files.
6513 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6516 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6517 initialization here...
6518 (c_initialize_diagnostics): ... but here. Set defaults after
6519 building pretty-printer.
6521 2014-10-23 Marek Polacek <polacek@redhat.com>
6524 * c-decl.c (pop_scope): Don't print warning in external_scope.
6526 2014-10-19 Marek Polacek <polacek@redhat.com>
6529 * c-typeck.c (output_init_element): Allow initializing objects with
6530 static storage duration with compound literals even in C99 and add
6533 2014-10-17 Marek Polacek <polacek@redhat.com>
6536 * c-typeck.c (digest_init): Allow initializing objects with static
6537 storage duration with compound literals even in C99 and add pedwarn
6540 2014-10-17 Marek Polacek <polacek@redhat.com>
6543 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6544 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6545 error multiple times. Print the type.
6547 2014-10-17 Marek Polacek <polacek@redhat.com>
6550 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6553 2014-10-17 Marek Polacek <polacek@redhat.com>
6555 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6556 (start_function): Use OPT_Wimplicit_int instead of 0.
6557 (store_parm_decls_oldstyle): Likewise.
6559 2014-10-17 Alan Modra <amodra@gmail.com>
6562 * c-decl.c (merge_decls): Don't merge section name or tls model
6563 to newdecl symtab node, instead merge to olddecl. Override
6564 existing olddecl section name. Set tls_model for all thread-local
6565 vars, not just OMP thread-private ones. Remove incorrect comment.
6567 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6569 * c-decl.c: Adjust include files.
6571 2014-10-14 DJ Delorie <dj@redhat.com>
6573 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6574 (c_token_starts_typename): Check all __intN, not just __int128.
6575 (c_token_starts_declspecs): Likewise.
6576 (c_parser_declspecs): Likewise.
6577 (c_parser_attribute_any_word): Likewise.
6578 (c_parser_objc_selector): Likewise.
6579 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6580 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6582 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6584 (finish_declspecs): Likewise.
6586 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6588 * c-parser.c (c_parser_all_labels): New function to replace
6590 (c_parser_statement): Call the new function.
6592 2014-10-09 Marek Polacek <polacek@redhat.com>
6595 * c-typeck.c (pop_init_level): Don't warn about initializing
6598 2014-10-07 Marek Polacek <polacek@redhat.com>
6601 * c-decl.c (header_for_builtin_fn): New function.
6602 (implicitly_declare): Suggest which header to include.
6604 2014-10-07 Marek Polacek <polacek@redhat.com>
6606 * c-convert.c (convert): Use error_operand_p.
6607 * c-typeck.c (require_complete_type): Likewise.
6608 (really_atomic_lvalue): Likewise.
6609 (digest_init): Likewise.
6610 (handle_omp_array_sections_1): Likewise.
6612 2014-10-03 Marek Polacek <polacek@redhat.com>
6615 * c-decl.c (pop_scope): Don't warn about "inline function declared
6616 but never defined" for functions marked with gnu_inline attribute.
6618 2014-09-25 Jakub Jelinek <jakub@redhat.com>
6621 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6622 on low_bound and length.
6624 2014-09-24 Marek Polacek <polacek@redhat.com>
6628 * c-parser.c: Don't define CPP_KEYWORD.
6629 (c_parser_switch_statement): Pass original type to c_finish_case.
6630 * c-tree.h (c_finish_case): Update declaration.
6631 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6632 conditionally to c_do_switch_warnings.
6634 2014-09-03 Marek Polacek <polacek@redhat.com>
6637 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6640 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6641 Balaji V. Iyer <balaji.v.iyer@intel.com>
6642 Igor Zamyatin <igor.zamyatin@intel.com>
6644 * c-parser.c (c_parser_cilk_for): New function.
6645 (c_parser_cilk_grainsize): Likewise.
6646 (c_get_temp_regvar): Likewise.
6647 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6648 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6649 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6650 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6653 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6655 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6656 with using HOST_WIDE_INT without truncation to 'int'
6658 2014-08-22 Marek Polacek <polacek@redhat.com>
6661 * c-typeck.c (parser_build_binary_op): Adjust call to
6662 warn_logical_not_parentheses.
6664 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6667 * c-parser.c (c_parser_array_notation): Check for correct
6668 type of an array added.
6670 2014-08-19 Marek Polacek <polacek@redhat.com>
6673 * c-typeck.c (build_binary_op): If either operand of a comparison
6674 is a boolean expression, call maybe_warn_bool_compare.
6676 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6679 * c-typeck.c (build_c_cast): Do a conversion even when the
6680 TYPE_MAIN_VARIANTs are the same.
6682 2014-08-19 Marek Polacek <polacek@redhat.com>
6684 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6685 pedwarn_c99 instead of pedwarn.
6686 (grokfield): Likewise.
6687 (warn_defaults_to): New function.
6688 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6689 Unconditionally call pedwarn_c99 instead of pedwarn.
6690 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6691 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6692 check flag_isoc11 before.
6693 * c-errors.c (pedwarn_c99): Change the return type to bool.
6694 Handle -Wc99-c11-compat.
6695 * c-parser.c (disable_extension_diagnostics): Handle
6696 warn_c99_c11_compat.
6697 (restore_extension_diagnostics): Likewise.
6698 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6699 instead of pedwarn, don't check flag_isoc11 before.
6700 (c_parser_declspecs): Likewise.
6701 (c_parser_alignas_specifier): Likewise.
6702 (c_parser_alignof_expression): Likewise.
6703 (c_parser_generic_selection): Likewise.
6704 * c-tree.h (pedwarn_c99): Update declaration.
6705 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6708 2014-08-19 Marek Polacek <polacek@redhat.com>
6710 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6712 * c-errors.c: Include "opts.h".
6713 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6714 * c-parser.c (disable_extension_diagnostics): Handle negative value
6715 of warn_c90_c99_compat, too.
6716 (restore_extension_diagnostics): Likewise.
6717 (c_parser_compound_statement_nostart): Pass
6718 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6720 2014-08-12 Marek Polacek <polacek@redhat.com>
6722 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6724 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6726 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6728 2014-08-10 Marek Polacek <polacek@redhat.com>
6731 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6732 Call pedwarn_c90 instead of pedwarn.
6733 (check_bitfield_type_and_width): Likewise.
6734 (declspecs_add_qual): Likewise.
6735 (declspecs_add_type): Likewise.
6736 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6737 Adjust to only call pedwarn_c90.
6738 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6739 pedwarn_c90 instead of pedwarn.
6740 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6741 * c-parser.c (disable_extension_diagnostics): Handle
6742 warn_c90_c99_compat.
6743 (restore_extension_diagnostics): Likewise.
6744 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6745 pedwarn_c90 instead of pedwarn.
6746 (c_parser_initelt): Likewise.
6747 (c_parser_postfix_expression): Likewise.
6748 (c_parser_postfix_expression_after_paren_type): Likewise.
6749 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6750 * c-tree.h: Fix formatting.
6751 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6752 pedwarn_c90 instead of pedwarn.
6754 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6756 * c-typeck.c: Remove include of pointer-set.h.
6758 2014-08-07 Marek Polacek <polacek@redhat.com>
6760 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6762 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6764 * c-typeck.c: Use hash_map instead of pointer_map.
6766 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6768 * c-decl.c: Use hash_set instead of pointer_set.
6770 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6773 * c-array-notation.c (expand_array_notations): Handling
6776 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
6779 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6782 2014-07-30 Tom Tromey <tromey@redhat.com>
6784 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6786 (really_start_incremental_init, push_init_level): Initialize
6788 (pop_init_level): Set global designator_depth.
6789 (process_init_element): Check for designated_init attribute.
6791 2014-07-20 Marek Polacek <polacek@redhat.com>
6794 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6795 (implicitly_declare): Pass location to implicit_decl_warning.
6797 2014-07-14 Jakub Jelinek <jakub@redhat.com>
6800 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6801 If non-NULL, call c_parser_check_literal_zero.
6802 (c_parser_check_literal_zero): New function.
6803 (c_parser_postfix_expression_after_primary): Adjust
6804 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6806 2014-07-06 Marek Polacek <polacek@redhat.com>
6809 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6810 * c-tree.h (C_ARRAY_PARAMETER): Define.
6811 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6814 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
6815 Chen Gang <gang.chen.5i5j@gmail.com>
6817 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6820 2014-07-01 Marek Polacek <polacek@redhat.com>
6822 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6823 instead of 0 to WARN_FOR_ASSIGNMENT.
6825 2014-07-01 Marek Polacek <polacek@redhat.com>
6828 * c-typeck.c (convert_for_assignment): Pass
6829 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6831 2014-06-30 Marek Polacek <polacek@redhat.com>
6833 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6834 has no_sanitize_undefined attribute.
6836 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6839 * c-array-notation.c (fix_builtin_array_notation_fn):
6840 Check for 0 arguments in builtin call. Check that bultin argument is
6842 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6845 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6847 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6848 qualifiers in __auto_type for atomic types.
6849 (c_parser_typeof_specifier): Discard all type qualifiers in
6850 __typeof__ for atomic types.
6852 2014-06-25 Marek Polacek <polacek@redhat.com>
6855 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6856 the return expression to c_finish_return.
6858 2014-06-25 Jakub Jelinek <jakub@redhat.com>
6860 * c-typeck.c (c_finish_omp_clauses): Make sure
6861 OMP_CLAUSE_LINEAR_STEP has correct type.
6863 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6867 2014-06-24 Jakub Jelinek <jakub@redhat.com>
6869 * c-parser.c (c_parser_omp_for_loop): For
6870 #pragma omp parallel for simd move lastprivate clause from parallel
6871 to for rather than simd.
6873 2014-06-23 Marek Polacek <polacek@redhat.com>
6875 * c-typeck.c (parser_build_binary_op): Don't call
6876 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6878 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6880 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6881 * c-decl.c (merge_decls): Likewise.
6883 2014-06-09 Marek Polacek <polacek@redhat.com>
6886 * c-typeck.c (error_init): Call inform instead of error_at.
6887 (pedwarn_init): Call inform instead of pedwarn.
6888 (warning_init): Call inform instead of warning_at.
6890 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
6892 * c-decl.c (merge_decls): Use set_decl_section_name.
6893 (duplicate_decls): Remove node if it exists.
6895 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6898 * c-typeck.c (push_init_level, process_init_element,
6899 pop_init_level): Correct check for zero initialization, move
6900 missing brace warning to respect zero initialization.
6902 2014-06-05 Marek Polacek <polacek@redhat.com>
6905 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6907 2014-06-05 Marek Polacek <polacek@redhat.com>
6910 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6911 on the left hand side operand of a comparison.
6913 2014-06-05 Marek Polacek <polacek@redhat.com>
6916 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6917 Print note only if the warning was printed.
6919 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6922 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6925 2014-06-03 Marek Polacek <polacek@redhat.com>
6928 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6930 * c-tree.h (c_start_case): Update.
6931 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6932 switch condition has boolean value.
6934 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
6936 * c-decl.c: Include builtins.h.
6937 * c-parser.c: Likewise.
6939 2014-05-27 Marek Polacek <polacek@redhat.com>
6942 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6943 error and warning calls to error_at and warning_at. Pass location of
6944 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6945 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6946 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6948 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6951 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6952 function parameters.
6954 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
6956 * c-decl.c (merge_decls): Preserve symtab node pointers.
6957 (duplicate_decls): Free new decl.
6959 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6961 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6964 * c-parser.c (c_parser_omp_target): Return bool values.
6966 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6968 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6969 num_teams_loc variable to num_thread_limit_loc.
6971 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6973 * c-array-notation.c (expand_array_notations): Use void_node
6974 instead of void_zero_node.
6976 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6978 * c-decl.c (finish_struct): Adjust.
6979 (finish_enum): Likewise.
6981 (record_inline_static): Likewise.
6982 (push_scope): Likewise.
6983 (make_label): Likewise.
6984 (lookup_label_for_goto): Likewise.
6985 (finish_struct): Likewise.
6986 (finish_enum): Likewise.
6987 (store_parm_decls): Likewise.
6988 (c_push_function_context): Likewise.
6989 * c-lang.h: Remove usage of variable_size gty attribute.
6990 * c-parser.c (c_parse_init): Adjust.
6991 (c_parse_file): Likewise.
6993 2014-05-13 Marek Polacek <polacek@redhat.com>
6996 * c-typeck.c (convert_for_assignment): Pass location to
6997 WARN_FOR_ASSIGNMENT instead of input_location.
6999 2014-05-10 Marek Polacek <polacek@redhat.com>
7001 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7002 maybe_warn_string_init.
7003 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7004 maybe_warn_string_init.
7005 * c-tree.h (maybe_warn_string_init): Update declaration.
7006 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7007 Call pedwarn_init with loc instead of with input_location.
7008 (digest_init): Pass init_loc to maybe_warn_string_init.
7009 (pop_init_level): Call pedwarn_init with loc instead of with
7011 (set_init_index): Likewise.
7012 (process_init_element): Likewise.
7014 2014-05-09 Marek Polacek <polacek@redhat.com>
7017 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7018 (c_parser_initelt): Pass location to set_init_label. Pass array index
7019 location to set_init_index.
7020 * c-tree.h (push_init_level): Update declaration.
7021 (pop_init_level): Likewise.
7022 (set_init_index): Likewise.
7023 (set_init_label): Likewise.
7024 * c-typeck.c (error_init): Add location parameter. Call error_at
7026 (digest_init): Pass init_loc to error_init.
7027 (really_start_incremental_init):
7028 (push_init_level): Add location parameter. Pass loc to pop_init_level
7030 (pop_init_level): Likewise.
7031 (set_designator): Add location parameter. Pass loc to pop_init_level,
7032 push_init_level, and error_init.
7033 (set_init_index): Add location parameter. Pass loc to error_init and
7035 (set_init_label): Likewise.
7036 (output_init_element): Pass loc to error_init.
7037 (process_init_element): Pass loc to error_init, pop_init_level,
7038 pedwarn_init, and push_init_level.
7040 2014-05-09 Marek Polacek <polacek@redhat.com>
7043 * c-parser.c (c_parser_attributes): Parse the arguments as an
7044 expression-list if the attribute takes identifier.
7046 2014-05-08 Marek Polacek <polacek@redhat.com>
7049 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7052 2014-05-08 Marek Polacek <polacek@redhat.com>
7055 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7058 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7059 Mike Stump <mikestump@comcast.net>
7060 Richard Sandiford <rdsandiford@googlemail.com>
7062 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7063 (finish_enum): Use wide-int interfaces.
7064 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7065 * c-typeck.c (build_c_cast): Likewise.
7066 (set_nonincremental_init_from_string): Likewise.
7067 (c_tree_equal): Likewise.
7069 2014-05-02 Marek Polacek <polacek@redhat.com>
7072 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7073 Return size_one_node when the type is not complete.
7074 (pointer_diff): Remove comment.
7075 (build_unary_op): Improve error messages.
7077 2014-05-02 Marek Polacek <polacek@redhat.com>
7079 * c-typeck.c (c_finish_return): Separate warning_at calls.
7081 2014-05-02 Marek Polacek <polacek@redhat.com>
7083 * c-tree.h (error_init): Remove declaration.
7084 (pedwarn_init): Likewise.
7085 * c-typeck.c (error_init): Make static and move above.
7086 (pedwarn_init): Likewise.
7087 (warning_init): Move above.
7088 (maybe_warn_string_init): Likewise.
7090 2014-05-01 Jeff Law <law@redhat.com>
7094 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7095 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7098 2014-05-02 Marek Polacek <polacek@redhat.com>
7101 * c-typeck.c (push_init_level): Set constructor_designated to
7102 p->designated for structures.
7104 2014-05-01 Marek Polacek <polacek@redhat.com>
7107 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7108 function-definition has an attribute after the declarator.
7110 2014-05-01 Marek Polacek <polacek@redhat.com>
7113 * c-typeck.c (warning_init): Add location_t parameter. Call
7114 warning_at instead of warning.
7115 (push_init_level): Pass input_location to warning_init.
7116 (add_pending_init): Add location_t parameter. Pass loc to
7118 (set_nonincremental_init): Pass input_location to add_pending_init.
7119 (set_nonincremental_init_from_string): Likewise.
7120 (output_init_element): Pass loc to warning_init and to
7123 2014-05-01 Marek Polacek <polacek@redhat.com>
7126 * c-typeck.c (c_finish_return): Distinguish between label and variable
7127 when warning about returning local address.
7129 2014-05-01 Marek Polacek <polacek@redhat.com>
7132 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7135 2014-05-01 Marek Polacek <polacek@redhat.com>
7138 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7139 instead of 0 to WARN_FOR_QUALIFIERS.
7141 2014-05-01 Marek Polacek <polacek@redhat.com>
7144 * c-typeck.c (default_conversion): Use better location for
7147 2014-04-30 Marek Polacek <polacek@redhat.com>
7149 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7150 also when SANITIZE_FLOAT_DIVIDE is on.
7152 2014-04-30 Marek Polacek <polacek@redhat.com>
7155 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7156 and pedwarn_init. Use loc insted of input_location.
7158 2014-04-30 Marek Polacek <polacek@redhat.com>
7161 * c-typeck.c (build_binary_op): Use location when warning about
7164 2014-04-25 Marek Polacek <polacek@redhat.com>
7167 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7168 always_inline/noinline and hot/cold attributes.
7170 2014-04-25 Marek Polacek <polacek@redhat.com>
7173 * c-parser.c (c_parser_initelt): Pass input_location to
7174 process_init_element.
7175 (c_parser_initval): Pass loc to process_init_element.
7176 * c-tree.h (process_init_element): Adjust declaration.
7177 * c-typeck.c (push_init_level): Pass input_location to
7178 process_init_element.
7179 (pop_init_level): Likewise.
7180 (set_designator): Likewise.
7181 (output_init_element): Add location_t parameter. Pass loc to
7183 (output_pending_init_elements): Pass input_location to
7184 output_init_element.
7185 (process_init_element): Add location_t parameter. Pass loc to
7186 output_init_element.
7188 2014-04-24 Jakub Jelinek <jakub@redhat.com>
7190 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7191 atomic-clause, allow comma in between atomic-clause and
7194 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7197 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7198 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7200 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7203 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7204 create_tmp_var instead build_decl for creating temps.
7205 (build_array_notation_expr): Likewise.
7206 (fix_conditional_array_notations_1): Likewise.
7207 (fix_array_notation_expr): Likewise.
7208 (fix_array_notation_call_expr): Likewise.
7210 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7213 * c-tree.h (c_build_function_call_vec): New prototype.
7214 * c-typeck.c (build_function_call_vec): Don't call
7215 resolve_overloaded_builtin here.
7216 (c_build_function_call_vec): New wrapper function around
7217 build_function_call_vec. Call resolve_overloaded_builtin here.
7218 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7219 Call c_build_function_call_vec instead of build_function_call_vec.
7220 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7221 * c-decl.c (finish_decl): Likewise.
7223 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7226 * c-typeck.c: Use correct format string in cast-qual warning
7228 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7230 * c-decl.c (c_decl_attributes): Use
7231 lang_hooks.types.omp_mappable_type.
7232 * c-typeck.c (c_finish_omp_clauses): Likewise.
7234 2014-03-06 Marek Polacek <polacek@redhat.com>
7237 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7238 of checking tree code.
7240 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7242 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7243 (c_parser_parameter_declaration): Likewise.
7245 2014-02-19 Marek Polacek <polacek@redhat.com>
7248 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7249 Call mark_exp_read on exp.value.
7250 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7251 TREE_ADDRESSABLE on old instead of val.
7252 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7254 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7256 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7257 C_EXPR_APPEND by vec_safe_push.
7258 * c-tree.h (C_EXPR_APPEND): Remove.
7260 2014-01-31 Marek Polacek <polacek@redhat.com>
7263 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7264 build_function_call_vec.
7265 (build_function_call): Likewise.
7266 (build_atomic_assign): Likewise.
7267 (build_function_call_vec): Add arg_loc parameter. Use it.
7268 (convert_arguments): Likewise.
7269 (convert_for_assignment): Rename rhs_loc to expr_loc.
7270 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7271 (c_parser_objc_keywordexpr): Likewise.
7272 (c_parser_postfix_expression_after_primary): Call
7273 build_function_call_vec with expr_loc rather than op_loc.
7274 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7275 build_function_call_vec.
7276 (c_parser_expr_list): Add locations parameter. Fill it with locations
7277 of function arguments.
7278 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7280 2014-01-30 Marek Polacek <polacek@redhat.com>
7283 * c-typeck.c (build_function_call_vec): Use loc parameter.
7284 (convert_arguments): Add location parameter. Use it.
7285 (ep_convert_and_check): Likewise.
7286 (build_atomic_assign): Adjust convert_for_assignment call.
7287 (build_modify_expr): Likewise.
7288 (digest_init): Likewise.
7289 (c_finish_return): Likewise.
7290 (build_conditional_expr): Adjust ep_convert_and_check calls.
7291 (convert_for_assignment): Add rhs_loc parameter. Use it.
7292 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7295 2014-01-30 Richard Biener <rguenther@suse.de>
7298 * c-typeck.c (build_function_call_vec): Do not replace calls
7299 to a function via an incompatible type with a runtime abort.
7301 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7303 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7304 flag_enable_cilkplus with flag_cilkplus.
7305 (c_parser_direct_declarator_inner): Likewise.
7306 (c_parser_attribute_any_word): Likewise.
7307 (c_parser_attributes): Likewise.
7308 (c_parser_compound_statement): Likewise.
7309 (c_parser_statement_after_labels): Likewise.
7310 (c_parser_if_statement): Likewise.
7311 (c_parser_switch_statement): Likewise.
7312 (c_parser_do_statement): Likewise.
7313 (c_parser_for_statement): Likewise.
7314 (c_parser_unary_expression): Likewise.
7315 (c_parser_postfix_expression): Likewise.
7316 (c_parser_postfix_expression_after_primary): Likewise.
7317 (c_parser_postfix_expression_after_primary): Likewise.
7318 (c_parser_omp_clause_name): Likewise.
7319 (c_finish_omp_declare_simd): Likewise.
7320 (c_parser_cilk_verify_simd): Likewise.
7321 * c-typeck.c (build_array_ref): Likewise.
7322 (build_function_call_vec): Likewise.
7323 (convert_arguments): Likewise.
7324 (build_compound_expr): Likewise.
7325 (c_finish_return): Likewise.
7326 (c_finish_if_stmt): Likewise.
7327 (c_finish_loop): Likewise.
7328 (build_binary_op): Likewise.
7330 2014-01-23 Marek Polacek <polacek@redhat.com>
7333 * c-typeck.c (parser_build_binary_op): Use location instead of
7335 (build_binary_op): Pass location to shorten_compare.
7337 2014-01-23 Marek Polacek <polacek@redhat.com>
7340 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7343 2014-01-23 Marek Polacek <polacek@redhat.com>
7346 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7347 of a comma expression.
7348 (emit_side_effect_warnings): Likewise.
7350 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7353 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7354 function to use walk_tree and moved a lot of its functionality to
7355 expand_array_notations.
7356 (expand_array_notations): New function.
7358 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7360 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7361 attribute an attribute without value.
7363 2014-01-23 Jakub Jelinek <jakub@redhat.com>
7366 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7367 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7369 2014-01-22 Marek Polacek <polacek@redhat.com>
7372 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7373 of remove_c_maybe_const_expr on op1 and op2.
7375 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7378 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7379 effects, preevaluate rhs using SAVE_EXPR first.
7381 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7384 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7385 statements with if-elseif statements.
7387 2014-01-06 Marek Polacek <polacek@redhat.com>
7390 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7391 defined bit-field types only in ISO C.
7393 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7395 Update copyright years
7397 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7399 * c-array-notation.c: Use the standard form for the copyright notice.
7401 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7403 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7404 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7405 field in parser is not empty. If not-empty, call the function
7406 c_parser_finish_omp_declare_simd.
7407 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7408 between SIMD-enabled functions and #pragma simd. Added new parameter.
7409 (c_parser_cilk_all_clauses): Modified the usage of the function
7410 c_parser_cilk_clause_vectorlength as mentioned above.
7411 (c_parser_cilk_simd_fn_vector_attrs): New function.
7412 (c_finish_cilk_simd_fn_tokens): Likewise.
7413 (is_cilkplus_vector_p): Likewise.
7414 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7415 "nomask," and "mask" strings in clause name.
7416 (c_parser_omp_all_clauses): Added 3 new case statements:
7417 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7418 PRAGMA_CILK_CLAUSE_NOMASK.
7419 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7420 check for vector attribute and if so call the function
7421 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7422 called the function c_finish_cilk_simd_fn_tokens.
7423 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7424 parser field is non-empty. If so, parse them as you would parse
7425 the omp declare simd pragma.
7426 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7427 Added a check when step is a parameter and flag it as error.
7428 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7429 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7432 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7434 * c-parser.c (c_parser_omp_parallel): Fix description.
7436 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7438 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7439 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7440 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7441 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7443 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7446 * c-parser.c (c_parser_alignas_specifier): Use
7447 c_sizeof_or_alignof_type instead of c_alignof.
7448 (c_parser_alignof_expression): Likewise, with min_alignof
7449 parameter depending on alignof spelling used.
7451 2013-12-04 Marek Polacek <polacek@redhat.com>
7454 * c-decl.c (start_function): Don't warn for missing prototype for
7457 2013-12-03 Marek Polacek <polacek@redhat.com>
7460 * c-decl.c (build_compound_literal): Allow compound literals with
7461 empty initial value.
7463 2013-12-02 Joseph Myers <joseph@codesourcery.com>
7466 * c-typeck.c (build_modify_expr): Diagnose assignment to
7467 expression with array type.
7469 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7472 * c-typeck.c (process_init_element): Do not treat a string as
7473 initializing a whole array when used with a designator for an
7476 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7479 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7480 an inline function following a static declaration.
7482 2013-11-28 Jakub Jelinek <jakub@redhat.com>
7485 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7486 to p_name before calling c_parser_omp_teams instead of after.
7487 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7488 argument. Remove unused p_name variable.
7490 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
7491 Jakub Jelinek <jakub@redhat.com>
7493 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7494 external_scope is NULL.
7496 2013-11-27 Tom de Vries <tom@codesourcery.com>
7497 Marc Glisse <marc.glisse@inria.fr>
7500 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7502 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7504 * c-typeck.c: Add required include files from gimple.h.
7506 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7508 * c-decl.c (define_label, shadow_tag_warned)
7509 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7510 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7511 (declspecs_add_type): Remove use of in_system_header macro.
7512 * c-parser.c (c_parser_unary_expression): Likewise.
7513 * c-typeck.c (store_init_value, process_init_element)
7514 (c_start_case): Likewise.
7516 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7519 * c-parser.c (c_parser_set_source_position_from_token): Remove
7520 reference to in_system_header from comment.
7522 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7524 * c-decl.c (grokdeclarator): Update comment to refer to
7525 tree_to_[su]hwi rather than tree_low_cst.
7527 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7529 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7530 tree_to_uhwi throughout.
7532 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7534 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7537 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7539 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7542 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7544 * c-parser.c (c_parser_cilk_simd): New.
7545 (c_parser_cilk_verify_simd): New.
7546 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7547 (c_parser_omp_for_loop): Add case for NE_EXPR.
7548 Set c_break_label for CILK_SIMD.
7549 (c_parser_cilk_clause_vectorlength): New.
7550 (c_parser_cilk_clause_linear): New.
7551 (c_parser_cilk_clause_name): New.
7552 (c_parser_cilk_all_clauses): New.
7553 * c-typeck.c (build_unary_op): Pass location argument to
7555 (build_modify_expr): Same.
7556 (build_asm_expr): Same.
7557 (c_finish_bc_stmt): Error on break/continue in loops.
7559 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7561 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7563 2013-11-14 Diego Novillo <dnovillo@google.com>
7565 * c-decl.c: Include print-tree.h.
7566 Include stor-layout.h.
7569 Include stringpool.h.
7570 * c-lang.c: Include fold-const.h.
7571 * c-parser.c: Include stringpool.h.
7573 Include stor-layout.h.
7575 Include trans-mem.h.
7576 * c-typeck.c: Include stor-layout.h.
7577 Include trans-mem.h.
7581 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7583 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7584 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7586 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7587 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7589 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7590 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7591 (c_parser_declarator, c_parser_direct_declarator_inner)
7592 (c_parser_parameter_declaration, c_parser_type_name): All callers
7594 (c_parser_declaration_or_fndef): Handle declarations with type
7595 determined from the initializer.
7597 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7599 * c-typeck.c: Include gimplify.h.
7601 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7603 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7604 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7606 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7607 or _Thread_local as appropriate in diagnostics.
7608 (build_null_declspecs): Initialize ret->thread_gnu_p.
7609 (declspecs_add_scspec): Handle either __thread or _Thread_local
7610 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7611 pedantic. Do not disallow _Thread_local extern and _Thread_local
7614 2013-11-07 Joseph Myers <joseph@codesourcery.com>
7615 Andrew MacLeod <amacleod@redhat.com>
7617 * c-aux-info.c (gen_type): Handle atomic qualifier.
7618 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7619 qualifiers when compating types.
7620 (shadow_tag_warned): Handle atomic_p in declspecs.
7621 (quals_from_declspecs): Likewise.
7622 (start_decl): Use c_type_promotes_to when promoting argument
7624 (grokdeclarator): Handle _Atomic.
7625 (get_parm_info): Diagnose any qualifier on "void" as only
7627 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7628 comparing types. Use c_type_promotes_to when promoting argument
7630 (finish_function): Use c_type_promotes_to when promoting argument
7632 (build_null_declspecs): Handle atomic_p in declspecs.
7633 (declspecs_add_qual): Handle RID_ATOMIC.
7634 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7635 (c_token_starts_declspecs): Handle RID_ATOMIC.
7636 (c_parser_declspecs): Handle atomic type specifiers and
7638 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7639 from types of expressions with atomic type.
7640 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7641 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7642 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7643 (c_parser_statement_after_labels, c_parser_switch_statement)
7644 (c_parser_for_statement, c_parser_expr_no_commas)
7645 (c_parser_conditional_expression, c_parser_binary_expression)
7646 (c_parser_cast_expression, c_parser_unary_expression)
7647 (c_parser_postfix_expression)
7648 (c_parser_postfix_expression_after_primary, c_parser_expression):
7649 Use convert_lvalue_to_rvalue.
7650 (c_parser_expression_conv, c_parser_expr_list): Document
7651 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7652 (c_parser_objc_synchronized_statement): Use
7653 convert_lvalue_to_rvalue.
7654 (c_parser_objc_selector): Handle RID_ATOMIC.
7655 (c_parser_objc_receiver, c_parser_array_notation): Use
7656 convert_lvalue_to_rvalue.
7657 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7658 _Atomic (type-name).
7659 (struct c_declspecs): Add atomic_p field.
7660 (convert_lvalue_to_rvalue): Declare.
7661 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7662 corresponding atomic types.
7663 (qualify_type): Don't add _Atomic qualifiers from second argument.
7664 (comp_target_types): Do not allow _Atomic mismatches.
7665 (type_lists_compatible_p): Do not remove atomic qualifiers when
7667 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7668 (build_atomic_assign): New functions.
7669 (build_unary_op): Use build_atomic_assign for atomic increment and
7671 (build_conditional_expr): Do not treat _Atomic void as a qualified
7673 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7674 (find_anonymous_field_with_type, convert_to_anonymous_field)
7675 (convert_for_assignment): Do not remove atomic qualifiers when
7677 (digest_init): Do not accept initialization of arrays of atomic
7678 elements by string constants.
7679 (build_asm_expr): Use convert_lvalue_to_rvalue.
7680 (build_binary_op): Do not treat _Atomic void as a qualified
7683 2013-11-06 DJ Delorie <dj@redhat.com>
7685 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7686 both explicit and builtin, print the location of the explicit one.
7688 2013-11-05 Tobias Burnus <burnus@net-b.de>
7690 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7691 c_parser_omp_distribute, c_parser_omp_teams,
7692 c_parser_omp_target, c_parser_omp_declare): Handle
7695 2013-11-03 Marek Polacek <polacek@redhat.com>
7697 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7699 2013-11-01 Jakub Jelinek <jakub@redhat.com>
7701 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7702 check_dup_generic at the end, unless remove is true.
7703 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7705 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7707 2013-10-31 Jakub Jelinek <jakub@redhat.com>
7709 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7710 with decl that is not pointer nor array.
7712 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7714 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7715 a spawning function is found.
7716 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7717 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7718 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7719 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7721 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7722 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7724 (c_finish_return): Added a check to reject _Cilk_spawn in return
7726 (build_cilk_spawn): New function.
7727 (build_cilk_sync): Likewise.
7728 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
7730 2013-10-27 Tobias Burnus <burnus@net-b.de>
7733 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7734 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7735 (c_parser_statement_after_labels): Update calls.
7737 2013-10-24 Tobias Burnus <burnus@net-b.de>
7740 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7741 Handle PRAGMA_IVDEP.
7742 (c_parser_statement_after_labels): Update call.
7744 2013-10-24 Marek Polacek <polacek@redhat.com>
7746 * c-parser.c (c_parser_struct_declaration): Add a comment.
7747 (c_parser_declarator): Don't allow _Alignas here.
7749 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
7751 * c-parser.c: Include omp-low.h.
7752 * c-typeck.c: Likewise.
7754 2013-10-17 Marek Polacek <polacek@redhat.com>
7757 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7758 Document syntax of the array-declarator.
7759 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7761 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7762 (c_parser_struct_declaration): Likewise.
7763 (c_parser_declarator): Likewise.
7764 (c_parser_direct_declarator_inner): Likewise.
7765 (c_parser_parameter_declaration): Likewise.
7766 (c_parser_type_name): Likewise.
7768 2013-10-11 Jakub Jelinek <jakub@redhat.com>
7770 * c-lang.h (current_omp_declare_target_attribute): New extern
7772 * c-parser.c: Include c-lang.h.
7773 (struct c_parser): Change tokens to c_token *.
7774 Add tokens_buf field. Change tokens_avail type to unsigned int.
7775 (c_parser_consume_token): If parser->tokens isn't
7776 &parser->tokens_buf[0], increment parser->tokens.
7777 (c_parser_consume_pragma): Likewise.
7778 (enum pragma_context): Add pragma_struct and pragma_param.
7779 (c_parser_external_declaration): Adjust
7780 c_parser_declaration_or_fndef caller.
7781 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7782 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7783 Adjust recursive call.
7784 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7786 (c_parser_parameter_declaration): Use pragma_param instead of
7788 (c_parser_compound_statement_nostart, c_parser_label,
7789 c_parser_for_statement): Adjust
7790 c_parser_declaration_or_fndef callers.
7791 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7792 it through to c_parser_conditional_expression.
7793 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7794 pass it through to c_parser_binary_expression. Adjust recursive
7796 (c_parser_binary_expression): Remove prec argument, add
7797 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7798 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7799 binop matches it, use build2 instead of parser_build_binary_op.
7800 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7801 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7802 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7803 Handle pragma_struct and pragma_param the same as pragma_external.
7804 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7805 (c_parser_omp_variable_list): Parse array sections for
7806 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7807 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7808 (c_parser_omp_clause_reduction): Handle user defined reductions.
7809 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7810 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7811 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7812 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7813 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7814 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7815 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7816 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7817 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7818 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7819 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7820 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7821 (c_parser_omp_for_loop): Add CODE argument, pass it through
7822 to c_finish_omp_for. Change last argument to cclauses,
7823 and adjust uses to grab parallel clauses from the array of all
7824 the split clauses. Adjust c_parser_binary_expression,
7825 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7826 (omp_split_clauses): New function.
7827 (c_parser_omp_simd): New function.
7828 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7829 Allow the function to be called also when parsing combined constructs,
7830 and call c_parser_omp_simd when parsing for simd.
7831 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7832 #pragma omp section, require exactly one structured-block instead of
7833 sequence of statements.
7834 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7835 Allow the function to be called also when parsing combined constructs.
7836 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7837 Allow the function to be called also when parsing combined
7839 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7840 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7841 c_parser_omp_teams, c_parser_omp_target_data,
7842 c_parser_omp_target_update, c_parser_omp_target,
7843 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7844 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7845 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7846 (c_parser_omp_construct): Add p_name and mask vars. Handle
7847 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7848 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7849 and c_parser_omp_sections callers.
7850 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7851 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7852 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7853 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7854 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7856 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7857 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7858 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7859 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7860 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7861 * c-typeck.c: Include tree-inline.h.
7862 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7863 handle_omp_array_sections_1, handle_omp_array_sections,
7864 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7865 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7866 user defined reductions.
7867 (c_tree_equal): New function.
7868 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7869 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7870 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7871 c_check_omp_declare_reduction_r): New prototypes.
7872 * c-decl.c (current_omp_declare_target_attribute): New variable.
7873 (c_decl_attributes): New function.
7874 (start_decl, start_function): Use it instead of decl_attributes.
7875 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7876 c_omp_reduction_decl, c_omp_reduction_lookup,
7877 c_check_omp_declare_reduction_r): New functions.
7879 2013-09-25 Tom Tromey <tromey@redhat.com>
7881 * Make-lang.in (c/gccspec.o): Remove.
7882 (CFLAGS-c/gccspec.o): New variable.
7883 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7884 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7885 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7887 2013-09-25 Tom Tromey <tromey@redhat.com>
7889 * Make-lang.in (c/gccspec.o): Don't use subshell.
7891 2013-09-18 Marek Polacek <polacek@redhat.com>
7894 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7895 Remove unnecessary check.
7897 2013-09-18 Marek Polacek <polacek@redhat.com>
7900 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7901 no_sanitize_undefined attribute.
7903 2013-09-13 Kai Tietz <ktietz@redhat.com>
7906 * c-decl.c (c_builtin_function_ext_scope): Remove
7907 wrong assumption that it is never called on prexisting
7910 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7912 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7914 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7916 * c-objc-common.c (c_tree_printer): Tidy.
7918 2013-08-30 Marek Polacek <polacek@redhat.com>
7920 * c-typeck.c (build_binary_op): Add division by zero and shift
7923 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
7924 Joseph Myers <joseph@codesourcery.com>
7927 * c-typeck.c (c_common_type): Prefer double_type_node over
7928 other REAL_TYPE types with the same precision.
7929 (convert_arguments): Likewise.
7931 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7933 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7934 (c_initialize_diagnostics): Call a destructor for the early printer.
7936 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7938 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7939 printer initialization.
7941 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
7944 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7945 check for truth values.
7946 (expand_array_notation_exprs): Added truth values case. Removed an
7947 unwanted else. Added for-loop to walk through subtrees in default
7950 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7952 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7954 2013-07-23 Joseph Myers <joseph@codesourcery.com>
7956 * c-parser.c (struct c_generic_association): Fix typo.
7958 2013-07-23 Tom Tromey <tromey@redhat.com>
7959 Joseph Myers <joseph@codesourcery.com>
7961 * c-parser.c (struct c_generic_association): New.
7962 (c_generic_association_d): New typedef.
7963 (c_parser_generic_selection): New function.
7964 (c_parser_postfix_expression): Handle RID_GENERIC.
7966 2013-07-13 Jason Merrill <jason@redhat.com>
7969 * c-decl.c (finish_struct): Check for too-large class.
7971 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7974 * c-typeck.c (set_init_index): When folding, check for index overflow.
7976 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7978 * c-parser.c (c_parser_array_notation): Removed rejection of array
7979 notations in an array of function pointers.
7981 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7983 * c-array-notation.c (make_triplet_val_inv): New function.
7984 (create_cmp_incr): Likewise.
7985 (create_array_refs): Likewise.
7986 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7987 Also modularized common parts between functions and called the function.
7988 (build_array_notation_expr): Likewise.
7989 (fix_conditional_array_notations_1): Likewise.
7990 (fix_array_notation_expr): Likewise.
7991 (fix_array_notation_call_expr): Likewise.
7993 2013-06-18 Marek Polacek <polacek@redhat.com>
7996 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7998 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8000 * c-array-notation.c (build_array_notation_expr): Reject array notation
8001 mismatch between LHS and RHS even inside a call_expr. Also, removed
8002 a couple while statements that were dead code.
8004 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8006 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8007 excessive precision expressions in function parameters. Also removed
8008 couple unwanted while statements.
8010 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8012 * c-array-notation.c (expand_array_notation_exprs): Added
8013 ARRAY_NOTATION_REF case.
8015 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8017 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8018 function to c-family/array-notation-common.c.
8019 (is_cilkplus_reduce_builtin): Likewise.
8020 (find_rank): Likewise.
8021 (extract_array_notation_exprs): Likewise.
8022 (replace_array_notations): Likewise.
8023 (find_inv_trees): Likewise.
8024 (replace_inv_trees): Likewise.
8025 (contains_array_notation_expr): Likewise.
8026 (find_correct_array_notation_type): Likewise.
8027 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8028 (struct inv_list): Moved this to c-family/array-notation-common.c.
8029 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
8031 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8033 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8034 reduction functions outside the for-loop. Added a check if the fundecl
8035 is non-NULL. Finally, removed an unwanted if-statement, and made the
8038 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8040 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8041 condition of the if-statement matches the rank of else-block and then-
8042 block when array notations are used.
8043 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8044 expression after the entire function body is parsed.
8045 (c_parser_expr_no_commas): Delayed creating array notation expressions
8046 to the end of function parsing.
8047 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8048 whole if-statement instead of just the condition.
8049 (expand_array_notation_exprs): Added MODIFY_EXPR case.
8051 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8054 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8055 array to NULL_TREE if they are unused. Also added a check for the
8056 field to be NULL before its fields are used in future.
8058 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8061 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8062 (build_array_notation_expr): Likewise.
8064 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8066 * c-typeck.c (build_array_ref): Added a check to see if array's
8067 index is greater than one. If true, then emit an error.
8068 (build_function_call_vec): Exclude error reporting and checking
8069 for builtin array-notation functions.
8070 (convert_arguments): Likewise.
8071 (c_finish_return): Added a check for array notations as a return
8072 expression. If true, then emit an error.
8073 (c_finish_loop): Added a check for array notations in a loop
8074 condition. If true then emit an error.
8075 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8076 (build_binary_op): Added a check for array notation expr inside
8077 op1 and op0. If present, we call another function to find correct
8079 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8080 * c-parser.c (c_parser_compound_statement): Check if array
8081 notation code is used in tree, if so, then transform them into
8083 (c_parser_expr_no_commas): Check if array notation is used in LHS
8084 or RHS, if so, then build array notation expression instead of
8086 (c_parser_postfix_expression_after_primary): Added a check for
8087 colon(s) after square braces, if so then handle it like an array
8088 notation. Also, break up array notations in unary op if found.
8089 (c_parser_direct_declarator_inner): Added a check for array
8091 (c_parser_compound_statement): Added a check for array notation in
8092 a stmt. If one is present, then expand array notation expr.
8093 (c_parser_if_statement): Likewise.
8094 (c_parser_switch_statement): Added a check for array notations in
8095 a switch statement's condition. If true, then output an error.
8096 (c_parser_while_statement): Similarly, but for a while.
8097 (c_parser_do_statement): Similarly, but for a do-while.
8098 (c_parser_for_statement): Similarly, but for a for-loop.
8099 (c_parser_unary_expression): Check if array notation is used in a
8100 pre-increment or pre-decrement expression. If true, then expand
8102 (c_parser_array_notation): New function.
8103 * c-array-notation.c: New file.
8104 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
8106 2013-05-23 Mike Stump <mikestump@comcast.net>
8108 * c-typeck.c (convert_for_assignment): Handle references to memory
8111 2013-05-16 Jason Merrill <jason@redhat.com>
8113 * Make-lang.in (cc1$(exeext)): Use link mutex.
8115 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8117 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8118 to simply use OPT_Wpointer_arith.
8119 (build_unary_op): Likewise.
8121 2013-04-03 Jakub Jelinek <jakub@redhat.com>
8124 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8125 argument. If set, or it temporarily for parsing of the first
8126 argument into force_folding_builtin_constant_p.
8127 (c_parser_postfix_expression): Adjust callers.
8129 2013-03-21 Richard Biener <rguenther@suse.de>
8131 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8132 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8134 2013-02-12 Marek Polacek <polacek@redhat.com>
8137 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8140 2013-01-24 Jakub Jelinek <jakub@redhat.com>
8143 * c-typeck.c (set_nonincremental_init_from_string): If
8144 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8146 (process_init_element): Likewise.
8148 2012-12-20 Jakub Jelinek <jakub@redhat.com>
8151 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8152 argument, don't call default_function_array_conversion
8153 nor c_fully_fold here.
8154 (c_parser_asm_statement): Adjust callers.
8155 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8156 and outputs here, and call default_function_array_conversion
8157 on inputs that don't need to be addressable.
8159 2012-12-18 Jakub Jelinek <jakub@redhat.com>
8162 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8163 warning require that both c_common_unsigned_type as well as
8164 c_common_signed_type is the same for both mvl and mvr types.
8166 2012-11-16 Diego Novillo <dnovillo@google.com>
8168 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8170 * c-common.c: Use new vec API in vec.h.
8171 * c-common.h: Likewise.
8172 * c-gimplify.c: Likewise.
8173 * c-pragma.c: Likewise.
8174 * c-pretty-print.c: Likewise.
8175 * c-pretty-print.h: Likewise.
8176 * c-semantics.c: Likewise.
8177 * c-decl.c: Likewise.
8178 * c-parser.c: Likewise.
8179 * c-tree.h: Likewise.
8180 * c-typeck.c: Likewise.
8182 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8185 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8187 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8190 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8191 shadows a function, unless the variable is a function or a
8192 pointer-to-function.
8194 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8197 * c-parser.c (struct c_tree_loc_pair): Removed.
8198 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8199 add location_t * and tree * arguments, fill in array of 3
8200 sizeof_arg trees and corresponding locs.
8201 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8202 c_parser_expr_list callers.
8203 (c_parser_postfix_expression_after_primary): Likewise. Pass
8204 array of 3 sizeof_arg trees and locs (corresponding to first
8205 3 arguments) to sizeof_pointer_memaccess_warning.
8207 2012-10-09 Lawrence Crowl <crowl@google.com>
8209 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8210 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8213 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8216 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8219 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8222 * c-typeck.c: Include c-common.h.
8223 (enum stv_conv): Moved to c-common.h.
8224 (scalar_to_vector): Moved to c-common.c.
8225 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8226 * Make-lang.in: c-typeck.c depends on c-common.h.
8228 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8230 * c-decl.c (c_write_global_declarations): Fix handling of
8233 2012-09-30 Sharad Singhai <singhai@google.com>
8235 * c-decl.c (c_write_global_declarations): Use a different method
8236 to determine if the dump has ben initialized.
8238 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8241 * c-typeck.c (c_cast_expr): When casting to a type requiring
8242 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8245 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8248 * c-typeck.c (build_unary_op): Pass original argument of
8249 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8250 any C_MAYBE_CONST_EXPR, if it has integer operands.
8251 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8252 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8253 to c_objc_common_truthvalue_conversion, then remove any
8254 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8255 c_objc_common_truthvalue_conversion not
8256 c_common_truthvalue_conversion.
8257 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8258 call note_integer_operands for arguments with integer operands
8259 that are not integer constants.
8261 2012-09-13 Jakub Jelinek <jakub@redhat.com>
8264 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8265 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8267 2012-08-31 Jakub Jelinek <jakub@redhat.com>
8270 * c-convert.c (convert): Don't call fold_convert_loc if
8271 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8272 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8273 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8275 2012-08-24 Jakub Jelinek <jakub@redhat.com>
8278 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8279 for nested and empty_ok arguments in the call to
8280 c_parser_declaration_or_fndef.
8282 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8284 * c-tree.h (c_last_sizeof_arg): Declare.
8285 * c-parser.c (struct c_tree_loc_pair): New type.
8286 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8288 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8289 (c_parser_postfix_expression_after_primary): Likewise. Call
8290 sizeof_pointer_memaccess_warning if needed.
8291 (sizeof_ptr_memacc_comptypes): New function.
8292 * c-typeck.c (c_last_sizeof_arg): New global variable.
8293 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8295 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
8297 * c-lang.h (lang_decl): Add variable_size GTY option.
8299 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8301 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8302 * Make-lang.in: Fix dependencies.
8304 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8306 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8307 and add language Makefile hooks.
8308 * config-lang.in: New file.
8309 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8310 add the required "normal" config-lang.in rules.
8311 * c-lang.h: Moved from gcc/ to here.
8312 * c-tree.h: Likewise.
8313 * c-objc-common.c: Likewise.
8314 * c-objc-common.h: Likewise.
8315 * c-typeck.c: Likewise.
8316 * c-convert.c: Likewise.
8317 * c-lang.c: Likewise.
8318 * c-aux-info.c: Likewise.
8319 * c-errors.c: Likewise.
8320 * gccspec.c: Likewise.
8321 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8322 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8324 Copyright (C) 2012-2022 Free Software Foundation, Inc.
8326 Copying and distribution of this file, with or without modification,
8327 are permitted in any medium without royalty provided the copyright
8328 notice and this notice are preserved.