1 2021-02-18 Jakub Jelinek <jakub@redhat.com>
4 * c-typeck.c (c_finish_return): Don't wrap retval into
5 EXCESS_PRECISION_EXPR in functions that return void.
7 2021-02-11 Marek Polacek <polacek@redhat.com>
9 * c-parser.c (c_parser_if_statement): Use vec_free.
11 2021-02-04 Martin Sebor <msebor@redhat.com>
14 * c-decl.c (locate_old_decl): Add type to diagnostic output.
15 (diagnose_mismatched_decls): Same.
16 (start_function): Introduce temporaries for better readability.
17 * c-typeck.c (comptypes_internal): Only consider complete enum
18 types in comparisons with integers.
20 2021-02-01 Martin Sebor <msebor@redhat.com>
23 * c-decl.c (free_attr_access_data): New function.
24 (c_parse_final_cleanups): Call free_attr_access_data.
26 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
28 * c-parser.c (c_parser_omp_clause_detach): New.
29 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
30 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
31 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
32 clause. Prevent use of detach with mergeable and overriding the
33 data sharing mode of the event handle.
35 2021-01-15 Jakub Jelinek <jakub@redhat.com>
37 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
38 unqualified element type and then call c_build_qualified_type on the
41 2021-01-07 Richard Biener <rguenther@suse.de>
43 * gimple-parser.c (c_parser_gimple_compound_statement): Only
44 reallocate loop array if it is too small.
46 2020-12-16 Martin Uecker <muecker@gwdg.de>
49 * c-typeck.c (build_modify_expr): Drop qualifiers.
51 2020-12-16 Martin Uecker <muecker@gwdg.de>
54 * c-parser.c (c_parser_expression): Look into
55 nop expression when marking expressions as read.
57 2020-12-14 Martin Liska <mliska@suse.cz>
60 * c-typeck.c (pointer_diff): Do not emit a top-level
62 (build_binary_op): Likewise.
64 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
66 * c-parser.c (c_parser_omp_allocate): New.
67 (c_parser_omp_construct): Call it.
69 2020-12-09 Richard Biener <rguenther@suse.de>
72 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
75 2020-12-07 Martin Uecker <muecker@gwdg.de>
78 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
79 that drops qualifiers to the end of the function.
81 2020-11-26 Martin Uecker <muecker@gwdg.de>
85 * c-parser.c (c_parser_declaration_or_fndef): Remove
86 redundant code to drop qualifiers of _Atomic types for __auto_type.
87 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
90 2020-11-24 Jakub Jelinek <jakub@redhat.com>
93 * c-parser.c (c_parser_binary_expression): For omp atomic binary
94 expressions, use make_node instead of build2 to avoid checking build2
97 2020-11-23 Joseph Myers <joseph@codesourcery.com>
100 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
101 for comparisons of complete and incomplete pointers.
103 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
105 * c-aux-info.c (gen_type): Support opaque types.
107 2020-11-20 Martin Sebor <msebor@redhat.com>
110 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
112 2020-11-20 Jakub Jelinek <jakub@redhat.com>
115 * Make-lang.in (c.serial): Change from goal to a variable.
116 (.PHONY): Drop c.serial.
118 2020-11-20 Martin Uecker <muecker@gwdg.de>
120 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
122 2020-11-19 Jakub Jelinek <jakub@redhat.com>
125 * c-decl.c (get_parm_array_spec): Bail out of nelts is
128 2020-11-18 Jakub Jelinek <jakub@redhat.com>
130 * Make-lang.in (c.serial): New goal.
131 (.PHONY): Add c.serial c.prev.
132 (cc1$(exeext)): Call LINK_PROGRESS.
134 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
136 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
138 * c-typeck.c (build_asm_expr): Remove an assert checking output
139 absence for asm goto.
141 2020-11-13 Jakub Jelinek <jakub@redhat.com>
143 * c-typeck.c (c_finish_omp_clauses): Don't clear
144 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
146 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
149 * c-parser.c (c_parser_objc_class_definition): Pass the
150 location of the class name to the interface declaration.
152 2020-11-10 Strager Neds <strager.nds@gmail.com>
154 * c-decl.c (merge_decls): Use new overload of
155 set_decl_section_name.
157 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
159 * c-parser.c (c_parser_omp_target_data): Add use of
160 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
161 handled map clause kind.
162 (c_parser_omp_target_enter_data): Likewise.
163 (c_parser_omp_target_exit_data): Likewise.
164 (c_parser_omp_target): Likewise.
165 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
166 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
167 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
168 same struct field access to co-exist on OpenMP construct.
170 2020-11-07 Martin Uecker <muecker@gwdg.de>
172 * c-parser.c (c_parser_label): Implement mixing of labels and code.
173 (c_parser_all_labels): Likewise.
175 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
177 * c-parser.c (c_parser_objc_at_property_declaration):
178 Improve parsing fidelity. Associate better location info
179 with @property attributes. Clean up the interface to
180 objc_add_property_declaration ().
182 2020-11-06 Nathan Sidwell <nathan@acm.org>
184 * c-decl.c (diagnose_mismatched_decls): Rename
185 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
186 (warn_if_shadowing, implicitly_declare, names_builtin_p)
187 (collect_source_refs): Likewise.
188 * c-typeck.c (inform_declaration, inform_for_arg)
189 (convert_for_assignment): Likewise.
191 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
193 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
195 (c_parser_omp_construct): Update call.
197 2020-11-04 Jakub Jelinek <jakub@redhat.com>
200 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
201 find underlying decl to clear in the aligned_head bitmap.
203 2020-11-04 Joseph Myers <joseph@codesourcery.com>
205 * c-decl.c (handle_nodiscard_attribute): New.
206 (std_attribute_table): Add nodiscard.
207 * c-parser.c (c_parser_std_attribute): Expect argument to
208 nodiscard attribute to be a string. Do not special-case ignoring
210 * c-typeck.c (maybe_warn_nodiscard): New.
211 (build_compound_expr, emit_side_effect_warnings): Call
212 maybe_warn_nodiscard.
213 (c_process_expr_stmt, c_finish_stmt_expr): Also call
214 emit_side_effect_warnings if warn_unused_result.
216 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
218 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
220 (finish_init): Likewise.
221 (pop_init_level): Likewise.
223 2020-10-28 Joseph Myers <joseph@codesourcery.com>
225 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
226 error_at for omitted parameter name.
228 2020-10-28 Jakub Jelinek <jakub@redhat.com>
230 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
231 (c_parser_omp_clause_allocate): New function.
232 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
233 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
234 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
235 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
236 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
237 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
238 PRAGMA_OMP_CLAUSE_ALLOCATE.
239 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
241 2020-10-27 Joseph Myers <joseph@codesourcery.com>
243 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
246 2020-10-23 Marek Polacek <polacek@redhat.com>
249 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
250 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
251 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
252 * c-tree.h (char_type_p): Declare.
253 * c-typeck.c (char_type_p): No longer static.
255 2020-10-23 Martin Sebor <msebor@redhat.com>
258 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
260 2020-09-19 Martin Sebor <msebor@redhat.com>
263 * c-decl.c (lookup_last_decl): Define new function.
264 (c_decl_attributes): Call it.
265 (start_decl): Add argument and use it.
266 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
267 (get_parm_array_spec): Define new function.
268 (push_parm_decl): Call get_parm_array_spec.
269 (start_function): Call warn_parm_array_mismatch. Build attribute
270 access and add it to current function.
271 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
272 in forms of array parameters.
273 * c-tree.h (start_decl): Add argument.
275 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
277 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
280 (start_function): Adjust for above change.
281 (c_push_function_context, c_pop_function_context): Likewise.
282 * c-lang.h (struct language_function): Likewise.
283 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
284 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
286 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
287 (c_parser_switch_statement): Adjust break/switch context handling
288 and calls to renamed functions.
289 (c_parser_while_statement): Adjust break/switch context handling and
291 (c_parser_do_statement): Ditto, with DO_STMT respectively.
292 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
293 (c_parser_omp_for_loop): Adjust break/switch context handling.
294 * c-tree.h (c_break_label, c_cont_label): Delete.
295 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
296 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
297 (in_statement, switch_statement_break_seen_p): Declare.
298 (c_start_case, c_finish_case): Renamed to...
299 (c_start_switch, c_finish_switch).
300 (c_finish_bc_stmt): Adjust arguments.
301 * c-typeck.c (build_function_call_vec): Don't try to print
302 statements with %qE format.
303 (struct c_switch): Rename switch_expr field to switch_stmt.
304 Add break_stmt_seen_p field.
305 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
306 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
307 (do_case): Update for changes to struct c_switch.
308 (c_finish_case): Rename to c_finish_switch. Update for changes to
309 struct c_switch and change of representation from SWITCH_EXPR to
311 (c_finish_loop): Delete.
312 (c_finish_bc_stmt): Update to reflect changes to break/continue
313 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
314 of a GOTO_EXPR except for objc foreach loops.
316 2020-09-01 Jakub Jelinek <jakub@redhat.com>
319 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
322 2020-08-28 Martin Sebor <msebor@redhat.com>
325 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
328 2020-08-27 Martin Liska <mliska@suse.cz>
330 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
331 growth function to true.
333 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
336 * c-typeck.c (handle_omp_array_sections_1): Talk about
337 array function parameter in the error message.
339 2020-08-18 Jakub Jelinek <jakub@redhat.com>
342 * c-parser.c (c_parser_generic_selection): Change match_found from bool
343 to int, holding index of the match. Call mark_exp_read on the selector
344 expression and on expressions other than the selected one.
346 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
349 * c-typeck.c (process_init_element): Split test for whether to
350 recurse into a record, union or array into...
351 (initialize_elementwise_p): ...this new function. Don't recurse
352 into a vector type if the initialization value is also a vector.
354 2020-07-31 Richard Biener <rguenther@suse.de>
357 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
358 Define to c_common_finalize_early_debug.
360 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
362 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
363 (c_parser_omp_critical): Permit hint(0) clause without named critical.
364 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
366 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
369 * c-decl.c (finish_decl): Call target hook
370 lower_local_decl_alignment to lower local decl alignment.
372 2020-07-09 Julian Brown <julian@codesourcery.com>
373 Thomas Schwinge <thomas@codesourcery.com>
376 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
377 for standalone attach/detach clauses.
379 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
381 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
382 set, warn for conversion between pointers that point to incompatible
383 scalar storage orders.
385 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
387 * c-parser.c (c_parser_statement_after_labels): Pass correct
388 parameters to c_parser_do_statement.
390 2020-06-16 Jakub Jelinek <jakub@redhat.com>
392 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
394 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
395 premature c_fully_fold. Defer explicit c_fully_fold calls to after
397 * c-tree.h (c_in_omp_for): Declare.
398 * c-typeck.c (c_in_omp_for): Define.
399 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
400 (digest_init): Likewise.
401 (build_binary_op): Likewise.
403 2020-06-16 Jakub Jelinek <jakub@redhat.com>
405 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
406 from kind by comma rather than colon.
408 2020-06-05 Mark Wielaard <mark@klomp.org>
410 * c-decl.c (implicit_decl_warning): When warned and olddecl is
411 an undeclared builtin, then add a fixit header hint, if found.
412 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
413 warning_at about implicit builtin declaration type mismatch.
415 2020-06-03 Mark Wielaard <mark@klomp.org>
417 * c-parser.c (struct c_parser): Add seen_string_literal
419 (c_parser_consume_token): Reset seen_string_literal.
420 (c_parser_error_richloc): Add name_hint if seen_string_literal
421 and next token is a CPP_NAME and we have a missing header
422 suggestion for the name.
423 (c_parser_string_literal): Set seen_string_literal.
425 2020-06-03 Mark Wielaard <mark@klomp.org>
427 * c-parser.c (c_parser_postfix_expression_after_primary): Add
428 scope with matching_parens after CPP_OPEN_PAREN.
430 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
432 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
434 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
436 * Make-lang.in: Remove extra slash.
438 2020-05-19 Martin Liska <mliska@suse.cz>
440 * c-parser.c: Fix typo.
442 2020-05-14 Jakub Jelinek <jakub@redhat.com>
444 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
446 2020-05-07 Richard Biener <rguenther@suse.de>
449 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
452 2020-04-30 Jakub Jelinek <jakub@redhat.com>
455 * c-decl.c (set_labels_context_r): In addition to context-less
456 LABEL_DECLs adjust also LABEL_DECLs with context equal to
457 parent function if any.
458 (store_parm_decls): Adjust comment.
460 2020-04-19 Jakub Jelinek <jakub@redhat.com>
463 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
464 two CPP_COLON tokens.
466 2020-04-17 Jakub Jelinek <jakub@redhat.com>
469 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
472 2020-04-15 Jakub Jelinek <jakub@redhat.com>
475 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
476 requires directive when not at file scope.
478 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
481 * c-decl.c (c_check_in_current_scope): New function.
482 * c-tree.h (c_check_in_current_scope): Declare it.
483 * c-parser.c (c_parser_oacc_declare): Add check that variables
484 are declared in the same scope as the directive. Fix handling
487 2020-04-07 Jakub Jelinek <jakub@redhat.com>
490 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
491 if c_parser_omp_master succeeded.
493 2020-03-23 Jakub Jelinek <jakub@redhat.com>
495 PR gcov-profile/94029
497 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
498 the function_start_locus location. Don't do that afterwards for the
499 __GIMPLE body parsing.
501 2020-03-19 Jakub Jelinek <jakub@redhat.com>
503 PR gcov-profile/94029
504 * c-tree.h (finish_function): Add location_t argument defaulted to
506 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
507 set it to the locus of closing } if non-NULL.
508 (c_parser_compound_statement_nostart): Return locus of closing }.
509 (c_parser_parse_rtl_body): Likewise.
510 (c_parser_declaration_or_fndef): Propagate locus of closing } to
512 * c-decl.c (finish_function): Add end_loc argument, use it instead of
513 input_location to set function_end_locus.
515 2020-03-17 Jakub Jelinek <jakub@redhat.com>
518 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
519 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
520 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
521 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
523 (finish_incomplete_vars): New function, moved from finish_struct. Use
524 relayout_decl instead of layout_decl.
525 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
526 being TYPE_VFIELD. Use finish_incomplete_vars.
527 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
528 finish_incomplete_vars.
529 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
530 also on ENUMERAL_TYPEs.
532 2020-03-16 Jakub Jelinek <jakub@redhat.com>
535 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
537 2020-03-13 Martin Sebor <msebor@redhat.com>
540 * c-decl.c (builtin_structptr_type_count): New constant.
541 (match_builtin_function_types): Reject decls that are incompatible
542 in types pointed to by pointers.
543 (diagnose_mismatched_decls): Adjust comments.
545 2020-03-05 Joseph Myers <joseph@codesourcery.com>
548 * c-typeck.c (pop_init_level): Do not diagnose initializers as
549 empty when initialized type is error_mark_node.
550 (set_designator, process_init_element): Ignore initializers for
551 elements of a variable-size type or of error_mark_node.
553 2020-03-01 Martin Sebor <msebor@redhat.com>
556 * c-decl.c (types_close_enough_to_match): New function.
557 (match_builtin_function_types):
558 (diagnose_mismatched_decls): Add missing inform call to a warning.
560 2020-03-01 Martin Sebor <msebor@redhat.com>
563 * c-typeck.c (build_functype_attribute_variant): New function.
564 (composite_type): Call it.
566 2020-02-25 Jakub Jelinek <jakub@redhat.com>
569 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
570 Rename last argument from probablity to probability.
572 2020-02-13 Jakub Jelinek <jakub@redhat.com>
575 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
576 *expr if it has side effects.
578 2020-01-30 Jeff Law <law@redhat.com>
581 * c-parser.c (c_parser_switch_statement): Make sure to request
582 marking the switch expr as used.
584 2020-01-22 Joseph Myers <joseph@codesourcery.com>
587 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
588 argument with integer operands.
590 2020-01-16 Kerem Kat <keremkat@gmail.com>
593 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
594 to support 4 available tokens.
596 2020-01-15 Joseph Myers <joseph@codesourcery.com>
599 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
600 determine whether to set DECL_CONTEXT.
602 2020-01-13 Joseph Myers <joseph@codesourcery.com>
605 * c-typeck.c (build_c_cast): Check for expressions with integer
606 operands that can occur in an unevaluated part of an integer
607 constant expression and call note_integer_operands as needed.
609 2019-01-08 Richard Biener <rguenther@suse.de>
612 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
615 2020-01-01 Jakub Jelinek <jakub@redhat.com>
617 Update copyright years.
619 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
621 * c-decl.c (collect_source_ref_cb): Delete.
622 (for_each_global_decl): Rename into...
623 (collect_source_refs): ...this. Call collect_source_ref directly.
624 (c_parse_final_cleanups): Always call collect_source_ref on the main
627 2019-12-19 Julian Brown <julian@codesourcery.com>
628 Cesar Philippidis <cesar@codesourcery.com>
630 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
632 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
633 Allow deref (->) in variable lists if true.
634 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
635 Pass to c_parser_omp_variable_list.
636 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
637 call to c_parser_omp_variable_list.
638 (c_parser_oacc_all_clauses): Support attach and detach clauses.
639 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
640 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
641 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
642 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
643 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
644 and detach. Support deref.
645 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
646 GOMP_MAP_ALWAYS_POINTER for OpenACC.
647 (c_oacc_check_attachments): New function.
648 (c_finish_omp_clauses): Check attach/detach arguments for being
649 pointers using above. Support deref.
651 2019-12-19 Julian Brown <julian@codesourcery.com>
652 Maciej W. Rozycki <macro@codesourcery.com>
653 Tobias Burnus <tobias@codesourcery.com>
654 Thomas Schwinge <thomas@codesourcery.com>
656 * c-parser.c (c_parser_omp_clause_name): Support no_create.
657 (c_parser_oacc_data_clause): Likewise.
658 (c_parser_oacc_all_clauses): Likewise.
659 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
660 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
661 PRAGMA_OACC_CLAUSE_NO_CREATE.
662 * c-typeck.c (handle_omp_array_sections): Support
665 2019-12-09 David Malcolm <dmalcolm@redhat.com>
667 * c-objc-common.c (range_label_for_type_mismatch::get_text):
668 Replace label_text ctor calls.
670 2019-12-04 Joseph Myers <joseph@codesourcery.com>
674 * c-typeck.c (convert_lvalue_to_rvalue): Call
675 require_complete_type for arguments not of void types.
676 (build_indirect_ref): Do not diagnose dereferencing pointers to
678 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
680 2019-12-03 Joseph Myers <joseph@codesourcery.com>
683 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
684 old-style parameter definitions.
686 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
690 * c-decl.c (flexible_array_type_p): Move to common code.
692 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
694 * c-decl.c (start_decl): Allow initialization of variables whose
695 size is a POLY_INT_CST.
696 (finish_decl): Use verify_type_context to check whether the target
697 allows variables with a particular type to have static or thread-local
698 storage duration. Don't raise a second error if such variables do
699 not have a constant size.
700 (grokdeclarator): Use verify_type_context to check whether the
701 target allows fields or array elements to have a particular type.
702 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
703 the target allows pointer difference for the types involved.
704 (build_unary_op): Likewise for pointer increment and decrement.
706 2019-11-29 Joseph Myers <joseph@codesourcery.com>
708 * c-parser.c (struct c_parser): Add members raw_tokens and
710 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
711 using previously-lexed raw tokens.
712 (c_parser_peek_nth_token_raw)
713 (c_parser_check_balanced_raw_token_sequence): New functions.
714 (c_parser_nth_token_starts_std_attributes): Use
715 c_parser_check_balanced_raw_token_sequence for Objective-C.
717 2019-11-25 Joseph Myers <joseph@codesourcery.com>
720 * c-decl.c (finish_declspecs): Use int instead of decimal
721 floating-point types if decimal floating-point not supported.
723 2019-11-25 Joseph Myers <joseph@codesourcery.com>
725 * c-tree.h (struct c_declarator): Use a structure for id member.
726 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
727 declarators at the start, not when handling individual declarators
728 later. Use u.id.id instead of u.id.
729 (grokfield): Use u.id.id instead of u.id.
730 (build_id_declarator): Set u.id.id and u.id.attrs.
731 (finish_declspecs): Handle postfix attributes in case of typedef
733 * c-parser.c (c_parser_direct_declarator)
734 (c_parser_direct_declarator_inner): Place declarator for
735 attributes inside that for function or array, not outside. Set
736 u.id.attrs for identifiers.
737 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
738 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
741 2019-11-22 Jakub Jelinek <jakub@redhat.com>
744 * c-decl.c (identifier_global_tag): Define.
746 2019-11-20 Richard Biener <rguenther@suse.de>
749 * c-decl.c (grokdeclarator): Prevent inlining of nested
750 function with VLA arguments.
752 2019-11-20 Joseph Myers <joseph@codesourcery.com>
754 * c-decl.c (c_warn_type_attributes): New function.
755 (groktypename, grokdeclarator, finish_declspecs): Call
756 c_warn_type_attributes before applying attributes to types.
757 * c-tree.h (c_warn_type_attributes): Declare.
759 2019-11-19 Joseph Myers <joseph@codesourcery.com>
761 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
763 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
764 pedwarn for unknown standard attributes and return error_mark_node
767 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
769 * c-parser.c (c_parser_parse_rtl_body): Always call
770 run_rtl_passes, even if startwith pass is not provided.
772 2019-11-15 Joseph Myers <joseph@codesourcery.com>
774 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
775 duplicate standard attributes.
777 2019-11-15 Joseph Myers <joseph@codesourcery.com>
779 * c-decl.c (std_attribute_table): Add maybe_unused.
781 2019-11-15 Joseph Myers <joseph@codesourcery.com>
783 * c-decl.c (std_attribute_table): Add fallthrough.
784 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
785 attribute at top level.
787 2019-11-15 Joseph Myers <joseph@codesourcery.com>
789 * c-decl.c (std_attribute_table): New.
790 (c_init_decl_processing): Register attributes from
792 * c-parser.c (c_parser_attribute_arguments): Add arguments
793 require_string and allow_empty_args. All callers changed.
794 (c_parser_std_attribute): Set require_string argument for
795 "deprecated" attribute.
797 2019-11-14 Joseph Myers <joseph@codesourcery.com>
799 * c-parser.c (c_parser_postfix_expression)
800 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
801 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
803 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
805 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
806 of build_same_sized_truth_vector_type.
807 (build_vec_cmp): Likewise.
809 2019-11-14 Jakub Jelinek <jakub@redhat.com>
811 * c-parser.c (c_parser_omp_context_selector): Don't require score
812 argument to fit into shwi, just to be INTEGER_CST. Diagnose
815 * c-parser.c (c_parser_omp_context_selector): Rename
816 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
817 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
818 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
821 2019-11-14 Joseph Myers <joseph@codesourcery.com>
823 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
824 ctsk_tagfirstref_attrs.
825 (struct c_declspecs): Update description of attrs. Add
826 postfix_attrs and non_std_attrs_seen_p. Increase size of
827 typespec_kind bit-field.
828 (c_warn_unused_attributes): New declaration.
829 (parser_xref_tag): Update prototype.
830 * c-decl.c (c_warn_unused_attributes): New function.
831 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
832 ctsk_tagref_attrs. Handle attribute declarations.
833 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
834 (grokdeclarator): Handle standard attributes.
835 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
836 attributes to incomplete type reference.
837 (xref_tag): Update call to parser_xref_tag.
838 (declspecs_add_addrspace, declspecs_add_type)
839 (declspecs_add_scspec, declspecs_add_attrs): Set
840 non_std_attrs_seen_p.
841 (finish_declspecs): Apply postfix standard attributes to type.
842 * c-parser.c (c_token_starts_declspecs)
843 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
844 (c_parser_next_tokens_start_declaration): Update comments.
845 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
846 parser->tokens[2] to parser->tokens[1].
847 (c_parser_nth_token_starts_std_attributes)
848 (c_parser_std_attribute_specifier_sequence): New functions.
849 (c_parser_declaration_or_fndef): Add arguments have_attrs and
850 attrs. All callers changed. Handle standard attributes.
851 (c_parser_parms_declarator, c_parser_parms_list_declarator)
852 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
854 (c_parser_declspecs): Add arguments start_std_attr_ok and
855 end_std_attr_ok. All callers changed. Handle standard
857 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
858 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
859 (c_parser_compound_statement_nostart, c_parser_all_labels)
860 (c_parser_label, c_parser_statement, c_parser_for_statement):
861 Handle standard attributes.
862 * c-parser.h (c_parser_declspecs): Update prototype.
863 * gimple-parser.c (c_parser_gimple_declaration): Update call to
866 2019-11-12 Martin Liska <mliska@suse.cz>
868 * gimple-parser.c: Do not include params.h.
870 2019-11-12 Martin Liska <mliska@suse.cz>
872 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
873 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
876 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
877 Frederik Harwath <frederik@codesourcery.com>
880 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
881 (c_parser_oacc_kernels_parallel): Rename function to...
882 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
883 (c_parser_omp_construct): Update accordingly.
886 2019-11-11 Jakub Jelinek <jakub@redhat.com>
888 * c-parser.c (c_parser_translation_unit): Diagnose declare target
889 without corresponding end declare target.
891 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
893 * c-convert.c (convert): Only handle vector conversions if one of
894 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
896 * c-typeck.c (build_array_ref): Only allow vector indexing if the
897 vectors satisfy gnu_vector_type_p.
898 (build_unary_op): Only allow unary operators to be applied to
899 vectors if they satisfy gnu_vector_type_p.
900 (digest_init): Only allow by-element initialization of vectors
901 if they satisfy gnu_vector_type_p.
902 (really_start_incremental_init): Likewise.
903 (push_init_level): Likewise.
904 (pop_init_level): Likewise.
905 (process_init_element): Likewise.
906 (build_binary_op): Only allow binary operators to be applied to
907 vectors if they satisfy gnu_vector_type_p.
909 2019-11-08 Joseph Myers <joseph@codesourcery.com>
911 * c-decl.c (grokparms): Convert () in a function definition to
913 (store_parm_decls_oldstyle): Pedwarn for C2x.
914 (store_parm_decls): Update comment about () not generating a
917 2019-11-07 Joseph Myers <joseph@codesourcery.com>
919 * c-parser.c (c_parser_attribute_arguments): New function.
920 Factored out of c_parser_gnu_attribute.
921 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
922 (c_parser_balanced_token_sequence, c_parser_std_attribute)
923 (c_parser_std_attribute_specifier): New functions.
924 (c_parser_transaction_attributes): Use
925 c_parser_std_attribute_specifier.
927 2019-11-07 Joseph Myers <joseph@codesourcery.com>
929 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
930 lex_joined_string and translate_strings_p.
931 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
933 (c_parser_string_literal): New function.
934 (c_parser_static_assert_declaration_no_semi): Use
935 c_parser_string_literal. Do not set lex_untranslated_string.
936 (c_parser_asm_string_literal): Use c_parser_string_literal.
937 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
938 (c_parser_gnu_attributes): Set and restore translate_strings_p
939 instead of lex_untranslated_string.
940 (c_parser_asm_statement): Do not set lex_untranslated_string.
941 (c_parser_asm_operands): Likewise.
942 (c_parser_has_attribute_expression): Set and restore
943 translate_strings_p instead of lex_untranslated_string.
944 (c_parser_postfix_expression): Use c_parser_string_literal.
945 (pragma_lex): Likewise.
946 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
947 (c_parse_file): Set translate_strings_p.
948 * gimple-parser.c (c_parser_gimple_postfix_expression)
949 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
950 * c-parser.c (c_parser_string_literal): Declare function.
952 2019-11-02 Jakub Jelinek <jakub@redhat.com>
954 * c-parser.c (c_finish_omp_declare_variant): Use
955 omp_get_context_selector instead of c_omp_get_context_selector.
957 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
959 * c-tree.h (c_simulate_enum_decl): Declare.
960 * c-decl.c (c_simulate_enum_decl): New function.
961 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
963 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
965 * c-tree.h (c_simulate_builtin_function_decl): Declare.
966 * c-decl.c (c_simulate_builtin_function_decl): New function.
967 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
970 2019-10-28 Martin Sebor <msebor@redhat.com>
973 * c-decl.c (names_builtin_p): Define a new function.
975 2019-10-28 Richard Biener <rguenther@suse.de>
978 * gimple-parser.c (c_parser_parse_gimple_body): Make
979 current_bb the entry block initially to easier recover
981 (c_parser_gimple_compound_statement): Adjust.
983 2019-10-24 Jakub Jelinek <jakub@redhat.com>
985 * c-parser.c (c_finish_omp_declare_variant): Use
986 omp_context_selector_matches instead of
987 c_omp_context_selector_matches.
988 * c-decl.c (c_decl_attributes): Add "omp declare target block"
989 attribute in between declare target and end declare target
992 2019-10-15 Joseph Myers <joseph@codesourcery.com>
994 * c-parser.c (c_parser_attribute_any_word): Rename to
995 c_parser_gnu_attribute_any_word. All callers changed.
996 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
998 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1000 (c_parser_declaration_or_fndef, c_parser_declspecs)
1001 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1002 (c_parser_struct_declaration, c_parser_declarator)
1003 (c_parser_gnu_attribute, c_parser_compound_statement)
1004 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1005 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1006 attribute-related syntax productions.
1008 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1010 * c-objc-common.c (useful_aka_type_p): Replace with...
1011 (get_aka_type): ...this new function. Given the original type,
1012 decide which aka type to print (if any). Only look through typedefs
1013 if user_facing_original_type_p.
1014 (print_type): Update accordingly.
1016 2019-10-14 Jakub Jelinek <jakub@redhat.com>
1018 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1019 into int NESTED, if it is 2, diagnose missing commas in between
1021 (c_parser_omp_context_selector): Pass 2 as last argument to
1022 c_parser_omp_all_clauses.
1024 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1026 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1027 For simd properties, put them directly into TREE_VALUE.
1028 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1029 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1030 add "omp declare variant base" attribute rather than
1031 "omp declare variant".
1033 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1035 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1037 2019-10-10 Jakub Jelinek <jakub@redhat.com>
1039 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1040 true, terminate processing on closing paren and don't skip to end of
1042 (c_parser_omp_declare_simd): Handle also declare variant.
1043 (omp_construct_selectors, omp_device_selectors,
1044 omp_implementation_selectors, omp_user_selectors): New variables.
1045 (c_parser_omp_context_selector,
1046 c_parser_omp_context_selector_specification,
1047 c_finish_omp_declare_variant): New functions.
1048 (c_finish_omp_declare_simd): Handle both declare simd and
1050 (c_parser_omp_declare): Handle declare variant.
1052 2019-10-02 Joseph Myers <joseph@codesourcery.com>
1054 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1057 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1059 * c-objc-common.c (useful_aka_type_p): New function.
1060 (print_type): Use it to decide whether an aka type is worth printing.
1062 2019-09-27 Jakub Jelinek <jakub@redhat.com>
1065 * c-parser.c (c_parser_predefined_identifier): New function.
1066 (c_parser_postfix_expression): Use it.
1067 (c_parser_omp_variable_list): Parse predefined identifiers.
1068 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1069 in shared and firstprivate clauses, even when they are predetermined
1072 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1074 * c-typeck.c (build_function_call_vec): Take the original function
1075 decl as an optional final parameter. Pass all built-in calls to
1076 check_builtin_function_arguments.
1078 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1081 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1082 of identifiers in the external scope only for variables and functions.
1084 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1087 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1089 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1092 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1093 after determining that the first token is not
1094 PRAGMA_GCC_PCH_PREPROCESS.
1096 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1098 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1099 FUNCTION_DECL to the right value in the presence of nested declarators.
1101 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1104 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1106 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1109 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1110 of a built_in_function.
1111 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1113 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1115 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1116 (c_parser_omp_clause_device_type): New function.
1117 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1118 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1119 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1120 diagnostics for declare target with clauses nested in clause-less
1121 declare target declaration-definition-seq.
1122 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1124 2019-08-09 Jakub Jelinek <jakub@redhat.com>
1126 * c-parser.c (check_no_duplicate_clause): Simplify using
1128 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1129 directive name modifiers.
1130 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1133 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1134 check_no_duplicate_clause call. Comment it out, instead emit a
1135 warning for duplicate dist_schedule clauses.
1137 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1139 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1141 2019-08-08 Jakub Jelinek <jakub@redhat.com>
1143 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1144 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1145 instead of generic_head to track duplicates.
1147 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1149 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1150 (c_parser_omp_clause_use_device_addr): New function.
1151 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1152 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1153 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1154 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1155 map or use_device_* clauses.
1156 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1157 in OpenMP, require pointer type rather than pointer or array type.
1158 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1160 2019-07-31 Jakub Jelinek <jakub@redhat.com>
1163 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1164 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1167 2019-07-25 Martin Liska <mliska@suse.cz>
1168 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1171 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1173 2019-07-25 Martin Liska <mliska@suse.cz>
1175 * c-decl.c (merge_decls): Use new macros
1176 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1178 2019-07-23 Richard Biener <rguenther@suse.de>
1180 PR tree-optimization/83518
1181 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1182 a CFG also rebuild cgraph edges.
1184 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1186 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1187 (c_parser_omp_clause_bind): New function.
1188 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1189 (OMP_LOOP_CLAUSE_MASK): Define.
1190 (c_parser_omp_loop): New function.
1191 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1192 loop combined with parallel or teams.
1193 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1194 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1196 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1199 * c-decl.c (finish_function): Check targetm.warn_func_return
1200 before issuing a -Wreturn-type warning.
1202 2019-07-12 Alexandre Oliva <oliva@adacore.com>
1204 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1205 (c_parser_compound_statement): Call it.
1207 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1209 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1210 (c_parser_omp_clause_order): New function.
1211 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1212 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1213 PRAGMA_OMP_CLAUSE_ORDER.
1214 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1216 2019-07-10 Richard Biener <rguenther@suse.de>
1218 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1219 _Literal (int *) &x for address literals.
1221 2019-07-09 Martin Sebor <msebor@redhat.com>
1224 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1226 (field_decl_cmp): Same.
1227 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1229 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1231 2019-07-09 Martin Sebor <msebor@redhat.com>
1234 * c-decl.c: Change class-key from class to struct and vice versa
1235 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1236 * gimple-parser.c: Same.
1238 2019-07-01 Richard Biener <rguenther@suse.de>
1240 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1241 _Literal (char *) &"foo" for address literals pointing to
1244 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1246 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1247 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1248 C incompatibility if alternate "__intN__" form is used.
1250 2019-06-24 Martin Sebor <msebor@redhat.com>
1252 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1254 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1256 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1257 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1258 (c_parser_omp_scan_loop_body): New function.
1259 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1260 inscan reduction clauses.
1261 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1262 non-inscan reductions on the same construct, or inscan reductions with
1263 ordered or schedule clauses, or inscan array reductions.
1265 2019-06-05 Martin Sebor <msebor@redhat.com>
1268 * c-typeck.c (c_finish_return): Only consider functions returning
1269 pointers as candidates for -Wreturn-local-addr.
1271 2019-06-05 Martin Sebor <msebor@redhat.com>
1273 * c-decl.c (start_decl): Adjust quoting and hyphenation
1275 (finish_decl): Same.
1276 (finish_enum): Same.
1277 (start_function): Same.
1278 (declspecs_add_type): Same.
1279 * c-parser.c (warn_for_abs): Same.
1280 * c-typeck.c (build_binary_op): Same.
1282 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1285 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1286 marked with an OpenACC 'routine' directive.
1289 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1290 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1293 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1294 clauses from "omp declare target" attribute.
1296 2019-05-16 Martin Sebor <msebor@redhat.com>
1298 * c-decl.c (start_decl): Quote keywords, operators, and
1299 types in diagnostics.
1300 (finish_decl): Same.
1301 * c-parser.c (c_parser_asm_statement): Same.
1302 (c_parser_conditional_expression): Same.
1303 (c_parser_transaction_cancel): Same.
1304 * c-typeck.c (c_common_type): Same.
1305 (build_conditional_expr): Same.
1306 (digest_init): Same.
1307 (process_init_element): Same.
1308 (build_binary_op): Same.
1310 2019-05-17 Richard Biener <rguenther@suse.de>
1312 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1313 (c_parser_gimple_unary_expression): Likewise.
1314 (c_parser_gimple_parentized_ternary_expression): New function.
1316 2019-05-16 Richard Biener <rguenther@suse.de>
1318 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1319 (c_parser_gimple_unary_expression): Likewise.
1321 2019-05-15 Richard Biener <rguenther@suse.de>
1323 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1326 2019-05-14 Richard Biener <rguenther@suse.de>
1328 * gimple-parser.c (c_parser_gimple_statement): Remove
1329 questionable auto-promotion to VIEW_CONVERT_EXPR.
1330 (c_parser_gimple_typespec): Split out from __MEM parsing.
1331 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1332 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1333 as __VIEW_CONVERT with -gimple.
1335 2019-05-09 Martin Liska <mliska@suse.cz>
1337 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1339 (c_parser_gimple_unary_expression): Parse also binary expression
1341 (c_parser_gimple_parentized_binary_expression): New function.
1343 2019-05-09 Martin Liska <mliska@suse.cz>
1345 * gimple-parser.c (struct gimple_parser): Add probability.
1346 for gimple_parser_edge.
1347 (gimple_parser::push_edge): Add new argument probability.
1348 (c_parser_gimple_parse_bb_spec): Parse also probability
1350 (c_parser_parse_gimple_body): Set edge probability.
1351 (c_parser_gimple_compound_statement): Consume token
1352 before calling c_parser_gimple_goto_stmt.
1354 (c_parser_gimple_statement): Pass new argument.
1355 (c_parser_gimple_goto_stmt): Likewise.
1356 (c_parser_gimple_if_stmt): Likewise.
1357 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1358 * c-parser.c (c_parser_declaration_or_fndef): Pass
1359 hot_bb_threshold argument.
1360 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1362 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1364 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1367 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1368 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1369 (c_parser_do_statement): Likewise.
1370 (c_parser_for_statement): Likewise. Formatting fixes.
1371 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1372 emit DEBUG_BEGIN_STMTs if needed.
1374 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1377 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1378 (c_start_case): Don't clear it.
1379 (do_case): Adjust c_add_case_label caller.
1380 (c_finish_case): Adjust c_do_switch_warnings caller.
1383 * c-decl.c (merge_decls): If remove is main variant and
1384 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1385 variant that has newdecl as TYPE_NAME if any.
1387 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1390 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1391 don't try to remove it from the variant list, but instead assert
1394 2019-04-01 Richard Biener <rguenther@suse.de>
1397 * c-tree.h (c_get_alias_set): Declare.
1398 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1399 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1400 as the underlying integer type.
1402 2019-03-19 Martin Sebor <msebor@redhat.com>
1404 PR tree-optimization/89688
1405 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1406 kinds of initializers.
1408 2019-03-19 Jakub Jelinek <jakub@redhat.com>
1411 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1412 return type even if quals_used is 0. Formatting fixes.
1414 2019-03-14 Richard Biener <rguenther@suse.de>
1416 * c-tree.h (enum c_declspec_il): New.
1417 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1419 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1420 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1421 (c_parser_declspecs): Adjust.
1422 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1423 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1425 (struct gimple_parser): New.
1426 (gimple_parser::push_edge): New method.
1427 (c_parser_gimple_parse_bb_spec): New helper.
1428 (c_parser_parse_gimple_body): Get start pass and IL specification.
1429 Initialize SSA and CFG.
1430 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1431 Build a gimple_parser parsing state and pass it along.
1432 (c_parser_gimple_statement): Change intermittend __PHI internal
1433 function argument for the edge.
1434 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1435 (c_parser_gimple_goto_stmt): Record edges to build.
1436 (c_parser_gimple_if_stmt): Likewise.
1437 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1438 (c_parser_gimple_or_rtl_pass_list): Likewise.
1440 2019-03-11 Martin Liska <mliska@suse.cz>
1442 * c-decl.c (check_for_loop_decls): Wrap an option name
1443 in a string format message and fix GNU coding style.
1444 * c-parser.c (c_parser_declspecs): Likewise.
1446 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1448 PR tree-optimization/89550
1449 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1451 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1452 or warning returned true.
1454 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1457 * c-typeck.c (convert_arguments): Call inform_declaration only if
1458 the previous warning_at call returned true.
1460 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1462 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1463 parameter. Adjust all users.
1464 (c_parser_oacc_simple_clause): Replace parser with loc formal
1465 parameter. Adjust all users.
1467 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1470 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1471 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1473 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1476 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1477 before c_decl_attributes rather than after it.
1479 2019-02-06 Jakub Jelinek <jakub@redhat.com>
1482 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1483 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1484 instead of 3 nested ifs.
1486 2019-02-06 Joseph Myers <joseph@codesourcery.com>
1489 * c-decl.c (finish_decl): Do not complete array types for arrays
1490 with external linkage not at file scope.
1492 2019-02-05 Richard Biener <rguenther@suse.de>
1495 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1496 all type variants when not supported.
1498 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1501 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1502 * c-decl.c (decl_jump_unsafe): Return false for
1503 C_DECL_COMPOUND_LITERAL_P decls.
1504 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1506 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1509 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1513 * c-decl.c (last_fileptr_type): Remove.
1514 (last_structptr_types): New variable.
1515 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1516 {old,new}rettype instead of the types themselves. Assert
1517 last_structptr_types array has the same number of elements
1518 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1519 argument oldtype and newtype. Instead of handling
1520 just fileptr_type_node specially, handle all builtin_structptr_types
1521 pointer nodes. Formatting fix.
1523 2019-01-24 Martin Sebor <msebor@redhat.com>
1528 * c-decl.c (match_builtin_function_types): Add arguments.
1529 (diagnose_mismatched_decls): Diagnose mismatched declarations
1530 of built-ins more strictly.
1532 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1535 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1536 on #pragma omp cancel with different modifiers.
1538 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1542 * c-typeck.c (convert_for_assignment): Upate the
1543 warn_for_address_or_pointer_of_packed_member call.
1545 2019-01-16 Tom Honermann <tom@honermann.net>
1546 Jason Merrill <jason@redhat.com>
1548 * c-typeck.c (digest_init): Revised the error message produced for
1549 ill-formed cases of array initialization with a string literal.
1550 (error_init): Make variadic.
1552 2019-01-12 Jakub Jelinek <jakub@redhat.com>
1554 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1556 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1559 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1560 if current_function_decl is non-NULL.
1562 2019-01-07 Joseph Myers <joseph@codesourcery.com>
1566 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1567 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1568 functions declared but never defined only for external scope, not
1571 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1574 * c-parser.c (c_parser_postfix_expression): Parse
1575 __builtin_convertvector.
1577 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1579 Update copyright years.
1581 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1584 * c-typeck.c (convert_for_assignment): Call
1585 warn_for_address_or_pointer_of_packed_member.
1587 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1589 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1590 a more specific error message (instead of just falling through).
1592 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1594 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1595 asm qualifier is first seen; use that to give nicer "duplicate asm
1596 qualifier" messages. Delete 'quals" variable, instead pass the
1597 "is_volatile_ flag to build_asm_stmt directly.
1598 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1599 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1601 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1603 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1604 "done" boolean variable.
1606 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1609 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1610 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1611 (build_binary_op): Use struct op_location_t and
1612 class binary_op_rich_location.
1614 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1617 * c-convert.c (convert): Call c_fully_fold before calling
1618 ubsan_instrument_float_cast.
1620 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1622 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1625 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1627 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1628 after asm. Pass a flag for it to build_asm_expr.
1629 * c-tree.h (build_asm_expr): Update declaration.
1630 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1633 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1636 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1637 combination of volatile and goto, in any order, without repetitions.
1639 2018-12-04 James Norris <jnorris@codesourcery.com>
1640 Cesar Philippidis <cesar@codesourcery.com>
1641 Julian Brown <julian@codesourcery.com>
1643 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1646 2018-11-30 Richard Biener <rguenther@suse.de>
1648 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1649 _Literal (type) { ... } as empty aggregate or vector constructor.
1651 2018-11-29 Martin Sebor <msebor@redhat.com>
1654 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1655 (convert_arguments): Add comments. Pass additional argument to
1658 2018-11-29 Martin Sebor <msebor@redhat.com>
1662 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1664 2018-11-23 Martin Sebor <msebor@redhat.com>
1667 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1668 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1670 2018-11-20 Martin Sebor <msebor@redhat.com>
1672 * c-parser.c (c_parser_has_attribute_expression): New function.
1673 (c_parser_attribute): New function.
1674 (c_parser_attributes): Move code into c_parser_attribute.
1675 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1677 2018-11-15 Martin Sebor <msebor@redhat.com>
1680 * c-decl.c (header_for_builtin_fn): Declare.
1681 (diagnose_mismatched_decls): Diagnose declarations of built-in
1682 functions without a prototype.
1683 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1684 (convert_argument): Same.
1685 (convert_arguments): Factor code out into convert_argument.
1686 Detect mismatches between built-in formal arguments in calls
1687 to built-in without prototype.
1688 (build_conditional_expr): Same.
1689 (type_or_builtin_type): New function.
1690 (convert_for_assignment): Add argument. Conditionally issue
1691 warnings instead of errors for mismatches.
1693 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1695 * c-decl.c: Replace "source_location" with "location_t".
1696 * c-tree.h: Likewise.
1697 * c-typeck.c: Likewise.
1698 * gimple-parser.c: Likewise.
1700 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1702 * c-parser.c (c_parser_omp_clause_final): Use
1703 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1704 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1705 parsing instead of c_parser_paren_condition.
1706 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1707 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1708 c_fully_fold instead of c_parser_condition.
1709 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1710 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1711 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1712 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1713 c_parser_expr_no_commas instead of c_parser_expression.
1715 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1716 reduction clause with inscan modifier.
1718 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1719 clauses other than atomic_default_mem_order.
1721 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1723 * c-parser.c: Include memmode.h.
1724 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1725 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1726 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1727 task_reduction clauses.
1728 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1729 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1730 section, or lvalue assignment expression.
1731 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1732 (c_parser_omp_clause_lastprivate): Parse optional
1733 conditional: modifier.
1734 (c_parser_omp_clause_hint): Require constant integer expression rather
1735 than just integer expression.
1736 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1738 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1739 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1740 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1742 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1743 iterators. Parse mutexinoutset and depobj kinds.
1744 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1746 (c_parser_omp_all_clauses): Likewise. Handle
1747 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1748 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1749 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1750 default memory order from requires directive if any. Adjust
1751 c_finish_omp_atomic caller.
1752 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1753 (c_parser_omp_flush): Parse flush with memory-order-clause.
1754 (c_parser_omp_for_loop): Allow NE_EXPR even in
1755 OpenMP loops, adjust c_finish_omp_for caller.
1756 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1757 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1758 Allow to be called while parsing combined parallel master.
1759 Parse combined master taskloop{, simd}.
1760 (c_parser_omp_parallel): Parse combined
1761 parallel master{, taskloop{, simd}} constructs.
1762 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1763 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1764 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1765 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1766 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1767 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1768 around teams body. Use SET_EXPR_LOCATION.
1769 (c_parser_omp_target_data): Allow target data
1770 with only use_device_ptr clauses.
1771 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1772 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1773 (c_parser_omp_requires): New function.
1774 (c_finish_taskloop_clauses): New function.
1775 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1776 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1777 declaration. Disallow in_reduction clause when combined with parallel
1779 (c_parser_omp_construct): Adjust c_parser_omp_master and
1780 c_parser_omp_taskgroup callers.
1781 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1783 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1784 like OMP_CLAUSE_REDUCTION.
1785 (handle_omp_array_sections): Likewise. Call save_expr on array
1786 reductions before calling build_index_type. Handle depend clauses
1788 (struct c_find_omp_var_s): New type.
1789 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1790 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1791 with static, runtime or auto schedule kinds. Call save_expr for whole
1792 array reduction sizes. Diagnose reductions with zero sized elements
1793 or variable length structures. Diagnose nogroup clause used with
1794 reduction clause(s). Handle depend clause with
1795 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1796 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1797 some different type for other kinds. Use build_unary_op with
1798 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1799 Handle depend clauses with iterators. Remove no longer needed special
1800 case that predetermined const qualified vars may be specified in
1801 firstprivate clause. Complain if const qualified vars are mentioned
1802 in data-sharing clauses other than firstprivate or shared. Use
1803 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1804 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1805 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1806 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1808 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1810 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1811 logic for change to name_hint::operator bool.
1812 (undeclared_variable): Likewise.
1813 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1814 (c_parser_parameter_declaration): Likewise.
1816 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1818 * c-errors.c (pedwarn_c11): New function.
1819 * c-parser.c (disable_extension_diagnostics): Save
1820 warn_c11_c2x_compat and set it to 0.
1821 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1822 (c_parser_static_assert_declaration_no_semi): Handle
1823 _Static_assert without string constant.
1824 * c-tree.h (pedwarn_c11): New prototype.
1826 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1828 * Make-lang.in (selftest-c): New.
1829 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1830 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1831 from gcc/Makefile.in.
1833 2018-10-02 Richard Biener <rguenther@suse.de>
1835 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1837 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1840 * c-typeck.c (build_binary_op): Use excess precision for
1841 comparisons of integers and floating-point for C11 and later.
1843 2018-09-26 Martin Jambor <mjambor@suse.cz>
1846 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1849 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1851 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1852 Update for new param.
1853 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1856 2018-09-17 Martin Jambor <mjambor@suse.cz>
1859 * c-parser.c: (warn_for_abs): New function.
1860 (c_parser_postfix_expression_after_primary): Call it.
1862 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1864 * c-typeck.c (digest_init): Shorten overlength strings.
1866 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1868 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1870 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1872 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1873 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1875 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1877 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1878 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1880 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1883 * c-decl.c (implicitly_declare): Update call to
1884 maybe_add_include_fixit to suggest overriding the location, as it
1886 * c-objc-common.c (c_tree_printer): Update for conversion of
1887 show_caret_p to a tri-state.
1889 2018-08-27 Martin Liska <mliska@suse.cz>
1891 * c-decl.c (locate_old_decl): Use new function
1892 fndecl_built_in_p and remove check for FUNCTION_DECL if
1894 (diagnose_mismatched_decls): Likewise.
1895 (merge_decls): Likewise.
1896 (warn_if_shadowing): Likewise.
1897 (pushdecl): Likewise.
1898 (implicitly_declare): Likewise.
1899 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1900 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1901 * c-typeck.c (build_function_call_vec): Likewise.
1902 (convert_arguments): Likewise.
1904 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1907 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1908 (diagnose_mismatched_decls): Likewise, in various places.
1909 (warn_if_shadowing): Likewise.
1910 (implicit_decl_warning): Likewise.
1911 (implicitly_declare): Likewise.
1912 (undeclared_variable): Likewise.
1913 (declare_label): Likewise.
1914 (grokdeclarator): Likewise.
1915 (start_function): Likewise.
1916 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1917 (c_parser_parameter_declaration): Likewise.
1918 (c_parser_binary_expression): Likewise.
1919 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1920 (parser_build_binary_op): Likewise.
1921 (build_unary_op): Likewise.
1922 (error_init): Likewise.
1923 (pedwarn_init): Likewise.
1924 (warning_init): Likewise.
1925 (convert_for_assignment): Likewise.
1927 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1929 * c-objc-common.c: Include "gcc-rich-location.h".
1930 (c_tree_printer): Move implemenation of '%T' to...
1931 (print_type): ...this new function.
1932 (range_label_for_type_mismatch::get_text): New function.
1933 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1934 range for the various ic_argpass cases.
1935 (class maybe_range_label_for_tree_type_mismatch): New class.
1936 (build_binary_op): Use it when calling binary_op_error.
1938 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1940 * c-decl.c (start_decl): Do not warn if variables is named as main
1941 and is a local variable.
1943 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1946 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1947 objects of unknown size.
1949 2018-08-13 Martin Sebor <msebor@redhat.com>
1951 PR tree-optimization/71625
1952 * c-parser.c (c_parser_declaration_or_fndef): Call
1953 braced_list_to_string.
1955 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1958 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1961 2018-08-01 Martin Sebor <msebor@redhat.com>
1963 PR tree-optimization/86650
1964 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1965 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1967 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1970 * c-typeck.c (init_field_decl_cmp): New function.
1971 (output_pending_init_elements): Use it for field comparisons
1972 instead of pure bit_position comparisons.
1974 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1976 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1977 type here, instead add "omp declare target implicit" attribute.
1978 (finish_decl): Diagnose vars without mappable type here.
1980 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1981 Thomas Schwinge <thomas@codesourcery.com>
1982 Cesar Philippidis <cesar@codesourcery.com>
1984 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1985 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1986 to their non-present_or_* counterparts. Make 'self' an alias to
1987 PRAGMA_OACC_CLAUSE_HOST.
1988 (c_parser_oacc_data_clause): Update GOMP mappings for
1989 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1990 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1991 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1992 Remove support for present_or_* clauses.
1993 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1994 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1995 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1996 (OACC_DATA_CLAUSE_MASK): Likewise.
1997 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1998 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1999 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2000 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2001 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2003 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2005 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2006 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2007 (c_parser_gimple_unary_expression): Likewise.
2009 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2012 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2013 before doing POINTER_DIFF_EXPR.
2015 2018-06-07 Marek Polacek <polacek@redhat.com>
2018 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2019 for loop initial declarations.
2021 2018-05-30 David Pagan <dave.pagan@oracle.com>
2024 * c-decl.c (grokdeclarator): Update check for return type warnings.
2025 (start_function): Likewise.
2026 (finish_function): Likewise.
2027 * c-typeck.c (c_finish_return): Update check for return type warnings.
2028 Pass OPT_Wreturn_type to pedwarn when appropriate.
2030 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2032 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2035 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2037 * gimple-parser.c: Include internal-fn.h.
2038 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2039 (c_parser_gimple_call_internal): New function.
2040 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2041 Fix typos in comment.
2043 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2046 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2047 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2049 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2050 fold_offsetof_1, pass argtype as TYPE to it and drop the
2053 2018-05-02 David Pagan <dave.pagan@oracle.com>
2056 * c-decl.c (old_style_parameter_scope): New function.
2057 * c-parser.c (c_parser_postfix_expression): Check for statement
2058 expressions in old-style function parameter list declarations.
2059 * c-parser.h (old_style_parameter_scope): New extern declaration.
2061 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2064 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2065 it is not TREE_STATIC.
2066 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2067 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2068 its COMPOUND_LITERAL_EXPR_DECL.
2070 2018-03-21 Joseph Myers <joseph@codesourcery.com>
2072 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2073 where all functions return the same _FloatN or _FloatNx type,
2074 treat integer types as _Float64 instead of double.
2076 2018-03-21 Jakub Jelinek <jakub@redhat.com>
2079 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2080 building vector comparison, diagnose it and return error_mark_node.
2082 2018-03-15 Jakub Jelinek <jakub@redhat.com>
2085 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2086 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2087 INTEGER_TYPE element type.
2089 2018-03-13 David Pagan <dave.pagan@oracle.com>
2092 * c-typeck.c (output_init_element): Ensure field initializer
2093 expression is always evaluated if there are side effects.
2095 2018-03-06 Jakub Jelinek <jakub@redhat.com>
2098 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2099 !building_stmt_list_p ().
2101 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2104 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2105 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2106 and include the BIND_EXPR in the list of things that need to be
2109 2018-02-09 Nathan Sidwell <nathan@acm.org>
2112 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2113 to strict_aliasing_warning.
2115 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2117 * c-typeck.c (really_start_incremental_init, push_init_level,
2118 set_nonincremental_init, output_init_element, process_init_element):
2119 Use DECL_UNNAMED_BIT_FIELD.
2121 2018-01-31 Marek Polacek <polacek@redhat.com>
2124 * c-parser.c (c_parser_compound_statement_nostart): Call
2125 expansion_point_location_if_in_system_header.
2127 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2130 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2133 2018-01-13 Jakub Jelinek <jakub@redhat.com>
2136 * c-tree.h (decl_constant_value_1): Add a bool argument.
2137 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2138 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2139 (decl_constant_value): Adjust caller.
2140 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2141 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2142 decl_constant_value returns initializer that has BLKmode or
2144 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2146 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2147 Alan Hayward <alan.hayward@arm.com>
2148 David Sherwood <david.sherwood@arm.com>
2150 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2151 TYPE_VECTOR_SUBPARTS.
2153 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2155 Update copyright years.
2157 2018-01-01 Jakub Jelinek <jakub@redhat.com>
2160 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2161 c_parser_conditional_expression, c_parser_cast_expression,
2162 c_parser_sizeof_expression, c_parser_alignof_expression,
2163 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2164 c_parser_transaction_expression): Use set_error () method instead
2165 of setting value member to error_mark_node.
2167 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2169 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2170 and _Float<N>X built-in functions.
2172 2017-12-22 Jakub Jelinek <jakub@redhat.com>
2175 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2176 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2177 incomplete vars rather than after it.
2180 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2181 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2182 and consider empty ones if there are no other stmts. For
2183 -Wunused-value walk all statements before the one only followed by
2186 2017-12-22 Mike Stump <mikestump@comcast.net>
2187 Eric Botcazou <ebotcazou@adacore.com>
2189 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2190 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2191 (c_parser_do_statement): Likewise.
2192 (c_parser_for_statement): Likewise.
2193 (c_parser_statement_after_labels): Adjust calls to above.
2194 (c_parse_pragma_ivdep): New static function.
2195 (c_parser_pragma_unroll): Likewise.
2196 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2197 <PRAGMA_UNROLL>: New case.
2199 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2201 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2202 perform_integral_promotions, digest_init): Replace Yoda conditions
2203 with typical order conditions.
2204 * c-decl.c (check_bitfield_type_and_width): Likewise.
2206 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2208 * c-typeck.c (c_safe_arg_type_equiv_p,
2209 c_safe_function_type_cast_p): New function.
2210 (build_c_cast): Implement -Wcast-function-type.
2212 2017-12-14 Richard Biener <rguenther@suse.de>
2215 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2216 like REALPART_EXPR for the behavior of whether its operand
2219 2017-12-12 Marek Polacek <polacek@redhat.com>
2222 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2224 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2226 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2227 * c-parser.c (add_debug_begin_stmt): New.
2228 (c_parser_declaration_or_fndef): Call it.
2229 (c_parser_compound_statement_nostart): Likewise.
2230 (c_parser_statement_after_labels): Likewise.
2231 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2233 2017-12-07 Joseph Myers <joseph@codesourcery.com>
2235 * c-decl.c (build_compound_literal): Add parameter alignas_align
2236 and set alignment of decl if nonzero.
2237 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2238 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2240 (c_parser_struct_declaration): Update syntax comment.
2241 (c_parser_type_name): Add alignas_ok argument and pass it to
2243 (c_parser_cast_expression): Pass true to c_parser_type_name and
2244 give error if a cast used an _Alignas specifier.
2245 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2246 give error if sizeof (type-name) used an _Alignas specifier.
2247 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2248 give error if _Alignof (type-name) used an _Alignas specifier.
2249 (c_parser_postfix_expression_after_paren_type): Check specified
2250 alignment for a compound literal and pass it to
2251 build_compound_literal.
2252 * c-parser.h (c_parser_type_name): Update prototype.
2253 * c-tree.h (build_compound_literal): Update prototype.
2255 2017-12-07 Martin Sebor <msebor@redhat.com>
2258 * c-decl.c (c_decl_attributes): Look up existing declaration and
2259 pass it to decl_attributes.
2261 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2264 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2265 reserved for use by the implementation.
2267 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2269 * c-decl.c: Include "c-family/c-spellcheck.h".
2271 2017-12-05 Martin Liska <mliska@suse.cz>
2272 Jakub Jelinek <jakub@redhat.com>
2274 * c-typeck.c (pointer_diff): Add new argument and instrument
2275 pointer subtraction.
2276 (build_binary_op): Similar for pointer comparison.
2278 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2281 * c-parser.c: Include tree-iterator.h.
2282 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2283 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2287 * c-tree.h (decl_constant_value_1): Declare.
2288 * c-typeck.c (decl_constant_value_1): New function.
2289 (decl_constant_value): Use it.
2290 * c-fold.c (c_fully_fold_internal): If in_init, use
2291 decl_constant_value_1 instead of decl_constant_value.
2293 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2295 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2297 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2300 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2301 c_switch_covers_all_cases_p returns true.
2303 2017-11-28 Julia Koval <julia.koval@intel.com>
2304 Sebastian Peryt <sebastian.peryt@intel.com>
2306 * Make-lang.in (c/c-array-notation.o): Remove.
2307 * c-array-notation.c: Delete.
2308 * c-decl.c: Remove cilkplus condition.
2309 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2310 c_parser_cilk_verify_simd, c_parser_array_notation,
2311 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2312 c_parser_cilk_simd_fn_vector_attrs,
2313 c_finish_cilk_simd_fn_tokens): Delete.
2314 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2315 (c_parser_direct_declarator_inner): Ditto.
2316 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2317 (c_parser_attributes, c_parser_compound_statement,
2318 c_parser_statement_after_labels, c_parser_if_statement,
2319 c_parser_switch_statement, c_parser_while_statement,
2320 c_parser_do_statement, c_parser_for_statement,
2321 c_parser_unary_expression, c_parser_postfix_expression,
2322 c_parser_postfix_expression_after_primary,
2323 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2324 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2326 * c-typeck.c (build_array_ref, build_function_call_vec,
2328 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2329 c_finish_loop, build_binary_op): Remove cilkplus support.
2331 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2333 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2336 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
2338 * Make-lang.in (c.install-plugin): Install backend import library.
2340 2017-11-23 Jakub Jelinek <jakub@redhat.com>
2342 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2343 pragma_stmt context.
2345 2017-11-23 Mike Stump <mikestump@comcast.net>
2346 Eric Botcazou <ebotcazou@adacore.com>
2348 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2350 (c_parser_do_statement): Likewise.
2351 (c_parser_for_statement): Likewise.
2353 2017-11-22 David Malcolm <dmalcolm@redhat.com>
2356 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2357 bool to bool *. Within '%T' handling, if showing an "aka", use
2358 "quoted" param to add appropriate quoting.
2360 2017-11-22 Marek Polacek <polacek@redhat.com>
2365 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2367 2017-11-21 David Malcolm <dmalcolm@redhat.com>
2370 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2371 earlier failed lookups.
2373 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2375 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2376 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2378 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2381 * c-decl.c: Include "c-family/known-headers.h".
2382 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2383 to known-headers.cc.
2384 (class suggest_missing_header): Move to known-header.h.
2385 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2386 than get_c_name_hint.
2388 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2390 * c-decl.c (get_c_name_hint): New function.
2391 (class suggest_missing_header): New class.
2392 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2393 suggest missing headers to the user.
2395 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2397 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2398 Include "c-family/name-hint.h"
2399 (implicit_decl_warning): Convert "hint" from
2400 const char * to name_hint. Pass location to
2401 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2402 warning was not printed.
2403 (undeclared_variable): Likewise for "guessed_id".
2404 (lookup_name_fuzzy): Convert return type from const char *
2405 to name_hint. Add location_t param.
2406 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2407 Include "c-family/name-hint.h"
2408 (c_parser_declaration_or_fndef): Convert "hint" from
2409 const char * to name_hint. Pass location to lookup_name_fuzzy.
2410 (c_parser_parameter_declaration): Likewise.
2412 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2416 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2418 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2419 handle_omp_array_sections): Likewise.
2420 (digest_init): Don't call decl_constant_value_for_optimization.
2421 * c-tree.h (decl_constant_value_for_optimization): Removed.
2422 * c-fold.c (c_fold_array_ref): New function.
2423 (c_fully_fold_internal): Add LVAL argument, propagate it through
2424 recursive calls. For VAR_P call decl_constant_value and
2425 unshare if not LVAL and either optimizing or IN_INIT. Remove
2426 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2427 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2428 (c_fully_fold): Add LVAL argument, pass it through to
2429 c_fully_fold_internal.
2430 (decl_constant_value_for_optimization): Removed.
2432 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2435 * c-parser.c (check_tgmath_function): New function.
2436 (enum tgmath_parm_kind): New enum.
2437 (c_parser_postfix_expression): Handle __builtin_tgmath.
2439 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2441 * c-decl.c (implicit_decl_warning): Update for renaming of
2442 pedwarn_at_rich_loc and warning_at_rich_loc.
2443 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2444 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2445 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2446 (c_parser_struct_or_union_specifier): Likewise for renaming of
2447 pedwarn_at_rich_loc.
2448 (c_parser_parameter_declaration): Likewise for renaming of
2450 * c-typeck.c (build_component_ref): Likewise.
2451 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2452 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2453 (set_init_label): Likewise for renaming of error_at_rich_loc.
2455 2017-10-30 Richard Biener <rguenther@suse.de>
2457 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2460 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2462 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2463 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2465 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2468 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2471 2017-10-25 Jakub Jelinek <jakub@redhat.com>
2474 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2475 newdecl to corresponding __builtin_ if any.
2477 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2480 * c-decl.c (diagnose_mismatched_decls): Use
2481 OPT_Wbuiltin_declaration_mismatch.
2483 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2485 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2486 use it to guard calls to maybe_suggest_missing_token_insertion.
2487 (c_parser_parms_list_declarator): Override default value of new
2488 "type_is_unique" param to c_parser_require.
2489 (c_parser_asm_statement): Likewise.
2490 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2493 2017-10-11 Nathan Sidwell <nathan@acm.org>
2495 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2497 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2499 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2500 operating on trees as wide_ints.
2501 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2502 (c_tree_equal): Likewise.
2504 2017-10-04 David Malcolm <dmalcolm@redhat.com>
2506 * c-decl.c (push_parm_decl): Store c_parm's location into the
2508 (build_c_parm): Add "loc" param and store it within the c_parm.
2509 * c-parser.c (struct c_parser): Add "last_token_location" field.
2510 (c_parser_consume_token): Store location of the token into the
2512 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2513 when handling a FUNCTION_DECL, if it doesn't already have them.
2514 (c_parser_parameter_declaration): Generate a location for the
2515 parameter, and pass it to the call to build_c_parm.
2516 * c-tree.h (struct c_parm): Add field "loc".
2517 (build_c_parm): Add location_t param.
2518 * c-typeck.c (get_fndecl_argument_location): New function.
2519 (inform_for_arg): New function.
2520 (convert_for_assignment): Use inform_for_arg when dealing with
2523 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2525 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2527 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2528 don't SET_DECL_C_BIT_FIELD here.
2531 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2532 instead of trying to set just TREE_READONLY manually.
2534 2017-09-16 Tom de Vries <tom@codesourcery.com>
2537 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2540 2017-09-15 Joseph Myers <joseph@codesourcery.com>
2543 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2545 (build_conditional_expr): For C11, generate result with excess
2546 precision when one argument is an integer and the other is of a
2547 type using excess precision.
2549 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2551 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2553 2017-09-13 Marek Polacek <polacek@redhat.com>
2556 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2557 than expr.original_type.
2559 2017-09-12 Nathan Sidwell <nathan@acm.org>
2561 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2562 resort_sorted_fields): Moved from c-family/c-common.c.
2563 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2565 2017-09-01 Joseph Myers <joseph@codesourcery.com>
2568 * c-typeck.c (build_atomic_assign): Handle argument with excess
2569 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2570 argument passed to build_binary_op and convert_for_assignment but
2571 not for call to c_fully_fold.
2572 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2573 Ensure build_binary_op is called with argument with original
2574 semantic type. Avoid calling c_fully_fold with an
2575 EXCESS_PRECISION_EXPR from build_binary_op.
2577 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2580 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2582 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2583 Alan Hayward <alan.hayward@arm.com>
2584 David Sherwood <david.sherwood@arm.com>
2586 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2587 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2588 m1 and m2 to the signed equivalent of a fixed-point
2591 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2593 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2594 than CAN_HAVE_LOCATION_P when determining whether to use the
2595 location_t value within "value".
2597 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2599 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2600 rather than peeking the location of the first token.
2601 * c-tree.h (c_expr::get_location): New method.
2603 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2605 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2606 to check_function_arguments.
2608 2017-08-18 Marek Polacek <polacek@redhat.com>
2610 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2613 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2616 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2617 (check_bitfield_type_and_width): Don't allow bit-field with
2618 warn_if_not_aligned type.
2620 2017-08-14 Martin Sebor <msebor@redhat.com>
2623 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2625 2017-08-11 Marek Polacek <polacek@redhat.com>
2628 * c-decl.c (pushtag): Only print inform if the warning was printed.
2629 (grokdeclarator): Likewise.
2631 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2633 * c-parser.c (c_parser_error): Rename to...
2634 (c_parser_error_richloc): ...this, making static, and adding
2635 "richloc" parameter, passing it to the c_parse_error call,
2636 rather than calling c_parser_set_source_position_from_token.
2637 (c_parser_error): Reintroduce, reimplementing in terms of the
2638 above, converting return type from void to bool.
2639 (class token_pair): New class.
2640 (struct matching_paren_traits): New struct.
2641 (matching_parens): New typedef.
2642 (struct matching_brace_traits): New struct.
2643 (matching_braces): New typedef.
2644 (get_matching_symbol): New function.
2645 (c_parser_require): Add param MATCHING_LOCATION, using it to
2646 highlight matching "opening" tokens for missing "closing" tokens.
2647 (c_parser_skip_until_found): Likewise.
2648 (c_parser_static_assert_declaration_no_semi): Convert explicit
2649 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2650 class matching_parens, so that the pertinent open parenthesis is
2651 highlighted when there are problems locating the close
2653 (c_parser_struct_or_union_specifier): Likewise.
2654 (c_parser_typeof_specifier): Likewise.
2655 (c_parser_alignas_specifier): Likewise.
2656 (c_parser_simple_asm_expr): Likewise.
2657 (c_parser_braced_init): Likewise, for matching_braces.
2658 (c_parser_paren_condition): Likewise, for matching_parens.
2659 (c_parser_switch_statement): Likewise.
2660 (c_parser_for_statement): Likewise.
2661 (c_parser_asm_statement): Likewise.
2662 (c_parser_asm_operands): Likewise.
2663 (c_parser_cast_expression): Likewise.
2664 (c_parser_sizeof_expression): Likewise.
2665 (c_parser_alignof_expression): Likewise.
2666 (c_parser_generic_selection): Likewise.
2667 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2668 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2669 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2670 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2671 c_parser_skip_until_found call.
2672 (c_parser_objc_class_definition): Use class matching_parens as
2674 (c_parser_objc_method_decl): Likewise.
2675 (c_parser_objc_try_catch_finally_statement): Likewise.
2676 (c_parser_objc_synchronized_statement): Likewise.
2677 (c_parser_objc_at_property_declaration): Likewise.
2678 (c_parser_oacc_wait_list): Likewise.
2679 (c_parser_omp_var_list_parens): Likewise.
2680 (c_parser_omp_clause_collapse): Likewise.
2681 (c_parser_omp_clause_default): Likewise.
2682 (c_parser_omp_clause_if): Likewise.
2683 (c_parser_omp_clause_num_threads): Likewise.
2684 (c_parser_omp_clause_num_tasks): Likewise.
2685 (c_parser_omp_clause_grainsize): Likewise.
2686 (c_parser_omp_clause_priority): Likewise.
2687 (c_parser_omp_clause_hint): Likewise.
2688 (c_parser_omp_clause_defaultmap): Likewise.
2689 (c_parser_oacc_single_int_clause): Likewise.
2690 (c_parser_omp_clause_ordered): Likewise.
2691 (c_parser_omp_clause_reduction): Likewise.
2692 (c_parser_omp_clause_schedule): Likewise.
2693 (c_parser_omp_clause_num_teams): Likewise.
2694 (c_parser_omp_clause_thread_limit): Likewise.
2695 (c_parser_omp_clause_aligned): Likewise.
2696 (c_parser_omp_clause_linear): Likewise.
2697 (c_parser_omp_clause_safelen): Likewise.
2698 (c_parser_omp_clause_simdlen): Likewise.
2699 (c_parser_omp_clause_depend): Likewise.
2700 (c_parser_omp_clause_map): Likewise.
2701 (c_parser_omp_clause_device): Likewise.
2702 (c_parser_omp_clause_dist_schedule): Likewise.
2703 (c_parser_omp_clause_proc_bind): Likewise.
2704 (c_parser_omp_clause_uniform): Likewise.
2705 (c_parser_omp_for_loop): Likewise.
2706 (c_parser_cilk_clause_vectorlength): Likewise.
2707 (c_parser_cilk_clause_linear): Likewise.
2708 (c_parser_transaction_expression): Likewise.
2709 * c-parser.h (c_parser_require): Add param matching_location with
2710 default UNKNOWN_LOCATION.
2711 (c_parser_error): Convert return type from void to bool.
2712 (c_parser_skip_until_found): Add param matching_location with
2713 default UNKNOWN_LOCATION.
2715 2017-08-09 Marek Polacek <polacek@redhat.com>
2717 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2718 * c-tree.h (build_external_ref): Update declaration.
2719 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2720 (build_external_ref): Change the type of a parameter to bool.
2721 (parser_build_binary_op): Use true/false instead of 1/0.
2722 (pointer_diff): Likewise.
2723 (build_modify_expr): Likewise.
2724 (set_designator): Change the type of a parameter to bool.
2725 (set_init_index): Use true/false instead of 1/0.
2726 (set_init_label): Likewise.
2727 (output_init_element): Change the type of a parameter to bool.
2728 (output_pending_init_elements): Use true/false instead of 1/0.
2729 (process_init_element): Likewise.
2730 (build_binary_op): Change the type of a parameter to bool.
2732 2017-08-09 Marek Polacek <polacek@redhat.com>
2735 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2736 Call emit_diagnostic_valist instead of pedwarn.
2737 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2738 Print the relevant types in diagnostics.
2740 2017-08-09 Marek Polacek <polacek@redhat.com>
2743 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2744 build_conditional_expr.
2745 * c-parser.c (c_parser_conditional_expression): Create locations for
2746 EXP1 and EXP2 from their source ranges. Pass the locations down to
2747 build_conditional_expr.
2748 * c-tree.h (build_conditional_expr): Update declaration.
2749 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2750 For -Wsign-compare, also print the types.
2752 2017-08-08 Martin Liska <mliska@suse.cz>
2754 * c-convert.c: Include header files.
2755 * c-typeck.c: Likewise.
2757 2017-08-07 Martin Liska <mliska@suse.cz>
2759 * c-parser.c (c_parser_attributes): Canonicalize name of an
2762 2017-08-02 Marek Polacek <polacek@redhat.com>
2765 * c-parser.c (c_parser_unary_expression): Use set_error.
2769 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2770 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2772 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2773 Martin Liska <mliska@suse.cz>
2775 * c-typeck.c (c_finish_goto_label): Build gimple predict
2778 2017-07-31 Martin Liska <mliska@suse.cz>
2781 * c-convert.c (convert): Guard condition with flag_sanitize_p
2782 also with current_function_decl non-null equality.
2783 * c-decl.c (grokdeclarator): Likewise.
2784 * c-typeck.c (build_binary_op): Likewise.
2786 2017-07-25 Marek Polacek <polacek@redhat.com>
2788 * c-decl.c (grokfield): Remove local variable.
2790 2017-07-25 Marek Polacek <polacek@redhat.com>
2793 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2794 macro expansion if the body is in { }.
2795 (c_parser_while_statement): Likewise.
2796 (c_parser_for_statement): Likewise.
2798 2017-07-18 Nathan Sidwell <nathan@acm.org>
2800 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2802 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2804 * c-decl.c (implicitly_declare): When suggesting a missing
2805 #include, provide a fix-it hint.
2807 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2809 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2810 and call that instead.
2811 * c-tree.h (selftest::run_c_tests): New decl.
2813 2017-06-26 Marek Polacek <polacek@redhat.com>
2816 * c-parser.c (c_parser_if_body): Set the location of the
2817 body of the conditional after parsing all the labels. Call
2818 warn_for_multistatement_macros.
2819 (c_parser_else_body): Likewise.
2820 (c_parser_switch_statement): Likewise.
2821 (c_parser_while_statement): Likewise.
2822 (c_parser_for_statement): Likewise.
2823 (c_parser_statement): Add a default argument. Save the location
2824 after labels have been parsed.
2825 (c_parser_c99_block_statement): Likewise.
2827 2017-06-19 Richard Biener <rguenther@suse.de>
2829 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2830 negated _Literals to parse _Literal (int) -1.
2832 2017-06-13 Martin Liska <mliska@suse.cz>
2835 * c-convert.c (convert): Use sanitize_flags_p.
2836 * c-decl.c (grokdeclarator): Likewise.
2837 * c-typeck.c (convert_for_assignment): Likewise.
2838 (c_finish_return): Likewise.
2839 (build_binary_op): Likewise.
2841 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2844 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2845 to sizetype before size_binop.
2847 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2849 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2852 2017-06-06 Marek Polacek <polacek@redhat.com>
2855 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2857 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2859 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2861 * c-parser.c (c_parser_binary_expression): Implement the
2862 -Wsizeof_pointer_div warning.
2863 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2864 from a parenthesized expression.
2865 (c_parser_expr_list): Use c_last_sizeof_loc.
2866 * c-tree.h (c_last_sizeof_loc): New external.
2867 * c-typeck.c (c_last_sizeof_loc): New variable.
2868 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2870 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2873 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2875 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2877 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2880 2017-05-24 Martin Sebor <msebor@redhat.com>
2883 * c-fold.c (c_fully_fold_internal): Adjust.
2884 * c-typeck.c (parser_build_unary_op): Adjust.
2886 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2888 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2889 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2892 2017-05-23 Marek Polacek <polacek@redhat.com>
2894 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2897 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2899 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2900 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2901 it returned invariant. Call tree_invariant_p unconditionally
2902 afterwards to decide whether to return expr or op0.
2904 2017-05-22 Nathan Sidwell <nathan@acm.org>
2906 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2908 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2910 * c-parser.c (c_parser_omp_clause_default): Handle
2911 "OMP_CLAUSE_DEFAULT_PRESENT".
2913 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2915 * config-lang.in (gtfiles): Add c-family/c-format.c.
2917 2017-05-18 Nathan Sidwell <nathan@acm.org>
2919 * c-decl.c (pushdecl_top_level): Delete unused function.
2921 2017-05-18 Marek Polacek <polacek@redhat.com>
2923 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2924 (check_earlier_gotos): Likewise.
2925 (define_label): Likewise.
2926 (pending_xref_error): Likewise.
2927 (smallest_type_quals_location): Likewise.
2928 (grokdeclarator): Likewise.
2929 (grokparms): Likewise.
2930 (identifier_global_value): Likewise.
2931 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2932 (find_init_member): Likewise.
2934 2017-05-18 Marek Polacek <polacek@redhat.com>
2936 * c-decl.c (start_decl): Use false/true instead of 0/1.
2937 (grokdeclarator): Likewise.
2938 (finish_struct): Likewise.
2939 (start_function): Change the return type to bool. Use false/true
2941 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2942 * c-tree.h (start_function): Update.
2943 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2944 (set_designator): Change the return type to bool. Use false/true
2947 2017-05-17 Marek Polacek <polacek@redhat.com>
2949 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2950 * c-typeck.c: Likewise.
2952 2017-05-17 Marek Polacek <polacek@redhat.com>
2955 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2956 DECL_IGNORED_P even for non-static compound literals.
2958 2017-05-17 Martin Liska <mliska@suse.cz>
2960 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2961 use it instead of int type.
2963 2017-05-17 Marek Polacek <polacek@redhat.com>
2965 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2967 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2968 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2969 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2970 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2972 (c_parser_conditional_expression): Likewise.
2973 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2974 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2975 (process_init_element): Likewise.
2976 (build_binary_op): Likewise.
2977 (handle_omp_array_sections_1): Likewise.
2979 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2981 * c-parser.c (c_parser_omp_clause_num_gangs)
2982 (c_parser_omp_clause_num_workers)
2983 (c_parser_omp_clause_vector_length): Merge functions into...
2984 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2987 2017-05-11 Nathan Sidwell <nathan@acm.org>
2989 * gimple-parser.c: Don't #include tree-dump.h.
2991 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2994 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2996 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2999 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3000 incorrect __MEM syntax.
3002 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3005 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3008 2017-05-09 Nathan Sidwell <nathan@acm.org>
3010 * c-tree.h (pushdecl): Declare.
3012 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3014 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3015 with diagnostic_report_diagnostic.
3016 * c-errors.c (pedwarn_c99): Likewise.
3017 (pedwarn_c90): Likewise.
3019 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3022 * c-gimplify.c (c_gimplify_expr): Remove calls to
3023 cilk_gimplifY_call_params_in_spawned_fn.
3025 2017-04-25 David Malcolm <dmalcolm@redhat.com>
3027 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3028 hint for removing extra semicolon.
3030 2017-04-21 Jakub Jelinek <jakub@redhat.com>
3033 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3034 enabled, set specs->type to integer_type_node.
3036 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3038 * c-array-notation.c: Fix typo in comment.
3040 2017-03-29 Marek Polacek <polacek@redhat.com>
3043 * c-decl.c (finish_decl): Check VAR_P.
3045 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3048 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3049 * c-typeck.c (c_mark_addressable): Likewise. Look through
3050 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3052 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3054 2017-03-23 Marek Polacek <polacek@redhat.com>
3056 * c-tree.h: Remove a C_RID_YYCODE reference.
3058 2017-03-21 Jakub Jelinek <jakub@redhat.com>
3061 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3062 optional COMPOUND_EXPR with ubsan instrumentation.
3064 2017-03-17 Marek Polacek <polacek@redhat.com>
3066 * c-parser.c: Add C11 references.
3068 2017-03-15 Marek Polacek <polacek@redhat.com>
3070 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3072 2017-03-11 Marek Polacek <polacek@redhat.com>
3074 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3076 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3078 PR translation/79848
3079 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3081 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3083 2017-03-09 Marek Polacek <polacek@redhat.com>
3086 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3087 parameter declarations with initializers.
3089 2017-03-09 Jakub Jelinek <jakub@redhat.com>
3092 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3095 2017-03-07 Jakub Jelinek <jakub@redhat.com>
3098 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3099 for "may only be used in compound statements" diagnostics, change it
3100 such that the same translatable string is used for all pragmas. For
3101 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3103 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3104 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3105 "may only be used in compound statements" diagnostics, such that the
3106 same translatable string is used for all pragmas.
3108 2017-03-04 Marek Polacek <polacek@redhat.com>
3111 * c-decl.c (implicit_decl_warning): Add missing space.
3113 2017-03-03 Marek Polacek <polacek@redhat.com>
3116 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3117 current_function_prototype_arg_types is error_mark_node. Fix
3118 formatting. Use TREE_VALUE instead of TREE_TYPE.
3120 2017-03-03 Jakub Jelinek <jakub@redhat.com>
3123 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3124 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3125 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3129 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3130 instead of %<_Generic>.
3131 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3132 (c_parser_omp_target_exit_data): Use %<release%> instead of
3135 2017-02-28 Jakub Jelinek <jakub@redhat.com>
3137 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3138 instead of just cond ? "..." : "...".
3139 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3140 for "enter"/"exit" keyword.
3141 (c_finish_oacc_routine): Don't use %s to supply portions of the
3144 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3147 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3148 handle -Wrestrict here.
3149 * c-typeck.c (build_function_call_vec): Adjust
3150 check_function_arguments caller.
3152 2017-02-23 Richard Biener <rguenther@suse.de>
3155 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3156 to initialize c_exprs to return.
3157 (c_parser_gimple_binary_expression): Likewise.
3158 (c_parser_gimple_unary_expression): Likewise.
3159 (c_parser_gimple_postfix_expression): Likewise.
3161 2017-02-22 Marek Polacek <polacek@redhat.com>
3164 * c-typeck.c (convert_arguments): Handle error_mark_node.
3166 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3168 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3169 value of c_parser_parse_ssa_name against error_mark_node and emit
3170 error if ssa name is anonymous and written as default definition.
3172 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3174 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3177 2017-02-16 Jakub Jelinek <jakub@redhat.com>
3180 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3181 ignore #pragma omp target even when not followed by identifier.
3183 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3185 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3186 (c_parser_gimple_unary_expression): Likewise.
3188 2017-02-13 Jakub Jelinek <jakub@redhat.com>
3190 * c-parser.c (c_parser_oacc_declare): Add missing space in
3193 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3196 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3197 set_c_expr_source_range when parsing ssa-name.
3199 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
3200 Richard Biener <rguenther@suse.de>
3202 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3203 building IL when arguments are error_mark_node.
3204 (c_parser_gimple_unary_expression): Likewise.
3205 (c_parser_gimple_if_stmt): Likewise.
3206 (c_parser_gimple_switch_stmt): Likewise.
3207 (c_parser_gimple_return_stmt): Likewise.
3208 (c_parser_parse_ssa_name): When name lookup fails do not build
3209 an SSA name. Use undeclared rather than not declared in error
3212 2017-02-09 Marek Polacek <polacek@redhat.com>
3215 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3216 instead of c_parser_skip_until_found.
3218 2017-02-09 Jakub Jelinek <jakub@redhat.com>
3221 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3222 symtab_node::get on automatic variables.
3224 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3225 Chung-Lin Tang <cltang@codesourcery.com>
3227 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3228 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3230 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3232 2017-02-07 Richard Biener <rguenther@suse.de>
3234 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3235 (c_parser_gimple_postfix_expression_after_primary):
3236 Do not use c_build_function_call_vec to avoid folding and promotion.
3239 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3242 * c-decl.c (pop_scope): Pass main_input_filename to
3243 build_translation_unit_decl.
3245 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3247 * c-parser.c: Include "read-rtl-function.h" and
3249 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3250 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3251 production. Update for renaming of field "gimple_pass" to
3252 "gimple_or_rtl_pass". If __RTL was seen, call
3253 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3254 to an auto_timevar, to cope with early exit.
3255 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3256 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3257 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3259 (c_parser_parse_rtl_body): New function.
3260 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3261 (struct c_declspecs): Rename field "gimple_pass" to
3262 "gimple_or_rtl_pass". Add field "rtl_p".
3263 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3264 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3265 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3266 (c_parser_gimple_or_rtl_pass_list): ...this.
3268 2017-01-20 Marek Polacek <polacek@redhat.com>
3271 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3273 2017-01-13 Richard Biener <rguenther@suse.de>
3275 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3278 2017-01-13 Richard Biener <rguenther@suse.de>
3280 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3281 _Literal ( type-name ) number.
3283 2017-01-12 Richard Biener <rguenther@suse.de>
3285 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3288 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3291 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3294 2017-01-11 Richard Biener <rguenther@suse.de>
3297 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3298 returns on parse errors.
3300 2017-01-04 Marek Polacek <polacek@redhat.com>
3303 * c-parser.c (c_parser_postfix_expression): Mark zero character
3304 constants by setting original_type in c_expr.
3305 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3306 with a zero character constant.
3307 (char_type_p): New function.
3309 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3311 * c-parser.c (c_parser_declaration_or_fndef): Create a
3312 rich_location at init_loc and parse it to start_init.
3313 (last_init_list_comma): New global.
3314 (c_parser_braced_init): Update last_init_list_comma when parsing
3315 commas. Pass it to pop_init_level. Pass location of closing
3316 brace to pop_init_level.
3317 (c_parser_postfix_expression_after_paren_type): Create a
3318 rich_location at type_loc and parse it to start_init.
3319 (c_parser_omp_declare_reduction): Likewise for loc.
3320 * c-tree.h (start_init): Add rich_location * param.
3321 (pop_init_level): Add location_t param.
3322 * c-typeck.c (struct initializer_stack): Add field
3323 "missing_brace_richloc".
3324 (start_init): Add richloc param, use it to initialize
3325 the stack node's missing_brace_richloc.
3326 (last_init_list_comma): New decl.
3327 (finish_implicit_inits): Pass last_init_list_comma to
3329 (push_init_level): When finding missing open braces, add fix-it
3330 hints to the richloc.
3331 (pop_init_level): Add "insert_before" param and pass it
3332 when calling pop_init_level. Add fixits about missing
3333 close braces to any richloc. Use the richloc for the
3334 -Wmissing-braces warning.
3335 (set_designator): Pass last_init_list_comma to pop_init_level.
3336 (process_init_element): Likewise.
3338 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3340 Update copyright years.
3342 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3345 * c-typeck.c (build_function_call_vec): If check_function_arguments
3346 returns true, set TREE_NO_WARNING on CALL_EXPR.
3349 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3350 to *expr instead of overwriting it.
3352 2016-12-20 Richard Biener <rguenther@suse.de>
3354 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3356 (c_parser_gimple_statement): Only build assigns for non-error
3358 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3360 2016-12-14 Martin Jambor <mjambor@suse.cz>
3362 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3364 (c_finish_oacc_routine): Adjusted call to
3365 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3366 to use their new names.
3367 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3369 (c_parser_oacc_update): Likewise.
3370 (c_parser_omp_simd): Likewise.
3371 (c_parser_omp_target_update): Likewise.
3372 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3373 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3375 (c_finish_omp_cancellation_point): Likewise.
3376 * gimple-parser.c: Do not include omp-low.h
3378 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3379 James Norris <jnorris@codesourcery.com>
3381 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3382 EXIT_DATA,WAIT} are not used in compound statements.
3383 (c_parser_oacc_enter_exit_data): Update diagnostics.
3385 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3388 * c-decl.c (diagnose_mismatched_decls): Use
3389 OPT_Wbuiltin_declaration_mismatch here too.
3391 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
3392 Alan Hayward <alan.hayward@arm.com>
3393 David Sherwood <david.sherwood@arm.com>
3395 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3396 (make_label, finish_struct): Likewise.
3398 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3399 Richard Biener <rguenther@suse.de>
3401 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3402 * config-lang.in (gtfiles): Add c/c-parser.h.
3403 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3404 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3405 * c-parser.c (enum c_id_kind, struct c_token,
3406 c_parser_next_token_is, c_parser_next_token_is_not,
3407 c_parser_next_token_is_keyword,
3408 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3410 * c-parser.h: ... new header.
3411 * c-parser.c: Include c-parser.h and gimple-parser.h.
3412 (c_parser_peek_token, c_parser_peek_2nd_token,
3413 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3414 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3415 c_parser_error, c_parser_require, c_parser_skip_until_found,
3416 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3417 c_parser_type_name): Export.
3418 (c_parser_tokens_buf): New function.
3419 (c_parser_error): Likewise.
3420 (c_parser_set_error): Likewise.
3421 (c_parser_declspecs): Handle RID_GIMPLE.
3422 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3423 via c_parser_parse_gimple_body.
3424 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3425 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3426 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3427 c_parser_error, c_parser_require, c_parser_skip_until_found,
3428 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3429 c_parser_type_name): Declare.
3430 (struct c_parser): Declare forward.
3431 (c_parser_tokens_buf): Declare.
3432 (c_parser_error): Likewise.
3433 (c_parser_set_error): Likewise.
3434 * gimple-parser.c: New file.
3435 * gimple-parser.h: Likewise.
3437 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3440 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3443 2016-09-11 Le-Chun Wu <lcwu@google.com>
3444 Mark Wielaard <mjw@redhat.com>
3446 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3447 to the given -Wshadow= variant.
3449 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3451 * c-typeck.c: Include memmodel.h.
3453 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3456 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3457 instead of lhd_return_null_tree_v.
3459 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3462 * c-decl.c (smallest_type_quals_location): New static function.
3463 (grokdeclarator): Try to find the correct location for an ignored
3466 2016-09-26 Marek Polacek <polacek@redhat.com>
3469 * c-decl.c (pop_scope): Add gcc_fallthrough.
3471 2016-09-26 Marek Polacek <polacek@redhat.com>
3474 * c-parser.c (struct c_token): Add flags field.
3475 (c_lex_one_token): Pass it to c_lex_with_flags.
3476 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3477 into IFN_FALLTHROUGH.
3478 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3479 attribute fallthrough after a case label or default label.
3480 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3482 2016-09-24 Marek Polacek <polacek@redhat.com>
3485 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3486 have boolean value. Warn about ++/-- on booleans.
3488 2016-09-23 Jakub Jelinek <jakub@redhat.com>
3490 * c-parser.c (incomplete_record_decls): Remove unnecessary
3491 = vNULL initialization of file scope vec.
3493 2016-09-16 Marek Polacek <polacek@redhat.com>
3495 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3497 2016-09-14 Marek Polacek <polacek@redhat.com>
3499 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3500 (fix_array_notation_expr): Likewise.
3501 * c-decl.c (finish_decl): Likewise.
3502 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3503 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3504 (function_to_pointer_conversion): Use false instead of 0.
3505 (convert_lvalue_to_rvalue): Likewise.
3506 (parser_build_unary_op): Likewise.
3507 (build_atomic_assign): Likewise.
3508 (build_unary_op): Change nonconvert parameter type to bool, use
3509 true/false instead of 1/0.
3510 (build_binary_op): Use true instead of 1.
3512 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3514 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3515 of add_fixit_insert to add_fixit_insert_before.
3517 2016-09-13 Marek Polacek <polacek@redhat.com>
3519 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3522 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3525 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3526 COMPOUND_EXPR to warn_for_omitted_condop.
3528 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3530 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3531 c_get_substring_location for this new langhook.
3533 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3536 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3538 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3539 instead of mark_exp_read on low_bound/length expression.
3540 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3541 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3542 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3543 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3544 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3545 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3546 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3547 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3548 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3549 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3550 instead of mark_expr_read.
3551 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3552 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3553 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3554 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3555 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3556 array section bases outside of depend clause, for depend clause
3557 use convert_lvalue_to_rvalue on the base.
3558 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3559 linear, aligned, map, to and from clauses.
3560 (c_omp_clause_copy_ctor): New function.
3562 2016-09-01 Marek Polacek <polacek@redhat.com>
3565 * c-typeck.c (composite_type): Add FALLTHRU comment.
3567 2016-08-31 David Malcolm <dmalcolm@redhat.com>
3569 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3570 to the insertion fixits for "struct", "union", and "enum".
3572 2016-08-30 David Malcolm <dmalcolm@redhat.com>
3574 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3575 rather than add_fixit_misspelled_id.
3576 (undeclared_variable): Likewise.
3577 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3578 now-redundant "here" params from add_fixit_insert method calls.
3579 (c_parser_parameter_declaration): Likewise.
3580 * c-typeck.c (build_component_ref): Remove now-redundant range
3581 param from add_fixit_replace method calls.
3583 2016-08-25 Marek Polacek <polacek@redhat.com>
3585 * c-typeck.c (parser_build_binary_op): Pass LHS to
3586 warn_logical_not_parentheses.
3588 2016-08-25 Marek Polacek <polacek@redhat.com>
3591 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3592 or _FloatN or _FloatNx is not supported.
3593 (finish_declspecs): Set type to integer_type_node when _FloatN or
3594 _FloatNx is not supported.
3596 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3599 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3600 (struct c_declspecs): Add field floatn_nx_idx.
3601 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3602 and _FloatNx type specifiers.
3603 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3604 (c_parser_declspecs, c_parser_attribute_any_word)
3605 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3606 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3607 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3608 narrower than double.
3610 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3611 Martin Liska <mliska@suse.cz>
3614 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3615 % to determine val element to change. Assert that
3616 wchar_bytes * charwidth fits into val array.
3618 2016-08-12 Marek Polacek <polacek@redhat.com>
3621 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3622 (c_parser_postfix_expression): Likewise.
3623 * c-typeck.c (build_unary_op): Adjust fall through comment.
3624 (c_mark_addressable): Likewise.
3626 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3629 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3630 array member through typedef, for orig_qual_indirect == 0 clear
3633 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3636 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3637 this up to selftest::run_c_tests.
3638 (selftest::run_c_tests): New function.
3640 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3642 * c-parser.c (struct oacc_routine_data): Add error_seen and
3643 fndecl_seen members.
3644 (c_finish_oacc_routine): Use these.
3645 (c_parser_declaration_or_fndef): Adjust.
3646 (c_parser_oacc_routine): Likewise. Support more C language
3647 constructs, and improve diagnostics. Move pragma context
3649 (c_parser_pragma): ... here.
3651 * c-parser.c (struct oacc_routine_data): New.
3652 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3654 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3655 declare target" attribute.
3657 2016-08-01 Jan Beulich <jbeulich@suse.com>
3659 * c-fold.c (c_fully_fold_internal): Also emit shift count
3660 warnings for vector types.
3661 * c-typeck.c (build_binary_op): Likewise.
3663 2016-07-29 Marek Polacek <polacek@redhat.com>
3666 * c-decl.c (finish_struct): Rephrase an error message.
3669 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3670 to error node for invalid code.
3673 * c-decl.c (implicitly_declare): Return decl early not only for
3674 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3676 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3679 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3680 on GNU extern inline functions.
3682 2016-07-29 Marek Polacek <polacek@redhat.com>
3685 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3688 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3690 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3692 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3694 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3696 (best_macro_match): Likewise, converting from a typedef to a
3698 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3699 (lookup_name_fuzzy): Update for change of best_macro_match to a
3700 subclass with a ctor that calls cpp_forall_identifiers.
3702 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3704 * c-decl.c (implicit_decl_warning): Update for conversion of
3705 return type of lookup_name_fuzzy to const char *.
3706 (undeclared_variable): Likewise.
3707 (lookup_name_fuzzy): Convert return type from tree to
3709 * c-parser.c (c_parser_declaration_or_fndef): Update for
3710 conversion of return type of lookup_name_fuzzy to const char *.
3711 (c_parser_parameter_declaration): Likewise.
3713 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3715 * c-parser.c (c_parser_oacc_declare): Don't scan for
3717 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3718 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3719 zero-length subarrays.
3721 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3724 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3725 instead of FUZZY_LOOKUP_NAME.
3726 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3727 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3729 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3732 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3734 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3736 * c-parser.c (c_parser_generic_selection): Make type of variable
3738 (c_parser_omp_declare_simd): Likewise.
3740 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3742 * c-decl.c (struct c_struct_parse_info): Change member types
3743 from vec to auto_vec.
3744 (start_struct): Adjust.
3745 (finish_struct): Likewise.
3747 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3750 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3752 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3754 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3755 Move pragma context checking into...
3756 (c_parser_omp_cancellation_point): ... here, and improve
3757 diagnostic messages.
3758 * c-typeck.c (c_finish_omp_cancel)
3759 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3761 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3764 * c-typeck.c (c_build_qualified_type): Don't clear
3765 C_TYPE_INCOMPLETE_VARS for the main variant.
3767 2016-06-28 Martin Sebor <msebor@redhat.com>
3770 * c-typeck.c (output_init_element): Diagnose incompatible types
3771 before non-constant initializers.
3773 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3775 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3777 2016-06-23 Andi Kleen <ak@linux.intel.com>
3779 * Make-lang.in: Add support for autofdo.
3781 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3784 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3785 (implicit_decl_warning): When issuing warnings for implicit
3786 declarations, attempt to provide a suggestion via
3788 (undeclared_variable): Likewise when issuing errors.
3789 (lookup_name_in_scope): Likewise.
3790 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3791 (best_macro_match): New typedef.
3792 (find_closest_macro_cpp_cb): New function.
3793 (lookup_name_fuzzy): New function.
3794 * c-parser.c: Include gcc-rich-location.h.
3795 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3796 (c_keyword_starts_typename): ...this new function.
3797 (c_parser_declaration_or_fndef): When issuing errors about
3798 missing "struct" etc, add a fixit. For other kinds of errors,
3799 attempt to provide a suggestion via lookup_name_fuzzy.
3800 (c_parser_parms_declarator): When looking ahead to detect typos in
3801 type names, also reject CPP_KEYWORD.
3802 (c_parser_parameter_declaration): When issuing errors about
3803 unknown type names, attempt to provide a suggestion via
3805 * c-tree.h (c_keyword_starts_typename): New prototype.
3807 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3810 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3811 c_common_type returns error_mark_node.
3813 2016-06-19 Martin Sebor <msebor@redhat.com>
3816 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3817 __alignof__ (expression).
3819 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3821 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3823 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3825 * c-typeck.c (build_component_ref): Simplify fixit code by
3826 using gcc_rich_location::add_fixit_misspelled_id.
3827 (set_init_label): Likewise.
3829 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3831 * c-parser.c (c_parser_initelt): Provide location of name for new
3832 location_t param of set_init_label.
3833 * c-tree.h (set_init_label): Add location_t param.
3834 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3835 param and use it when issuing error messages about unrecognized
3836 field names. Attempt to provide a fixit hint if appropriate,
3837 otherwise update the error message to provide the type name.
3839 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3842 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3845 2016-06-08 Martin Sebor <msebor@redhat.com>
3846 Jakub Jelinek <jakub@redhat.com>
3850 * c-typeck.c (convert_arguments): Don't promote last argument
3851 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3853 2016-06-08 Marek Polacek <polacek@redhat.com>
3856 * c-decl.c (grokdeclarator): Check TYPE_P.
3859 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3862 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3864 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3865 and structure element reference, capture the location of the
3866 element name token and pass it to build_component_ref.
3867 (c_parser_postfix_expression_after_primary): Likewise for
3868 structure element dereference.
3869 (c_parser_omp_variable_list): Likewise for
3870 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3871 * c-tree.h (build_component_ref): Add location_t param.
3872 * c-typeck.c (build_component_ref): Add location_t param
3873 COMPONENT_LOC. Use it, if available, when issuing hints about
3874 mispelled member names to provide a fixit replacement hint.
3876 2016-06-06 Marek Polacek <polacek@redhat.com>
3879 * c-parser.c (c_parser_direct_declarator): Set location.
3881 2016-06-06 Marek Polacek <polacek@redhat.com>
3883 * c-typeck.c (comptypes_internal): Handle comparisons of
3884 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3885 TYPE_REF_CAN_ALIAS_ALL.
3887 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3889 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3890 arguments as addressable when async clause exists.
3892 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3895 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3896 when combined with target construct.
3898 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3900 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3901 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3903 2016-05-25 Marek Polacek <polacek@redhat.com>
3906 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3909 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3911 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3913 * c-parser.c (c_parser_oacc_declare): Add support for
3914 GOMP_MAP_FIRSTPRIVATE_POINTER.
3915 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3916 argument with enum c_omp_region_type ort.
3917 (handle_omp_array_sections): Likewise. Update call to
3918 handle_omp_array_sections_1.
3919 (c_finish_omp_clauses): Add specific errors and warning messages for
3920 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3921 call to handle_omp_array_sections.
3923 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3925 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3927 2016-05-24 Richard Biener <rguenther@suse.de>
3931 * c-typeck.c (build_array_ref): Do not complain about indexing
3932 non-lvalue vectors. Adjust for function name change.
3934 2016-05-20 Martin Sebor <msebor@redhat.com>
3937 * c-typeck.c (error_init): Use
3938 expansion_point_location_if_in_system_header.
3939 (warning_init): Same.
3941 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3944 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3946 (c_parser_postfix_expression): Likewise.
3947 * c-tree.h (c_expr::set_error): New method.
3948 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3949 that result's range is initialized.
3951 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3953 * c-typeck.c (parser_build_unary_op): Fix formatting.
3955 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3957 * c-decl.c (grokdeclarator): Remove errmsg and use of
3958 targetm.invalid_return_type.
3959 (grokparms): Remove errmsg and use of
3960 targetm.invalid_parameter_type.
3962 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3964 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3965 function return type.
3967 2016-05-12 Marek Polacek <polacek@redhat.com>
3970 * c-decl.c (build_compound_literal): Pass LOC down to
3971 c_incomplete_type_error.
3972 * c-tree.h (require_complete_type): Adjust declaration.
3973 (c_incomplete_type_error): Likewise.
3974 * c-typeck.c (require_complete_type): Add location parameter, pass it
3975 down to c_incomplete_type_error.
3976 (c_incomplete_type_error): Add location parameter, pass it down to
3978 (build_component_ref): Pass location down to c_incomplete_type_error.
3979 (default_conversion): Pass location down to require_complete_type.
3980 (build_array_ref): Likewise.
3981 (build_function_call_vec): Likewise.
3982 (convert_arguments): Likewise.
3983 (build_unary_op): Likewise.
3984 (build_c_cast): Likewise.
3985 (build_modify_expr): Likewise.
3986 (convert_for_assignment): Likewise.
3987 (c_finish_omp_clauses): Likewise.
3989 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3992 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3994 * c-errors.c (pedwarn_c90): Return true if warned.
3995 * c-tree.h (pedwarn_c90): Change return type to bool.
3996 (enum c_declspec_word): Add new enumerator cdw_atomic.
3998 2016-05-11 Marek Polacek <polacek@redhat.com>
4001 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4002 diagnose_mismatched_attributes and call it.
4004 2016-05-10 Marek Polacek <polacek@redhat.com>
4007 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4008 on a declaration following the definition.
4010 2016-05-05 Jakub Jelinek <jakub@redhat.com>
4012 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4013 parse it through to c_parser_c99_block_statement.
4014 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4017 2016-05-04 Marek Polacek <polacek@redhat.com>
4019 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4022 2016-05-04 Marek Polacek <polacek@redhat.com>
4025 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4026 for macro expansions.
4028 2016-05-03 Marek Polacek <polacek@redhat.com>
4031 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4032 check_builtin_function_arguments.
4034 2016-05-03 Richard Biener <rguenther@suse.de>
4036 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4037 the checksum from the previous stage.
4039 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4041 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4042 c_finish_omp_clauses.
4043 (c_parser_omp_all_clauses): Likewise.
4044 (c_parser_oacc_cache): Likewise.
4045 (c_parser_oacc_loop): Likewise.
4046 (omp_split_clauses): Likewise.
4047 (c_parser_omp_declare_target): Likewise.
4048 (c_parser_cilk_all_clauses): Likewise.
4049 (c_parser_cilk_for): Likewise.
4050 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4051 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4053 2016-05-02 Marek Polacek <polacek@redhat.com>
4056 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4059 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4062 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4063 OACC_LOOP_CLAUSE_MASK.
4064 (c_parser_oacc_kernels_parallel): Update call to
4065 c_oacc_split_loop_clauses.
4067 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
4069 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4070 argument to build_modify_expr in two cases.
4072 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4074 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4075 warn_for_memset instead of warning directly here.
4077 2016-04-26 Marek Polacek <polacek@redhat.com>
4080 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4082 (c_parser_for_statement): ... here.
4083 (c_parser_if_statement): Use it.
4084 (c_parser_switch_statement): Use it.
4085 (c_parser_while_statement): Use it.
4088 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4090 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4093 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4094 instead of c_finish_cilk_clauses.
4095 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4096 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4097 floating-point variables in the linear clause for Cilk Plus.
4099 2016-04-18 Michael Matz <matz@suse.de>
4101 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4102 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4104 2016-04-15 Marek Polacek <polacek@redhat.com>
4107 * c-typeck.c (build_unary_op): Pass location down to error and
4110 2016-04-15 Jakub Jelinek <jakub@redhat.com>
4113 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4115 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4116 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4117 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4118 Adjust c_parser_pragma callers.
4119 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4121 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4123 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4124 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4125 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4126 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4127 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4128 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4129 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4130 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4132 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4133 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4136 2016-04-13 Marek Polacek <polacek@redhat.com>
4139 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4141 (c_parser_statement): Likewise.
4142 (c_parser_c99_block_statement): Likewise.
4143 (c_parser_while_statement): Likewise.
4144 (c_parser_for_statement): Likewise.
4145 (c_parser_if_body): Don't set IF_P here.
4146 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4147 about dangling else here.
4148 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4149 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4150 warn about dangling else here.
4152 2016-04-04 Marek Polacek <polacek@redhat.com>
4155 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4157 2016-03-31 Marek Polacek <polacek@redhat.com>
4160 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4162 2016-03-18 David Malcolm <dmalcolm@redhat.com>
4165 * c-parser.c (c_parser_postfix_expression): Set the source range
4166 for uses of "__builtin_types_compatible_p".
4168 2016-03-17 Jakub Jelinek <jakub@redhat.com>
4171 * c-typeck.c (composite_type): Don't count void_list_node
4172 into len, if the list is terminated by void_list_node, start
4173 with void_list_node instead of NULL for newargs. Stop
4176 2016-03-16 Marek Polacek <polacek@redhat.com>
4179 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4180 nested functions returning VM types.
4182 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4184 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4185 when calling c_finish_omp_clauses.
4187 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4190 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4193 2016-03-04 Marek Polacek <polacek@redhat.com>
4196 * c-parser.c (c_parser_postfix_expression): Call
4197 c_parser_cast_expression rather than c_parser_postfix_expression.
4199 2016-03-01 Jakub Jelinek <jakub@redhat.com>
4203 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4204 of incomplete decls to error_mark_node.
4206 2016-02-24 Marek Polacek <polacek@redhat.com>
4209 * c-decl.c (finish_decl): Don't update the copy of the type of a
4210 different decl type.
4212 2016-02-23 Jakub Jelinek <jakub@redhat.com>
4215 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4216 in id_kind reclassification.
4218 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4221 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4223 2016-02-16 James Norris <jnorris@codesourcery.com>
4226 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4228 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4230 * c-decl.c (build_null_declspecs): Zero the entire struct.
4233 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4234 callers changed. If nested_p is true, use it to call
4235 finish_implicit_inits.
4236 * c-tree.h (finish_implicit_inits): Declare.
4237 * c-typeck.c (finish_implicit_inits): New function. Move code
4239 (push_init_level): ... here.
4240 (set_designator, process_init_element): Call finish_implicit_inits.
4242 2016-02-11 Jakub Jelinek <jakub@redhat.com>
4245 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4246 arguments for -Waddress warning.
4248 2016-02-04 Jakub Jelinek <jakub@redhat.com>
4251 * c-decl.c (finish_enum): When honoring mode attribute,
4252 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4254 2016-01-29 Jakub Jelinek <jakub@redhat.com>
4257 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4258 all type variants, not just TYPE_MAIN_VARIANT.
4260 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4263 * c-decl.c (c_write_global_declarations_1): Warn with
4264 warn_unused_function if static prototype without definition
4267 2016-01-27 Marek Polacek <polacek@redhat.com>
4270 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4271 to unsigned, if needed. Add -Wsign-compare warning.
4273 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4275 PR tree-optimization/69483
4276 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4278 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4281 * c-tree.h (incomplete_record_decls): Declare.
4282 * c-parser.c (incomplete_record_decls): Define.
4283 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4284 report error if any decl has zero size.
4285 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4286 or enum type to incomplete_record_decls.
4288 2016-01-14 Tom de Vries <tom@codesourcery.com>
4290 PR tree-optimization/68773
4291 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4294 2016-01-14 Marek Polacek <polacek@redhat.com>
4297 * c-decl.c (grokdeclarator): Provide more information for invalid
4300 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4302 * c-parser.c (c_parser_unary_expression): For dereferences, build
4303 a combined location before calling build_indirect_ref, so that
4304 error reports cover the full range, manually updating the c_expr
4307 2016-01-06 Marek Polacek <polacek@redhat.com>
4310 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4311 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4314 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4316 Update copyright years.
4318 2016-01-04 Marek Polacek <polacek@redhat.com>
4321 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4322 optimization to use __atomic_fetch_* built-in if possible.
4324 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4326 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4328 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4331 2015-12-22 Marek Polacek <polacek@redhat.com>
4334 * c-typeck.c (build_component_ref): Warn when acessing elements of
4335 atomic structures or unions.
4337 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4339 * c-typeck.c: Include "gcc-rich-location.h".
4340 (build_binary_op): In the two places that call binary_op_error,
4341 create a gcc_rich_location and populate it with the location of
4342 the binary op and its two operands.
4344 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4346 * c-parser.c (c_parser_statement_after_labels): When calling
4347 c_finish_return, Use the return expression's location if it has
4348 one, falling back to the location of the first token within it.
4349 * c-typeck.c (c_finish_return): When issuing warnings about
4350 the incorrect presence/absence of a return value, issue a note
4351 showing the declaration of the function.
4353 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4355 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4357 (c_parser_peek_nth_token): New function.
4358 (c_parser_peek_conflict_marker): New function.
4359 (c_parser_error): Detect conflict markers and report them as such.
4361 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4363 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4364 to preserve range information for the primary expression
4365 in the call to c_parser_postfix_expression_after_primary.
4367 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4369 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4370 expression location, falling back on the first token location,
4371 rather than always using the latter.
4373 2015-12-16 Marek Polacek <polacek@redhat.com>
4376 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4379 2015-12-15 Marek Polacek <polacek@redhat.com>
4382 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4385 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4387 * c-parser.c (c_parser_alignof_expression): Capture location of
4388 closing parenthesis (if any), or of end of unary expression, and
4389 use it to build a src_range for the expression.
4391 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4394 * c-parser.c (c_parser_get_builtin_args): Add
4395 "out_close_paren_loc" param, and write back to it.
4396 (c_parser_postfix_expression): Capture the closing
4397 parenthesis location for RID_CHOOSE_EXPR,
4398 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4399 RID_BUILTIN_SHUFFLE and use it to set the source range
4400 for such expressions; within RID_BUILTIN_COMPLEX set
4401 the underlying location.
4403 2015-12-07 Marek Polacek <polacek@redhat.com>
4406 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4407 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4409 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4411 * c-tree.h (c_build_va_arg): Adjust prototype.
4412 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4413 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4414 parameter, adjust throughout and issue an error if EXPR is a component
4415 with reverse storage order.
4417 2015-12-02 Jason Merrill <jason@redhat.com>
4419 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4420 (c_fully_fold_internal, decl_constant_value_for_optimization):
4421 Move from c-common.c.
4422 * c-tree.h: Declare decl_constant_value_for_optimization.
4423 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4425 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4428 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4429 following link from declarator to next declarator. Track original
4430 qualified type and pass it to c_build_qualified_type.
4431 * c-typeck.c (c_build_qualified_type): Add arguments
4432 orig_qual_type and orig_qual_indirect.
4434 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4436 * c-parser.c (c_parser_omp_clause_name)
4437 (c_parser_oacc_all_clauses): Alphabetical sorting.
4439 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4442 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4445 2015-12-01 Julian Brown <julian@codesourcery.com>
4446 Cesar Philippidis <cesar@codesourcery.com>
4447 James Norris <James_Norris@mentor.com>
4449 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4450 (c_parser_oacc_clause_use_device): New function.
4451 (c_parser_oacc_all_clauses): Add use_device support.
4452 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4453 (c_parser_oacc_host_data): New function.
4454 (c_parser_omp_construct): Add host_data support.
4455 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4456 * c-typeck.c (c_finish_oacc_host_data): New function.
4457 (c_finish_omp_clauses): Add use_device support.
4459 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4462 * c-decl.c: Set TYPE_PACKED in variants.
4464 2015-11-27 Martin Liska <mliska@suse.cz>
4467 * c-array-notation.c (fix_builtin_array_notation_fn):
4468 Use release_vec_vec instead of vec::release.
4469 (build_array_notation_expr): Likewise.
4470 (fix_conditional_array_notations_1): Likewise.
4471 (fix_array_notation_expr): Likewise.
4472 (fix_array_notation_call_expr): Likewise.
4474 2015-11-27 Jakub Jelinek <jakub@redhat.com>
4477 * c-parser.c (c_parser_compound_statement_nostart): If
4478 last_label is true, use pragma_stmt instead of pragma_compound
4479 as second c_parser_pragma argument.
4480 (c_parser_omp_ordered, c_parser_omp_target_update,
4481 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4482 false as second argument to c_parser_skip_to_pragma_eol after
4483 diagnosing standalone directives used in pragma_stmt context.
4485 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4487 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4488 with "if (ENABLE_OFFLOADING)".
4490 2015-11-23 David Malcolm <dmalcolm@redhat.com>
4493 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4494 for various Objective-C constructs: Class.name syntax,
4495 @selector(), @protocol(), @encode(), and [] message syntax.
4497 2015-11-20 David Malcolm <dmalcolm@redhat.com>
4500 * c-typeck.c (should_suggest_deref_p): New function.
4501 (build_component_ref): Special-case POINTER_TYPE when
4502 generating a "not a structure of union" error message, and
4503 suggest a "->" rather than a ".", providing a fix-it hint.
4505 2015-11-19 David Malcolm <dmalcolm@redhat.com>
4507 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4508 candidate into a new function, find_closest_identifier.
4510 2015-11-19 Marek Polacek <polacek@redhat.com>
4513 * c-typeck.c (parser_build_binary_op): Properly handle
4514 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4516 2015-11-17 David Malcolm <dmalcolm@redhat.com>
4518 * c-parser.c (set_c_expr_source_range): Bulletproof both
4519 overloaded implementations against NULL expr->value.
4520 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4522 (c_parser_unary_expression): Likewise when handling addresses of
4524 (c_parser_postfix_expression): Likewise for statement expressions,
4525 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4526 __builtin_va_arg, and for __builtin_offset_of.
4527 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4528 src_range using the range of the braced initializer.
4529 (c_parser_transaction_expression): Set src_range for "ret" to a
4530 sane pair of values.
4532 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4534 * c-parser.c (c_finish_omp_declare_simd): Look for
4535 "simd" attribute as well. Update error message.
4537 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4539 * c-parser.c (c_parser_omp_declare_target): Adjust.
4541 2015-11-14 Jakub Jelinek <jakub@redhat.com>
4543 * c-typeck.c (c_finish_omp_clauses): Don't mark
4544 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4546 2015-11-14 Marek Polacek <polacek@redhat.com>
4548 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4549 * c-typeck.c: Likewise.
4551 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4553 * c-decl.c (warn_defaults_to): Pass line_table to
4555 * c-errors.c (pedwarn_c99): Likewise.
4556 (pedwarn_c90): Likewise.
4557 * c-parser.c (set_c_expr_source_range): New functions.
4558 (c_token::get_range): New method.
4559 (c_token::get_finish): New method.
4560 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4561 based on the range from the start of the LHS to the end of the
4563 (c_parser_conditional_expression): Likewise, based on the range
4564 from the start of the cond.value to the end of exp2.value.
4565 (c_parser_binary_expression): Call set_c_expr_source_range on
4566 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4567 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4568 based on the cast_loc through to the end of the expr.
4569 (c_parser_unary_expression): Likewise, based on the
4570 op_loc through to the end of op.
4571 (c_parser_sizeof_expression) Likewise, based on the start of the
4572 sizeof token through to either the closing paren or the end of
4574 (c_parser_postfix_expression): Likewise, using the token range,
4575 or from the open paren through to the close paren for
4576 parenthesized expressions.
4577 (c_parser_postfix_expression_after_primary): Likewise, for
4578 various kinds of expression.
4579 * c-tree.h (struct c_expr): Add field "src_range".
4580 (c_expr::get_start): New method.
4581 (c_expr::get_finish): New method.
4582 (set_c_expr_source_range): New decls.
4583 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4584 on ret for prefix unary ops.
4585 (parser_build_binary_op): Likewise, running from the start of
4586 arg1.value through to the end of arg2.value.
4588 2015-11-13 Marek Polacek <polacek@redhat.com>
4591 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4593 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4595 * c-typeck.c: Include spellcheck.h.
4596 (lookup_field_fuzzy_find_candidates): New function.
4597 (lookup_field_fuzzy): New function.
4598 (build_component_ref): If the field was not found, try using
4599 lookup_field_fuzzy and potentially offer a suggestion.
4601 2015-11-12 James Norris <jnorris@codesourcery.com>
4602 Joseph Myers <joseph@codesourcery.com>
4604 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4605 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4606 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4607 and PRAGMA_OMP_CLAUSE_LINK.
4608 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4609 and PRAGMA_OACC_CLAUSE_LINK.
4610 (OACC_DECLARE_CLAUSE_MASK): New definition.
4611 (c_parser_oacc_declare): New function.
4613 2015-11-12 Marek Polacek <polacek@redhat.com>
4616 * c-parser.c (c_parser_for_statement): Reclassify the token in
4619 2015-11-11 Marek Polacek <polacek@redhat.com>
4623 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4624 checking the size of an array.
4626 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4628 * c-array-notation.c: Remove unused header files.
4629 * c-aux-info.c: Likewise.
4630 * c-convert.c: Likewise.
4631 * c-decl.c: Likewise.
4632 * c-errors.c: Likewise.
4633 * c-lang.c: Likewise.
4634 * c-objc-common.c: Likewise.
4635 * c-parser.c: Likewise.
4636 * c-typeck.c: Likewise.
4637 * gccspec.c: Likewise.
4639 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4640 Cesar Philippidis <cesar@codesourcery.com>
4641 James Norris <jnorris@codesourcery.com>
4642 Julian Brown <julian@codesourcery.com>
4643 Nathan Sidwell <nathan@codesourcery.com>
4645 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4647 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4648 (c_parser_pragma): Parse 'acc routine'.
4649 (OACC_ROUTINE_CLAUSE_MARK): Define.
4650 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4652 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4655 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4656 location of the backward-goto to the start of the loop body.
4658 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4661 * c-parser.c (c_parser_while_statement): Finish the loop before
4662 parsing ahead for misleading indentation.
4663 (c_parser_for_statement): Likewise.
4665 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4667 * c-decl.c (finish_struct): If the structure has reverse storage
4668 order, rewrite the type of array fields with scalar component. Call
4669 maybe_apply_pragma_scalar_storage_order on entry.
4670 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4671 errors on bit-fields and reverse SSO here and not...
4672 (c_mark_addressable): ...here.
4673 (output_init_element): Adjust call to initializer_constant_valid_p.
4674 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4676 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4678 * c-decl.c (warn_defaults_to): Update for change in signature
4679 of diagnostic_set_info.
4680 * c-errors.c (pedwarn_c99): Likewise.
4681 (pedwarn_c90): Likewise.
4682 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4683 for textinfo::set_location.
4685 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4686 Thomas Schwinge <thomas@codesourcery.com>
4687 James Norris <jnorris@codesourcery.com>
4689 * c-parser.c (c_parser_omp_clause_name): Add support for
4690 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4691 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4692 default(none) in OpenACC.
4693 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4695 (c_parser_oacc_clause_tile): New function.
4696 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4697 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4698 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4700 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4701 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4703 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4704 (c_parser_oacc_update): Update the error message for missing clauses.
4705 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4706 and OMP_CLAUSE_INDEPENDENT.
4708 2015-11-05 Marek Polacek <polacek@redhat.com>
4711 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4712 deal with pre-evaluation on invalid types.
4714 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4715 Ilya Verbin <ilya.verbin@intel.com>
4717 * c-parser.c: Include context.h and gimple-expr.h.
4718 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4719 monotonic together with nonmonotonic.
4720 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4721 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4722 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4723 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4724 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4725 expressions on combined target teams before the target.
4726 (c_parser_omp_declare_target): If decl has "omp declare target" or
4727 "omp declare target link" attribute, and cgraph or varpool node already
4728 exists, then set corresponding flags. Call c_finish_omp_clauses
4729 in the parenthesized extended-list syntax case.
4730 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4732 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4733 on OMP_CLAUSE_REDUCTION array sections.
4734 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4735 into the constant offset, or for variable low-bound using
4736 POINTER_PLUS_EXPR. For structure element based array sections use
4737 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4738 (c_finish_omp_clauses): Drop generic_field_head, structure
4739 elements are now always mapped even as array section bases,
4740 diagnose same var in data sharing and mapping clauses. Diagnose if
4741 linear step on declare simd is neither a constant nor a uniform
4742 parameter. Look through POINTER_PLUS_EXPR for array section
4743 reductions. Diagnose the same var or function appearing multiple
4744 times on the same directive. Fix up wording for the to clause if t
4745 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4746 modifier on kinds other than dynamic or guided or nonmonotonic
4747 modifier together with ordered clause.
4749 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4750 Chung-Lin Tang <cltang@codesourcery.com>
4752 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4754 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4756 * c-array-notation.c: Reorder #include's and remove duplicates.
4757 * c-aux-info.c: Likewise.
4758 * c-convert.c: Likewise.
4759 * c-decl.c: Likewise.
4760 * c-errors.c: Likewise.
4761 * c-lang.c: Likewise.
4762 * c-objc-common.c: Likewise.
4763 * c-parser.c: Likewise.
4764 * c-typeck.c: Likewise.
4766 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4769 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4770 after calling build_qualified_type.
4772 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4773 Thomas Schwinge <thomas@codesourcery.com>
4774 James Norris <jnorris@codesourcery.com>
4775 Joseph Myers <joseph@codesourcery.com>
4776 Julian Brown <julian@codesourcery.com>
4777 Bernd Schmidt <bschmidt@redhat.com>
4779 * c-parser.c (c_parser_oacc_shape_clause): New.
4780 (c_parser_oacc_simple_clause): New.
4781 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4782 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4784 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4785 James Norris <jnorris@codesourcery.com>
4786 Cesar Philippidis <cesar@codesourcery.com>
4790 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4791 parameters, and handle these. Adjust all users.
4792 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4794 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4796 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4798 (c_finish_omp_construct): Declare function.
4799 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4800 Merge functions into...
4801 (c_finish_omp_construct): ... this new function.
4803 2015-10-22 Richard Biener <rguenther@suse.de>
4805 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4806 before folding a MINUS_EXPR.
4808 2015-10-21 Marek Polacek <polacek@redhat.com>
4811 * c-decl.c (start_function): Warn about vararg functions without
4814 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4816 * c-typeck.c (build_conditional_expr): Use boolean vector
4817 type for vector comparison.
4818 (build_vec_cmp): New.
4819 (build_binary_op): Use build_vec_cmp for comparison.
4821 2015-10-20 Marek Polacek <polacek@redhat.com>
4823 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4825 2015-10-20 Marek Polacek <polacek@redhat.com>
4828 * c-parser.c (c_parser_attributes): Break out of the loop if the
4829 token after an attribute isn't a comma.
4831 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4832 Aldy Hernandez <aldyh@redhat.com>
4834 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4835 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4836 (c_parser_omp_variable_list): Handle structure elements for
4837 map, to and from clauses. Handle array sections in reduction
4838 clause. Formatting fixes.
4839 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4840 if clause modifiers.
4841 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4842 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4843 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4844 c_parser_omp_clause_is_device_ptr): New functions.
4845 (c_parser_omp_clause_ordered): Parse optional parameter.
4846 (c_parser_omp_clause_reduction): Handle array reductions.
4847 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4848 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4850 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4851 (c_parser_omp_clause_depend_sink): New function.
4852 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4853 (c_parser_omp_clause_map): Parse release/delete map kinds and
4854 optional always modifier.
4855 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4856 and c_finish_omp_clauses callers.
4857 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4858 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4859 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4860 (OMP_CRITICAL_CLAUSE_MASK): Define.
4861 (c_parser_omp_critical): Parse critical clauses.
4862 (c_parser_omp_for_loop): Handle doacross loops, adjust
4863 c_finish_omp_for and c_finish_omp_clauses callers.
4864 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4865 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4866 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4867 (c_parser_omp_for): Disallow ordered clause when combined with
4868 distribute. Disallow linear clause when combined with distribute
4869 and not combined with simd.
4870 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4871 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4872 parse clauses and if depend clause is found, don't parse a body.
4873 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4874 Allow target parallel without for after it.
4875 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4876 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4877 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4879 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4880 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4881 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4882 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4884 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4885 defaultmap and is_device_ptr clauses.
4886 (c_parser_omp_target): Parse target parallel and target simd. Set
4887 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4888 and target exit data. Diagnose invalid map kinds.
4889 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4890 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4892 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4894 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4895 (c_parser_omp_taskloop): New function.
4896 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4897 handle PRAGMA_OMP_TASKLOOP.
4898 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4899 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4900 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4901 Add IS_OMP argument, handle structure element bases, diagnose
4902 bitfields, pass IS_OMP recursively, diagnose known zero length
4903 array sections in depend clauses, handle array sections in reduction
4904 clause, diagnose negative length even for pointers.
4905 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4906 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4907 array sections in reduction clause, set
4908 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4909 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4910 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4911 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4913 2015-10-06 Marek Polacek <polacek@redhat.com>
4915 * c-parser.c (c_parser_statement_after_labels): Use
4916 protected_set_expr_location.
4917 (c_parser_omp_clause_num_gangs): Likewise.
4918 (c_parser_omp_clause_num_threads): Likewise.
4919 (c_parser_omp_clause_num_workers): Likewise.
4920 (c_parser_omp_clause_vector_length): Likewise.
4921 (c_parser_omp_clause_num_teams): Likewise.
4922 (c_parser_omp_clause_thread_limit): Likewise.
4923 * c-typeck.c (build_c_cast): Likewise.
4924 (c_cast_expr): Likewise.
4926 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4928 * c-typeck.c (c_tree_equal): Use real_equal instead of
4931 2015-10-04 Jason Merrill <jason@redhat.com>
4933 * c-parser.c (c_lex_one_token): Handle @synchronized.
4934 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4935 can change whether the function is transaction_safe.
4937 2015-10-02 Marek Polacek <polacek@redhat.com>
4940 * c-typeck.c (convert_for_assignment): Use the expansion point
4941 location throughout.
4943 2015-10-02 Marek Polacek <polacek@redhat.com>
4946 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4947 and pass it down to c_parser_if_statement.
4948 (c_parser_else_body): Add CHAIN parameter and pass it down to
4949 c_parser_statement_after_labels.
4950 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4951 duplicated if-else-if conditions.
4953 2015-10-01 Marek Polacek <polacek@redhat.com>
4955 * c-typeck.c (convert_for_assignment): Improve commentary.
4957 2015-09-30 Marek Polacek <polacek@redhat.com>
4960 * c-typeck.c (c_finish_return): Use the expansion point location for
4961 certain "return with value" warnings.
4963 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4965 * c-parser.c (pragma_lex): Add loc argument.
4967 2015-09-15 Marek Polacek <polacek@redhat.com>
4970 * c-decl.c (tag_exists_p): New function.
4971 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4972 struct/union/enum keywords are missing.
4973 * c-tree.h (tag_exists_p): Declare.
4975 2015-09-15 Marek Polacek <polacek@redhat.com>
4977 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4978 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4979 Return NULL_TREE instead of 0.
4980 (lookup_name): Return NULL_TREE instead of 0.
4981 (lookup_name_in_scope): Likewise.
4982 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4983 (parser_xref_tag): Use false instead of 0.
4984 (start_struct): Use true instead of 1.
4985 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4987 2015-09-14 Marek Polacek <polacek@redhat.com>
4989 * c-typeck.c (set_nonincremental_init_from_string): Use
4990 HOST_WIDE_INT_M1U when shifting a negative value.
4992 2015-09-09 Mark Wielaard <mjw@redhat.com>
4994 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4997 2015-09-10 Jakub Jelinek <jakub@redhat.com>
5000 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5001 into OMP_FOR_PRE_BODY rather than before the loop.
5003 2015-09-09 Jakub Jelinek <jakub@redhat.com>
5006 * c-parser.c (c_parser_oacc_all_clauses,
5007 c_parser_omp_all_clauses): Remove invalid clause from
5008 list of clauses even if parser->error is set.
5011 * c-parser.c (c_parser_omp_clause_aligned,
5012 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5014 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5018 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5019 instead of c_parser_unary_expression. If the result is !lvalue_p,
5020 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5022 2015-09-04 Marek Polacek <polacek@redhat.com>
5025 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5027 2015-09-03 Martin Sebor <msebor@redhat.com>
5030 * c-typeck.c (convert_arguments, parser_build_unary_op,
5031 build_conditional_expr, c_cast_expr, convert_for_assignment,
5032 build_binary_op, _objc_common_truthvalue_conversion): Call
5034 (c_decl_implicit): Define.
5036 2015-09-02 Marek Polacek <polacek@redhat.com>
5039 * c-parser.c (c_parser_enum_specifier): Give a better error for
5042 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5044 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5046 2015-08-12 Marek Polacek <polacek@redhat.com>
5048 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5051 2015-08-03 Marek Polacek <polacek@redhat.com>
5054 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5056 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5058 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5060 * c-parser.c (c_parser_if_body): Take token_indent_info
5061 argument. Call warn_for_misleading_indentation even when the
5062 body is a semicolon. Extract token_indent_infos corresponding
5063 to the guard, body and next tokens. Adjust call to
5064 warn_for_misleading_indentation accordingly.
5065 (c_parser_else_body): Likewise.
5066 (c_parser_if_statement): Likewise.
5067 (c_parser_while_statement): Likewise.
5068 (c_parser_for_statement): Likewise.
5070 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5071 Manuel López-Ibáñez <manu@gcc.gnu.org>
5073 * c-decl.c (get_parm_info): Remove static var. Update warning
5076 2015-07-27 Marek Polacek <polacek@redhat.com>
5080 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5082 2015-07-20 Marek Polacek <polacek@redhat.com>
5085 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5086 (build_binary_op): Warn about left shift overflows.
5088 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5090 * c-array-notation.c: Adjust includes for flags.h changes.
5091 * c-objc-common.c: Likewise.
5093 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5095 * c-array-notation.c: Adjust includes.
5096 * c-aux-info.c: Likewise.
5097 * c-convert.c: Likewise.
5098 * c-decl.c: Likewise.
5099 * c-errors.c: Likewise.
5100 * c-lang.c: Likewise.
5101 * c-objc-common.c: Likewise.
5102 * c-parser.c: Likewise.
5103 * c-typeck.c: Likewise.
5105 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5108 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5110 2015-06-29 Marek Polacek <polacek@redhat.com>
5113 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5114 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5115 about -Wswitch-bool here.
5116 (do_case): Update c_add_case_label call.
5117 (c_finish_case): Update c_do_switch_warnings call.
5119 2015-06-27 Marek Polacek <polacek@redhat.com>
5121 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5123 2015-06-26 Marek Polacek <polacek@redhat.com>
5125 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5127 * c-typeck.c (array_to_pointer_conversion): Likewise.
5128 (build_unary_op): Likewise.
5129 (c_finish_return): Likewise.
5131 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5133 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5134 * c-parser.c: Likewise.
5136 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5138 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5139 instead of pointer_hash.
5140 (detect_field_duplicates): Likewise.
5142 2015-06-25 Marek Polacek <polacek@redhat.com>
5144 * c-array-notation.c: Use VAR_P throughout.
5145 * c-decl.c: Likewise.
5146 * c-objc-common.c: Likewise.
5147 * c-parser.c: Likewise.
5148 * c-typeck.c: Likewise.
5150 2015-06-25 Marek Polacek <polacek@redhat.com>
5152 * c-decl.c: Use is_global_var throughout.
5153 * c-parser.c: Likewise.
5154 * c-typeck.c: Likewise.
5156 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5158 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5159 * c-aux-info.c: Likewise.
5160 * c-convert.c: Likewise.
5161 * c-decl.c: Likewise.
5162 * c-errors.c: Likewise.
5163 * c-lang.c: Likewise.
5164 * c-objc-common.c: Likewise.
5165 * c-parser.c: Likewise.
5166 * c-typeck.c: Likewise.
5168 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
5171 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5174 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5176 * c-decl.c (pop_scope): Register the main translation unit
5177 through the new debug hook.
5179 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5181 * c-array-notation.c : Adjust include files.
5182 * c-aux-info.c : Likewise.
5183 * c-convert.c : Likewise.
5184 * c-decl.c : Likewise.
5185 * c-errors.c : Likewise.
5186 * c-lang.c : Likewise.
5187 * c-lang.h : Likewise.
5188 * c-objc-common.c : Likewise.
5189 * c-parser.c : Likewise.
5190 * c-typeck.c : Likewise.
5192 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5194 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5195 immediately clobber it.
5196 (c_write_global_declarations_1): Remove call to
5197 check_global_declaration_1.
5198 (c_write_global_declarations_2): Remove.
5199 (c_write_final_cleanups): Rename from c_write_global_declarations.
5200 Remove call to finalize_compilation_unit.
5201 Remove calls to debugging hooks.
5202 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5203 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5204 * c-tree.h: Remove c_write_global_declarations.
5206 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5208 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5209 * c-aux-info.c: Likewise.
5210 * c-convert.c: Likewise.
5211 * c-decl.c: Likewise.
5212 * c-errors.c: Likewise.
5213 * c-lang.c: Likewise.
5214 * c-objc-common.c: Likewise.
5215 * c-parser.c: Likewise.
5216 * c-typeck.c: Likewise.
5218 2015-06-04 Marek Polacek <polacek@redhat.com>
5221 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5224 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5226 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5227 Warn for empty struct.
5228 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5230 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5232 * c-decl.c (start_function): Call plugin before parsing.
5233 (finish_function): Call plugin after parsing.
5235 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5238 * c-decl.c (merge_decls): Merge DECL_COMMON.
5240 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
5242 * Make-lang.in (check_gcc_pallelize): Define.
5244 2015-05-22 Marek Polacek <polacek@redhat.com>
5247 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5250 2015-05-21 Marek Polacek <polacek@redhat.com>
5252 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5255 2015-05-20 Marek Polacek <polacek@redhat.com>
5257 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5258 * c-typeck.c: Likewise.
5260 2015-05-19 Marek Polacek <polacek@redhat.com>
5262 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5264 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5267 * c-parser.c (c_parser_omp_for_loop): Don't add
5268 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5269 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5270 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5273 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5275 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5278 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5281 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5284 2015-05-14 Marek Polacek <polacek@redhat.com>
5288 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5291 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5293 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5294 to add a call to warn_for_misleading_indentation.
5295 (c_parser_else_body): Likewise, adding param "else_loc".
5296 (c_parser_if_statement): Check for misleading indentation.
5297 (c_parser_while_statement): Likewise.
5298 (c_parser_for_statement): Likewise.
5300 2015-05-08 Marek Polacek <polacek@redhat.com>
5303 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5304 (output_init_element): Likewise.
5306 2015-05-07 Marek Polacek <polacek@redhat.com>
5309 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5312 2015-04-30 Marek Polacek <polacek@redhat.com>
5314 * c-typeck.c (set_init_label): Call error_at instead of error and
5317 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5320 * c-typeck.c (c_build_va_arg): Clarify the error message.
5322 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5324 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5325 OMP_STANDALONE_CLAUSES.
5327 2015-04-28 Marek Polacek <polacek@redhat.com>
5329 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5331 2015-04-28 Marek Polacek <polacek@redhat.com>
5334 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5336 2015-04-25 Marek Polacek <polacek@redhat.com>
5339 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5342 2015-04-23 Marek Polacek <polacek@redhat.com>
5345 * c-decl.c (set_labels_context_r): New function.
5346 (store_parm_decls): Call it via walk_tree_without_duplicates.
5347 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5348 instead of create_tmp_var. Build TARGET_EXPR instead of
5350 (build_atomic_assign): Use create_tmp_var_raw instead of
5351 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5353 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5355 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5356 (c_parser_omp_target_update): Add missed %> to error_at ().
5358 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5361 * c-decl.c (c_default_pointer_mode): Remove definition.
5362 * c-tree.h (c_default_pointer_mode): Remove declaration.
5364 2015-03-27 Tobias Burnus <burnus@net-b.de>
5367 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5369 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5370 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5371 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5373 2015-03-19 Jakub Jelinek <jakub@redhat.com>
5375 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5376 attribute for DECL_EXTERNAL VAR_DECLs.
5378 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5380 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5383 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5386 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5387 before preparing arguments to warn_logical_not_parentheses.
5389 2015-03-09 Jakub Jelinek <jakub@redhat.com>
5392 * c-typeck.c (parser_build_binary_op): Don't warn for
5393 !!x == y or !b == y where b is _Bool.
5395 2015-03-09 Marek Polacek <polacek@redhat.com>
5397 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5398 * c-decl.c (grokdeclarator): Likewise.
5399 * c-typeck.c (build_binary_op): Likewise.
5401 2015-02-27 Marek Polacek <polacek@redhat.com>
5404 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5406 2015-02-14 Marek Polacek <polacek@redhat.com>
5409 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5410 declared through a typedef name.
5412 2015-02-13 Marek Polacek <polacek@redhat.com>
5415 * c-decl.c (grokdeclarator): Print also the type when giving
5416 the error message about array's incomplete element type.
5418 2015-02-11 Jakub Jelinek <jakub@redhat.com>
5421 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5422 check in the POP macro.
5424 2015-02-09 Marek Polacek <polacek@redhat.com>
5427 * c-typeck.c (process_init_element): Don't always wrap
5428 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5429 initializing a range of elements.
5431 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5435 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5437 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5439 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5440 processing enum declaration.
5442 2015-01-29 Marek Polacek <polacek@redhat.com>
5445 * c-typeck.c (pop_init_level): If constructor_elements has
5446 exactly one element with integer_zerop value, set constructor_zeroinit
5447 to 1. Remove braces around warning_init call.
5449 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5452 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5453 of FUNCTION_DECLs with error_mark_node.
5455 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5458 * c-typeck.c (convert_arguments): Return -1 if there are
5459 error_args, even if we've diagnosed too many arguments.
5461 2015-01-21 Richard Biener <rguenther@suse.de>
5464 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5465 for builtins the user declared correctly.
5467 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5468 Bernd Schmidt <bernds@codesourcery.com>
5469 Cesar Philippidis <cesar@codesourcery.com>
5470 James Norris <jnorris@codesourcery.com>
5471 Jakub Jelinek <jakub@redhat.com>
5472 Ilmir Usmanov <i.usmanov@samsung.com>
5474 * c-parser.c: Include "gomp-constants.h".
5475 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5476 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5477 Use OMP_CLAUSE_SET_MAP_KIND.
5478 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5479 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5480 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5481 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5482 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5483 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5484 "copyout", "create", "delete", "deviceptr", "gang", "host",
5485 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5486 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5487 "present_or_create", "pcreate", "seq", "self", "vector",
5488 "vector_length", "wait", "worker".
5489 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5490 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5491 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5492 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5493 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5494 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5495 (c_parser_oacc_data_clause_deviceptr)
5496 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5497 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5498 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5499 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5500 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5501 (c_parser_oacc_parallel, c_parser_oacc_update)
5502 (c_parser_oacc_wait): New functions.
5503 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5504 (c_finish_oacc_data): New prototypes.
5505 * c-typeck.c: Include "gomp-constants.h".
5506 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5507 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5508 OMP_CLAUSE_SET_MAP_KIND.
5509 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5510 (c_finish_oacc_data): New functions.
5511 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5512 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5513 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5514 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5515 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5516 GOMP_MAP_FORCE_DEVICEPTR.
5518 2015-01-09 Michael Collison <michael.collison@linaro.org>
5520 * c-array-notation.c: Include hash-set.h, machmode.h,
5521 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5522 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5523 * c-aux-info.c: Ditto.
5524 * c-convert.c: Ditto.
5526 * c-errors.c: Ditto.
5527 * c-lang.c: Dittoxs.
5528 * c-objc-common.c: Ditto.
5529 * c-parser.c: Ditto.
5530 * c-typeck.c: Include hash-set.h, machmode.h,
5531 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5532 fold-const.h, wide-int.h, inchash.h, real.h and
5533 fixed-value.h due to flattening of tree.h.
5535 2015-01-07 Marek Polacek <polacek@redhat.com>
5538 * c-typeck.c (process_init_element): Disallow initialization of
5539 a flexible array member with a string constant if the structure
5542 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5545 * c-typeck.c (convert_for_assignment, c_finish_return): For
5546 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5547 types also set in_late_binary_op around convert call.
5548 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5549 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5550 result on expr as last argument to ubsan_instrument_float_cast,
5551 if in_late_binary_op, don't use c_save_expr but save_expr.
5553 Update copyright years.
5555 2015-01-05 Marek Polacek <polacek@redhat.com>
5558 * c-typeck.c (build_array_ref): Pass loc down to
5559 warn_array_subscript_with_type_char.
5561 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5563 * c-typeck.c: New behavious for pointers to arrays with qualifiers
5564 (common-pointer-type): For pointers to arrays take qualifiers from
5566 (build_conditional_expr): Add warnings for lost qualifiers.
5567 (comp-target-types): Allow pointers to arrays with different qualifiers.
5568 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5569 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5570 to PEDWARN_FOR_QUALIFIERS.
5572 2014-12-17 Jakub Jelinek <jakub@redhat.com>
5575 * c-convert.c: Include ubsan.h.
5576 (convert): For real -> integral casts and
5577 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5578 instead instrument the float cast directly.
5580 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5582 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5583 c_finish_stmt_expr): Remove NULL last argument from
5584 create_tmp_var_raw and create_tmp_var calls.
5585 * c-array-notation.c (fix_builtin_array_notation_fn,
5586 build_array_notation_expr, fix_conditional_array_notations_1,
5587 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5589 2014-11-28 Marek Polacek <polacek@redhat.com>
5592 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5593 convert the right operand to integer type.
5595 2014-11-25 Marek Polacek <polacek@redhat.com>
5598 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5599 for inline functions.
5601 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5604 * c-typeck.c (build_array_ref): Adjust
5605 convert_vector_to_pointer_for_subscript caller. If it returns true,
5606 call non_lvalue_loc on the result.
5608 2014-11-11 Richard Biener <rguenther@suse.de>
5610 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5613 2014-11-10 Andi Kleen <ak@linux.intel.com>
5616 * c-parser.c (c_parser_statement_after_labels): Call
5618 (c_parser_if_statement): Dito.
5619 (c_parser_switch_statement): Dito.
5620 (c_parser_while_statement): Dito.
5621 (c_parser_do_statement): Dito.
5622 (c_parser_for_statement): Dito.
5623 * c-typeck.c (c_finish_loop): Dito.
5625 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5627 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5628 OPT_Wshift_count_overflow in the warnings.
5630 2014-10-30 Marek Polacek <polacek@redhat.com>
5632 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5633 print the stripped version as well, if they're not the same.
5635 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5637 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5640 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5642 * c-decl.c: Adjust include files.
5643 * c-parser.c: Ditto.
5645 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5646 Tom Tromey <tromey@redhat.com>
5648 * c-tree.h (enum c_oracle_request): New.
5649 (c_binding_oracle_function): New typedef.
5650 (c_binding_oracle, c_pushtag, c_bind): Declare.
5651 * c-decl.c (c_binding_oracle): New global.
5652 (I_SYMBOL_CHECKED): New macro.
5653 (i_symbol_binding): New function.
5654 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5655 (I_TAG_CHECKED): New macro.
5656 (i_tag_binding): New function.
5657 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5658 (I_LABEL_CHECKED): New macro.
5659 (i_label_binding): New function.
5660 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5661 (c_print_identifier): Save and restore c_binding_oracle.
5662 (c_pushtag, c_bind): New functions.
5664 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5666 * c-typeck.c: Adjust include files.
5668 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5671 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5672 initialization here...
5673 (c_initialize_diagnostics): ... but here. Set defaults after
5674 building pretty-printer.
5676 2014-10-23 Marek Polacek <polacek@redhat.com>
5679 * c-decl.c (pop_scope): Don't print warning in external_scope.
5681 2014-10-19 Marek Polacek <polacek@redhat.com>
5684 * c-typeck.c (output_init_element): Allow initializing objects with
5685 static storage duration with compound literals even in C99 and add
5688 2014-10-17 Marek Polacek <polacek@redhat.com>
5691 * c-typeck.c (digest_init): Allow initializing objects with static
5692 storage duration with compound literals even in C99 and add pedwarn
5695 2014-10-17 Marek Polacek <polacek@redhat.com>
5698 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5699 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5700 error multiple times. Print the type.
5702 2014-10-17 Marek Polacek <polacek@redhat.com>
5705 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5708 2014-10-17 Marek Polacek <polacek@redhat.com>
5710 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5711 (start_function): Use OPT_Wimplicit_int instead of 0.
5712 (store_parm_decls_oldstyle): Likewise.
5714 2014-10-17 Alan Modra <amodra@gmail.com>
5717 * c-decl.c (merge_decls): Don't merge section name or tls model
5718 to newdecl symtab node, instead merge to olddecl. Override
5719 existing olddecl section name. Set tls_model for all thread-local
5720 vars, not just OMP thread-private ones. Remove incorrect comment.
5722 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5724 * c-decl.c: Adjust include files.
5726 2014-10-14 DJ Delorie <dj@redhat.com>
5728 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5729 (c_token_starts_typename): Check all __intN, not just __int128.
5730 (c_token_starts_declspecs): Likewise.
5731 (c_parser_declspecs): Likewise.
5732 (c_parser_attribute_any_word): Likewise.
5733 (c_parser_objc_selector): Likewise.
5734 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5735 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5737 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5739 (finish_declspecs): Likewise.
5741 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5743 * c-parser.c (c_parser_all_labels): New function to replace
5745 (c_parser_statement): Call the new function.
5747 2014-10-09 Marek Polacek <polacek@redhat.com>
5750 * c-typeck.c (pop_init_level): Don't warn about initializing
5753 2014-10-07 Marek Polacek <polacek@redhat.com>
5756 * c-decl.c (header_for_builtin_fn): New function.
5757 (implicitly_declare): Suggest which header to include.
5759 2014-10-07 Marek Polacek <polacek@redhat.com>
5761 * c-convert.c (convert): Use error_operand_p.
5762 * c-typeck.c (require_complete_type): Likewise.
5763 (really_atomic_lvalue): Likewise.
5764 (digest_init): Likewise.
5765 (handle_omp_array_sections_1): Likewise.
5767 2014-10-03 Marek Polacek <polacek@redhat.com>
5770 * c-decl.c (pop_scope): Don't warn about "inline function declared
5771 but never defined" for functions marked with gnu_inline attribute.
5773 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5776 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5777 on low_bound and length.
5779 2014-09-24 Marek Polacek <polacek@redhat.com>
5783 * c-parser.c: Don't define CPP_KEYWORD.
5784 (c_parser_switch_statement): Pass original type to c_finish_case.
5785 * c-tree.h (c_finish_case): Update declaration.
5786 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5787 conditionally to c_do_switch_warnings.
5789 2014-09-03 Marek Polacek <polacek@redhat.com>
5792 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5795 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5796 Balaji V. Iyer <balaji.v.iyer@intel.com>
5797 Igor Zamyatin <igor.zamyatin@intel.com>
5799 * c-parser.c (c_parser_cilk_for): New function.
5800 (c_parser_cilk_grainsize): Likewise.
5801 (c_get_temp_regvar): Likewise.
5802 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5803 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5804 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5805 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5808 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5810 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5811 with using HOST_WIDE_INT without truncation to 'int'
5813 2014-08-22 Marek Polacek <polacek@redhat.com>
5816 * c-typeck.c (parser_build_binary_op): Adjust call to
5817 warn_logical_not_parentheses.
5819 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5822 * c-parser.c (c_parser_array_notation): Check for correct
5823 type of an array added.
5825 2014-08-19 Marek Polacek <polacek@redhat.com>
5828 * c-typeck.c (build_binary_op): If either operand of a comparison
5829 is a boolean expression, call maybe_warn_bool_compare.
5831 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5834 * c-typeck.c (build_c_cast): Do a conversion even when the
5835 TYPE_MAIN_VARIANTs are the same.
5837 2014-08-19 Marek Polacek <polacek@redhat.com>
5839 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5840 pedwarn_c99 instead of pedwarn.
5841 (grokfield): Likewise.
5842 (warn_defaults_to): New function.
5843 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5844 Unconditionally call pedwarn_c99 instead of pedwarn.
5845 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5846 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5847 check flag_isoc11 before.
5848 * c-errors.c (pedwarn_c99): Change the return type to bool.
5849 Handle -Wc99-c11-compat.
5850 * c-parser.c (disable_extension_diagnostics): Handle
5851 warn_c99_c11_compat.
5852 (restore_extension_diagnostics): Likewise.
5853 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5854 instead of pedwarn, don't check flag_isoc11 before.
5855 (c_parser_declspecs): Likewise.
5856 (c_parser_alignas_specifier): Likewise.
5857 (c_parser_alignof_expression): Likewise.
5858 (c_parser_generic_selection): Likewise.
5859 * c-tree.h (pedwarn_c99): Update declaration.
5860 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5863 2014-08-19 Marek Polacek <polacek@redhat.com>
5865 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5867 * c-errors.c: Include "opts.h".
5868 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5869 * c-parser.c (disable_extension_diagnostics): Handle negative value
5870 of warn_c90_c99_compat, too.
5871 (restore_extension_diagnostics): Likewise.
5872 (c_parser_compound_statement_nostart): Pass
5873 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5875 2014-08-12 Marek Polacek <polacek@redhat.com>
5877 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5879 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5881 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5883 2014-08-10 Marek Polacek <polacek@redhat.com>
5886 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5887 Call pedwarn_c90 instead of pedwarn.
5888 (check_bitfield_type_and_width): Likewise.
5889 (declspecs_add_qual): Likewise.
5890 (declspecs_add_type): Likewise.
5891 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5892 Adjust to only call pedwarn_c90.
5893 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5894 pedwarn_c90 instead of pedwarn.
5895 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5896 * c-parser.c (disable_extension_diagnostics): Handle
5897 warn_c90_c99_compat.
5898 (restore_extension_diagnostics): Likewise.
5899 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5900 pedwarn_c90 instead of pedwarn.
5901 (c_parser_initelt): Likewise.
5902 (c_parser_postfix_expression): Likewise.
5903 (c_parser_postfix_expression_after_paren_type): Likewise.
5904 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5905 * c-tree.h: Fix formatting.
5906 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5907 pedwarn_c90 instead of pedwarn.
5909 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5911 * c-typeck.c: Remove include of pointer-set.h.
5913 2014-08-07 Marek Polacek <polacek@redhat.com>
5915 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5917 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5919 * c-typeck.c: Use hash_map instead of pointer_map.
5921 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5923 * c-decl.c: Use hash_set instead of pointer_set.
5925 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5928 * c-array-notation.c (expand_array_notations): Handling
5931 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5934 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5937 2014-07-30 Tom Tromey <tromey@redhat.com>
5939 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5941 (really_start_incremental_init, push_init_level): Initialize
5943 (pop_init_level): Set global designator_depth.
5944 (process_init_element): Check for designated_init attribute.
5946 2014-07-20 Marek Polacek <polacek@redhat.com>
5949 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5950 (implicitly_declare): Pass location to implicit_decl_warning.
5952 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5955 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5956 If non-NULL, call c_parser_check_literal_zero.
5957 (c_parser_check_literal_zero): New function.
5958 (c_parser_postfix_expression_after_primary): Adjust
5959 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5961 2014-07-06 Marek Polacek <polacek@redhat.com>
5964 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5965 * c-tree.h (C_ARRAY_PARAMETER): Define.
5966 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5969 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5970 Chen Gang <gang.chen.5i5j@gmail.com>
5972 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5975 2014-07-01 Marek Polacek <polacek@redhat.com>
5977 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5978 instead of 0 to WARN_FOR_ASSIGNMENT.
5980 2014-07-01 Marek Polacek <polacek@redhat.com>
5983 * c-typeck.c (convert_for_assignment): Pass
5984 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5986 2014-06-30 Marek Polacek <polacek@redhat.com>
5988 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5989 has no_sanitize_undefined attribute.
5991 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5994 * c-array-notation.c (fix_builtin_array_notation_fn):
5995 Check for 0 arguments in builtin call. Check that bultin argument is
5997 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6000 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6002 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6003 qualifiers in __auto_type for atomic types.
6004 (c_parser_typeof_specifier): Discard all type qualifiers in
6005 __typeof__ for atomic types.
6007 2014-06-25 Marek Polacek <polacek@redhat.com>
6010 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6011 the return expression to c_finish_return.
6013 2014-06-25 Jakub Jelinek <jakub@redhat.com>
6015 * c-typeck.c (c_finish_omp_clauses): Make sure
6016 OMP_CLAUSE_LINEAR_STEP has correct type.
6018 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6022 2014-06-24 Jakub Jelinek <jakub@redhat.com>
6024 * c-parser.c (c_parser_omp_for_loop): For
6025 #pragma omp parallel for simd move lastprivate clause from parallel
6026 to for rather than simd.
6028 2014-06-23 Marek Polacek <polacek@redhat.com>
6030 * c-typeck.c (parser_build_binary_op): Don't call
6031 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6033 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6035 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6036 * c-decl.c (merge_decls): Likewise.
6038 2014-06-09 Marek Polacek <polacek@redhat.com>
6041 * c-typeck.c (error_init): Call inform instead of error_at.
6042 (pedwarn_init): Call inform instead of pedwarn.
6043 (warning_init): Call inform instead of warning_at.
6045 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
6047 * c-decl.c (merge_decls): Use set_decl_section_name.
6048 (duplicate_decls): Remove node if it exists.
6050 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6053 * c-typeck.c (push_init_level, process_init_element,
6054 pop_init_level): Correct check for zero initialization, move
6055 missing brace warning to respect zero initialization.
6057 2014-06-05 Marek Polacek <polacek@redhat.com>
6060 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6062 2014-06-05 Marek Polacek <polacek@redhat.com>
6065 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6066 on the left hand side operand of a comparison.
6068 2014-06-05 Marek Polacek <polacek@redhat.com>
6071 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6072 Print note only if the warning was printed.
6074 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6077 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6080 2014-06-03 Marek Polacek <polacek@redhat.com>
6083 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6085 * c-tree.h (c_start_case): Update.
6086 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6087 switch condition has boolean value.
6089 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
6091 * c-decl.c: Include builtins.h.
6092 * c-parser.c: Likewise.
6094 2014-05-27 Marek Polacek <polacek@redhat.com>
6097 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6098 error and warning calls to error_at and warning_at. Pass location of
6099 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6100 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6101 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6103 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6106 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6107 function parameters.
6109 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
6111 * c-decl.c (merge_decls): Preserve symtab node pointers.
6112 (duplicate_decls): Free new decl.
6114 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6116 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6119 * c-parser.c (c_parser_omp_target): Return bool values.
6121 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6123 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6124 num_teams_loc variable to num_thread_limit_loc.
6126 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6128 * c-array-notation.c (expand_array_notations): Use void_node
6129 instead of void_zero_node.
6131 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6133 * c-decl.c (finish_struct): Adjust.
6134 (finish_enum): Likewise.
6136 (record_inline_static): Likewise.
6137 (push_scope): Likewise.
6138 (make_label): Likewise.
6139 (lookup_label_for_goto): Likewise.
6140 (finish_struct): Likewise.
6141 (finish_enum): Likewise.
6142 (store_parm_decls): Likewise.
6143 (c_push_function_context): Likewise.
6144 * c-lang.h: Remove usage of variable_size gty attribute.
6145 * c-parser.c (c_parse_init): Adjust.
6146 (c_parse_file): Likewise.
6148 2014-05-13 Marek Polacek <polacek@redhat.com>
6151 * c-typeck.c (convert_for_assignment): Pass location to
6152 WARN_FOR_ASSIGNMENT instead of input_location.
6154 2014-05-10 Marek Polacek <polacek@redhat.com>
6156 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6157 maybe_warn_string_init.
6158 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6159 maybe_warn_string_init.
6160 * c-tree.h (maybe_warn_string_init): Update declaration.
6161 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6162 Call pedwarn_init with loc instead of with input_location.
6163 (digest_init): Pass init_loc to maybe_warn_string_init.
6164 (pop_init_level): Call pedwarn_init with loc instead of with
6166 (set_init_index): Likewise.
6167 (process_init_element): Likewise.
6169 2014-05-09 Marek Polacek <polacek@redhat.com>
6172 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6173 (c_parser_initelt): Pass location to set_init_label. Pass array index
6174 location to set_init_index.
6175 * c-tree.h (push_init_level): Update declaration.
6176 (pop_init_level): Likewise.
6177 (set_init_index): Likewise.
6178 (set_init_label): Likewise.
6179 * c-typeck.c (error_init): Add location parameter. Call error_at
6181 (digest_init): Pass init_loc to error_init.
6182 (really_start_incremental_init):
6183 (push_init_level): Add location parameter. Pass loc to pop_init_level
6185 (pop_init_level): Likewise.
6186 (set_designator): Add location parameter. Pass loc to pop_init_level,
6187 push_init_level, and error_init.
6188 (set_init_index): Add location parameter. Pass loc to error_init and
6190 (set_init_label): Likewise.
6191 (output_init_element): Pass loc to error_init.
6192 (process_init_element): Pass loc to error_init, pop_init_level,
6193 pedwarn_init, and push_init_level.
6195 2014-05-09 Marek Polacek <polacek@redhat.com>
6198 * c-parser.c (c_parser_attributes): Parse the arguments as an
6199 expression-list if the attribute takes identifier.
6201 2014-05-08 Marek Polacek <polacek@redhat.com>
6204 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6207 2014-05-08 Marek Polacek <polacek@redhat.com>
6210 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6213 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6214 Mike Stump <mikestump@comcast.net>
6215 Richard Sandiford <rdsandiford@googlemail.com>
6217 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6218 (finish_enum): Use wide-int interfaces.
6219 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6220 * c-typeck.c (build_c_cast): Likewise.
6221 (set_nonincremental_init_from_string): Likewise.
6222 (c_tree_equal): Likewise.
6224 2014-05-02 Marek Polacek <polacek@redhat.com>
6227 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6228 Return size_one_node when the type is not complete.
6229 (pointer_diff): Remove comment.
6230 (build_unary_op): Improve error messages.
6232 2014-05-02 Marek Polacek <polacek@redhat.com>
6234 * c-typeck.c (c_finish_return): Separate warning_at calls.
6236 2014-05-02 Marek Polacek <polacek@redhat.com>
6238 * c-tree.h (error_init): Remove declaration.
6239 (pedwarn_init): Likewise.
6240 * c-typeck.c (error_init): Make static and move above.
6241 (pedwarn_init): Likewise.
6242 (warning_init): Move above.
6243 (maybe_warn_string_init): Likewise.
6245 2014-05-01 Jeff Law <law@redhat.com>
6249 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6250 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6253 2014-05-02 Marek Polacek <polacek@redhat.com>
6256 * c-typeck.c (push_init_level): Set constructor_designated to
6257 p->designated for structures.
6259 2014-05-01 Marek Polacek <polacek@redhat.com>
6262 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6263 function-definition has an attribute after the declarator.
6265 2014-05-01 Marek Polacek <polacek@redhat.com>
6268 * c-typeck.c (warning_init): Add location_t parameter. Call
6269 warning_at instead of warning.
6270 (push_init_level): Pass input_location to warning_init.
6271 (add_pending_init): Add location_t parameter. Pass loc to
6273 (set_nonincremental_init): Pass input_location to add_pending_init.
6274 (set_nonincremental_init_from_string): Likewise.
6275 (output_init_element): Pass loc to warning_init and to
6278 2014-05-01 Marek Polacek <polacek@redhat.com>
6281 * c-typeck.c (c_finish_return): Distinguish between label and variable
6282 when warning about returning local address.
6284 2014-05-01 Marek Polacek <polacek@redhat.com>
6287 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6290 2014-05-01 Marek Polacek <polacek@redhat.com>
6293 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6294 instead of 0 to WARN_FOR_QUALIFIERS.
6296 2014-05-01 Marek Polacek <polacek@redhat.com>
6299 * c-typeck.c (default_conversion): Use better location for
6302 2014-04-30 Marek Polacek <polacek@redhat.com>
6304 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6305 also when SANITIZE_FLOAT_DIVIDE is on.
6307 2014-04-30 Marek Polacek <polacek@redhat.com>
6310 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6311 and pedwarn_init. Use loc insted of input_location.
6313 2014-04-30 Marek Polacek <polacek@redhat.com>
6316 * c-typeck.c (build_binary_op): Use location when warning about
6319 2014-04-25 Marek Polacek <polacek@redhat.com>
6322 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6323 always_inline/noinline and hot/cold attributes.
6325 2014-04-25 Marek Polacek <polacek@redhat.com>
6328 * c-parser.c (c_parser_initelt): Pass input_location to
6329 process_init_element.
6330 (c_parser_initval): Pass loc to process_init_element.
6331 * c-tree.h (process_init_element): Adjust declaration.
6332 * c-typeck.c (push_init_level): Pass input_location to
6333 process_init_element.
6334 (pop_init_level): Likewise.
6335 (set_designator): Likewise.
6336 (output_init_element): Add location_t parameter. Pass loc to
6338 (output_pending_init_elements): Pass input_location to
6339 output_init_element.
6340 (process_init_element): Add location_t parameter. Pass loc to
6341 output_init_element.
6343 2014-04-24 Jakub Jelinek <jakub@redhat.com>
6345 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6346 atomic-clause, allow comma in between atomic-clause and
6349 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6352 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6353 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6355 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6358 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6359 create_tmp_var instead build_decl for creating temps.
6360 (build_array_notation_expr): Likewise.
6361 (fix_conditional_array_notations_1): Likewise.
6362 (fix_array_notation_expr): Likewise.
6363 (fix_array_notation_call_expr): Likewise.
6365 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6368 * c-tree.h (c_build_function_call_vec): New prototype.
6369 * c-typeck.c (build_function_call_vec): Don't call
6370 resolve_overloaded_builtin here.
6371 (c_build_function_call_vec): New wrapper function around
6372 build_function_call_vec. Call resolve_overloaded_builtin here.
6373 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6374 Call c_build_function_call_vec instead of build_function_call_vec.
6375 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6376 * c-decl.c (finish_decl): Likewise.
6378 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6381 * c-typeck.c: Use correct format string in cast-qual warning
6383 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6385 * c-decl.c (c_decl_attributes): Use
6386 lang_hooks.types.omp_mappable_type.
6387 * c-typeck.c (c_finish_omp_clauses): Likewise.
6389 2014-03-06 Marek Polacek <polacek@redhat.com>
6392 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6393 of checking tree code.
6395 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6397 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6398 (c_parser_parameter_declaration): Likewise.
6400 2014-02-19 Marek Polacek <polacek@redhat.com>
6403 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6404 Call mark_exp_read on exp.value.
6405 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6406 TREE_ADDRESSABLE on old instead of val.
6407 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6409 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6411 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6412 C_EXPR_APPEND by vec_safe_push.
6413 * c-tree.h (C_EXPR_APPEND): Remove.
6415 2014-01-31 Marek Polacek <polacek@redhat.com>
6418 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6419 build_function_call_vec.
6420 (build_function_call): Likewise.
6421 (build_atomic_assign): Likewise.
6422 (build_function_call_vec): Add arg_loc parameter. Use it.
6423 (convert_arguments): Likewise.
6424 (convert_for_assignment): Rename rhs_loc to expr_loc.
6425 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6426 (c_parser_objc_keywordexpr): Likewise.
6427 (c_parser_postfix_expression_after_primary): Call
6428 build_function_call_vec with expr_loc rather than op_loc.
6429 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6430 build_function_call_vec.
6431 (c_parser_expr_list): Add locations parameter. Fill it with locations
6432 of function arguments.
6433 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6435 2014-01-30 Marek Polacek <polacek@redhat.com>
6438 * c-typeck.c (build_function_call_vec): Use loc parameter.
6439 (convert_arguments): Add location parameter. Use it.
6440 (ep_convert_and_check): Likewise.
6441 (build_atomic_assign): Adjust convert_for_assignment call.
6442 (build_modify_expr): Likewise.
6443 (digest_init): Likewise.
6444 (c_finish_return): Likewise.
6445 (build_conditional_expr): Adjust ep_convert_and_check calls.
6446 (convert_for_assignment): Add rhs_loc parameter. Use it.
6447 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6450 2014-01-30 Richard Biener <rguenther@suse.de>
6453 * c-typeck.c (build_function_call_vec): Do not replace calls
6454 to a function via an incompatible type with a runtime abort.
6456 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6458 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6459 flag_enable_cilkplus with flag_cilkplus.
6460 (c_parser_direct_declarator_inner): Likewise.
6461 (c_parser_attribute_any_word): Likewise.
6462 (c_parser_attributes): Likewise.
6463 (c_parser_compound_statement): Likewise.
6464 (c_parser_statement_after_labels): Likewise.
6465 (c_parser_if_statement): Likewise.
6466 (c_parser_switch_statement): Likewise.
6467 (c_parser_do_statement): Likewise.
6468 (c_parser_for_statement): Likewise.
6469 (c_parser_unary_expression): Likewise.
6470 (c_parser_postfix_expression): Likewise.
6471 (c_parser_postfix_expression_after_primary): Likewise.
6472 (c_parser_postfix_expression_after_primary): Likewise.
6473 (c_parser_omp_clause_name): Likewise.
6474 (c_finish_omp_declare_simd): Likewise.
6475 (c_parser_cilk_verify_simd): Likewise.
6476 * c-typeck.c (build_array_ref): Likewise.
6477 (build_function_call_vec): Likewise.
6478 (convert_arguments): Likewise.
6479 (build_compound_expr): Likewise.
6480 (c_finish_return): Likewise.
6481 (c_finish_if_stmt): Likewise.
6482 (c_finish_loop): Likewise.
6483 (build_binary_op): Likewise.
6485 2014-01-23 Marek Polacek <polacek@redhat.com>
6488 * c-typeck.c (parser_build_binary_op): Use location instead of
6490 (build_binary_op): Pass location to shorten_compare.
6492 2014-01-23 Marek Polacek <polacek@redhat.com>
6495 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6498 2014-01-23 Marek Polacek <polacek@redhat.com>
6501 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6502 of a comma expression.
6503 (emit_side_effect_warnings): Likewise.
6505 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6508 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6509 function to use walk_tree and moved a lot of its functionality to
6510 expand_array_notations.
6511 (expand_array_notations): New function.
6513 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6515 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6516 attribute an attribute without value.
6518 2014-01-23 Jakub Jelinek <jakub@redhat.com>
6521 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6522 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6524 2014-01-22 Marek Polacek <polacek@redhat.com>
6527 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6528 of remove_c_maybe_const_expr on op1 and op2.
6530 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6533 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6534 effects, preevaluate rhs using SAVE_EXPR first.
6536 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6539 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6540 statements with if-elseif statements.
6542 2014-01-06 Marek Polacek <polacek@redhat.com>
6545 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6546 defined bit-field types only in ISO C.
6548 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6550 Update copyright years
6552 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6554 * c-array-notation.c: Use the standard form for the copyright notice.
6556 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6558 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6559 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6560 field in parser is not empty. If not-empty, call the function
6561 c_parser_finish_omp_declare_simd.
6562 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6563 between SIMD-enabled functions and #pragma simd. Added new parameter.
6564 (c_parser_cilk_all_clauses): Modified the usage of the function
6565 c_parser_cilk_clause_vectorlength as mentioned above.
6566 (c_parser_cilk_simd_fn_vector_attrs): New function.
6567 (c_finish_cilk_simd_fn_tokens): Likewise.
6568 (is_cilkplus_vector_p): Likewise.
6569 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6570 "nomask," and "mask" strings in clause name.
6571 (c_parser_omp_all_clauses): Added 3 new case statements:
6572 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6573 PRAGMA_CILK_CLAUSE_NOMASK.
6574 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6575 check for vector attribute and if so call the function
6576 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6577 called the function c_finish_cilk_simd_fn_tokens.
6578 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6579 parser field is non-empty. If so, parse them as you would parse
6580 the omp declare simd pragma.
6581 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6582 Added a check when step is a parameter and flag it as error.
6583 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6584 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6587 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6589 * c-parser.c (c_parser_omp_parallel): Fix description.
6591 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6593 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6594 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6595 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6596 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6598 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6601 * c-parser.c (c_parser_alignas_specifier): Use
6602 c_sizeof_or_alignof_type instead of c_alignof.
6603 (c_parser_alignof_expression): Likewise, with min_alignof
6604 parameter depending on alignof spelling used.
6606 2013-12-04 Marek Polacek <polacek@redhat.com>
6609 * c-decl.c (start_function): Don't warn for missing prototype for
6612 2013-12-03 Marek Polacek <polacek@redhat.com>
6615 * c-decl.c (build_compound_literal): Allow compound literals with
6616 empty initial value.
6618 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6621 * c-typeck.c (build_modify_expr): Diagnose assignment to
6622 expression with array type.
6624 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6627 * c-typeck.c (process_init_element): Do not treat a string as
6628 initializing a whole array when used with a designator for an
6631 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6634 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6635 an inline function following a static declaration.
6637 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6640 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6641 to p_name before calling c_parser_omp_teams instead of after.
6642 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6643 argument. Remove unused p_name variable.
6645 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6646 Jakub Jelinek <jakub@redhat.com>
6648 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6649 external_scope is NULL.
6651 2013-11-27 Tom de Vries <tom@codesourcery.com>
6652 Marc Glisse <marc.glisse@inria.fr>
6655 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6657 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6659 * c-typeck.c: Add required include files from gimple.h.
6661 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6663 * c-decl.c (define_label, shadow_tag_warned)
6664 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6665 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6666 (declspecs_add_type): Remove use of in_system_header macro.
6667 * c-parser.c (c_parser_unary_expression): Likewise.
6668 * c-typeck.c (store_init_value, process_init_element)
6669 (c_start_case): Likewise.
6671 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6674 * c-parser.c (c_parser_set_source_position_from_token): Remove
6675 reference to in_system_header from comment.
6677 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6679 * c-decl.c (grokdeclarator): Update comment to refer to
6680 tree_to_[su]hwi rather than tree_low_cst.
6682 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6684 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6685 tree_to_uhwi throughout.
6687 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6689 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6692 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6694 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6697 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6699 * c-parser.c (c_parser_cilk_simd): New.
6700 (c_parser_cilk_verify_simd): New.
6701 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6702 (c_parser_omp_for_loop): Add case for NE_EXPR.
6703 Set c_break_label for CILK_SIMD.
6704 (c_parser_cilk_clause_vectorlength): New.
6705 (c_parser_cilk_clause_linear): New.
6706 (c_parser_cilk_clause_name): New.
6707 (c_parser_cilk_all_clauses): New.
6708 * c-typeck.c (build_unary_op): Pass location argument to
6710 (build_modify_expr): Same.
6711 (build_asm_expr): Same.
6712 (c_finish_bc_stmt): Error on break/continue in loops.
6714 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6716 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6718 2013-11-14 Diego Novillo <dnovillo@google.com>
6720 * c-decl.c: Include print-tree.h.
6721 Include stor-layout.h.
6724 Include stringpool.h.
6725 * c-lang.c: Include fold-const.h.
6726 * c-parser.c: Include stringpool.h.
6728 Include stor-layout.h.
6730 Include trans-mem.h.
6731 * c-typeck.c: Include stor-layout.h.
6732 Include trans-mem.h.
6736 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6738 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6739 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6741 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6742 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6744 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6745 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6746 (c_parser_declarator, c_parser_direct_declarator_inner)
6747 (c_parser_parameter_declaration, c_parser_type_name): All callers
6749 (c_parser_declaration_or_fndef): Handle declarations with type
6750 determined from the initializer.
6752 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6754 * c-typeck.c: Include gimplify.h.
6756 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6758 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6759 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6761 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6762 or _Thread_local as appropriate in diagnostics.
6763 (build_null_declspecs): Initialize ret->thread_gnu_p.
6764 (declspecs_add_scspec): Handle either __thread or _Thread_local
6765 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6766 pedantic. Do not disallow _Thread_local extern and _Thread_local
6769 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6770 Andrew MacLeod <amacleod@redhat.com>
6772 * c-aux-info.c (gen_type): Handle atomic qualifier.
6773 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6774 qualifiers when compating types.
6775 (shadow_tag_warned): Handle atomic_p in declspecs.
6776 (quals_from_declspecs): Likewise.
6777 (start_decl): Use c_type_promotes_to when promoting argument
6779 (grokdeclarator): Handle _Atomic.
6780 (get_parm_info): Diagnose any qualifier on "void" as only
6782 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6783 comparing types. Use c_type_promotes_to when promoting argument
6785 (finish_function): Use c_type_promotes_to when promoting argument
6787 (build_null_declspecs): Handle atomic_p in declspecs.
6788 (declspecs_add_qual): Handle RID_ATOMIC.
6789 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6790 (c_token_starts_declspecs): Handle RID_ATOMIC.
6791 (c_parser_declspecs): Handle atomic type specifiers and
6793 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6794 from types of expressions with atomic type.
6795 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6796 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6797 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6798 (c_parser_statement_after_labels, c_parser_switch_statement)
6799 (c_parser_for_statement, c_parser_expr_no_commas)
6800 (c_parser_conditional_expression, c_parser_binary_expression)
6801 (c_parser_cast_expression, c_parser_unary_expression)
6802 (c_parser_postfix_expression)
6803 (c_parser_postfix_expression_after_primary, c_parser_expression):
6804 Use convert_lvalue_to_rvalue.
6805 (c_parser_expression_conv, c_parser_expr_list): Document
6806 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6807 (c_parser_objc_synchronized_statement): Use
6808 convert_lvalue_to_rvalue.
6809 (c_parser_objc_selector): Handle RID_ATOMIC.
6810 (c_parser_objc_receiver, c_parser_array_notation): Use
6811 convert_lvalue_to_rvalue.
6812 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6813 _Atomic (type-name).
6814 (struct c_declspecs): Add atomic_p field.
6815 (convert_lvalue_to_rvalue): Declare.
6816 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6817 corresponding atomic types.
6818 (qualify_type): Don't add _Atomic qualifiers from second argument.
6819 (comp_target_types): Do not allow _Atomic mismatches.
6820 (type_lists_compatible_p): Do not remove atomic qualifiers when
6822 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6823 (build_atomic_assign): New functions.
6824 (build_unary_op): Use build_atomic_assign for atomic increment and
6826 (build_conditional_expr): Do not treat _Atomic void as a qualified
6828 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6829 (find_anonymous_field_with_type, convert_to_anonymous_field)
6830 (convert_for_assignment): Do not remove atomic qualifiers when
6832 (digest_init): Do not accept initialization of arrays of atomic
6833 elements by string constants.
6834 (build_asm_expr): Use convert_lvalue_to_rvalue.
6835 (build_binary_op): Do not treat _Atomic void as a qualified
6838 2013-11-06 DJ Delorie <dj@redhat.com>
6840 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6841 both explicit and builtin, print the location of the explicit one.
6843 2013-11-05 Tobias Burnus <burnus@net-b.de>
6845 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6846 c_parser_omp_distribute, c_parser_omp_teams,
6847 c_parser_omp_target, c_parser_omp_declare): Handle
6850 2013-11-03 Marek Polacek <polacek@redhat.com>
6852 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6854 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6856 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6857 check_dup_generic at the end, unless remove is true.
6858 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6860 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6862 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6864 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6865 with decl that is not pointer nor array.
6867 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6869 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6870 a spawning function is found.
6871 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6872 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6873 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6874 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6876 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6877 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6879 (c_finish_return): Added a check to reject _Cilk_spawn in return
6881 (build_cilk_spawn): New function.
6882 (build_cilk_sync): Likewise.
6883 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6885 2013-10-27 Tobias Burnus <burnus@net-b.de>
6888 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6889 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6890 (c_parser_statement_after_labels): Update calls.
6892 2013-10-24 Tobias Burnus <burnus@net-b.de>
6895 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6896 Handle PRAGMA_IVDEP.
6897 (c_parser_statement_after_labels): Update call.
6899 2013-10-24 Marek Polacek <polacek@redhat.com>
6901 * c-parser.c (c_parser_struct_declaration): Add a comment.
6902 (c_parser_declarator): Don't allow _Alignas here.
6904 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6906 * c-parser.c: Include omp-low.h.
6907 * c-typeck.c: Likewise.
6909 2013-10-17 Marek Polacek <polacek@redhat.com>
6912 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6913 Document syntax of the array-declarator.
6914 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6916 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6917 (c_parser_struct_declaration): Likewise.
6918 (c_parser_declarator): Likewise.
6919 (c_parser_direct_declarator_inner): Likewise.
6920 (c_parser_parameter_declaration): Likewise.
6921 (c_parser_type_name): Likewise.
6923 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6925 * c-lang.h (current_omp_declare_target_attribute): New extern
6927 * c-parser.c: Include c-lang.h.
6928 (struct c_parser): Change tokens to c_token *.
6929 Add tokens_buf field. Change tokens_avail type to unsigned int.
6930 (c_parser_consume_token): If parser->tokens isn't
6931 &parser->tokens_buf[0], increment parser->tokens.
6932 (c_parser_consume_pragma): Likewise.
6933 (enum pragma_context): Add pragma_struct and pragma_param.
6934 (c_parser_external_declaration): Adjust
6935 c_parser_declaration_or_fndef caller.
6936 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6937 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6938 Adjust recursive call.
6939 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6941 (c_parser_parameter_declaration): Use pragma_param instead of
6943 (c_parser_compound_statement_nostart, c_parser_label,
6944 c_parser_for_statement): Adjust
6945 c_parser_declaration_or_fndef callers.
6946 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6947 it through to c_parser_conditional_expression.
6948 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6949 pass it through to c_parser_binary_expression. Adjust recursive
6951 (c_parser_binary_expression): Remove prec argument, add
6952 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6953 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6954 binop matches it, use build2 instead of parser_build_binary_op.
6955 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6956 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6957 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6958 Handle pragma_struct and pragma_param the same as pragma_external.
6959 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6960 (c_parser_omp_variable_list): Parse array sections for
6961 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6962 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6963 (c_parser_omp_clause_reduction): Handle user defined reductions.
6964 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6965 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6966 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6967 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6968 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6969 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6970 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6971 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6972 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6973 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6974 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6975 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6976 (c_parser_omp_for_loop): Add CODE argument, pass it through
6977 to c_finish_omp_for. Change last argument to cclauses,
6978 and adjust uses to grab parallel clauses from the array of all
6979 the split clauses. Adjust c_parser_binary_expression,
6980 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6981 (omp_split_clauses): New function.
6982 (c_parser_omp_simd): New function.
6983 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6984 Allow the function to be called also when parsing combined constructs,
6985 and call c_parser_omp_simd when parsing for simd.
6986 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6987 #pragma omp section, require exactly one structured-block instead of
6988 sequence of statements.
6989 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6990 Allow the function to be called also when parsing combined constructs.
6991 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6992 Allow the function to be called also when parsing combined
6994 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6995 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6996 c_parser_omp_teams, c_parser_omp_target_data,
6997 c_parser_omp_target_update, c_parser_omp_target,
6998 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6999 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7000 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7001 (c_parser_omp_construct): Add p_name and mask vars. Handle
7002 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7003 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7004 and c_parser_omp_sections callers.
7005 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7006 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7007 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7008 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7009 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7011 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7012 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7013 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7014 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7015 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7016 * c-typeck.c: Include tree-inline.h.
7017 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7018 handle_omp_array_sections_1, handle_omp_array_sections,
7019 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7020 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7021 user defined reductions.
7022 (c_tree_equal): New function.
7023 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7024 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7025 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7026 c_check_omp_declare_reduction_r): New prototypes.
7027 * c-decl.c (current_omp_declare_target_attribute): New variable.
7028 (c_decl_attributes): New function.
7029 (start_decl, start_function): Use it instead of decl_attributes.
7030 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7031 c_omp_reduction_decl, c_omp_reduction_lookup,
7032 c_check_omp_declare_reduction_r): New functions.
7034 2013-09-25 Tom Tromey <tromey@redhat.com>
7036 * Make-lang.in (c/gccspec.o): Remove.
7037 (CFLAGS-c/gccspec.o): New variable.
7038 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7039 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7040 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7042 2013-09-25 Tom Tromey <tromey@redhat.com>
7044 * Make-lang.in (c/gccspec.o): Don't use subshell.
7046 2013-09-18 Marek Polacek <polacek@redhat.com>
7049 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7050 Remove unnecessary check.
7052 2013-09-18 Marek Polacek <polacek@redhat.com>
7055 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7056 no_sanitize_undefined attribute.
7058 2013-09-13 Kai Tietz <ktietz@redhat.com>
7061 * c-decl.c (c_builtin_function_ext_scope): Remove
7062 wrong assumption that it is never called on prexisting
7065 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7067 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7069 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7071 * c-objc-common.c (c_tree_printer): Tidy.
7073 2013-08-30 Marek Polacek <polacek@redhat.com>
7075 * c-typeck.c (build_binary_op): Add division by zero and shift
7078 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
7079 Joseph Myers <joseph@codesourcery.com>
7082 * c-typeck.c (c_common_type): Prefer double_type_node over
7083 other REAL_TYPE types with the same precision.
7084 (convert_arguments): Likewise.
7086 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7088 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7089 (c_initialize_diagnostics): Call a destructor for the early printer.
7091 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7093 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7094 printer initialization.
7096 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
7099 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7100 check for truth values.
7101 (expand_array_notation_exprs): Added truth values case. Removed an
7102 unwanted else. Added for-loop to walk through subtrees in default
7105 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7107 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7109 2013-07-23 Joseph Myers <joseph@codesourcery.com>
7111 * c-parser.c (struct c_generic_association): Fix typo.
7113 2013-07-23 Tom Tromey <tromey@redhat.com>
7114 Joseph Myers <joseph@codesourcery.com>
7116 * c-parser.c (struct c_generic_association): New.
7117 (c_generic_association_d): New typedef.
7118 (c_parser_generic_selection): New function.
7119 (c_parser_postfix_expression): Handle RID_GENERIC.
7121 2013-07-13 Jason Merrill <jason@redhat.com>
7124 * c-decl.c (finish_struct): Check for too-large class.
7126 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7129 * c-typeck.c (set_init_index): When folding, check for index overflow.
7131 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7133 * c-parser.c (c_parser_array_notation): Removed rejection of array
7134 notations in an array of function pointers.
7136 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7138 * c-array-notation.c (make_triplet_val_inv): New function.
7139 (create_cmp_incr): Likewise.
7140 (create_array_refs): Likewise.
7141 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7142 Also modularized common parts between functions and called the function.
7143 (build_array_notation_expr): Likewise.
7144 (fix_conditional_array_notations_1): Likewise.
7145 (fix_array_notation_expr): Likewise.
7146 (fix_array_notation_call_expr): Likewise.
7148 2013-06-18 Marek Polacek <polacek@redhat.com>
7151 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7153 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7155 * c-array-notation.c (build_array_notation_expr): Reject array notation
7156 mismatch between LHS and RHS even inside a call_expr. Also, removed
7157 a couple while statements that were dead code.
7159 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7161 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7162 excessive precision expressions in function parameters. Also removed
7163 couple unwanted while statements.
7165 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7167 * c-array-notation.c (expand_array_notation_exprs): Added
7168 ARRAY_NOTATION_REF case.
7170 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7172 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7173 function to c-family/array-notation-common.c.
7174 (is_cilkplus_reduce_builtin): Likewise.
7175 (find_rank): Likewise.
7176 (extract_array_notation_exprs): Likewise.
7177 (replace_array_notations): Likewise.
7178 (find_inv_trees): Likewise.
7179 (replace_inv_trees): Likewise.
7180 (contains_array_notation_expr): Likewise.
7181 (find_correct_array_notation_type): Likewise.
7182 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7183 (struct inv_list): Moved this to c-family/array-notation-common.c.
7184 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7186 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7188 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7189 reduction functions outside the for-loop. Added a check if the fundecl
7190 is non-NULL. Finally, removed an unwanted if-statement, and made the
7193 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7195 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7196 condition of the if-statement matches the rank of else-block and then-
7197 block when array notations are used.
7198 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7199 expression after the entire function body is parsed.
7200 (c_parser_expr_no_commas): Delayed creating array notation expressions
7201 to the end of function parsing.
7202 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7203 whole if-statement instead of just the condition.
7204 (expand_array_notation_exprs): Added MODIFY_EXPR case.
7206 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7209 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7210 array to NULL_TREE if they are unused. Also added a check for the
7211 field to be NULL before its fields are used in future.
7213 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7216 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7217 (build_array_notation_expr): Likewise.
7219 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7221 * c-typeck.c (build_array_ref): Added a check to see if array's
7222 index is greater than one. If true, then emit an error.
7223 (build_function_call_vec): Exclude error reporting and checking
7224 for builtin array-notation functions.
7225 (convert_arguments): Likewise.
7226 (c_finish_return): Added a check for array notations as a return
7227 expression. If true, then emit an error.
7228 (c_finish_loop): Added a check for array notations in a loop
7229 condition. If true then emit an error.
7230 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7231 (build_binary_op): Added a check for array notation expr inside
7232 op1 and op0. If present, we call another function to find correct
7234 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7235 * c-parser.c (c_parser_compound_statement): Check if array
7236 notation code is used in tree, if so, then transform them into
7238 (c_parser_expr_no_commas): Check if array notation is used in LHS
7239 or RHS, if so, then build array notation expression instead of
7241 (c_parser_postfix_expression_after_primary): Added a check for
7242 colon(s) after square braces, if so then handle it like an array
7243 notation. Also, break up array notations in unary op if found.
7244 (c_parser_direct_declarator_inner): Added a check for array
7246 (c_parser_compound_statement): Added a check for array notation in
7247 a stmt. If one is present, then expand array notation expr.
7248 (c_parser_if_statement): Likewise.
7249 (c_parser_switch_statement): Added a check for array notations in
7250 a switch statement's condition. If true, then output an error.
7251 (c_parser_while_statement): Similarly, but for a while.
7252 (c_parser_do_statement): Similarly, but for a do-while.
7253 (c_parser_for_statement): Similarly, but for a for-loop.
7254 (c_parser_unary_expression): Check if array notation is used in a
7255 pre-increment or pre-decrement expression. If true, then expand
7257 (c_parser_array_notation): New function.
7258 * c-array-notation.c: New file.
7259 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7261 2013-05-23 Mike Stump <mikestump@comcast.net>
7263 * c-typeck.c (convert_for_assignment): Handle references to memory
7266 2013-05-16 Jason Merrill <jason@redhat.com>
7268 * Make-lang.in (cc1$(exeext)): Use link mutex.
7270 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7272 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7273 to simply use OPT_Wpointer_arith.
7274 (build_unary_op): Likewise.
7276 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7279 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7280 argument. If set, or it temporarily for parsing of the first
7281 argument into force_folding_builtin_constant_p.
7282 (c_parser_postfix_expression): Adjust callers.
7284 2013-03-21 Richard Biener <rguenther@suse.de>
7286 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7287 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7289 2013-02-12 Marek Polacek <polacek@redhat.com>
7292 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7295 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7298 * c-typeck.c (set_nonincremental_init_from_string): If
7299 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7301 (process_init_element): Likewise.
7303 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7306 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7307 argument, don't call default_function_array_conversion
7308 nor c_fully_fold here.
7309 (c_parser_asm_statement): Adjust callers.
7310 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7311 and outputs here, and call default_function_array_conversion
7312 on inputs that don't need to be addressable.
7314 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7317 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7318 warning require that both c_common_unsigned_type as well as
7319 c_common_signed_type is the same for both mvl and mvr types.
7321 2012-11-16 Diego Novillo <dnovillo@google.com>
7323 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7325 * c-common.c: Use new vec API in vec.h.
7326 * c-common.h: Likewise.
7327 * c-gimplify.c: Likewise.
7328 * c-pragma.c: Likewise.
7329 * c-pretty-print.c: Likewise.
7330 * c-pretty-print.h: Likewise.
7331 * c-semantics.c: Likewise.
7332 * c-decl.c: Likewise.
7333 * c-parser.c: Likewise.
7334 * c-tree.h: Likewise.
7335 * c-typeck.c: Likewise.
7337 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7340 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7342 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7345 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7346 shadows a function, unless the variable is a function or a
7347 pointer-to-function.
7349 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7352 * c-parser.c (struct c_tree_loc_pair): Removed.
7353 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7354 add location_t * and tree * arguments, fill in array of 3
7355 sizeof_arg trees and corresponding locs.
7356 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7357 c_parser_expr_list callers.
7358 (c_parser_postfix_expression_after_primary): Likewise. Pass
7359 array of 3 sizeof_arg trees and locs (corresponding to first
7360 3 arguments) to sizeof_pointer_memaccess_warning.
7362 2012-10-09 Lawrence Crowl <crowl@google.com>
7364 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7365 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7368 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7371 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7374 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7377 * c-typeck.c: Include c-common.h.
7378 (enum stv_conv): Moved to c-common.h.
7379 (scalar_to_vector): Moved to c-common.c.
7380 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7381 * Make-lang.in: c-typeck.c depends on c-common.h.
7383 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7385 * c-decl.c (c_write_global_declarations): Fix handling of
7388 2012-09-30 Sharad Singhai <singhai@google.com>
7390 * c-decl.c (c_write_global_declarations): Use a different method
7391 to determine if the dump has ben initialized.
7393 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7396 * c-typeck.c (c_cast_expr): When casting to a type requiring
7397 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7400 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7403 * c-typeck.c (build_unary_op): Pass original argument of
7404 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7405 any C_MAYBE_CONST_EXPR, if it has integer operands.
7406 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7407 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7408 to c_objc_common_truthvalue_conversion, then remove any
7409 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7410 c_objc_common_truthvalue_conversion not
7411 c_common_truthvalue_conversion.
7412 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7413 call note_integer_operands for arguments with integer operands
7414 that are not integer constants.
7416 2012-09-13 Jakub Jelinek <jakub@redhat.com>
7419 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7420 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7422 2012-08-31 Jakub Jelinek <jakub@redhat.com>
7425 * c-convert.c (convert): Don't call fold_convert_loc if
7426 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7427 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7428 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7430 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7433 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7434 for nested and empty_ok arguments in the call to
7435 c_parser_declaration_or_fndef.
7437 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7439 * c-tree.h (c_last_sizeof_arg): Declare.
7440 * c-parser.c (struct c_tree_loc_pair): New type.
7441 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7443 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7444 (c_parser_postfix_expression_after_primary): Likewise. Call
7445 sizeof_pointer_memaccess_warning if needed.
7446 (sizeof_ptr_memacc_comptypes): New function.
7447 * c-typeck.c (c_last_sizeof_arg): New global variable.
7448 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7450 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7452 * c-lang.h (lang_decl): Add variable_size GTY option.
7454 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7456 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7457 * Make-lang.in: Fix dependencies.
7459 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7461 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7462 and add language Makefile hooks.
7463 * config-lang.in: New file.
7464 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7465 add the required "normal" config-lang.in rules.
7466 * c-lang.h: Moved from gcc/ to here.
7467 * c-tree.h: Likewise.
7468 * c-objc-common.c: Likewise.
7469 * c-objc-common.h: Likewise.
7470 * c-typeck.c: Likewise.
7471 * c-convert.c: Likewise.
7472 * c-lang.c: Likewise.
7473 * c-aux-info.c: Likewise.
7474 * c-errors.c: Likewise.
7475 * gccspec.c: Likewise.
7476 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7477 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7479 Copyright (C) 2012-2021 Free Software Foundation, Inc.
7481 Copying and distribution of this file, with or without modification,
7482 are permitted in any medium without royalty provided the copyright
7483 notice and this notice are preserved.