1 2020-11-26 Martin Uecker <muecker@gwdg.de>
5 * c-parser.c (c_parser_declaration_or_fndef): Remove
6 redundant code to drop qualifiers of _Atomic types for __auto_type.
7 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
10 2020-11-24 Jakub Jelinek <jakub@redhat.com>
13 * c-parser.c (c_parser_binary_expression): For omp atomic binary
14 expressions, use make_node instead of build2 to avoid checking build2
17 2020-11-23 Joseph Myers <joseph@codesourcery.com>
20 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
21 for comparisons of complete and incomplete pointers.
23 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
25 * c-aux-info.c (gen_type): Support opaque types.
27 2020-11-20 Martin Sebor <msebor@redhat.com>
30 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
32 2020-11-20 Jakub Jelinek <jakub@redhat.com>
35 * Make-lang.in (c.serial): Change from goal to a variable.
36 (.PHONY): Drop c.serial.
38 2020-11-20 Martin Uecker <muecker@gwdg.de>
40 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
42 2020-11-19 Jakub Jelinek <jakub@redhat.com>
45 * c-decl.c (get_parm_array_spec): Bail out of nelts is
48 2020-11-18 Jakub Jelinek <jakub@redhat.com>
50 * Make-lang.in (c.serial): New goal.
51 (.PHONY): Add c.serial c.prev.
52 (cc1$(exeext)): Call LINK_PROGRESS.
54 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
56 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
58 * c-typeck.c (build_asm_expr): Remove an assert checking output
61 2020-11-13 Jakub Jelinek <jakub@redhat.com>
63 * c-typeck.c (c_finish_omp_clauses): Don't clear
64 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
66 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
69 * c-parser.c (c_parser_objc_class_definition): Pass the
70 location of the class name to the interface declaration.
72 2020-11-10 Strager Neds <strager.nds@gmail.com>
74 * c-decl.c (merge_decls): Use new overload of
75 set_decl_section_name.
77 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
79 * c-parser.c (c_parser_omp_target_data): Add use of
80 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
81 handled map clause kind.
82 (c_parser_omp_target_enter_data): Likewise.
83 (c_parser_omp_target_exit_data): Likewise.
84 (c_parser_omp_target): Likewise.
85 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
86 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
87 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
88 same struct field access to co-exist on OpenMP construct.
90 2020-11-07 Martin Uecker <muecker@gwdg.de>
92 * c-parser.c (c_parser_label): Implement mixing of labels and code.
93 (c_parser_all_labels): Likewise.
95 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
97 * c-parser.c (c_parser_objc_at_property_declaration):
98 Improve parsing fidelity. Associate better location info
99 with @property attributes. Clean up the interface to
100 objc_add_property_declaration ().
102 2020-11-06 Nathan Sidwell <nathan@acm.org>
104 * c-decl.c (diagnose_mismatched_decls): Rename
105 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
106 (warn_if_shadowing, implicitly_declare, names_builtin_p)
107 (collect_source_refs): Likewise.
108 * c-typeck.c (inform_declaration, inform_for_arg)
109 (convert_for_assignment): Likewise.
111 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
113 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
115 (c_parser_omp_construct): Update call.
117 2020-11-04 Jakub Jelinek <jakub@redhat.com>
120 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
121 find underlying decl to clear in the aligned_head bitmap.
123 2020-11-04 Joseph Myers <joseph@codesourcery.com>
125 * c-decl.c (handle_nodiscard_attribute): New.
126 (std_attribute_table): Add nodiscard.
127 * c-parser.c (c_parser_std_attribute): Expect argument to
128 nodiscard attribute to be a string. Do not special-case ignoring
130 * c-typeck.c (maybe_warn_nodiscard): New.
131 (build_compound_expr, emit_side_effect_warnings): Call
132 maybe_warn_nodiscard.
133 (c_process_expr_stmt, c_finish_stmt_expr): Also call
134 emit_side_effect_warnings if warn_unused_result.
136 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
138 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
140 (finish_init): Likewise.
141 (pop_init_level): Likewise.
143 2020-10-28 Joseph Myers <joseph@codesourcery.com>
145 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
146 error_at for omitted parameter name.
148 2020-10-28 Jakub Jelinek <jakub@redhat.com>
150 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
151 (c_parser_omp_clause_allocate): New function.
152 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
153 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
154 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
155 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
156 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
157 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
158 PRAGMA_OMP_CLAUSE_ALLOCATE.
159 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
161 2020-10-27 Joseph Myers <joseph@codesourcery.com>
163 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
166 2020-10-23 Marek Polacek <polacek@redhat.com>
169 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
170 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
171 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
172 * c-tree.h (char_type_p): Declare.
173 * c-typeck.c (char_type_p): No longer static.
175 2020-10-23 Martin Sebor <msebor@redhat.com>
178 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
180 2020-09-19 Martin Sebor <msebor@redhat.com>
183 * c-decl.c (lookup_last_decl): Define new function.
184 (c_decl_attributes): Call it.
185 (start_decl): Add argument and use it.
186 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
187 (get_parm_array_spec): Define new function.
188 (push_parm_decl): Call get_parm_array_spec.
189 (start_function): Call warn_parm_array_mismatch. Build attribute
190 access and add it to current function.
191 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
192 in forms of array parameters.
193 * c-tree.h (start_decl): Add argument.
195 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
197 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
200 (start_function): Adjust for above change.
201 (c_push_function_context, c_pop_function_context): Likewise.
202 * c-lang.h (struct language_function): Likewise.
203 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
204 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
206 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
207 (c_parser_switch_statement): Adjust break/switch context handling
208 and calls to renamed functions.
209 (c_parser_while_statement): Adjust break/switch context handling and
211 (c_parser_do_statement): Ditto, with DO_STMT respectively.
212 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
213 (c_parser_omp_for_loop): Adjust break/switch context handling.
214 * c-tree.h (c_break_label, c_cont_label): Delete.
215 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
216 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
217 (in_statement, switch_statement_break_seen_p): Declare.
218 (c_start_case, c_finish_case): Renamed to...
219 (c_start_switch, c_finish_switch).
220 (c_finish_bc_stmt): Adjust arguments.
221 * c-typeck.c (build_function_call_vec): Don't try to print
222 statements with %qE format.
223 (struct c_switch): Rename switch_expr field to switch_stmt.
224 Add break_stmt_seen_p field.
225 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
226 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
227 (do_case): Update for changes to struct c_switch.
228 (c_finish_case): Rename to c_finish_switch. Update for changes to
229 struct c_switch and change of representation from SWITCH_EXPR to
231 (c_finish_loop): Delete.
232 (c_finish_bc_stmt): Update to reflect changes to break/continue
233 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
234 of a GOTO_EXPR except for objc foreach loops.
236 2020-09-01 Jakub Jelinek <jakub@redhat.com>
239 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
242 2020-08-28 Martin Sebor <msebor@redhat.com>
245 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
248 2020-08-27 Martin Liska <mliska@suse.cz>
250 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
251 growth function to true.
253 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
256 * c-typeck.c (handle_omp_array_sections_1): Talk about
257 array function parameter in the error message.
259 2020-08-18 Jakub Jelinek <jakub@redhat.com>
262 * c-parser.c (c_parser_generic_selection): Change match_found from bool
263 to int, holding index of the match. Call mark_exp_read on the selector
264 expression and on expressions other than the selected one.
266 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
269 * c-typeck.c (process_init_element): Split test for whether to
270 recurse into a record, union or array into...
271 (initialize_elementwise_p): ...this new function. Don't recurse
272 into a vector type if the initialization value is also a vector.
274 2020-07-31 Richard Biener <rguenther@suse.de>
277 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
278 Define to c_common_finalize_early_debug.
280 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
282 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
283 (c_parser_omp_critical): Permit hint(0) clause without named critical.
284 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
286 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
289 * c-decl.c (finish_decl): Call target hook
290 lower_local_decl_alignment to lower local decl alignment.
292 2020-07-09 Julian Brown <julian@codesourcery.com>
293 Thomas Schwinge <thomas@codesourcery.com>
296 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
297 for standalone attach/detach clauses.
299 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
301 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
302 set, warn for conversion between pointers that point to incompatible
303 scalar storage orders.
305 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
307 * c-parser.c (c_parser_statement_after_labels): Pass correct
308 parameters to c_parser_do_statement.
310 2020-06-16 Jakub Jelinek <jakub@redhat.com>
312 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
314 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
315 premature c_fully_fold. Defer explicit c_fully_fold calls to after
317 * c-tree.h (c_in_omp_for): Declare.
318 * c-typeck.c (c_in_omp_for): Define.
319 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
320 (digest_init): Likewise.
321 (build_binary_op): Likewise.
323 2020-06-16 Jakub Jelinek <jakub@redhat.com>
325 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
326 from kind by comma rather than colon.
328 2020-06-05 Mark Wielaard <mark@klomp.org>
330 * c-decl.c (implicit_decl_warning): When warned and olddecl is
331 an undeclared builtin, then add a fixit header hint, if found.
332 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
333 warning_at about implicit builtin declaration type mismatch.
335 2020-06-03 Mark Wielaard <mark@klomp.org>
337 * c-parser.c (struct c_parser): Add seen_string_literal
339 (c_parser_consume_token): Reset seen_string_literal.
340 (c_parser_error_richloc): Add name_hint if seen_string_literal
341 and next token is a CPP_NAME and we have a missing header
342 suggestion for the name.
343 (c_parser_string_literal): Set seen_string_literal.
345 2020-06-03 Mark Wielaard <mark@klomp.org>
347 * c-parser.c (c_parser_postfix_expression_after_primary): Add
348 scope with matching_parens after CPP_OPEN_PAREN.
350 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
352 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
354 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
356 * Make-lang.in: Remove extra slash.
358 2020-05-19 Martin Liska <mliska@suse.cz>
360 * c-parser.c: Fix typo.
362 2020-05-14 Jakub Jelinek <jakub@redhat.com>
364 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
366 2020-05-07 Richard Biener <rguenther@suse.de>
369 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
372 2020-04-30 Jakub Jelinek <jakub@redhat.com>
375 * c-decl.c (set_labels_context_r): In addition to context-less
376 LABEL_DECLs adjust also LABEL_DECLs with context equal to
377 parent function if any.
378 (store_parm_decls): Adjust comment.
380 2020-04-19 Jakub Jelinek <jakub@redhat.com>
383 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
384 two CPP_COLON tokens.
386 2020-04-17 Jakub Jelinek <jakub@redhat.com>
389 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
392 2020-04-15 Jakub Jelinek <jakub@redhat.com>
395 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
396 requires directive when not at file scope.
398 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
401 * c-decl.c (c_check_in_current_scope): New function.
402 * c-tree.h (c_check_in_current_scope): Declare it.
403 * c-parser.c (c_parser_oacc_declare): Add check that variables
404 are declared in the same scope as the directive. Fix handling
407 2020-04-07 Jakub Jelinek <jakub@redhat.com>
410 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
411 if c_parser_omp_master succeeded.
413 2020-03-23 Jakub Jelinek <jakub@redhat.com>
415 PR gcov-profile/94029
417 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
418 the function_start_locus location. Don't do that afterwards for the
419 __GIMPLE body parsing.
421 2020-03-19 Jakub Jelinek <jakub@redhat.com>
423 PR gcov-profile/94029
424 * c-tree.h (finish_function): Add location_t argument defaulted to
426 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
427 set it to the locus of closing } if non-NULL.
428 (c_parser_compound_statement_nostart): Return locus of closing }.
429 (c_parser_parse_rtl_body): Likewise.
430 (c_parser_declaration_or_fndef): Propagate locus of closing } to
432 * c-decl.c (finish_function): Add end_loc argument, use it instead of
433 input_location to set function_end_locus.
435 2020-03-17 Jakub Jelinek <jakub@redhat.com>
438 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
439 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
440 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
441 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
443 (finish_incomplete_vars): New function, moved from finish_struct. Use
444 relayout_decl instead of layout_decl.
445 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
446 being TYPE_VFIELD. Use finish_incomplete_vars.
447 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
448 finish_incomplete_vars.
449 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
450 also on ENUMERAL_TYPEs.
452 2020-03-16 Jakub Jelinek <jakub@redhat.com>
455 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
457 2020-03-13 Martin Sebor <msebor@redhat.com>
460 * c-decl.c (builtin_structptr_type_count): New constant.
461 (match_builtin_function_types): Reject decls that are incompatible
462 in types pointed to by pointers.
463 (diagnose_mismatched_decls): Adjust comments.
465 2020-03-05 Joseph Myers <joseph@codesourcery.com>
468 * c-typeck.c (pop_init_level): Do not diagnose initializers as
469 empty when initialized type is error_mark_node.
470 (set_designator, process_init_element): Ignore initializers for
471 elements of a variable-size type or of error_mark_node.
473 2020-03-01 Martin Sebor <msebor@redhat.com>
476 * c-decl.c (types_close_enough_to_match): New function.
477 (match_builtin_function_types):
478 (diagnose_mismatched_decls): Add missing inform call to a warning.
480 2020-03-01 Martin Sebor <msebor@redhat.com>
483 * c-typeck.c (build_functype_attribute_variant): New function.
484 (composite_type): Call it.
486 2020-02-25 Jakub Jelinek <jakub@redhat.com>
489 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
490 Rename last argument from probablity to probability.
492 2020-02-13 Jakub Jelinek <jakub@redhat.com>
495 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
496 *expr if it has side effects.
498 2020-01-30 Jeff Law <law@redhat.com>
501 * c-parser.c (c_parser_switch_statement): Make sure to request
502 marking the switch expr as used.
504 2020-01-22 Joseph Myers <joseph@codesourcery.com>
507 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
508 argument with integer operands.
510 2020-01-16 Kerem Kat <keremkat@gmail.com>
513 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
514 to support 4 available tokens.
516 2020-01-15 Joseph Myers <joseph@codesourcery.com>
519 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
520 determine whether to set DECL_CONTEXT.
522 2020-01-13 Joseph Myers <joseph@codesourcery.com>
525 * c-typeck.c (build_c_cast): Check for expressions with integer
526 operands that can occur in an unevaluated part of an integer
527 constant expression and call note_integer_operands as needed.
529 2019-01-08 Richard Biener <rguenther@suse.de>
532 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
535 2020-01-01 Jakub Jelinek <jakub@redhat.com>
537 Update copyright years.
539 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
541 * c-decl.c (collect_source_ref_cb): Delete.
542 (for_each_global_decl): Rename into...
543 (collect_source_refs): ...this. Call collect_source_ref directly.
544 (c_parse_final_cleanups): Always call collect_source_ref on the main
547 2019-12-19 Julian Brown <julian@codesourcery.com>
548 Cesar Philippidis <cesar@codesourcery.com>
550 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
552 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
553 Allow deref (->) in variable lists if true.
554 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
555 Pass to c_parser_omp_variable_list.
556 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
557 call to c_parser_omp_variable_list.
558 (c_parser_oacc_all_clauses): Support attach and detach clauses.
559 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
560 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
561 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
562 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
563 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
564 and detach. Support deref.
565 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
566 GOMP_MAP_ALWAYS_POINTER for OpenACC.
567 (c_oacc_check_attachments): New function.
568 (c_finish_omp_clauses): Check attach/detach arguments for being
569 pointers using above. Support deref.
571 2019-12-19 Julian Brown <julian@codesourcery.com>
572 Maciej W. Rozycki <macro@codesourcery.com>
573 Tobias Burnus <tobias@codesourcery.com>
574 Thomas Schwinge <thomas@codesourcery.com>
576 * c-parser.c (c_parser_omp_clause_name): Support no_create.
577 (c_parser_oacc_data_clause): Likewise.
578 (c_parser_oacc_all_clauses): Likewise.
579 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
580 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
581 PRAGMA_OACC_CLAUSE_NO_CREATE.
582 * c-typeck.c (handle_omp_array_sections): Support
585 2019-12-09 David Malcolm <dmalcolm@redhat.com>
587 * c-objc-common.c (range_label_for_type_mismatch::get_text):
588 Replace label_text ctor calls.
590 2019-12-04 Joseph Myers <joseph@codesourcery.com>
594 * c-typeck.c (convert_lvalue_to_rvalue): Call
595 require_complete_type for arguments not of void types.
596 (build_indirect_ref): Do not diagnose dereferencing pointers to
598 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
600 2019-12-03 Joseph Myers <joseph@codesourcery.com>
603 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
604 old-style parameter definitions.
606 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
610 * c-decl.c (flexible_array_type_p): Move to common code.
612 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
614 * c-decl.c (start_decl): Allow initialization of variables whose
615 size is a POLY_INT_CST.
616 (finish_decl): Use verify_type_context to check whether the target
617 allows variables with a particular type to have static or thread-local
618 storage duration. Don't raise a second error if such variables do
619 not have a constant size.
620 (grokdeclarator): Use verify_type_context to check whether the
621 target allows fields or array elements to have a particular type.
622 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
623 the target allows pointer difference for the types involved.
624 (build_unary_op): Likewise for pointer increment and decrement.
626 2019-11-29 Joseph Myers <joseph@codesourcery.com>
628 * c-parser.c (struct c_parser): Add members raw_tokens and
630 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
631 using previously-lexed raw tokens.
632 (c_parser_peek_nth_token_raw)
633 (c_parser_check_balanced_raw_token_sequence): New functions.
634 (c_parser_nth_token_starts_std_attributes): Use
635 c_parser_check_balanced_raw_token_sequence for Objective-C.
637 2019-11-25 Joseph Myers <joseph@codesourcery.com>
640 * c-decl.c (finish_declspecs): Use int instead of decimal
641 floating-point types if decimal floating-point not supported.
643 2019-11-25 Joseph Myers <joseph@codesourcery.com>
645 * c-tree.h (struct c_declarator): Use a structure for id member.
646 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
647 declarators at the start, not when handling individual declarators
648 later. Use u.id.id instead of u.id.
649 (grokfield): Use u.id.id instead of u.id.
650 (build_id_declarator): Set u.id.id and u.id.attrs.
651 (finish_declspecs): Handle postfix attributes in case of typedef
653 * c-parser.c (c_parser_direct_declarator)
654 (c_parser_direct_declarator_inner): Place declarator for
655 attributes inside that for function or array, not outside. Set
656 u.id.attrs for identifiers.
657 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
658 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
661 2019-11-22 Jakub Jelinek <jakub@redhat.com>
664 * c-decl.c (identifier_global_tag): Define.
666 2019-11-20 Richard Biener <rguenther@suse.de>
669 * c-decl.c (grokdeclarator): Prevent inlining of nested
670 function with VLA arguments.
672 2019-11-20 Joseph Myers <joseph@codesourcery.com>
674 * c-decl.c (c_warn_type_attributes): New function.
675 (groktypename, grokdeclarator, finish_declspecs): Call
676 c_warn_type_attributes before applying attributes to types.
677 * c-tree.h (c_warn_type_attributes): Declare.
679 2019-11-19 Joseph Myers <joseph@codesourcery.com>
681 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
683 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
684 pedwarn for unknown standard attributes and return error_mark_node
687 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
689 * c-parser.c (c_parser_parse_rtl_body): Always call
690 run_rtl_passes, even if startwith pass is not provided.
692 2019-11-15 Joseph Myers <joseph@codesourcery.com>
694 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
695 duplicate standard attributes.
697 2019-11-15 Joseph Myers <joseph@codesourcery.com>
699 * c-decl.c (std_attribute_table): Add maybe_unused.
701 2019-11-15 Joseph Myers <joseph@codesourcery.com>
703 * c-decl.c (std_attribute_table): Add fallthrough.
704 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
705 attribute at top level.
707 2019-11-15 Joseph Myers <joseph@codesourcery.com>
709 * c-decl.c (std_attribute_table): New.
710 (c_init_decl_processing): Register attributes from
712 * c-parser.c (c_parser_attribute_arguments): Add arguments
713 require_string and allow_empty_args. All callers changed.
714 (c_parser_std_attribute): Set require_string argument for
715 "deprecated" attribute.
717 2019-11-14 Joseph Myers <joseph@codesourcery.com>
719 * c-parser.c (c_parser_postfix_expression)
720 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
721 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
723 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
725 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
726 of build_same_sized_truth_vector_type.
727 (build_vec_cmp): Likewise.
729 2019-11-14 Jakub Jelinek <jakub@redhat.com>
731 * c-parser.c (c_parser_omp_context_selector): Don't require score
732 argument to fit into shwi, just to be INTEGER_CST. Diagnose
735 * c-parser.c (c_parser_omp_context_selector): Rename
736 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
737 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
738 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
741 2019-11-14 Joseph Myers <joseph@codesourcery.com>
743 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
744 ctsk_tagfirstref_attrs.
745 (struct c_declspecs): Update description of attrs. Add
746 postfix_attrs and non_std_attrs_seen_p. Increase size of
747 typespec_kind bit-field.
748 (c_warn_unused_attributes): New declaration.
749 (parser_xref_tag): Update prototype.
750 * c-decl.c (c_warn_unused_attributes): New function.
751 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
752 ctsk_tagref_attrs. Handle attribute declarations.
753 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
754 (grokdeclarator): Handle standard attributes.
755 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
756 attributes to incomplete type reference.
757 (xref_tag): Update call to parser_xref_tag.
758 (declspecs_add_addrspace, declspecs_add_type)
759 (declspecs_add_scspec, declspecs_add_attrs): Set
760 non_std_attrs_seen_p.
761 (finish_declspecs): Apply postfix standard attributes to type.
762 * c-parser.c (c_token_starts_declspecs)
763 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
764 (c_parser_next_tokens_start_declaration): Update comments.
765 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
766 parser->tokens[2] to parser->tokens[1].
767 (c_parser_nth_token_starts_std_attributes)
768 (c_parser_std_attribute_specifier_sequence): New functions.
769 (c_parser_declaration_or_fndef): Add arguments have_attrs and
770 attrs. All callers changed. Handle standard attributes.
771 (c_parser_parms_declarator, c_parser_parms_list_declarator)
772 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
774 (c_parser_declspecs): Add arguments start_std_attr_ok and
775 end_std_attr_ok. All callers changed. Handle standard
777 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
778 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
779 (c_parser_compound_statement_nostart, c_parser_all_labels)
780 (c_parser_label, c_parser_statement, c_parser_for_statement):
781 Handle standard attributes.
782 * c-parser.h (c_parser_declspecs): Update prototype.
783 * gimple-parser.c (c_parser_gimple_declaration): Update call to
786 2019-11-12 Martin Liska <mliska@suse.cz>
788 * gimple-parser.c: Do not include params.h.
790 2019-11-12 Martin Liska <mliska@suse.cz>
792 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
793 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
796 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
797 Frederik Harwath <frederik@codesourcery.com>
800 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
801 (c_parser_oacc_kernels_parallel): Rename function to...
802 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
803 (c_parser_omp_construct): Update accordingly.
806 2019-11-11 Jakub Jelinek <jakub@redhat.com>
808 * c-parser.c (c_parser_translation_unit): Diagnose declare target
809 without corresponding end declare target.
811 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
813 * c-convert.c (convert): Only handle vector conversions if one of
814 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
816 * c-typeck.c (build_array_ref): Only allow vector indexing if the
817 vectors satisfy gnu_vector_type_p.
818 (build_unary_op): Only allow unary operators to be applied to
819 vectors if they satisfy gnu_vector_type_p.
820 (digest_init): Only allow by-element initialization of vectors
821 if they satisfy gnu_vector_type_p.
822 (really_start_incremental_init): Likewise.
823 (push_init_level): Likewise.
824 (pop_init_level): Likewise.
825 (process_init_element): Likewise.
826 (build_binary_op): Only allow binary operators to be applied to
827 vectors if they satisfy gnu_vector_type_p.
829 2019-11-08 Joseph Myers <joseph@codesourcery.com>
831 * c-decl.c (grokparms): Convert () in a function definition to
833 (store_parm_decls_oldstyle): Pedwarn for C2x.
834 (store_parm_decls): Update comment about () not generating a
837 2019-11-07 Joseph Myers <joseph@codesourcery.com>
839 * c-parser.c (c_parser_attribute_arguments): New function.
840 Factored out of c_parser_gnu_attribute.
841 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
842 (c_parser_balanced_token_sequence, c_parser_std_attribute)
843 (c_parser_std_attribute_specifier): New functions.
844 (c_parser_transaction_attributes): Use
845 c_parser_std_attribute_specifier.
847 2019-11-07 Joseph Myers <joseph@codesourcery.com>
849 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
850 lex_joined_string and translate_strings_p.
851 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
853 (c_parser_string_literal): New function.
854 (c_parser_static_assert_declaration_no_semi): Use
855 c_parser_string_literal. Do not set lex_untranslated_string.
856 (c_parser_asm_string_literal): Use c_parser_string_literal.
857 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
858 (c_parser_gnu_attributes): Set and restore translate_strings_p
859 instead of lex_untranslated_string.
860 (c_parser_asm_statement): Do not set lex_untranslated_string.
861 (c_parser_asm_operands): Likewise.
862 (c_parser_has_attribute_expression): Set and restore
863 translate_strings_p instead of lex_untranslated_string.
864 (c_parser_postfix_expression): Use c_parser_string_literal.
865 (pragma_lex): Likewise.
866 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
867 (c_parse_file): Set translate_strings_p.
868 * gimple-parser.c (c_parser_gimple_postfix_expression)
869 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
870 * c-parser.c (c_parser_string_literal): Declare function.
872 2019-11-02 Jakub Jelinek <jakub@redhat.com>
874 * c-parser.c (c_finish_omp_declare_variant): Use
875 omp_get_context_selector instead of c_omp_get_context_selector.
877 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
879 * c-tree.h (c_simulate_enum_decl): Declare.
880 * c-decl.c (c_simulate_enum_decl): New function.
881 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
883 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
885 * c-tree.h (c_simulate_builtin_function_decl): Declare.
886 * c-decl.c (c_simulate_builtin_function_decl): New function.
887 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
890 2019-10-28 Martin Sebor <msebor@redhat.com>
893 * c-decl.c (names_builtin_p): Define a new function.
895 2019-10-28 Richard Biener <rguenther@suse.de>
898 * gimple-parser.c (c_parser_parse_gimple_body): Make
899 current_bb the entry block initially to easier recover
901 (c_parser_gimple_compound_statement): Adjust.
903 2019-10-24 Jakub Jelinek <jakub@redhat.com>
905 * c-parser.c (c_finish_omp_declare_variant): Use
906 omp_context_selector_matches instead of
907 c_omp_context_selector_matches.
908 * c-decl.c (c_decl_attributes): Add "omp declare target block"
909 attribute in between declare target and end declare target
912 2019-10-15 Joseph Myers <joseph@codesourcery.com>
914 * c-parser.c (c_parser_attribute_any_word): Rename to
915 c_parser_gnu_attribute_any_word. All callers changed.
916 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
918 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
920 (c_parser_declaration_or_fndef, c_parser_declspecs)
921 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
922 (c_parser_struct_declaration, c_parser_declarator)
923 (c_parser_gnu_attribute, c_parser_compound_statement)
924 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
925 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
926 attribute-related syntax productions.
928 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
930 * c-objc-common.c (useful_aka_type_p): Replace with...
931 (get_aka_type): ...this new function. Given the original type,
932 decide which aka type to print (if any). Only look through typedefs
933 if user_facing_original_type_p.
934 (print_type): Update accordingly.
936 2019-10-14 Jakub Jelinek <jakub@redhat.com>
938 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
939 into int NESTED, if it is 2, diagnose missing commas in between
941 (c_parser_omp_context_selector): Pass 2 as last argument to
942 c_parser_omp_all_clauses.
944 2019-10-12 Jakub Jelinek <jakub@redhat.com>
946 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
947 For simd properties, put them directly into TREE_VALUE.
948 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
949 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
950 add "omp declare variant base" attribute rather than
951 "omp declare variant".
953 2019-10-11 Joseph Myers <joseph@codesourcery.com>
955 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
957 2019-10-10 Jakub Jelinek <jakub@redhat.com>
959 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
960 true, terminate processing on closing paren and don't skip to end of
962 (c_parser_omp_declare_simd): Handle also declare variant.
963 (omp_construct_selectors, omp_device_selectors,
964 omp_implementation_selectors, omp_user_selectors): New variables.
965 (c_parser_omp_context_selector,
966 c_parser_omp_context_selector_specification,
967 c_finish_omp_declare_variant): New functions.
968 (c_finish_omp_declare_simd): Handle both declare simd and
970 (c_parser_omp_declare): Handle declare variant.
972 2019-10-02 Joseph Myers <joseph@codesourcery.com>
974 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
977 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
979 * c-objc-common.c (useful_aka_type_p): New function.
980 (print_type): Use it to decide whether an aka type is worth printing.
982 2019-09-27 Jakub Jelinek <jakub@redhat.com>
985 * c-parser.c (c_parser_predefined_identifier): New function.
986 (c_parser_postfix_expression): Use it.
987 (c_parser_omp_variable_list): Parse predefined identifiers.
988 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
989 in shared and firstprivate clauses, even when they are predetermined
992 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
994 * c-typeck.c (build_function_call_vec): Take the original function
995 decl as an optional final parameter. Pass all built-in calls to
996 check_builtin_function_arguments.
998 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1001 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1002 of identifiers in the external scope only for variables and functions.
1004 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1007 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1009 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1012 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1013 after determining that the first token is not
1014 PRAGMA_GCC_PCH_PREPROCESS.
1016 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1018 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1019 FUNCTION_DECL to the right value in the presence of nested declarators.
1021 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1024 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1026 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1029 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1030 of a built_in_function.
1031 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1033 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1035 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1036 (c_parser_omp_clause_device_type): New function.
1037 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1038 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1039 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1040 diagnostics for declare target with clauses nested in clause-less
1041 declare target declaration-definition-seq.
1042 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1044 2019-08-09 Jakub Jelinek <jakub@redhat.com>
1046 * c-parser.c (check_no_duplicate_clause): Simplify using
1048 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1049 directive name modifiers.
1050 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1053 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1054 check_no_duplicate_clause call. Comment it out, instead emit a
1055 warning for duplicate dist_schedule clauses.
1057 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1059 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1061 2019-08-08 Jakub Jelinek <jakub@redhat.com>
1063 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1064 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1065 instead of generic_head to track duplicates.
1067 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1069 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1070 (c_parser_omp_clause_use_device_addr): New function.
1071 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1072 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1073 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1074 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1075 map or use_device_* clauses.
1076 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1077 in OpenMP, require pointer type rather than pointer or array type.
1078 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1080 2019-07-31 Jakub Jelinek <jakub@redhat.com>
1083 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1084 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1087 2019-07-25 Martin Liska <mliska@suse.cz>
1088 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1091 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1093 2019-07-25 Martin Liska <mliska@suse.cz>
1095 * c-decl.c (merge_decls): Use new macros
1096 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1098 2019-07-23 Richard Biener <rguenther@suse.de>
1100 PR tree-optimization/83518
1101 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1102 a CFG also rebuild cgraph edges.
1104 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1106 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1107 (c_parser_omp_clause_bind): New function.
1108 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1109 (OMP_LOOP_CLAUSE_MASK): Define.
1110 (c_parser_omp_loop): New function.
1111 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1112 loop combined with parallel or teams.
1113 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1114 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1116 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1119 * c-decl.c (finish_function): Check targetm.warn_func_return
1120 before issuing a -Wreturn-type warning.
1122 2019-07-12 Alexandre Oliva <oliva@adacore.com>
1124 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1125 (c_parser_compound_statement): Call it.
1127 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1129 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1130 (c_parser_omp_clause_order): New function.
1131 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1132 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1133 PRAGMA_OMP_CLAUSE_ORDER.
1134 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1136 2019-07-10 Richard Biener <rguenther@suse.de>
1138 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1139 _Literal (int *) &x for address literals.
1141 2019-07-09 Martin Sebor <msebor@redhat.com>
1144 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1146 (field_decl_cmp): Same.
1147 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1149 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1151 2019-07-09 Martin Sebor <msebor@redhat.com>
1154 * c-decl.c: Change class-key from class to struct and vice versa
1155 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1156 * gimple-parser.c: Same.
1158 2019-07-01 Richard Biener <rguenther@suse.de>
1160 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1161 _Literal (char *) &"foo" for address literals pointing to
1164 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1166 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1167 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1168 C incompatibility if alternate "__intN__" form is used.
1170 2019-06-24 Martin Sebor <msebor@redhat.com>
1172 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1174 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1176 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1177 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1178 (c_parser_omp_scan_loop_body): New function.
1179 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1180 inscan reduction clauses.
1181 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1182 non-inscan reductions on the same construct, or inscan reductions with
1183 ordered or schedule clauses, or inscan array reductions.
1185 2019-06-05 Martin Sebor <msebor@redhat.com>
1188 * c-typeck.c (c_finish_return): Only consider functions returning
1189 pointers as candidates for -Wreturn-local-addr.
1191 2019-06-05 Martin Sebor <msebor@redhat.com>
1193 * c-decl.c (start_decl): Adjust quoting and hyphenation
1195 (finish_decl): Same.
1196 (finish_enum): Same.
1197 (start_function): Same.
1198 (declspecs_add_type): Same.
1199 * c-parser.c (warn_for_abs): Same.
1200 * c-typeck.c (build_binary_op): Same.
1202 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1205 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1206 marked with an OpenACC 'routine' directive.
1209 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1210 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1213 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1214 clauses from "omp declare target" attribute.
1216 2019-05-16 Martin Sebor <msebor@redhat.com>
1218 * c-decl.c (start_decl): Quote keywords, operators, and
1219 types in diagnostics.
1220 (finish_decl): Same.
1221 * c-parser.c (c_parser_asm_statement): Same.
1222 (c_parser_conditional_expression): Same.
1223 (c_parser_transaction_cancel): Same.
1224 * c-typeck.c (c_common_type): Same.
1225 (build_conditional_expr): Same.
1226 (digest_init): Same.
1227 (process_init_element): Same.
1228 (build_binary_op): Same.
1230 2019-05-17 Richard Biener <rguenther@suse.de>
1232 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1233 (c_parser_gimple_unary_expression): Likewise.
1234 (c_parser_gimple_parentized_ternary_expression): New function.
1236 2019-05-16 Richard Biener <rguenther@suse.de>
1238 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1239 (c_parser_gimple_unary_expression): Likewise.
1241 2019-05-15 Richard Biener <rguenther@suse.de>
1243 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1246 2019-05-14 Richard Biener <rguenther@suse.de>
1248 * gimple-parser.c (c_parser_gimple_statement): Remove
1249 questionable auto-promotion to VIEW_CONVERT_EXPR.
1250 (c_parser_gimple_typespec): Split out from __MEM parsing.
1251 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1252 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1253 as __VIEW_CONVERT with -gimple.
1255 2019-05-09 Martin Liska <mliska@suse.cz>
1257 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1259 (c_parser_gimple_unary_expression): Parse also binary expression
1261 (c_parser_gimple_parentized_binary_expression): New function.
1263 2019-05-09 Martin Liska <mliska@suse.cz>
1265 * gimple-parser.c (struct gimple_parser): Add probability.
1266 for gimple_parser_edge.
1267 (gimple_parser::push_edge): Add new argument probability.
1268 (c_parser_gimple_parse_bb_spec): Parse also probability
1270 (c_parser_parse_gimple_body): Set edge probability.
1271 (c_parser_gimple_compound_statement): Consume token
1272 before calling c_parser_gimple_goto_stmt.
1274 (c_parser_gimple_statement): Pass new argument.
1275 (c_parser_gimple_goto_stmt): Likewise.
1276 (c_parser_gimple_if_stmt): Likewise.
1277 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1278 * c-parser.c (c_parser_declaration_or_fndef): Pass
1279 hot_bb_threshold argument.
1280 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1282 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1284 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1287 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1288 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1289 (c_parser_do_statement): Likewise.
1290 (c_parser_for_statement): Likewise. Formatting fixes.
1291 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1292 emit DEBUG_BEGIN_STMTs if needed.
1294 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1297 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1298 (c_start_case): Don't clear it.
1299 (do_case): Adjust c_add_case_label caller.
1300 (c_finish_case): Adjust c_do_switch_warnings caller.
1303 * c-decl.c (merge_decls): If remove is main variant and
1304 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1305 variant that has newdecl as TYPE_NAME if any.
1307 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1310 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1311 don't try to remove it from the variant list, but instead assert
1314 2019-04-01 Richard Biener <rguenther@suse.de>
1317 * c-tree.h (c_get_alias_set): Declare.
1318 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1319 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1320 as the underlying integer type.
1322 2019-03-19 Martin Sebor <msebor@redhat.com>
1324 PR tree-optimization/89688
1325 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1326 kinds of initializers.
1328 2019-03-19 Jakub Jelinek <jakub@redhat.com>
1331 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1332 return type even if quals_used is 0. Formatting fixes.
1334 2019-03-14 Richard Biener <rguenther@suse.de>
1336 * c-tree.h (enum c_declspec_il): New.
1337 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1339 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1340 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1341 (c_parser_declspecs): Adjust.
1342 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1343 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1345 (struct gimple_parser): New.
1346 (gimple_parser::push_edge): New method.
1347 (c_parser_gimple_parse_bb_spec): New helper.
1348 (c_parser_parse_gimple_body): Get start pass and IL specification.
1349 Initialize SSA and CFG.
1350 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1351 Build a gimple_parser parsing state and pass it along.
1352 (c_parser_gimple_statement): Change intermittend __PHI internal
1353 function argument for the edge.
1354 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1355 (c_parser_gimple_goto_stmt): Record edges to build.
1356 (c_parser_gimple_if_stmt): Likewise.
1357 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1358 (c_parser_gimple_or_rtl_pass_list): Likewise.
1360 2019-03-11 Martin Liska <mliska@suse.cz>
1362 * c-decl.c (check_for_loop_decls): Wrap an option name
1363 in a string format message and fix GNU coding style.
1364 * c-parser.c (c_parser_declspecs): Likewise.
1366 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1368 PR tree-optimization/89550
1369 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1371 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1372 or warning returned true.
1374 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1377 * c-typeck.c (convert_arguments): Call inform_declaration only if
1378 the previous warning_at call returned true.
1380 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1382 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1383 parameter. Adjust all users.
1384 (c_parser_oacc_simple_clause): Replace parser with loc formal
1385 parameter. Adjust all users.
1387 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1390 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1391 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1393 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1396 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1397 before c_decl_attributes rather than after it.
1399 2019-02-06 Jakub Jelinek <jakub@redhat.com>
1402 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1403 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1404 instead of 3 nested ifs.
1406 2019-02-06 Joseph Myers <joseph@codesourcery.com>
1409 * c-decl.c (finish_decl): Do not complete array types for arrays
1410 with external linkage not at file scope.
1412 2019-02-05 Richard Biener <rguenther@suse.de>
1415 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1416 all type variants when not supported.
1418 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1421 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1422 * c-decl.c (decl_jump_unsafe): Return false for
1423 C_DECL_COMPOUND_LITERAL_P decls.
1424 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1426 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1429 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1433 * c-decl.c (last_fileptr_type): Remove.
1434 (last_structptr_types): New variable.
1435 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1436 {old,new}rettype instead of the types themselves. Assert
1437 last_structptr_types array has the same number of elements
1438 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1439 argument oldtype and newtype. Instead of handling
1440 just fileptr_type_node specially, handle all builtin_structptr_types
1441 pointer nodes. Formatting fix.
1443 2019-01-24 Martin Sebor <msebor@redhat.com>
1448 * c-decl.c (match_builtin_function_types): Add arguments.
1449 (diagnose_mismatched_decls): Diagnose mismatched declarations
1450 of built-ins more strictly.
1452 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1455 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1456 on #pragma omp cancel with different modifiers.
1458 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1462 * c-typeck.c (convert_for_assignment): Upate the
1463 warn_for_address_or_pointer_of_packed_member call.
1465 2019-01-16 Tom Honermann <tom@honermann.net>
1466 Jason Merrill <jason@redhat.com>
1468 * c-typeck.c (digest_init): Revised the error message produced for
1469 ill-formed cases of array initialization with a string literal.
1470 (error_init): Make variadic.
1472 2019-01-12 Jakub Jelinek <jakub@redhat.com>
1474 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1476 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1479 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1480 if current_function_decl is non-NULL.
1482 2019-01-07 Joseph Myers <joseph@codesourcery.com>
1486 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1487 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1488 functions declared but never defined only for external scope, not
1491 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1494 * c-parser.c (c_parser_postfix_expression): Parse
1495 __builtin_convertvector.
1497 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1499 Update copyright years.
1501 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1504 * c-typeck.c (convert_for_assignment): Call
1505 warn_for_address_or_pointer_of_packed_member.
1507 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1509 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1510 a more specific error message (instead of just falling through).
1512 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1514 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1515 asm qualifier is first seen; use that to give nicer "duplicate asm
1516 qualifier" messages. Delete 'quals" variable, instead pass the
1517 "is_volatile_ flag to build_asm_stmt directly.
1518 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1519 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1521 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1523 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1524 "done" boolean variable.
1526 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1529 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1530 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1531 (build_binary_op): Use struct op_location_t and
1532 class binary_op_rich_location.
1534 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1537 * c-convert.c (convert): Call c_fully_fold before calling
1538 ubsan_instrument_float_cast.
1540 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1542 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1545 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1547 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1548 after asm. Pass a flag for it to build_asm_expr.
1549 * c-tree.h (build_asm_expr): Update declaration.
1550 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1553 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1556 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1557 combination of volatile and goto, in any order, without repetitions.
1559 2018-12-04 James Norris <jnorris@codesourcery.com>
1560 Cesar Philippidis <cesar@codesourcery.com>
1561 Julian Brown <julian@codesourcery.com>
1563 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1566 2018-11-30 Richard Biener <rguenther@suse.de>
1568 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1569 _Literal (type) { ... } as empty aggregate or vector constructor.
1571 2018-11-29 Martin Sebor <msebor@redhat.com>
1574 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1575 (convert_arguments): Add comments. Pass additional argument to
1578 2018-11-29 Martin Sebor <msebor@redhat.com>
1582 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1584 2018-11-23 Martin Sebor <msebor@redhat.com>
1587 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1588 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1590 2018-11-20 Martin Sebor <msebor@redhat.com>
1592 * c-parser.c (c_parser_has_attribute_expression): New function.
1593 (c_parser_attribute): New function.
1594 (c_parser_attributes): Move code into c_parser_attribute.
1595 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1597 2018-11-15 Martin Sebor <msebor@redhat.com>
1600 * c-decl.c (header_for_builtin_fn): Declare.
1601 (diagnose_mismatched_decls): Diagnose declarations of built-in
1602 functions without a prototype.
1603 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1604 (convert_argument): Same.
1605 (convert_arguments): Factor code out into convert_argument.
1606 Detect mismatches between built-in formal arguments in calls
1607 to built-in without prototype.
1608 (build_conditional_expr): Same.
1609 (type_or_builtin_type): New function.
1610 (convert_for_assignment): Add argument. Conditionally issue
1611 warnings instead of errors for mismatches.
1613 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1615 * c-decl.c: Replace "source_location" with "location_t".
1616 * c-tree.h: Likewise.
1617 * c-typeck.c: Likewise.
1618 * gimple-parser.c: Likewise.
1620 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1622 * c-parser.c (c_parser_omp_clause_final): Use
1623 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1624 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1625 parsing instead of c_parser_paren_condition.
1626 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1627 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1628 c_fully_fold instead of c_parser_condition.
1629 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1630 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1631 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1632 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1633 c_parser_expr_no_commas instead of c_parser_expression.
1635 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1636 reduction clause with inscan modifier.
1638 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1639 clauses other than atomic_default_mem_order.
1641 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1643 * c-parser.c: Include memmode.h.
1644 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1645 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1646 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1647 task_reduction clauses.
1648 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1649 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1650 section, or lvalue assignment expression.
1651 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1652 (c_parser_omp_clause_lastprivate): Parse optional
1653 conditional: modifier.
1654 (c_parser_omp_clause_hint): Require constant integer expression rather
1655 than just integer expression.
1656 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1658 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1659 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1660 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1662 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1663 iterators. Parse mutexinoutset and depobj kinds.
1664 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1666 (c_parser_omp_all_clauses): Likewise. Handle
1667 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1668 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1669 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1670 default memory order from requires directive if any. Adjust
1671 c_finish_omp_atomic caller.
1672 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1673 (c_parser_omp_flush): Parse flush with memory-order-clause.
1674 (c_parser_omp_for_loop): Allow NE_EXPR even in
1675 OpenMP loops, adjust c_finish_omp_for caller.
1676 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1677 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1678 Allow to be called while parsing combined parallel master.
1679 Parse combined master taskloop{, simd}.
1680 (c_parser_omp_parallel): Parse combined
1681 parallel master{, taskloop{, simd}} constructs.
1682 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1683 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1684 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1685 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1686 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1687 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1688 around teams body. Use SET_EXPR_LOCATION.
1689 (c_parser_omp_target_data): Allow target data
1690 with only use_device_ptr clauses.
1691 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1692 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1693 (c_parser_omp_requires): New function.
1694 (c_finish_taskloop_clauses): New function.
1695 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1696 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1697 declaration. Disallow in_reduction clause when combined with parallel
1699 (c_parser_omp_construct): Adjust c_parser_omp_master and
1700 c_parser_omp_taskgroup callers.
1701 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1703 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1704 like OMP_CLAUSE_REDUCTION.
1705 (handle_omp_array_sections): Likewise. Call save_expr on array
1706 reductions before calling build_index_type. Handle depend clauses
1708 (struct c_find_omp_var_s): New type.
1709 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1710 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1711 with static, runtime or auto schedule kinds. Call save_expr for whole
1712 array reduction sizes. Diagnose reductions with zero sized elements
1713 or variable length structures. Diagnose nogroup clause used with
1714 reduction clause(s). Handle depend clause with
1715 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1716 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1717 some different type for other kinds. Use build_unary_op with
1718 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1719 Handle depend clauses with iterators. Remove no longer needed special
1720 case that predetermined const qualified vars may be specified in
1721 firstprivate clause. Complain if const qualified vars are mentioned
1722 in data-sharing clauses other than firstprivate or shared. Use
1723 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1724 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1725 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1726 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1728 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1730 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1731 logic for change to name_hint::operator bool.
1732 (undeclared_variable): Likewise.
1733 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1734 (c_parser_parameter_declaration): Likewise.
1736 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1738 * c-errors.c (pedwarn_c11): New function.
1739 * c-parser.c (disable_extension_diagnostics): Save
1740 warn_c11_c2x_compat and set it to 0.
1741 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1742 (c_parser_static_assert_declaration_no_semi): Handle
1743 _Static_assert without string constant.
1744 * c-tree.h (pedwarn_c11): New prototype.
1746 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1748 * Make-lang.in (selftest-c): New.
1749 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1750 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1751 from gcc/Makefile.in.
1753 2018-10-02 Richard Biener <rguenther@suse.de>
1755 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1757 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1760 * c-typeck.c (build_binary_op): Use excess precision for
1761 comparisons of integers and floating-point for C11 and later.
1763 2018-09-26 Martin Jambor <mjambor@suse.cz>
1766 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1769 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1771 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1772 Update for new param.
1773 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1776 2018-09-17 Martin Jambor <mjambor@suse.cz>
1779 * c-parser.c: (warn_for_abs): New function.
1780 (c_parser_postfix_expression_after_primary): Call it.
1782 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1784 * c-typeck.c (digest_init): Shorten overlength strings.
1786 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1788 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1790 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1792 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1793 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1795 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1797 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1798 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1800 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1803 * c-decl.c (implicitly_declare): Update call to
1804 maybe_add_include_fixit to suggest overriding the location, as it
1806 * c-objc-common.c (c_tree_printer): Update for conversion of
1807 show_caret_p to a tri-state.
1809 2018-08-27 Martin Liska <mliska@suse.cz>
1811 * c-decl.c (locate_old_decl): Use new function
1812 fndecl_built_in_p and remove check for FUNCTION_DECL if
1814 (diagnose_mismatched_decls): Likewise.
1815 (merge_decls): Likewise.
1816 (warn_if_shadowing): Likewise.
1817 (pushdecl): Likewise.
1818 (implicitly_declare): Likewise.
1819 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1820 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1821 * c-typeck.c (build_function_call_vec): Likewise.
1822 (convert_arguments): Likewise.
1824 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1827 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1828 (diagnose_mismatched_decls): Likewise, in various places.
1829 (warn_if_shadowing): Likewise.
1830 (implicit_decl_warning): Likewise.
1831 (implicitly_declare): Likewise.
1832 (undeclared_variable): Likewise.
1833 (declare_label): Likewise.
1834 (grokdeclarator): Likewise.
1835 (start_function): Likewise.
1836 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1837 (c_parser_parameter_declaration): Likewise.
1838 (c_parser_binary_expression): Likewise.
1839 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1840 (parser_build_binary_op): Likewise.
1841 (build_unary_op): Likewise.
1842 (error_init): Likewise.
1843 (pedwarn_init): Likewise.
1844 (warning_init): Likewise.
1845 (convert_for_assignment): Likewise.
1847 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1849 * c-objc-common.c: Include "gcc-rich-location.h".
1850 (c_tree_printer): Move implemenation of '%T' to...
1851 (print_type): ...this new function.
1852 (range_label_for_type_mismatch::get_text): New function.
1853 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1854 range for the various ic_argpass cases.
1855 (class maybe_range_label_for_tree_type_mismatch): New class.
1856 (build_binary_op): Use it when calling binary_op_error.
1858 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1860 * c-decl.c (start_decl): Do not warn if variables is named as main
1861 and is a local variable.
1863 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1866 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1867 objects of unknown size.
1869 2018-08-13 Martin Sebor <msebor@redhat.com>
1871 PR tree-optimization/71625
1872 * c-parser.c (c_parser_declaration_or_fndef): Call
1873 braced_list_to_string.
1875 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1878 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1881 2018-08-01 Martin Sebor <msebor@redhat.com>
1883 PR tree-optimization/86650
1884 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1885 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1887 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1890 * c-typeck.c (init_field_decl_cmp): New function.
1891 (output_pending_init_elements): Use it for field comparisons
1892 instead of pure bit_position comparisons.
1894 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1896 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1897 type here, instead add "omp declare target implicit" attribute.
1898 (finish_decl): Diagnose vars without mappable type here.
1900 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1901 Thomas Schwinge <thomas@codesourcery.com>
1902 Cesar Philippidis <cesar@codesourcery.com>
1904 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1905 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1906 to their non-present_or_* counterparts. Make 'self' an alias to
1907 PRAGMA_OACC_CLAUSE_HOST.
1908 (c_parser_oacc_data_clause): Update GOMP mappings for
1909 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1910 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1911 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1912 Remove support for present_or_* clauses.
1913 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1914 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1915 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1916 (OACC_DATA_CLAUSE_MASK): Likewise.
1917 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1918 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1919 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1920 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1921 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1923 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1925 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1926 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1927 (c_parser_gimple_unary_expression): Likewise.
1929 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1932 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1933 before doing POINTER_DIFF_EXPR.
1935 2018-06-07 Marek Polacek <polacek@redhat.com>
1938 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1939 for loop initial declarations.
1941 2018-05-30 David Pagan <dave.pagan@oracle.com>
1944 * c-decl.c (grokdeclarator): Update check for return type warnings.
1945 (start_function): Likewise.
1946 (finish_function): Likewise.
1947 * c-typeck.c (c_finish_return): Update check for return type warnings.
1948 Pass OPT_Wreturn_type to pedwarn when appropriate.
1950 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1952 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1955 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1957 * gimple-parser.c: Include internal-fn.h.
1958 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1959 (c_parser_gimple_call_internal): New function.
1960 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1961 Fix typos in comment.
1963 2018-05-10 Jakub Jelinek <jakub@redhat.com>
1966 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1967 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1969 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1970 fold_offsetof_1, pass argtype as TYPE to it and drop the
1973 2018-05-02 David Pagan <dave.pagan@oracle.com>
1976 * c-decl.c (old_style_parameter_scope): New function.
1977 * c-parser.c (c_parser_postfix_expression): Check for statement
1978 expressions in old-style function parameter list declarations.
1979 * c-parser.h (old_style_parameter_scope): New extern declaration.
1981 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1984 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1985 it is not TREE_STATIC.
1986 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1987 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1988 its COMPOUND_LITERAL_EXPR_DECL.
1990 2018-03-21 Joseph Myers <joseph@codesourcery.com>
1992 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1993 where all functions return the same _FloatN or _FloatNx type,
1994 treat integer types as _Float64 instead of double.
1996 2018-03-21 Jakub Jelinek <jakub@redhat.com>
1999 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2000 building vector comparison, diagnose it and return error_mark_node.
2002 2018-03-15 Jakub Jelinek <jakub@redhat.com>
2005 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2006 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2007 INTEGER_TYPE element type.
2009 2018-03-13 David Pagan <dave.pagan@oracle.com>
2012 * c-typeck.c (output_init_element): Ensure field initializer
2013 expression is always evaluated if there are side effects.
2015 2018-03-06 Jakub Jelinek <jakub@redhat.com>
2018 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2019 !building_stmt_list_p ().
2021 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2024 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2025 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2026 and include the BIND_EXPR in the list of things that need to be
2029 2018-02-09 Nathan Sidwell <nathan@acm.org>
2032 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2033 to strict_aliasing_warning.
2035 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2037 * c-typeck.c (really_start_incremental_init, push_init_level,
2038 set_nonincremental_init, output_init_element, process_init_element):
2039 Use DECL_UNNAMED_BIT_FIELD.
2041 2018-01-31 Marek Polacek <polacek@redhat.com>
2044 * c-parser.c (c_parser_compound_statement_nostart): Call
2045 expansion_point_location_if_in_system_header.
2047 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2050 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2053 2018-01-13 Jakub Jelinek <jakub@redhat.com>
2056 * c-tree.h (decl_constant_value_1): Add a bool argument.
2057 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2058 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2059 (decl_constant_value): Adjust caller.
2060 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2061 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2062 decl_constant_value returns initializer that has BLKmode or
2064 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2067 Alan Hayward <alan.hayward@arm.com>
2068 David Sherwood <david.sherwood@arm.com>
2070 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2071 TYPE_VECTOR_SUBPARTS.
2073 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2075 Update copyright years.
2077 2018-01-01 Jakub Jelinek <jakub@redhat.com>
2080 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2081 c_parser_conditional_expression, c_parser_cast_expression,
2082 c_parser_sizeof_expression, c_parser_alignof_expression,
2083 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2084 c_parser_transaction_expression): Use set_error () method instead
2085 of setting value member to error_mark_node.
2087 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2089 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2090 and _Float<N>X built-in functions.
2092 2017-12-22 Jakub Jelinek <jakub@redhat.com>
2095 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2096 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2097 incomplete vars rather than after it.
2100 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2101 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2102 and consider empty ones if there are no other stmts. For
2103 -Wunused-value walk all statements before the one only followed by
2106 2017-12-22 Mike Stump <mikestump@comcast.net>
2107 Eric Botcazou <ebotcazou@adacore.com>
2109 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2110 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2111 (c_parser_do_statement): Likewise.
2112 (c_parser_for_statement): Likewise.
2113 (c_parser_statement_after_labels): Adjust calls to above.
2114 (c_parse_pragma_ivdep): New static function.
2115 (c_parser_pragma_unroll): Likewise.
2116 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2117 <PRAGMA_UNROLL>: New case.
2119 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2121 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2122 perform_integral_promotions, digest_init): Replace Yoda conditions
2123 with typical order conditions.
2124 * c-decl.c (check_bitfield_type_and_width): Likewise.
2126 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2128 * c-typeck.c (c_safe_arg_type_equiv_p,
2129 c_safe_function_type_cast_p): New function.
2130 (build_c_cast): Implement -Wcast-function-type.
2132 2017-12-14 Richard Biener <rguenther@suse.de>
2135 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2136 like REALPART_EXPR for the behavior of whether its operand
2139 2017-12-12 Marek Polacek <polacek@redhat.com>
2142 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2144 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2146 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2147 * c-parser.c (add_debug_begin_stmt): New.
2148 (c_parser_declaration_or_fndef): Call it.
2149 (c_parser_compound_statement_nostart): Likewise.
2150 (c_parser_statement_after_labels): Likewise.
2151 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2153 2017-12-07 Joseph Myers <joseph@codesourcery.com>
2155 * c-decl.c (build_compound_literal): Add parameter alignas_align
2156 and set alignment of decl if nonzero.
2157 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2158 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2160 (c_parser_struct_declaration): Update syntax comment.
2161 (c_parser_type_name): Add alignas_ok argument and pass it to
2163 (c_parser_cast_expression): Pass true to c_parser_type_name and
2164 give error if a cast used an _Alignas specifier.
2165 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2166 give error if sizeof (type-name) used an _Alignas specifier.
2167 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2168 give error if _Alignof (type-name) used an _Alignas specifier.
2169 (c_parser_postfix_expression_after_paren_type): Check specified
2170 alignment for a compound literal and pass it to
2171 build_compound_literal.
2172 * c-parser.h (c_parser_type_name): Update prototype.
2173 * c-tree.h (build_compound_literal): Update prototype.
2175 2017-12-07 Martin Sebor <msebor@redhat.com>
2178 * c-decl.c (c_decl_attributes): Look up existing declaration and
2179 pass it to decl_attributes.
2181 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2184 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2185 reserved for use by the implementation.
2187 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2189 * c-decl.c: Include "c-family/c-spellcheck.h".
2191 2017-12-05 Martin Liska <mliska@suse.cz>
2192 Jakub Jelinek <jakub@redhat.com>
2194 * c-typeck.c (pointer_diff): Add new argument and instrument
2195 pointer subtraction.
2196 (build_binary_op): Similar for pointer comparison.
2198 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2201 * c-parser.c: Include tree-iterator.h.
2202 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2203 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2207 * c-tree.h (decl_constant_value_1): Declare.
2208 * c-typeck.c (decl_constant_value_1): New function.
2209 (decl_constant_value): Use it.
2210 * c-fold.c (c_fully_fold_internal): If in_init, use
2211 decl_constant_value_1 instead of decl_constant_value.
2213 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2215 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2217 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2220 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2221 c_switch_covers_all_cases_p returns true.
2223 2017-11-28 Julia Koval <julia.koval@intel.com>
2224 Sebastian Peryt <sebastian.peryt@intel.com>
2226 * Make-lang.in (c/c-array-notation.o): Remove.
2227 * c-array-notation.c: Delete.
2228 * c-decl.c: Remove cilkplus condition.
2229 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2230 c_parser_cilk_verify_simd, c_parser_array_notation,
2231 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2232 c_parser_cilk_simd_fn_vector_attrs,
2233 c_finish_cilk_simd_fn_tokens): Delete.
2234 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2235 (c_parser_direct_declarator_inner): Ditto.
2236 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2237 (c_parser_attributes, c_parser_compound_statement,
2238 c_parser_statement_after_labels, c_parser_if_statement,
2239 c_parser_switch_statement, c_parser_while_statement,
2240 c_parser_do_statement, c_parser_for_statement,
2241 c_parser_unary_expression, c_parser_postfix_expression,
2242 c_parser_postfix_expression_after_primary,
2243 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2244 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2246 * c-typeck.c (build_array_ref, build_function_call_vec,
2248 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2249 c_finish_loop, build_binary_op): Remove cilkplus support.
2251 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2253 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2256 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
2258 * Make-lang.in (c.install-plugin): Install backend import library.
2260 2017-11-23 Jakub Jelinek <jakub@redhat.com>
2262 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2263 pragma_stmt context.
2265 2017-11-23 Mike Stump <mikestump@comcast.net>
2266 Eric Botcazou <ebotcazou@adacore.com>
2268 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2270 (c_parser_do_statement): Likewise.
2271 (c_parser_for_statement): Likewise.
2273 2017-11-22 David Malcolm <dmalcolm@redhat.com>
2276 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2277 bool to bool *. Within '%T' handling, if showing an "aka", use
2278 "quoted" param to add appropriate quoting.
2280 2017-11-22 Marek Polacek <polacek@redhat.com>
2285 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2287 2017-11-21 David Malcolm <dmalcolm@redhat.com>
2290 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2291 earlier failed lookups.
2293 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2295 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2296 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2298 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2301 * c-decl.c: Include "c-family/known-headers.h".
2302 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2303 to known-headers.cc.
2304 (class suggest_missing_header): Move to known-header.h.
2305 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2306 than get_c_name_hint.
2308 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2310 * c-decl.c (get_c_name_hint): New function.
2311 (class suggest_missing_header): New class.
2312 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2313 suggest missing headers to the user.
2315 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2317 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2318 Include "c-family/name-hint.h"
2319 (implicit_decl_warning): Convert "hint" from
2320 const char * to name_hint. Pass location to
2321 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2322 warning was not printed.
2323 (undeclared_variable): Likewise for "guessed_id".
2324 (lookup_name_fuzzy): Convert return type from const char *
2325 to name_hint. Add location_t param.
2326 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2327 Include "c-family/name-hint.h"
2328 (c_parser_declaration_or_fndef): Convert "hint" from
2329 const char * to name_hint. Pass location to lookup_name_fuzzy.
2330 (c_parser_parameter_declaration): Likewise.
2332 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2336 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2338 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2339 handle_omp_array_sections): Likewise.
2340 (digest_init): Don't call decl_constant_value_for_optimization.
2341 * c-tree.h (decl_constant_value_for_optimization): Removed.
2342 * c-fold.c (c_fold_array_ref): New function.
2343 (c_fully_fold_internal): Add LVAL argument, propagate it through
2344 recursive calls. For VAR_P call decl_constant_value and
2345 unshare if not LVAL and either optimizing or IN_INIT. Remove
2346 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2347 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2348 (c_fully_fold): Add LVAL argument, pass it through to
2349 c_fully_fold_internal.
2350 (decl_constant_value_for_optimization): Removed.
2352 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2355 * c-parser.c (check_tgmath_function): New function.
2356 (enum tgmath_parm_kind): New enum.
2357 (c_parser_postfix_expression): Handle __builtin_tgmath.
2359 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2361 * c-decl.c (implicit_decl_warning): Update for renaming of
2362 pedwarn_at_rich_loc and warning_at_rich_loc.
2363 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2364 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2365 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2366 (c_parser_struct_or_union_specifier): Likewise for renaming of
2367 pedwarn_at_rich_loc.
2368 (c_parser_parameter_declaration): Likewise for renaming of
2370 * c-typeck.c (build_component_ref): Likewise.
2371 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2372 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2373 (set_init_label): Likewise for renaming of error_at_rich_loc.
2375 2017-10-30 Richard Biener <rguenther@suse.de>
2377 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2380 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2382 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2383 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2385 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2388 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2391 2017-10-25 Jakub Jelinek <jakub@redhat.com>
2394 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2395 newdecl to corresponding __builtin_ if any.
2397 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2400 * c-decl.c (diagnose_mismatched_decls): Use
2401 OPT_Wbuiltin_declaration_mismatch.
2403 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2405 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2406 use it to guard calls to maybe_suggest_missing_token_insertion.
2407 (c_parser_parms_list_declarator): Override default value of new
2408 "type_is_unique" param to c_parser_require.
2409 (c_parser_asm_statement): Likewise.
2410 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2413 2017-10-11 Nathan Sidwell <nathan@acm.org>
2415 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2417 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2419 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2420 operating on trees as wide_ints.
2421 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2422 (c_tree_equal): Likewise.
2424 2017-10-04 David Malcolm <dmalcolm@redhat.com>
2426 * c-decl.c (push_parm_decl): Store c_parm's location into the
2428 (build_c_parm): Add "loc" param and store it within the c_parm.
2429 * c-parser.c (struct c_parser): Add "last_token_location" field.
2430 (c_parser_consume_token): Store location of the token into the
2432 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2433 when handling a FUNCTION_DECL, if it doesn't already have them.
2434 (c_parser_parameter_declaration): Generate a location for the
2435 parameter, and pass it to the call to build_c_parm.
2436 * c-tree.h (struct c_parm): Add field "loc".
2437 (build_c_parm): Add location_t param.
2438 * c-typeck.c (get_fndecl_argument_location): New function.
2439 (inform_for_arg): New function.
2440 (convert_for_assignment): Use inform_for_arg when dealing with
2443 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2445 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2447 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2448 don't SET_DECL_C_BIT_FIELD here.
2451 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2452 instead of trying to set just TREE_READONLY manually.
2454 2017-09-16 Tom de Vries <tom@codesourcery.com>
2457 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2460 2017-09-15 Joseph Myers <joseph@codesourcery.com>
2463 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2465 (build_conditional_expr): For C11, generate result with excess
2466 precision when one argument is an integer and the other is of a
2467 type using excess precision.
2469 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2471 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2473 2017-09-13 Marek Polacek <polacek@redhat.com>
2476 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2477 than expr.original_type.
2479 2017-09-12 Nathan Sidwell <nathan@acm.org>
2481 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2482 resort_sorted_fields): Moved from c-family/c-common.c.
2483 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2485 2017-09-01 Joseph Myers <joseph@codesourcery.com>
2488 * c-typeck.c (build_atomic_assign): Handle argument with excess
2489 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2490 argument passed to build_binary_op and convert_for_assignment but
2491 not for call to c_fully_fold.
2492 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2493 Ensure build_binary_op is called with argument with original
2494 semantic type. Avoid calling c_fully_fold with an
2495 EXCESS_PRECISION_EXPR from build_binary_op.
2497 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2500 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2502 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2503 Alan Hayward <alan.hayward@arm.com>
2504 David Sherwood <david.sherwood@arm.com>
2506 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2507 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2508 m1 and m2 to the signed equivalent of a fixed-point
2511 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2513 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2514 than CAN_HAVE_LOCATION_P when determining whether to use the
2515 location_t value within "value".
2517 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2519 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2520 rather than peeking the location of the first token.
2521 * c-tree.h (c_expr::get_location): New method.
2523 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2525 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2526 to check_function_arguments.
2528 2017-08-18 Marek Polacek <polacek@redhat.com>
2530 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2533 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2536 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2537 (check_bitfield_type_and_width): Don't allow bit-field with
2538 warn_if_not_aligned type.
2540 2017-08-14 Martin Sebor <msebor@redhat.com>
2543 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2545 2017-08-11 Marek Polacek <polacek@redhat.com>
2548 * c-decl.c (pushtag): Only print inform if the warning was printed.
2549 (grokdeclarator): Likewise.
2551 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2553 * c-parser.c (c_parser_error): Rename to...
2554 (c_parser_error_richloc): ...this, making static, and adding
2555 "richloc" parameter, passing it to the c_parse_error call,
2556 rather than calling c_parser_set_source_position_from_token.
2557 (c_parser_error): Reintroduce, reimplementing in terms of the
2558 above, converting return type from void to bool.
2559 (class token_pair): New class.
2560 (struct matching_paren_traits): New struct.
2561 (matching_parens): New typedef.
2562 (struct matching_brace_traits): New struct.
2563 (matching_braces): New typedef.
2564 (get_matching_symbol): New function.
2565 (c_parser_require): Add param MATCHING_LOCATION, using it to
2566 highlight matching "opening" tokens for missing "closing" tokens.
2567 (c_parser_skip_until_found): Likewise.
2568 (c_parser_static_assert_declaration_no_semi): Convert explicit
2569 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2570 class matching_parens, so that the pertinent open parenthesis is
2571 highlighted when there are problems locating the close
2573 (c_parser_struct_or_union_specifier): Likewise.
2574 (c_parser_typeof_specifier): Likewise.
2575 (c_parser_alignas_specifier): Likewise.
2576 (c_parser_simple_asm_expr): Likewise.
2577 (c_parser_braced_init): Likewise, for matching_braces.
2578 (c_parser_paren_condition): Likewise, for matching_parens.
2579 (c_parser_switch_statement): Likewise.
2580 (c_parser_for_statement): Likewise.
2581 (c_parser_asm_statement): Likewise.
2582 (c_parser_asm_operands): Likewise.
2583 (c_parser_cast_expression): Likewise.
2584 (c_parser_sizeof_expression): Likewise.
2585 (c_parser_alignof_expression): Likewise.
2586 (c_parser_generic_selection): Likewise.
2587 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2588 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2589 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2590 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2591 c_parser_skip_until_found call.
2592 (c_parser_objc_class_definition): Use class matching_parens as
2594 (c_parser_objc_method_decl): Likewise.
2595 (c_parser_objc_try_catch_finally_statement): Likewise.
2596 (c_parser_objc_synchronized_statement): Likewise.
2597 (c_parser_objc_at_property_declaration): Likewise.
2598 (c_parser_oacc_wait_list): Likewise.
2599 (c_parser_omp_var_list_parens): Likewise.
2600 (c_parser_omp_clause_collapse): Likewise.
2601 (c_parser_omp_clause_default): Likewise.
2602 (c_parser_omp_clause_if): Likewise.
2603 (c_parser_omp_clause_num_threads): Likewise.
2604 (c_parser_omp_clause_num_tasks): Likewise.
2605 (c_parser_omp_clause_grainsize): Likewise.
2606 (c_parser_omp_clause_priority): Likewise.
2607 (c_parser_omp_clause_hint): Likewise.
2608 (c_parser_omp_clause_defaultmap): Likewise.
2609 (c_parser_oacc_single_int_clause): Likewise.
2610 (c_parser_omp_clause_ordered): Likewise.
2611 (c_parser_omp_clause_reduction): Likewise.
2612 (c_parser_omp_clause_schedule): Likewise.
2613 (c_parser_omp_clause_num_teams): Likewise.
2614 (c_parser_omp_clause_thread_limit): Likewise.
2615 (c_parser_omp_clause_aligned): Likewise.
2616 (c_parser_omp_clause_linear): Likewise.
2617 (c_parser_omp_clause_safelen): Likewise.
2618 (c_parser_omp_clause_simdlen): Likewise.
2619 (c_parser_omp_clause_depend): Likewise.
2620 (c_parser_omp_clause_map): Likewise.
2621 (c_parser_omp_clause_device): Likewise.
2622 (c_parser_omp_clause_dist_schedule): Likewise.
2623 (c_parser_omp_clause_proc_bind): Likewise.
2624 (c_parser_omp_clause_uniform): Likewise.
2625 (c_parser_omp_for_loop): Likewise.
2626 (c_parser_cilk_clause_vectorlength): Likewise.
2627 (c_parser_cilk_clause_linear): Likewise.
2628 (c_parser_transaction_expression): Likewise.
2629 * c-parser.h (c_parser_require): Add param matching_location with
2630 default UNKNOWN_LOCATION.
2631 (c_parser_error): Convert return type from void to bool.
2632 (c_parser_skip_until_found): Add param matching_location with
2633 default UNKNOWN_LOCATION.
2635 2017-08-09 Marek Polacek <polacek@redhat.com>
2637 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2638 * c-tree.h (build_external_ref): Update declaration.
2639 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2640 (build_external_ref): Change the type of a parameter to bool.
2641 (parser_build_binary_op): Use true/false instead of 1/0.
2642 (pointer_diff): Likewise.
2643 (build_modify_expr): Likewise.
2644 (set_designator): Change the type of a parameter to bool.
2645 (set_init_index): Use true/false instead of 1/0.
2646 (set_init_label): Likewise.
2647 (output_init_element): Change the type of a parameter to bool.
2648 (output_pending_init_elements): Use true/false instead of 1/0.
2649 (process_init_element): Likewise.
2650 (build_binary_op): Change the type of a parameter to bool.
2652 2017-08-09 Marek Polacek <polacek@redhat.com>
2655 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2656 Call emit_diagnostic_valist instead of pedwarn.
2657 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2658 Print the relevant types in diagnostics.
2660 2017-08-09 Marek Polacek <polacek@redhat.com>
2663 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2664 build_conditional_expr.
2665 * c-parser.c (c_parser_conditional_expression): Create locations for
2666 EXP1 and EXP2 from their source ranges. Pass the locations down to
2667 build_conditional_expr.
2668 * c-tree.h (build_conditional_expr): Update declaration.
2669 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2670 For -Wsign-compare, also print the types.
2672 2017-08-08 Martin Liska <mliska@suse.cz>
2674 * c-convert.c: Include header files.
2675 * c-typeck.c: Likewise.
2677 2017-08-07 Martin Liska <mliska@suse.cz>
2679 * c-parser.c (c_parser_attributes): Canonicalize name of an
2682 2017-08-02 Marek Polacek <polacek@redhat.com>
2685 * c-parser.c (c_parser_unary_expression): Use set_error.
2689 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2690 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2692 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2693 Martin Liska <mliska@suse.cz>
2695 * c-typeck.c (c_finish_goto_label): Build gimple predict
2698 2017-07-31 Martin Liska <mliska@suse.cz>
2701 * c-convert.c (convert): Guard condition with flag_sanitize_p
2702 also with current_function_decl non-null equality.
2703 * c-decl.c (grokdeclarator): Likewise.
2704 * c-typeck.c (build_binary_op): Likewise.
2706 2017-07-25 Marek Polacek <polacek@redhat.com>
2708 * c-decl.c (grokfield): Remove local variable.
2710 2017-07-25 Marek Polacek <polacek@redhat.com>
2713 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2714 macro expansion if the body is in { }.
2715 (c_parser_while_statement): Likewise.
2716 (c_parser_for_statement): Likewise.
2718 2017-07-18 Nathan Sidwell <nathan@acm.org>
2720 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2722 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2724 * c-decl.c (implicitly_declare): When suggesting a missing
2725 #include, provide a fix-it hint.
2727 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2729 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2730 and call that instead.
2731 * c-tree.h (selftest::run_c_tests): New decl.
2733 2017-06-26 Marek Polacek <polacek@redhat.com>
2736 * c-parser.c (c_parser_if_body): Set the location of the
2737 body of the conditional after parsing all the labels. Call
2738 warn_for_multistatement_macros.
2739 (c_parser_else_body): Likewise.
2740 (c_parser_switch_statement): Likewise.
2741 (c_parser_while_statement): Likewise.
2742 (c_parser_for_statement): Likewise.
2743 (c_parser_statement): Add a default argument. Save the location
2744 after labels have been parsed.
2745 (c_parser_c99_block_statement): Likewise.
2747 2017-06-19 Richard Biener <rguenther@suse.de>
2749 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2750 negated _Literals to parse _Literal (int) -1.
2752 2017-06-13 Martin Liska <mliska@suse.cz>
2755 * c-convert.c (convert): Use sanitize_flags_p.
2756 * c-decl.c (grokdeclarator): Likewise.
2757 * c-typeck.c (convert_for_assignment): Likewise.
2758 (c_finish_return): Likewise.
2759 (build_binary_op): Likewise.
2761 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2764 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2765 to sizetype before size_binop.
2767 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2769 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2772 2017-06-06 Marek Polacek <polacek@redhat.com>
2775 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2777 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2779 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2781 * c-parser.c (c_parser_binary_expression): Implement the
2782 -Wsizeof_pointer_div warning.
2783 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2784 from a parenthesized expression.
2785 (c_parser_expr_list): Use c_last_sizeof_loc.
2786 * c-tree.h (c_last_sizeof_loc): New external.
2787 * c-typeck.c (c_last_sizeof_loc): New variable.
2788 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2790 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2793 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2795 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2797 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2800 2017-05-24 Martin Sebor <msebor@redhat.com>
2803 * c-fold.c (c_fully_fold_internal): Adjust.
2804 * c-typeck.c (parser_build_unary_op): Adjust.
2806 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2808 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2809 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2812 2017-05-23 Marek Polacek <polacek@redhat.com>
2814 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2817 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2819 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2820 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2821 it returned invariant. Call tree_invariant_p unconditionally
2822 afterwards to decide whether to return expr or op0.
2824 2017-05-22 Nathan Sidwell <nathan@acm.org>
2826 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2828 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2830 * c-parser.c (c_parser_omp_clause_default): Handle
2831 "OMP_CLAUSE_DEFAULT_PRESENT".
2833 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2835 * config-lang.in (gtfiles): Add c-family/c-format.c.
2837 2017-05-18 Nathan Sidwell <nathan@acm.org>
2839 * c-decl.c (pushdecl_top_level): Delete unused function.
2841 2017-05-18 Marek Polacek <polacek@redhat.com>
2843 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2844 (check_earlier_gotos): Likewise.
2845 (define_label): Likewise.
2846 (pending_xref_error): Likewise.
2847 (smallest_type_quals_location): Likewise.
2848 (grokdeclarator): Likewise.
2849 (grokparms): Likewise.
2850 (identifier_global_value): Likewise.
2851 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2852 (find_init_member): Likewise.
2854 2017-05-18 Marek Polacek <polacek@redhat.com>
2856 * c-decl.c (start_decl): Use false/true instead of 0/1.
2857 (grokdeclarator): Likewise.
2858 (finish_struct): Likewise.
2859 (start_function): Change the return type to bool. Use false/true
2861 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2862 * c-tree.h (start_function): Update.
2863 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2864 (set_designator): Change the return type to bool. Use false/true
2867 2017-05-17 Marek Polacek <polacek@redhat.com>
2869 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2870 * c-typeck.c: Likewise.
2872 2017-05-17 Marek Polacek <polacek@redhat.com>
2875 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2876 DECL_IGNORED_P even for non-static compound literals.
2878 2017-05-17 Martin Liska <mliska@suse.cz>
2880 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2881 use it instead of int type.
2883 2017-05-17 Marek Polacek <polacek@redhat.com>
2885 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2887 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2888 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2889 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2890 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2892 (c_parser_conditional_expression): Likewise.
2893 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2894 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2895 (process_init_element): Likewise.
2896 (build_binary_op): Likewise.
2897 (handle_omp_array_sections_1): Likewise.
2899 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2901 * c-parser.c (c_parser_omp_clause_num_gangs)
2902 (c_parser_omp_clause_num_workers)
2903 (c_parser_omp_clause_vector_length): Merge functions into...
2904 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2907 2017-05-11 Nathan Sidwell <nathan@acm.org>
2909 * gimple-parser.c: Don't #include tree-dump.h.
2911 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2914 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2916 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2919 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2920 incorrect __MEM syntax.
2922 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2925 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2928 2017-05-09 Nathan Sidwell <nathan@acm.org>
2930 * c-tree.h (pushdecl): Declare.
2932 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2934 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2935 with diagnostic_report_diagnostic.
2936 * c-errors.c (pedwarn_c99): Likewise.
2937 (pedwarn_c90): Likewise.
2939 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2942 * c-gimplify.c (c_gimplify_expr): Remove calls to
2943 cilk_gimplifY_call_params_in_spawned_fn.
2945 2017-04-25 David Malcolm <dmalcolm@redhat.com>
2947 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2948 hint for removing extra semicolon.
2950 2017-04-21 Jakub Jelinek <jakub@redhat.com>
2953 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2954 enabled, set specs->type to integer_type_node.
2956 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2958 * c-array-notation.c: Fix typo in comment.
2960 2017-03-29 Marek Polacek <polacek@redhat.com>
2963 * c-decl.c (finish_decl): Check VAR_P.
2965 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2968 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2969 * c-typeck.c (c_mark_addressable): Likewise. Look through
2970 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2972 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2974 2017-03-23 Marek Polacek <polacek@redhat.com>
2976 * c-tree.h: Remove a C_RID_YYCODE reference.
2978 2017-03-21 Jakub Jelinek <jakub@redhat.com>
2981 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2982 optional COMPOUND_EXPR with ubsan instrumentation.
2984 2017-03-17 Marek Polacek <polacek@redhat.com>
2986 * c-parser.c: Add C11 references.
2988 2017-03-15 Marek Polacek <polacek@redhat.com>
2990 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2992 2017-03-11 Marek Polacek <polacek@redhat.com>
2994 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2996 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2998 PR translation/79848
2999 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3001 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3003 2017-03-09 Marek Polacek <polacek@redhat.com>
3006 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3007 parameter declarations with initializers.
3009 2017-03-09 Jakub Jelinek <jakub@redhat.com>
3012 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3015 2017-03-07 Jakub Jelinek <jakub@redhat.com>
3018 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3019 for "may only be used in compound statements" diagnostics, change it
3020 such that the same translatable string is used for all pragmas. For
3021 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3023 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3024 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3025 "may only be used in compound statements" diagnostics, such that the
3026 same translatable string is used for all pragmas.
3028 2017-03-04 Marek Polacek <polacek@redhat.com>
3031 * c-decl.c (implicit_decl_warning): Add missing space.
3033 2017-03-03 Marek Polacek <polacek@redhat.com>
3036 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3037 current_function_prototype_arg_types is error_mark_node. Fix
3038 formatting. Use TREE_VALUE instead of TREE_TYPE.
3040 2017-03-03 Jakub Jelinek <jakub@redhat.com>
3043 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3044 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3045 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3049 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3050 instead of %<_Generic>.
3051 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3052 (c_parser_omp_target_exit_data): Use %<release%> instead of
3055 2017-02-28 Jakub Jelinek <jakub@redhat.com>
3057 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3058 instead of just cond ? "..." : "...".
3059 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3060 for "enter"/"exit" keyword.
3061 (c_finish_oacc_routine): Don't use %s to supply portions of the
3064 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3067 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3068 handle -Wrestrict here.
3069 * c-typeck.c (build_function_call_vec): Adjust
3070 check_function_arguments caller.
3072 2017-02-23 Richard Biener <rguenther@suse.de>
3075 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3076 to initialize c_exprs to return.
3077 (c_parser_gimple_binary_expression): Likewise.
3078 (c_parser_gimple_unary_expression): Likewise.
3079 (c_parser_gimple_postfix_expression): Likewise.
3081 2017-02-22 Marek Polacek <polacek@redhat.com>
3084 * c-typeck.c (convert_arguments): Handle error_mark_node.
3086 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3088 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3089 value of c_parser_parse_ssa_name against error_mark_node and emit
3090 error if ssa name is anonymous and written as default definition.
3092 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3094 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3097 2017-02-16 Jakub Jelinek <jakub@redhat.com>
3100 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3101 ignore #pragma omp target even when not followed by identifier.
3103 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3105 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3106 (c_parser_gimple_unary_expression): Likewise.
3108 2017-02-13 Jakub Jelinek <jakub@redhat.com>
3110 * c-parser.c (c_parser_oacc_declare): Add missing space in
3113 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3116 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3117 set_c_expr_source_range when parsing ssa-name.
3119 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
3120 Richard Biener <rguenther@suse.de>
3122 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3123 building IL when arguments are error_mark_node.
3124 (c_parser_gimple_unary_expression): Likewise.
3125 (c_parser_gimple_if_stmt): Likewise.
3126 (c_parser_gimple_switch_stmt): Likewise.
3127 (c_parser_gimple_return_stmt): Likewise.
3128 (c_parser_parse_ssa_name): When name lookup fails do not build
3129 an SSA name. Use undeclared rather than not declared in error
3132 2017-02-09 Marek Polacek <polacek@redhat.com>
3135 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3136 instead of c_parser_skip_until_found.
3138 2017-02-09 Jakub Jelinek <jakub@redhat.com>
3141 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3142 symtab_node::get on automatic variables.
3144 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3145 Chung-Lin Tang <cltang@codesourcery.com>
3147 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3148 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3150 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3152 2017-02-07 Richard Biener <rguenther@suse.de>
3154 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3155 (c_parser_gimple_postfix_expression_after_primary):
3156 Do not use c_build_function_call_vec to avoid folding and promotion.
3159 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3162 * c-decl.c (pop_scope): Pass main_input_filename to
3163 build_translation_unit_decl.
3165 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3167 * c-parser.c: Include "read-rtl-function.h" and
3169 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3170 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3171 production. Update for renaming of field "gimple_pass" to
3172 "gimple_or_rtl_pass". If __RTL was seen, call
3173 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3174 to an auto_timevar, to cope with early exit.
3175 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3176 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3177 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3179 (c_parser_parse_rtl_body): New function.
3180 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3181 (struct c_declspecs): Rename field "gimple_pass" to
3182 "gimple_or_rtl_pass". Add field "rtl_p".
3183 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3184 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3185 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3186 (c_parser_gimple_or_rtl_pass_list): ...this.
3188 2017-01-20 Marek Polacek <polacek@redhat.com>
3191 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3193 2017-01-13 Richard Biener <rguenther@suse.de>
3195 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3198 2017-01-13 Richard Biener <rguenther@suse.de>
3200 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3201 _Literal ( type-name ) number.
3203 2017-01-12 Richard Biener <rguenther@suse.de>
3205 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3208 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3211 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3214 2017-01-11 Richard Biener <rguenther@suse.de>
3217 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3218 returns on parse errors.
3220 2017-01-04 Marek Polacek <polacek@redhat.com>
3223 * c-parser.c (c_parser_postfix_expression): Mark zero character
3224 constants by setting original_type in c_expr.
3225 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3226 with a zero character constant.
3227 (char_type_p): New function.
3229 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3231 * c-parser.c (c_parser_declaration_or_fndef): Create a
3232 rich_location at init_loc and parse it to start_init.
3233 (last_init_list_comma): New global.
3234 (c_parser_braced_init): Update last_init_list_comma when parsing
3235 commas. Pass it to pop_init_level. Pass location of closing
3236 brace to pop_init_level.
3237 (c_parser_postfix_expression_after_paren_type): Create a
3238 rich_location at type_loc and parse it to start_init.
3239 (c_parser_omp_declare_reduction): Likewise for loc.
3240 * c-tree.h (start_init): Add rich_location * param.
3241 (pop_init_level): Add location_t param.
3242 * c-typeck.c (struct initializer_stack): Add field
3243 "missing_brace_richloc".
3244 (start_init): Add richloc param, use it to initialize
3245 the stack node's missing_brace_richloc.
3246 (last_init_list_comma): New decl.
3247 (finish_implicit_inits): Pass last_init_list_comma to
3249 (push_init_level): When finding missing open braces, add fix-it
3250 hints to the richloc.
3251 (pop_init_level): Add "insert_before" param and pass it
3252 when calling pop_init_level. Add fixits about missing
3253 close braces to any richloc. Use the richloc for the
3254 -Wmissing-braces warning.
3255 (set_designator): Pass last_init_list_comma to pop_init_level.
3256 (process_init_element): Likewise.
3258 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3260 Update copyright years.
3262 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3265 * c-typeck.c (build_function_call_vec): If check_function_arguments
3266 returns true, set TREE_NO_WARNING on CALL_EXPR.
3269 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3270 to *expr instead of overwriting it.
3272 2016-12-20 Richard Biener <rguenther@suse.de>
3274 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3276 (c_parser_gimple_statement): Only build assigns for non-error
3278 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3280 2016-12-14 Martin Jambor <mjambor@suse.cz>
3282 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3284 (c_finish_oacc_routine): Adjusted call to
3285 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3286 to use their new names.
3287 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3289 (c_parser_oacc_update): Likewise.
3290 (c_parser_omp_simd): Likewise.
3291 (c_parser_omp_target_update): Likewise.
3292 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3293 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3295 (c_finish_omp_cancellation_point): Likewise.
3296 * gimple-parser.c: Do not include omp-low.h
3298 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3299 James Norris <jnorris@codesourcery.com>
3301 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3302 EXIT_DATA,WAIT} are not used in compound statements.
3303 (c_parser_oacc_enter_exit_data): Update diagnostics.
3305 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3308 * c-decl.c (diagnose_mismatched_decls): Use
3309 OPT_Wbuiltin_declaration_mismatch here too.
3311 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
3312 Alan Hayward <alan.hayward@arm.com>
3313 David Sherwood <david.sherwood@arm.com>
3315 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3316 (make_label, finish_struct): Likewise.
3318 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3319 Richard Biener <rguenther@suse.de>
3321 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3322 * config-lang.in (gtfiles): Add c/c-parser.h.
3323 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3324 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3325 * c-parser.c (enum c_id_kind, struct c_token,
3326 c_parser_next_token_is, c_parser_next_token_is_not,
3327 c_parser_next_token_is_keyword,
3328 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3330 * c-parser.h: ... new header.
3331 * c-parser.c: Include c-parser.h and gimple-parser.h.
3332 (c_parser_peek_token, c_parser_peek_2nd_token,
3333 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3334 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3335 c_parser_error, c_parser_require, c_parser_skip_until_found,
3336 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3337 c_parser_type_name): Export.
3338 (c_parser_tokens_buf): New function.
3339 (c_parser_error): Likewise.
3340 (c_parser_set_error): Likewise.
3341 (c_parser_declspecs): Handle RID_GIMPLE.
3342 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3343 via c_parser_parse_gimple_body.
3344 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3345 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3346 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3347 c_parser_error, c_parser_require, c_parser_skip_until_found,
3348 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3349 c_parser_type_name): Declare.
3350 (struct c_parser): Declare forward.
3351 (c_parser_tokens_buf): Declare.
3352 (c_parser_error): Likewise.
3353 (c_parser_set_error): Likewise.
3354 * gimple-parser.c: New file.
3355 * gimple-parser.h: Likewise.
3357 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3360 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3363 2016-09-11 Le-Chun Wu <lcwu@google.com>
3364 Mark Wielaard <mjw@redhat.com>
3366 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3367 to the given -Wshadow= variant.
3369 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3371 * c-typeck.c: Include memmodel.h.
3373 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3376 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3377 instead of lhd_return_null_tree_v.
3379 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3382 * c-decl.c (smallest_type_quals_location): New static function.
3383 (grokdeclarator): Try to find the correct location for an ignored
3386 2016-09-26 Marek Polacek <polacek@redhat.com>
3389 * c-decl.c (pop_scope): Add gcc_fallthrough.
3391 2016-09-26 Marek Polacek <polacek@redhat.com>
3394 * c-parser.c (struct c_token): Add flags field.
3395 (c_lex_one_token): Pass it to c_lex_with_flags.
3396 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3397 into IFN_FALLTHROUGH.
3398 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3399 attribute fallthrough after a case label or default label.
3400 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3402 2016-09-24 Marek Polacek <polacek@redhat.com>
3405 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3406 have boolean value. Warn about ++/-- on booleans.
3408 2016-09-23 Jakub Jelinek <jakub@redhat.com>
3410 * c-parser.c (incomplete_record_decls): Remove unnecessary
3411 = vNULL initialization of file scope vec.
3413 2016-09-16 Marek Polacek <polacek@redhat.com>
3415 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3417 2016-09-14 Marek Polacek <polacek@redhat.com>
3419 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3420 (fix_array_notation_expr): Likewise.
3421 * c-decl.c (finish_decl): Likewise.
3422 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3423 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3424 (function_to_pointer_conversion): Use false instead of 0.
3425 (convert_lvalue_to_rvalue): Likewise.
3426 (parser_build_unary_op): Likewise.
3427 (build_atomic_assign): Likewise.
3428 (build_unary_op): Change nonconvert parameter type to bool, use
3429 true/false instead of 1/0.
3430 (build_binary_op): Use true instead of 1.
3432 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3434 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3435 of add_fixit_insert to add_fixit_insert_before.
3437 2016-09-13 Marek Polacek <polacek@redhat.com>
3439 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3442 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3445 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3446 COMPOUND_EXPR to warn_for_omitted_condop.
3448 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3450 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3451 c_get_substring_location for this new langhook.
3453 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3456 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3458 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3459 instead of mark_exp_read on low_bound/length expression.
3460 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3461 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3462 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3463 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3464 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3465 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3466 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3467 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3468 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3469 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3470 instead of mark_expr_read.
3471 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3472 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3473 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3474 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3475 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3476 array section bases outside of depend clause, for depend clause
3477 use convert_lvalue_to_rvalue on the base.
3478 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3479 linear, aligned, map, to and from clauses.
3480 (c_omp_clause_copy_ctor): New function.
3482 2016-09-01 Marek Polacek <polacek@redhat.com>
3485 * c-typeck.c (composite_type): Add FALLTHRU comment.
3487 2016-08-31 David Malcolm <dmalcolm@redhat.com>
3489 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3490 to the insertion fixits for "struct", "union", and "enum".
3492 2016-08-30 David Malcolm <dmalcolm@redhat.com>
3494 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3495 rather than add_fixit_misspelled_id.
3496 (undeclared_variable): Likewise.
3497 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3498 now-redundant "here" params from add_fixit_insert method calls.
3499 (c_parser_parameter_declaration): Likewise.
3500 * c-typeck.c (build_component_ref): Remove now-redundant range
3501 param from add_fixit_replace method calls.
3503 2016-08-25 Marek Polacek <polacek@redhat.com>
3505 * c-typeck.c (parser_build_binary_op): Pass LHS to
3506 warn_logical_not_parentheses.
3508 2016-08-25 Marek Polacek <polacek@redhat.com>
3511 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3512 or _FloatN or _FloatNx is not supported.
3513 (finish_declspecs): Set type to integer_type_node when _FloatN or
3514 _FloatNx is not supported.
3516 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3519 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3520 (struct c_declspecs): Add field floatn_nx_idx.
3521 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3522 and _FloatNx type specifiers.
3523 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3524 (c_parser_declspecs, c_parser_attribute_any_word)
3525 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3526 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3527 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3528 narrower than double.
3530 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3531 Martin Liska <mliska@suse.cz>
3534 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3535 % to determine val element to change. Assert that
3536 wchar_bytes * charwidth fits into val array.
3538 2016-08-12 Marek Polacek <polacek@redhat.com>
3541 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3542 (c_parser_postfix_expression): Likewise.
3543 * c-typeck.c (build_unary_op): Adjust fall through comment.
3544 (c_mark_addressable): Likewise.
3546 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3549 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3550 array member through typedef, for orig_qual_indirect == 0 clear
3553 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3556 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3557 this up to selftest::run_c_tests.
3558 (selftest::run_c_tests): New function.
3560 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3562 * c-parser.c (struct oacc_routine_data): Add error_seen and
3563 fndecl_seen members.
3564 (c_finish_oacc_routine): Use these.
3565 (c_parser_declaration_or_fndef): Adjust.
3566 (c_parser_oacc_routine): Likewise. Support more C language
3567 constructs, and improve diagnostics. Move pragma context
3569 (c_parser_pragma): ... here.
3571 * c-parser.c (struct oacc_routine_data): New.
3572 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3574 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3575 declare target" attribute.
3577 2016-08-01 Jan Beulich <jbeulich@suse.com>
3579 * c-fold.c (c_fully_fold_internal): Also emit shift count
3580 warnings for vector types.
3581 * c-typeck.c (build_binary_op): Likewise.
3583 2016-07-29 Marek Polacek <polacek@redhat.com>
3586 * c-decl.c (finish_struct): Rephrase an error message.
3589 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3590 to error node for invalid code.
3593 * c-decl.c (implicitly_declare): Return decl early not only for
3594 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3596 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3599 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3600 on GNU extern inline functions.
3602 2016-07-29 Marek Polacek <polacek@redhat.com>
3605 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3608 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3610 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3612 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3614 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3616 (best_macro_match): Likewise, converting from a typedef to a
3618 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3619 (lookup_name_fuzzy): Update for change of best_macro_match to a
3620 subclass with a ctor that calls cpp_forall_identifiers.
3622 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3624 * c-decl.c (implicit_decl_warning): Update for conversion of
3625 return type of lookup_name_fuzzy to const char *.
3626 (undeclared_variable): Likewise.
3627 (lookup_name_fuzzy): Convert return type from tree to
3629 * c-parser.c (c_parser_declaration_or_fndef): Update for
3630 conversion of return type of lookup_name_fuzzy to const char *.
3631 (c_parser_parameter_declaration): Likewise.
3633 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3635 * c-parser.c (c_parser_oacc_declare): Don't scan for
3637 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3638 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3639 zero-length subarrays.
3641 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3644 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3645 instead of FUZZY_LOOKUP_NAME.
3646 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3647 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3649 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3652 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3654 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3656 * c-parser.c (c_parser_generic_selection): Make type of variable
3658 (c_parser_omp_declare_simd): Likewise.
3660 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3662 * c-decl.c (struct c_struct_parse_info): Change member types
3663 from vec to auto_vec.
3664 (start_struct): Adjust.
3665 (finish_struct): Likewise.
3667 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3670 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3672 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3674 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3675 Move pragma context checking into...
3676 (c_parser_omp_cancellation_point): ... here, and improve
3677 diagnostic messages.
3678 * c-typeck.c (c_finish_omp_cancel)
3679 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3681 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3684 * c-typeck.c (c_build_qualified_type): Don't clear
3685 C_TYPE_INCOMPLETE_VARS for the main variant.
3687 2016-06-28 Martin Sebor <msebor@redhat.com>
3690 * c-typeck.c (output_init_element): Diagnose incompatible types
3691 before non-constant initializers.
3693 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3695 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3697 2016-06-23 Andi Kleen <ak@linux.intel.com>
3699 * Make-lang.in: Add support for autofdo.
3701 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3704 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3705 (implicit_decl_warning): When issuing warnings for implicit
3706 declarations, attempt to provide a suggestion via
3708 (undeclared_variable): Likewise when issuing errors.
3709 (lookup_name_in_scope): Likewise.
3710 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3711 (best_macro_match): New typedef.
3712 (find_closest_macro_cpp_cb): New function.
3713 (lookup_name_fuzzy): New function.
3714 * c-parser.c: Include gcc-rich-location.h.
3715 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3716 (c_keyword_starts_typename): ...this new function.
3717 (c_parser_declaration_or_fndef): When issuing errors about
3718 missing "struct" etc, add a fixit. For other kinds of errors,
3719 attempt to provide a suggestion via lookup_name_fuzzy.
3720 (c_parser_parms_declarator): When looking ahead to detect typos in
3721 type names, also reject CPP_KEYWORD.
3722 (c_parser_parameter_declaration): When issuing errors about
3723 unknown type names, attempt to provide a suggestion via
3725 * c-tree.h (c_keyword_starts_typename): New prototype.
3727 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3730 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3731 c_common_type returns error_mark_node.
3733 2016-06-19 Martin Sebor <msebor@redhat.com>
3736 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3737 __alignof__ (expression).
3739 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3741 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3743 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3745 * c-typeck.c (build_component_ref): Simplify fixit code by
3746 using gcc_rich_location::add_fixit_misspelled_id.
3747 (set_init_label): Likewise.
3749 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3751 * c-parser.c (c_parser_initelt): Provide location of name for new
3752 location_t param of set_init_label.
3753 * c-tree.h (set_init_label): Add location_t param.
3754 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3755 param and use it when issuing error messages about unrecognized
3756 field names. Attempt to provide a fixit hint if appropriate,
3757 otherwise update the error message to provide the type name.
3759 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3762 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3765 2016-06-08 Martin Sebor <msebor@redhat.com>
3766 Jakub Jelinek <jakub@redhat.com>
3770 * c-typeck.c (convert_arguments): Don't promote last argument
3771 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3773 2016-06-08 Marek Polacek <polacek@redhat.com>
3776 * c-decl.c (grokdeclarator): Check TYPE_P.
3779 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3782 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3784 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3785 and structure element reference, capture the location of the
3786 element name token and pass it to build_component_ref.
3787 (c_parser_postfix_expression_after_primary): Likewise for
3788 structure element dereference.
3789 (c_parser_omp_variable_list): Likewise for
3790 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3791 * c-tree.h (build_component_ref): Add location_t param.
3792 * c-typeck.c (build_component_ref): Add location_t param
3793 COMPONENT_LOC. Use it, if available, when issuing hints about
3794 mispelled member names to provide a fixit replacement hint.
3796 2016-06-06 Marek Polacek <polacek@redhat.com>
3799 * c-parser.c (c_parser_direct_declarator): Set location.
3801 2016-06-06 Marek Polacek <polacek@redhat.com>
3803 * c-typeck.c (comptypes_internal): Handle comparisons of
3804 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3805 TYPE_REF_CAN_ALIAS_ALL.
3807 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3809 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3810 arguments as addressable when async clause exists.
3812 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3815 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3816 when combined with target construct.
3818 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3820 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3821 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3823 2016-05-25 Marek Polacek <polacek@redhat.com>
3826 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3829 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3831 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3833 * c-parser.c (c_parser_oacc_declare): Add support for
3834 GOMP_MAP_FIRSTPRIVATE_POINTER.
3835 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3836 argument with enum c_omp_region_type ort.
3837 (handle_omp_array_sections): Likewise. Update call to
3838 handle_omp_array_sections_1.
3839 (c_finish_omp_clauses): Add specific errors and warning messages for
3840 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3841 call to handle_omp_array_sections.
3843 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3845 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3847 2016-05-24 Richard Biener <rguenther@suse.de>
3851 * c-typeck.c (build_array_ref): Do not complain about indexing
3852 non-lvalue vectors. Adjust for function name change.
3854 2016-05-20 Martin Sebor <msebor@redhat.com>
3857 * c-typeck.c (error_init): Use
3858 expansion_point_location_if_in_system_header.
3859 (warning_init): Same.
3861 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3864 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3866 (c_parser_postfix_expression): Likewise.
3867 * c-tree.h (c_expr::set_error): New method.
3868 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3869 that result's range is initialized.
3871 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3873 * c-typeck.c (parser_build_unary_op): Fix formatting.
3875 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3877 * c-decl.c (grokdeclarator): Remove errmsg and use of
3878 targetm.invalid_return_type.
3879 (grokparms): Remove errmsg and use of
3880 targetm.invalid_parameter_type.
3882 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3884 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3885 function return type.
3887 2016-05-12 Marek Polacek <polacek@redhat.com>
3890 * c-decl.c (build_compound_literal): Pass LOC down to
3891 c_incomplete_type_error.
3892 * c-tree.h (require_complete_type): Adjust declaration.
3893 (c_incomplete_type_error): Likewise.
3894 * c-typeck.c (require_complete_type): Add location parameter, pass it
3895 down to c_incomplete_type_error.
3896 (c_incomplete_type_error): Add location parameter, pass it down to
3898 (build_component_ref): Pass location down to c_incomplete_type_error.
3899 (default_conversion): Pass location down to require_complete_type.
3900 (build_array_ref): Likewise.
3901 (build_function_call_vec): Likewise.
3902 (convert_arguments): Likewise.
3903 (build_unary_op): Likewise.
3904 (build_c_cast): Likewise.
3905 (build_modify_expr): Likewise.
3906 (convert_for_assignment): Likewise.
3907 (c_finish_omp_clauses): Likewise.
3909 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3912 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3914 * c-errors.c (pedwarn_c90): Return true if warned.
3915 * c-tree.h (pedwarn_c90): Change return type to bool.
3916 (enum c_declspec_word): Add new enumerator cdw_atomic.
3918 2016-05-11 Marek Polacek <polacek@redhat.com>
3921 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3922 diagnose_mismatched_attributes and call it.
3924 2016-05-10 Marek Polacek <polacek@redhat.com>
3927 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3928 on a declaration following the definition.
3930 2016-05-05 Jakub Jelinek <jakub@redhat.com>
3932 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3933 parse it through to c_parser_c99_block_statement.
3934 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3937 2016-05-04 Marek Polacek <polacek@redhat.com>
3939 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3942 2016-05-04 Marek Polacek <polacek@redhat.com>
3945 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3946 for macro expansions.
3948 2016-05-03 Marek Polacek <polacek@redhat.com>
3951 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3952 check_builtin_function_arguments.
3954 2016-05-03 Richard Biener <rguenther@suse.de>
3956 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3957 the checksum from the previous stage.
3959 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3961 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3962 c_finish_omp_clauses.
3963 (c_parser_omp_all_clauses): Likewise.
3964 (c_parser_oacc_cache): Likewise.
3965 (c_parser_oacc_loop): Likewise.
3966 (omp_split_clauses): Likewise.
3967 (c_parser_omp_declare_target): Likewise.
3968 (c_parser_cilk_all_clauses): Likewise.
3969 (c_parser_cilk_for): Likewise.
3970 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3971 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3973 2016-05-02 Marek Polacek <polacek@redhat.com>
3976 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3979 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3982 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3983 OACC_LOOP_CLAUSE_MASK.
3984 (c_parser_oacc_kernels_parallel): Update call to
3985 c_oacc_split_loop_clauses.
3987 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
3989 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3990 argument to build_modify_expr in two cases.
3992 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3994 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3995 warn_for_memset instead of warning directly here.
3997 2016-04-26 Marek Polacek <polacek@redhat.com>
4000 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4002 (c_parser_for_statement): ... here.
4003 (c_parser_if_statement): Use it.
4004 (c_parser_switch_statement): Use it.
4005 (c_parser_while_statement): Use it.
4008 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4010 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4013 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4014 instead of c_finish_cilk_clauses.
4015 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4016 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4017 floating-point variables in the linear clause for Cilk Plus.
4019 2016-04-18 Michael Matz <matz@suse.de>
4021 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4022 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4024 2016-04-15 Marek Polacek <polacek@redhat.com>
4027 * c-typeck.c (build_unary_op): Pass location down to error and
4030 2016-04-15 Jakub Jelinek <jakub@redhat.com>
4033 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4035 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4036 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4037 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4038 Adjust c_parser_pragma callers.
4039 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4041 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4043 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4044 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4045 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4046 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4047 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4048 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4049 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4050 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4052 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4053 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4056 2016-04-13 Marek Polacek <polacek@redhat.com>
4059 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4061 (c_parser_statement): Likewise.
4062 (c_parser_c99_block_statement): Likewise.
4063 (c_parser_while_statement): Likewise.
4064 (c_parser_for_statement): Likewise.
4065 (c_parser_if_body): Don't set IF_P here.
4066 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4067 about dangling else here.
4068 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4069 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4070 warn about dangling else here.
4072 2016-04-04 Marek Polacek <polacek@redhat.com>
4075 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4077 2016-03-31 Marek Polacek <polacek@redhat.com>
4080 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4082 2016-03-18 David Malcolm <dmalcolm@redhat.com>
4085 * c-parser.c (c_parser_postfix_expression): Set the source range
4086 for uses of "__builtin_types_compatible_p".
4088 2016-03-17 Jakub Jelinek <jakub@redhat.com>
4091 * c-typeck.c (composite_type): Don't count void_list_node
4092 into len, if the list is terminated by void_list_node, start
4093 with void_list_node instead of NULL for newargs. Stop
4096 2016-03-16 Marek Polacek <polacek@redhat.com>
4099 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4100 nested functions returning VM types.
4102 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4104 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4105 when calling c_finish_omp_clauses.
4107 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4110 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4113 2016-03-04 Marek Polacek <polacek@redhat.com>
4116 * c-parser.c (c_parser_postfix_expression): Call
4117 c_parser_cast_expression rather than c_parser_postfix_expression.
4119 2016-03-01 Jakub Jelinek <jakub@redhat.com>
4123 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4124 of incomplete decls to error_mark_node.
4126 2016-02-24 Marek Polacek <polacek@redhat.com>
4129 * c-decl.c (finish_decl): Don't update the copy of the type of a
4130 different decl type.
4132 2016-02-23 Jakub Jelinek <jakub@redhat.com>
4135 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4136 in id_kind reclassification.
4138 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4141 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4143 2016-02-16 James Norris <jnorris@codesourcery.com>
4146 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4148 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4150 * c-decl.c (build_null_declspecs): Zero the entire struct.
4153 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4154 callers changed. If nested_p is true, use it to call
4155 finish_implicit_inits.
4156 * c-tree.h (finish_implicit_inits): Declare.
4157 * c-typeck.c (finish_implicit_inits): New function. Move code
4159 (push_init_level): ... here.
4160 (set_designator, process_init_element): Call finish_implicit_inits.
4162 2016-02-11 Jakub Jelinek <jakub@redhat.com>
4165 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4166 arguments for -Waddress warning.
4168 2016-02-04 Jakub Jelinek <jakub@redhat.com>
4171 * c-decl.c (finish_enum): When honoring mode attribute,
4172 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4174 2016-01-29 Jakub Jelinek <jakub@redhat.com>
4177 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4178 all type variants, not just TYPE_MAIN_VARIANT.
4180 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4183 * c-decl.c (c_write_global_declarations_1): Warn with
4184 warn_unused_function if static prototype without definition
4187 2016-01-27 Marek Polacek <polacek@redhat.com>
4190 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4191 to unsigned, if needed. Add -Wsign-compare warning.
4193 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4195 PR tree-optimization/69483
4196 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4198 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4201 * c-tree.h (incomplete_record_decls): Declare.
4202 * c-parser.c (incomplete_record_decls): Define.
4203 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4204 report error if any decl has zero size.
4205 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4206 or enum type to incomplete_record_decls.
4208 2016-01-14 Tom de Vries <tom@codesourcery.com>
4210 PR tree-optimization/68773
4211 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4214 2016-01-14 Marek Polacek <polacek@redhat.com>
4217 * c-decl.c (grokdeclarator): Provide more information for invalid
4220 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4222 * c-parser.c (c_parser_unary_expression): For dereferences, build
4223 a combined location before calling build_indirect_ref, so that
4224 error reports cover the full range, manually updating the c_expr
4227 2016-01-06 Marek Polacek <polacek@redhat.com>
4230 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4231 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4234 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4236 Update copyright years.
4238 2016-01-04 Marek Polacek <polacek@redhat.com>
4241 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4242 optimization to use __atomic_fetch_* built-in if possible.
4244 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4246 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4248 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4251 2015-12-22 Marek Polacek <polacek@redhat.com>
4254 * c-typeck.c (build_component_ref): Warn when acessing elements of
4255 atomic structures or unions.
4257 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4259 * c-typeck.c: Include "gcc-rich-location.h".
4260 (build_binary_op): In the two places that call binary_op_error,
4261 create a gcc_rich_location and populate it with the location of
4262 the binary op and its two operands.
4264 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4266 * c-parser.c (c_parser_statement_after_labels): When calling
4267 c_finish_return, Use the return expression's location if it has
4268 one, falling back to the location of the first token within it.
4269 * c-typeck.c (c_finish_return): When issuing warnings about
4270 the incorrect presence/absence of a return value, issue a note
4271 showing the declaration of the function.
4273 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4275 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4277 (c_parser_peek_nth_token): New function.
4278 (c_parser_peek_conflict_marker): New function.
4279 (c_parser_error): Detect conflict markers and report them as such.
4281 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4283 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4284 to preserve range information for the primary expression
4285 in the call to c_parser_postfix_expression_after_primary.
4287 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4289 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4290 expression location, falling back on the first token location,
4291 rather than always using the latter.
4293 2015-12-16 Marek Polacek <polacek@redhat.com>
4296 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4299 2015-12-15 Marek Polacek <polacek@redhat.com>
4302 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4305 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4307 * c-parser.c (c_parser_alignof_expression): Capture location of
4308 closing parenthesis (if any), or of end of unary expression, and
4309 use it to build a src_range for the expression.
4311 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4314 * c-parser.c (c_parser_get_builtin_args): Add
4315 "out_close_paren_loc" param, and write back to it.
4316 (c_parser_postfix_expression): Capture the closing
4317 parenthesis location for RID_CHOOSE_EXPR,
4318 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4319 RID_BUILTIN_SHUFFLE and use it to set the source range
4320 for such expressions; within RID_BUILTIN_COMPLEX set
4321 the underlying location.
4323 2015-12-07 Marek Polacek <polacek@redhat.com>
4326 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4327 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4329 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4331 * c-tree.h (c_build_va_arg): Adjust prototype.
4332 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4333 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4334 parameter, adjust throughout and issue an error if EXPR is a component
4335 with reverse storage order.
4337 2015-12-02 Jason Merrill <jason@redhat.com>
4339 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4340 (c_fully_fold_internal, decl_constant_value_for_optimization):
4341 Move from c-common.c.
4342 * c-tree.h: Declare decl_constant_value_for_optimization.
4343 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4345 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4348 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4349 following link from declarator to next declarator. Track original
4350 qualified type and pass it to c_build_qualified_type.
4351 * c-typeck.c (c_build_qualified_type): Add arguments
4352 orig_qual_type and orig_qual_indirect.
4354 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4356 * c-parser.c (c_parser_omp_clause_name)
4357 (c_parser_oacc_all_clauses): Alphabetical sorting.
4359 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4362 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4365 2015-12-01 Julian Brown <julian@codesourcery.com>
4366 Cesar Philippidis <cesar@codesourcery.com>
4367 James Norris <James_Norris@mentor.com>
4369 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4370 (c_parser_oacc_clause_use_device): New function.
4371 (c_parser_oacc_all_clauses): Add use_device support.
4372 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4373 (c_parser_oacc_host_data): New function.
4374 (c_parser_omp_construct): Add host_data support.
4375 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4376 * c-typeck.c (c_finish_oacc_host_data): New function.
4377 (c_finish_omp_clauses): Add use_device support.
4379 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4382 * c-decl.c: Set TYPE_PACKED in variants.
4384 2015-11-27 Martin Liska <mliska@suse.cz>
4387 * c-array-notation.c (fix_builtin_array_notation_fn):
4388 Use release_vec_vec instead of vec::release.
4389 (build_array_notation_expr): Likewise.
4390 (fix_conditional_array_notations_1): Likewise.
4391 (fix_array_notation_expr): Likewise.
4392 (fix_array_notation_call_expr): Likewise.
4394 2015-11-27 Jakub Jelinek <jakub@redhat.com>
4397 * c-parser.c (c_parser_compound_statement_nostart): If
4398 last_label is true, use pragma_stmt instead of pragma_compound
4399 as second c_parser_pragma argument.
4400 (c_parser_omp_ordered, c_parser_omp_target_update,
4401 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4402 false as second argument to c_parser_skip_to_pragma_eol after
4403 diagnosing standalone directives used in pragma_stmt context.
4405 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4407 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4408 with "if (ENABLE_OFFLOADING)".
4410 2015-11-23 David Malcolm <dmalcolm@redhat.com>
4413 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4414 for various Objective-C constructs: Class.name syntax,
4415 @selector(), @protocol(), @encode(), and [] message syntax.
4417 2015-11-20 David Malcolm <dmalcolm@redhat.com>
4420 * c-typeck.c (should_suggest_deref_p): New function.
4421 (build_component_ref): Special-case POINTER_TYPE when
4422 generating a "not a structure of union" error message, and
4423 suggest a "->" rather than a ".", providing a fix-it hint.
4425 2015-11-19 David Malcolm <dmalcolm@redhat.com>
4427 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4428 candidate into a new function, find_closest_identifier.
4430 2015-11-19 Marek Polacek <polacek@redhat.com>
4433 * c-typeck.c (parser_build_binary_op): Properly handle
4434 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4436 2015-11-17 David Malcolm <dmalcolm@redhat.com>
4438 * c-parser.c (set_c_expr_source_range): Bulletproof both
4439 overloaded implementations against NULL expr->value.
4440 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4442 (c_parser_unary_expression): Likewise when handling addresses of
4444 (c_parser_postfix_expression): Likewise for statement expressions,
4445 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4446 __builtin_va_arg, and for __builtin_offset_of.
4447 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4448 src_range using the range of the braced initializer.
4449 (c_parser_transaction_expression): Set src_range for "ret" to a
4450 sane pair of values.
4452 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4454 * c-parser.c (c_finish_omp_declare_simd): Look for
4455 "simd" attribute as well. Update error message.
4457 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4459 * c-parser.c (c_parser_omp_declare_target): Adjust.
4461 2015-11-14 Jakub Jelinek <jakub@redhat.com>
4463 * c-typeck.c (c_finish_omp_clauses): Don't mark
4464 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4466 2015-11-14 Marek Polacek <polacek@redhat.com>
4468 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4469 * c-typeck.c: Likewise.
4471 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4473 * c-decl.c (warn_defaults_to): Pass line_table to
4475 * c-errors.c (pedwarn_c99): Likewise.
4476 (pedwarn_c90): Likewise.
4477 * c-parser.c (set_c_expr_source_range): New functions.
4478 (c_token::get_range): New method.
4479 (c_token::get_finish): New method.
4480 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4481 based on the range from the start of the LHS to the end of the
4483 (c_parser_conditional_expression): Likewise, based on the range
4484 from the start of the cond.value to the end of exp2.value.
4485 (c_parser_binary_expression): Call set_c_expr_source_range on
4486 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4487 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4488 based on the cast_loc through to the end of the expr.
4489 (c_parser_unary_expression): Likewise, based on the
4490 op_loc through to the end of op.
4491 (c_parser_sizeof_expression) Likewise, based on the start of the
4492 sizeof token through to either the closing paren or the end of
4494 (c_parser_postfix_expression): Likewise, using the token range,
4495 or from the open paren through to the close paren for
4496 parenthesized expressions.
4497 (c_parser_postfix_expression_after_primary): Likewise, for
4498 various kinds of expression.
4499 * c-tree.h (struct c_expr): Add field "src_range".
4500 (c_expr::get_start): New method.
4501 (c_expr::get_finish): New method.
4502 (set_c_expr_source_range): New decls.
4503 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4504 on ret for prefix unary ops.
4505 (parser_build_binary_op): Likewise, running from the start of
4506 arg1.value through to the end of arg2.value.
4508 2015-11-13 Marek Polacek <polacek@redhat.com>
4511 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4513 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4515 * c-typeck.c: Include spellcheck.h.
4516 (lookup_field_fuzzy_find_candidates): New function.
4517 (lookup_field_fuzzy): New function.
4518 (build_component_ref): If the field was not found, try using
4519 lookup_field_fuzzy and potentially offer a suggestion.
4521 2015-11-12 James Norris <jnorris@codesourcery.com>
4522 Joseph Myers <joseph@codesourcery.com>
4524 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4525 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4526 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4527 and PRAGMA_OMP_CLAUSE_LINK.
4528 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4529 and PRAGMA_OACC_CLAUSE_LINK.
4530 (OACC_DECLARE_CLAUSE_MASK): New definition.
4531 (c_parser_oacc_declare): New function.
4533 2015-11-12 Marek Polacek <polacek@redhat.com>
4536 * c-parser.c (c_parser_for_statement): Reclassify the token in
4539 2015-11-11 Marek Polacek <polacek@redhat.com>
4543 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4544 checking the size of an array.
4546 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4548 * c-array-notation.c: Remove unused header files.
4549 * c-aux-info.c: Likewise.
4550 * c-convert.c: Likewise.
4551 * c-decl.c: Likewise.
4552 * c-errors.c: Likewise.
4553 * c-lang.c: Likewise.
4554 * c-objc-common.c: Likewise.
4555 * c-parser.c: Likewise.
4556 * c-typeck.c: Likewise.
4557 * gccspec.c: Likewise.
4559 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4560 Cesar Philippidis <cesar@codesourcery.com>
4561 James Norris <jnorris@codesourcery.com>
4562 Julian Brown <julian@codesourcery.com>
4563 Nathan Sidwell <nathan@codesourcery.com>
4565 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4567 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4568 (c_parser_pragma): Parse 'acc routine'.
4569 (OACC_ROUTINE_CLAUSE_MARK): Define.
4570 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4572 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4575 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4576 location of the backward-goto to the start of the loop body.
4578 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4581 * c-parser.c (c_parser_while_statement): Finish the loop before
4582 parsing ahead for misleading indentation.
4583 (c_parser_for_statement): Likewise.
4585 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4587 * c-decl.c (finish_struct): If the structure has reverse storage
4588 order, rewrite the type of array fields with scalar component. Call
4589 maybe_apply_pragma_scalar_storage_order on entry.
4590 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4591 errors on bit-fields and reverse SSO here and not...
4592 (c_mark_addressable): ...here.
4593 (output_init_element): Adjust call to initializer_constant_valid_p.
4594 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4596 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4598 * c-decl.c (warn_defaults_to): Update for change in signature
4599 of diagnostic_set_info.
4600 * c-errors.c (pedwarn_c99): Likewise.
4601 (pedwarn_c90): Likewise.
4602 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4603 for textinfo::set_location.
4605 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4606 Thomas Schwinge <thomas@codesourcery.com>
4607 James Norris <jnorris@codesourcery.com>
4609 * c-parser.c (c_parser_omp_clause_name): Add support for
4610 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4611 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4612 default(none) in OpenACC.
4613 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4615 (c_parser_oacc_clause_tile): New function.
4616 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4617 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4618 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4620 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4621 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4623 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4624 (c_parser_oacc_update): Update the error message for missing clauses.
4625 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4626 and OMP_CLAUSE_INDEPENDENT.
4628 2015-11-05 Marek Polacek <polacek@redhat.com>
4631 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4632 deal with pre-evaluation on invalid types.
4634 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4635 Ilya Verbin <ilya.verbin@intel.com>
4637 * c-parser.c: Include context.h and gimple-expr.h.
4638 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4639 monotonic together with nonmonotonic.
4640 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4641 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4642 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4643 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4644 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4645 expressions on combined target teams before the target.
4646 (c_parser_omp_declare_target): If decl has "omp declare target" or
4647 "omp declare target link" attribute, and cgraph or varpool node already
4648 exists, then set corresponding flags. Call c_finish_omp_clauses
4649 in the parenthesized extended-list syntax case.
4650 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4652 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4653 on OMP_CLAUSE_REDUCTION array sections.
4654 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4655 into the constant offset, or for variable low-bound using
4656 POINTER_PLUS_EXPR. For structure element based array sections use
4657 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4658 (c_finish_omp_clauses): Drop generic_field_head, structure
4659 elements are now always mapped even as array section bases,
4660 diagnose same var in data sharing and mapping clauses. Diagnose if
4661 linear step on declare simd is neither a constant nor a uniform
4662 parameter. Look through POINTER_PLUS_EXPR for array section
4663 reductions. Diagnose the same var or function appearing multiple
4664 times on the same directive. Fix up wording for the to clause if t
4665 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4666 modifier on kinds other than dynamic or guided or nonmonotonic
4667 modifier together with ordered clause.
4669 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4670 Chung-Lin Tang <cltang@codesourcery.com>
4672 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4674 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4676 * c-array-notation.c: Reorder #include's and remove duplicates.
4677 * c-aux-info.c: Likewise.
4678 * c-convert.c: Likewise.
4679 * c-decl.c: Likewise.
4680 * c-errors.c: Likewise.
4681 * c-lang.c: Likewise.
4682 * c-objc-common.c: Likewise.
4683 * c-parser.c: Likewise.
4684 * c-typeck.c: Likewise.
4686 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4689 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4690 after calling build_qualified_type.
4692 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4693 Thomas Schwinge <thomas@codesourcery.com>
4694 James Norris <jnorris@codesourcery.com>
4695 Joseph Myers <joseph@codesourcery.com>
4696 Julian Brown <julian@codesourcery.com>
4697 Bernd Schmidt <bschmidt@redhat.com>
4699 * c-parser.c (c_parser_oacc_shape_clause): New.
4700 (c_parser_oacc_simple_clause): New.
4701 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4702 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4704 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4705 James Norris <jnorris@codesourcery.com>
4706 Cesar Philippidis <cesar@codesourcery.com>
4710 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4711 parameters, and handle these. Adjust all users.
4712 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4714 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4716 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4718 (c_finish_omp_construct): Declare function.
4719 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4720 Merge functions into...
4721 (c_finish_omp_construct): ... this new function.
4723 2015-10-22 Richard Biener <rguenther@suse.de>
4725 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4726 before folding a MINUS_EXPR.
4728 2015-10-21 Marek Polacek <polacek@redhat.com>
4731 * c-decl.c (start_function): Warn about vararg functions without
4734 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4736 * c-typeck.c (build_conditional_expr): Use boolean vector
4737 type for vector comparison.
4738 (build_vec_cmp): New.
4739 (build_binary_op): Use build_vec_cmp for comparison.
4741 2015-10-20 Marek Polacek <polacek@redhat.com>
4743 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4745 2015-10-20 Marek Polacek <polacek@redhat.com>
4748 * c-parser.c (c_parser_attributes): Break out of the loop if the
4749 token after an attribute isn't a comma.
4751 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4752 Aldy Hernandez <aldyh@redhat.com>
4754 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4755 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4756 (c_parser_omp_variable_list): Handle structure elements for
4757 map, to and from clauses. Handle array sections in reduction
4758 clause. Formatting fixes.
4759 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4760 if clause modifiers.
4761 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4762 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4763 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4764 c_parser_omp_clause_is_device_ptr): New functions.
4765 (c_parser_omp_clause_ordered): Parse optional parameter.
4766 (c_parser_omp_clause_reduction): Handle array reductions.
4767 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4768 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4770 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4771 (c_parser_omp_clause_depend_sink): New function.
4772 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4773 (c_parser_omp_clause_map): Parse release/delete map kinds and
4774 optional always modifier.
4775 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4776 and c_finish_omp_clauses callers.
4777 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4778 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4779 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4780 (OMP_CRITICAL_CLAUSE_MASK): Define.
4781 (c_parser_omp_critical): Parse critical clauses.
4782 (c_parser_omp_for_loop): Handle doacross loops, adjust
4783 c_finish_omp_for and c_finish_omp_clauses callers.
4784 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4785 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4786 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4787 (c_parser_omp_for): Disallow ordered clause when combined with
4788 distribute. Disallow linear clause when combined with distribute
4789 and not combined with simd.
4790 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4791 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4792 parse clauses and if depend clause is found, don't parse a body.
4793 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4794 Allow target parallel without for after it.
4795 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4796 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4797 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4799 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4800 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4801 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4802 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4804 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4805 defaultmap and is_device_ptr clauses.
4806 (c_parser_omp_target): Parse target parallel and target simd. Set
4807 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4808 and target exit data. Diagnose invalid map kinds.
4809 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4810 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4812 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4814 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4815 (c_parser_omp_taskloop): New function.
4816 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4817 handle PRAGMA_OMP_TASKLOOP.
4818 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4819 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4820 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4821 Add IS_OMP argument, handle structure element bases, diagnose
4822 bitfields, pass IS_OMP recursively, diagnose known zero length
4823 array sections in depend clauses, handle array sections in reduction
4824 clause, diagnose negative length even for pointers.
4825 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4826 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4827 array sections in reduction clause, set
4828 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4829 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4830 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4831 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4833 2015-10-06 Marek Polacek <polacek@redhat.com>
4835 * c-parser.c (c_parser_statement_after_labels): Use
4836 protected_set_expr_location.
4837 (c_parser_omp_clause_num_gangs): Likewise.
4838 (c_parser_omp_clause_num_threads): Likewise.
4839 (c_parser_omp_clause_num_workers): Likewise.
4840 (c_parser_omp_clause_vector_length): Likewise.
4841 (c_parser_omp_clause_num_teams): Likewise.
4842 (c_parser_omp_clause_thread_limit): Likewise.
4843 * c-typeck.c (build_c_cast): Likewise.
4844 (c_cast_expr): Likewise.
4846 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4848 * c-typeck.c (c_tree_equal): Use real_equal instead of
4851 2015-10-04 Jason Merrill <jason@redhat.com>
4853 * c-parser.c (c_lex_one_token): Handle @synchronized.
4854 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4855 can change whether the function is transaction_safe.
4857 2015-10-02 Marek Polacek <polacek@redhat.com>
4860 * c-typeck.c (convert_for_assignment): Use the expansion point
4861 location throughout.
4863 2015-10-02 Marek Polacek <polacek@redhat.com>
4866 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4867 and pass it down to c_parser_if_statement.
4868 (c_parser_else_body): Add CHAIN parameter and pass it down to
4869 c_parser_statement_after_labels.
4870 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4871 duplicated if-else-if conditions.
4873 2015-10-01 Marek Polacek <polacek@redhat.com>
4875 * c-typeck.c (convert_for_assignment): Improve commentary.
4877 2015-09-30 Marek Polacek <polacek@redhat.com>
4880 * c-typeck.c (c_finish_return): Use the expansion point location for
4881 certain "return with value" warnings.
4883 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4885 * c-parser.c (pragma_lex): Add loc argument.
4887 2015-09-15 Marek Polacek <polacek@redhat.com>
4890 * c-decl.c (tag_exists_p): New function.
4891 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4892 struct/union/enum keywords are missing.
4893 * c-tree.h (tag_exists_p): Declare.
4895 2015-09-15 Marek Polacek <polacek@redhat.com>
4897 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4898 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4899 Return NULL_TREE instead of 0.
4900 (lookup_name): Return NULL_TREE instead of 0.
4901 (lookup_name_in_scope): Likewise.
4902 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4903 (parser_xref_tag): Use false instead of 0.
4904 (start_struct): Use true instead of 1.
4905 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4907 2015-09-14 Marek Polacek <polacek@redhat.com>
4909 * c-typeck.c (set_nonincremental_init_from_string): Use
4910 HOST_WIDE_INT_M1U when shifting a negative value.
4912 2015-09-09 Mark Wielaard <mjw@redhat.com>
4914 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4917 2015-09-10 Jakub Jelinek <jakub@redhat.com>
4920 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4921 into OMP_FOR_PRE_BODY rather than before the loop.
4923 2015-09-09 Jakub Jelinek <jakub@redhat.com>
4926 * c-parser.c (c_parser_oacc_all_clauses,
4927 c_parser_omp_all_clauses): Remove invalid clause from
4928 list of clauses even if parser->error is set.
4931 * c-parser.c (c_parser_omp_clause_aligned,
4932 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4934 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4938 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4939 instead of c_parser_unary_expression. If the result is !lvalue_p,
4940 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4942 2015-09-04 Marek Polacek <polacek@redhat.com>
4945 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4947 2015-09-03 Martin Sebor <msebor@redhat.com>
4950 * c-typeck.c (convert_arguments, parser_build_unary_op,
4951 build_conditional_expr, c_cast_expr, convert_for_assignment,
4952 build_binary_op, _objc_common_truthvalue_conversion): Call
4954 (c_decl_implicit): Define.
4956 2015-09-02 Marek Polacek <polacek@redhat.com>
4959 * c-parser.c (c_parser_enum_specifier): Give a better error for
4962 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4964 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4966 2015-08-12 Marek Polacek <polacek@redhat.com>
4968 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4971 2015-08-03 Marek Polacek <polacek@redhat.com>
4974 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4976 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4978 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4980 * c-parser.c (c_parser_if_body): Take token_indent_info
4981 argument. Call warn_for_misleading_indentation even when the
4982 body is a semicolon. Extract token_indent_infos corresponding
4983 to the guard, body and next tokens. Adjust call to
4984 warn_for_misleading_indentation accordingly.
4985 (c_parser_else_body): Likewise.
4986 (c_parser_if_statement): Likewise.
4987 (c_parser_while_statement): Likewise.
4988 (c_parser_for_statement): Likewise.
4990 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4991 Manuel López-Ibáñez <manu@gcc.gnu.org>
4993 * c-decl.c (get_parm_info): Remove static var. Update warning
4996 2015-07-27 Marek Polacek <polacek@redhat.com>
5000 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5002 2015-07-20 Marek Polacek <polacek@redhat.com>
5005 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5006 (build_binary_op): Warn about left shift overflows.
5008 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5010 * c-array-notation.c: Adjust includes for flags.h changes.
5011 * c-objc-common.c: Likewise.
5013 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5015 * c-array-notation.c: Adjust includes.
5016 * c-aux-info.c: Likewise.
5017 * c-convert.c: Likewise.
5018 * c-decl.c: Likewise.
5019 * c-errors.c: Likewise.
5020 * c-lang.c: Likewise.
5021 * c-objc-common.c: Likewise.
5022 * c-parser.c: Likewise.
5023 * c-typeck.c: Likewise.
5025 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5028 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5030 2015-06-29 Marek Polacek <polacek@redhat.com>
5033 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5034 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5035 about -Wswitch-bool here.
5036 (do_case): Update c_add_case_label call.
5037 (c_finish_case): Update c_do_switch_warnings call.
5039 2015-06-27 Marek Polacek <polacek@redhat.com>
5041 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5043 2015-06-26 Marek Polacek <polacek@redhat.com>
5045 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5047 * c-typeck.c (array_to_pointer_conversion): Likewise.
5048 (build_unary_op): Likewise.
5049 (c_finish_return): Likewise.
5051 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5053 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5054 * c-parser.c: Likewise.
5056 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5058 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5059 instead of pointer_hash.
5060 (detect_field_duplicates): Likewise.
5062 2015-06-25 Marek Polacek <polacek@redhat.com>
5064 * c-array-notation.c: Use VAR_P throughout.
5065 * c-decl.c: Likewise.
5066 * c-objc-common.c: Likewise.
5067 * c-parser.c: Likewise.
5068 * c-typeck.c: Likewise.
5070 2015-06-25 Marek Polacek <polacek@redhat.com>
5072 * c-decl.c: Use is_global_var throughout.
5073 * c-parser.c: Likewise.
5074 * c-typeck.c: Likewise.
5076 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5078 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5079 * c-aux-info.c: Likewise.
5080 * c-convert.c: Likewise.
5081 * c-decl.c: Likewise.
5082 * c-errors.c: Likewise.
5083 * c-lang.c: Likewise.
5084 * c-objc-common.c: Likewise.
5085 * c-parser.c: Likewise.
5086 * c-typeck.c: Likewise.
5088 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
5091 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5094 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5096 * c-decl.c (pop_scope): Register the main translation unit
5097 through the new debug hook.
5099 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5101 * c-array-notation.c : Adjust include files.
5102 * c-aux-info.c : Likewise.
5103 * c-convert.c : Likewise.
5104 * c-decl.c : Likewise.
5105 * c-errors.c : Likewise.
5106 * c-lang.c : Likewise.
5107 * c-lang.h : Likewise.
5108 * c-objc-common.c : Likewise.
5109 * c-parser.c : Likewise.
5110 * c-typeck.c : Likewise.
5112 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5114 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5115 immediately clobber it.
5116 (c_write_global_declarations_1): Remove call to
5117 check_global_declaration_1.
5118 (c_write_global_declarations_2): Remove.
5119 (c_write_final_cleanups): Rename from c_write_global_declarations.
5120 Remove call to finalize_compilation_unit.
5121 Remove calls to debugging hooks.
5122 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5123 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5124 * c-tree.h: Remove c_write_global_declarations.
5126 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5128 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5129 * c-aux-info.c: Likewise.
5130 * c-convert.c: Likewise.
5131 * c-decl.c: Likewise.
5132 * c-errors.c: Likewise.
5133 * c-lang.c: Likewise.
5134 * c-objc-common.c: Likewise.
5135 * c-parser.c: Likewise.
5136 * c-typeck.c: Likewise.
5138 2015-06-04 Marek Polacek <polacek@redhat.com>
5141 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5144 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5146 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5147 Warn for empty struct.
5148 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5150 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5152 * c-decl.c (start_function): Call plugin before parsing.
5153 (finish_function): Call plugin after parsing.
5155 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5158 * c-decl.c (merge_decls): Merge DECL_COMMON.
5160 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
5162 * Make-lang.in (check_gcc_pallelize): Define.
5164 2015-05-22 Marek Polacek <polacek@redhat.com>
5167 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5170 2015-05-21 Marek Polacek <polacek@redhat.com>
5172 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5175 2015-05-20 Marek Polacek <polacek@redhat.com>
5177 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5178 * c-typeck.c: Likewise.
5180 2015-05-19 Marek Polacek <polacek@redhat.com>
5182 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5184 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5187 * c-parser.c (c_parser_omp_for_loop): Don't add
5188 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5189 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5190 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5193 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5195 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5198 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5201 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5204 2015-05-14 Marek Polacek <polacek@redhat.com>
5208 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5211 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5213 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5214 to add a call to warn_for_misleading_indentation.
5215 (c_parser_else_body): Likewise, adding param "else_loc".
5216 (c_parser_if_statement): Check for misleading indentation.
5217 (c_parser_while_statement): Likewise.
5218 (c_parser_for_statement): Likewise.
5220 2015-05-08 Marek Polacek <polacek@redhat.com>
5223 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5224 (output_init_element): Likewise.
5226 2015-05-07 Marek Polacek <polacek@redhat.com>
5229 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5232 2015-04-30 Marek Polacek <polacek@redhat.com>
5234 * c-typeck.c (set_init_label): Call error_at instead of error and
5237 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5240 * c-typeck.c (c_build_va_arg): Clarify the error message.
5242 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5244 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5245 OMP_STANDALONE_CLAUSES.
5247 2015-04-28 Marek Polacek <polacek@redhat.com>
5249 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5251 2015-04-28 Marek Polacek <polacek@redhat.com>
5254 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5256 2015-04-25 Marek Polacek <polacek@redhat.com>
5259 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5262 2015-04-23 Marek Polacek <polacek@redhat.com>
5265 * c-decl.c (set_labels_context_r): New function.
5266 (store_parm_decls): Call it via walk_tree_without_duplicates.
5267 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5268 instead of create_tmp_var. Build TARGET_EXPR instead of
5270 (build_atomic_assign): Use create_tmp_var_raw instead of
5271 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5273 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5275 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5276 (c_parser_omp_target_update): Add missed %> to error_at ().
5278 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5281 * c-decl.c (c_default_pointer_mode): Remove definition.
5282 * c-tree.h (c_default_pointer_mode): Remove declaration.
5284 2015-03-27 Tobias Burnus <burnus@net-b.de>
5287 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5289 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5290 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5291 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5293 2015-03-19 Jakub Jelinek <jakub@redhat.com>
5295 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5296 attribute for DECL_EXTERNAL VAR_DECLs.
5298 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5300 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5303 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5306 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5307 before preparing arguments to warn_logical_not_parentheses.
5309 2015-03-09 Jakub Jelinek <jakub@redhat.com>
5312 * c-typeck.c (parser_build_binary_op): Don't warn for
5313 !!x == y or !b == y where b is _Bool.
5315 2015-03-09 Marek Polacek <polacek@redhat.com>
5317 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5318 * c-decl.c (grokdeclarator): Likewise.
5319 * c-typeck.c (build_binary_op): Likewise.
5321 2015-02-27 Marek Polacek <polacek@redhat.com>
5324 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5326 2015-02-14 Marek Polacek <polacek@redhat.com>
5329 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5330 declared through a typedef name.
5332 2015-02-13 Marek Polacek <polacek@redhat.com>
5335 * c-decl.c (grokdeclarator): Print also the type when giving
5336 the error message about array's incomplete element type.
5338 2015-02-11 Jakub Jelinek <jakub@redhat.com>
5341 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5342 check in the POP macro.
5344 2015-02-09 Marek Polacek <polacek@redhat.com>
5347 * c-typeck.c (process_init_element): Don't always wrap
5348 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5349 initializing a range of elements.
5351 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5355 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5357 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5359 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5360 processing enum declaration.
5362 2015-01-29 Marek Polacek <polacek@redhat.com>
5365 * c-typeck.c (pop_init_level): If constructor_elements has
5366 exactly one element with integer_zerop value, set constructor_zeroinit
5367 to 1. Remove braces around warning_init call.
5369 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5372 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5373 of FUNCTION_DECLs with error_mark_node.
5375 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5378 * c-typeck.c (convert_arguments): Return -1 if there are
5379 error_args, even if we've diagnosed too many arguments.
5381 2015-01-21 Richard Biener <rguenther@suse.de>
5384 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5385 for builtins the user declared correctly.
5387 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5388 Bernd Schmidt <bernds@codesourcery.com>
5389 Cesar Philippidis <cesar@codesourcery.com>
5390 James Norris <jnorris@codesourcery.com>
5391 Jakub Jelinek <jakub@redhat.com>
5392 Ilmir Usmanov <i.usmanov@samsung.com>
5394 * c-parser.c: Include "gomp-constants.h".
5395 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5396 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5397 Use OMP_CLAUSE_SET_MAP_KIND.
5398 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5399 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5400 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5401 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5402 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5403 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5404 "copyout", "create", "delete", "deviceptr", "gang", "host",
5405 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5406 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5407 "present_or_create", "pcreate", "seq", "self", "vector",
5408 "vector_length", "wait", "worker".
5409 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5410 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5411 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5412 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5413 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5414 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5415 (c_parser_oacc_data_clause_deviceptr)
5416 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5417 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5418 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5419 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5420 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5421 (c_parser_oacc_parallel, c_parser_oacc_update)
5422 (c_parser_oacc_wait): New functions.
5423 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5424 (c_finish_oacc_data): New prototypes.
5425 * c-typeck.c: Include "gomp-constants.h".
5426 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5427 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5428 OMP_CLAUSE_SET_MAP_KIND.
5429 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5430 (c_finish_oacc_data): New functions.
5431 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5432 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5433 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5434 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5435 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5436 GOMP_MAP_FORCE_DEVICEPTR.
5438 2015-01-09 Michael Collison <michael.collison@linaro.org>
5440 * c-array-notation.c: Include hash-set.h, machmode.h,
5441 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5442 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5443 * c-aux-info.c: Ditto.
5444 * c-convert.c: Ditto.
5446 * c-errors.c: Ditto.
5447 * c-lang.c: Dittoxs.
5448 * c-objc-common.c: Ditto.
5449 * c-parser.c: Ditto.
5450 * c-typeck.c: Include hash-set.h, machmode.h,
5451 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5452 fold-const.h, wide-int.h, inchash.h, real.h and
5453 fixed-value.h due to flattening of tree.h.
5455 2015-01-07 Marek Polacek <polacek@redhat.com>
5458 * c-typeck.c (process_init_element): Disallow initialization of
5459 a flexible array member with a string constant if the structure
5462 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5465 * c-typeck.c (convert_for_assignment, c_finish_return): For
5466 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5467 types also set in_late_binary_op around convert call.
5468 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5469 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5470 result on expr as last argument to ubsan_instrument_float_cast,
5471 if in_late_binary_op, don't use c_save_expr but save_expr.
5473 Update copyright years.
5475 2015-01-05 Marek Polacek <polacek@redhat.com>
5478 * c-typeck.c (build_array_ref): Pass loc down to
5479 warn_array_subscript_with_type_char.
5481 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5483 * c-typeck.c: New behavious for pointers to arrays with qualifiers
5484 (common-pointer-type): For pointers to arrays take qualifiers from
5486 (build_conditional_expr): Add warnings for lost qualifiers.
5487 (comp-target-types): Allow pointers to arrays with different qualifiers.
5488 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5489 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5490 to PEDWARN_FOR_QUALIFIERS.
5492 2014-12-17 Jakub Jelinek <jakub@redhat.com>
5495 * c-convert.c: Include ubsan.h.
5496 (convert): For real -> integral casts and
5497 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5498 instead instrument the float cast directly.
5500 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5502 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5503 c_finish_stmt_expr): Remove NULL last argument from
5504 create_tmp_var_raw and create_tmp_var calls.
5505 * c-array-notation.c (fix_builtin_array_notation_fn,
5506 build_array_notation_expr, fix_conditional_array_notations_1,
5507 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5509 2014-11-28 Marek Polacek <polacek@redhat.com>
5512 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5513 convert the right operand to integer type.
5515 2014-11-25 Marek Polacek <polacek@redhat.com>
5518 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5519 for inline functions.
5521 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5524 * c-typeck.c (build_array_ref): Adjust
5525 convert_vector_to_pointer_for_subscript caller. If it returns true,
5526 call non_lvalue_loc on the result.
5528 2014-11-11 Richard Biener <rguenther@suse.de>
5530 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5533 2014-11-10 Andi Kleen <ak@linux.intel.com>
5536 * c-parser.c (c_parser_statement_after_labels): Call
5538 (c_parser_if_statement): Dito.
5539 (c_parser_switch_statement): Dito.
5540 (c_parser_while_statement): Dito.
5541 (c_parser_do_statement): Dito.
5542 (c_parser_for_statement): Dito.
5543 * c-typeck.c (c_finish_loop): Dito.
5545 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5547 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5548 OPT_Wshift_count_overflow in the warnings.
5550 2014-10-30 Marek Polacek <polacek@redhat.com>
5552 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5553 print the stripped version as well, if they're not the same.
5555 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5557 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5560 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5562 * c-decl.c: Adjust include files.
5563 * c-parser.c: Ditto.
5565 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5566 Tom Tromey <tromey@redhat.com>
5568 * c-tree.h (enum c_oracle_request): New.
5569 (c_binding_oracle_function): New typedef.
5570 (c_binding_oracle, c_pushtag, c_bind): Declare.
5571 * c-decl.c (c_binding_oracle): New global.
5572 (I_SYMBOL_CHECKED): New macro.
5573 (i_symbol_binding): New function.
5574 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5575 (I_TAG_CHECKED): New macro.
5576 (i_tag_binding): New function.
5577 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5578 (I_LABEL_CHECKED): New macro.
5579 (i_label_binding): New function.
5580 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5581 (c_print_identifier): Save and restore c_binding_oracle.
5582 (c_pushtag, c_bind): New functions.
5584 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5586 * c-typeck.c: Adjust include files.
5588 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5591 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5592 initialization here...
5593 (c_initialize_diagnostics): ... but here. Set defaults after
5594 building pretty-printer.
5596 2014-10-23 Marek Polacek <polacek@redhat.com>
5599 * c-decl.c (pop_scope): Don't print warning in external_scope.
5601 2014-10-19 Marek Polacek <polacek@redhat.com>
5604 * c-typeck.c (output_init_element): Allow initializing objects with
5605 static storage duration with compound literals even in C99 and add
5608 2014-10-17 Marek Polacek <polacek@redhat.com>
5611 * c-typeck.c (digest_init): Allow initializing objects with static
5612 storage duration with compound literals even in C99 and add pedwarn
5615 2014-10-17 Marek Polacek <polacek@redhat.com>
5618 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5619 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5620 error multiple times. Print the type.
5622 2014-10-17 Marek Polacek <polacek@redhat.com>
5625 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5628 2014-10-17 Marek Polacek <polacek@redhat.com>
5630 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5631 (start_function): Use OPT_Wimplicit_int instead of 0.
5632 (store_parm_decls_oldstyle): Likewise.
5634 2014-10-17 Alan Modra <amodra@gmail.com>
5637 * c-decl.c (merge_decls): Don't merge section name or tls model
5638 to newdecl symtab node, instead merge to olddecl. Override
5639 existing olddecl section name. Set tls_model for all thread-local
5640 vars, not just OMP thread-private ones. Remove incorrect comment.
5642 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5644 * c-decl.c: Adjust include files.
5646 2014-10-14 DJ Delorie <dj@redhat.com>
5648 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5649 (c_token_starts_typename): Check all __intN, not just __int128.
5650 (c_token_starts_declspecs): Likewise.
5651 (c_parser_declspecs): Likewise.
5652 (c_parser_attribute_any_word): Likewise.
5653 (c_parser_objc_selector): Likewise.
5654 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5655 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5657 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5659 (finish_declspecs): Likewise.
5661 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5663 * c-parser.c (c_parser_all_labels): New function to replace
5665 (c_parser_statement): Call the new function.
5667 2014-10-09 Marek Polacek <polacek@redhat.com>
5670 * c-typeck.c (pop_init_level): Don't warn about initializing
5673 2014-10-07 Marek Polacek <polacek@redhat.com>
5676 * c-decl.c (header_for_builtin_fn): New function.
5677 (implicitly_declare): Suggest which header to include.
5679 2014-10-07 Marek Polacek <polacek@redhat.com>
5681 * c-convert.c (convert): Use error_operand_p.
5682 * c-typeck.c (require_complete_type): Likewise.
5683 (really_atomic_lvalue): Likewise.
5684 (digest_init): Likewise.
5685 (handle_omp_array_sections_1): Likewise.
5687 2014-10-03 Marek Polacek <polacek@redhat.com>
5690 * c-decl.c (pop_scope): Don't warn about "inline function declared
5691 but never defined" for functions marked with gnu_inline attribute.
5693 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5696 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5697 on low_bound and length.
5699 2014-09-24 Marek Polacek <polacek@redhat.com>
5703 * c-parser.c: Don't define CPP_KEYWORD.
5704 (c_parser_switch_statement): Pass original type to c_finish_case.
5705 * c-tree.h (c_finish_case): Update declaration.
5706 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5707 conditionally to c_do_switch_warnings.
5709 2014-09-03 Marek Polacek <polacek@redhat.com>
5712 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5715 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5716 Balaji V. Iyer <balaji.v.iyer@intel.com>
5717 Igor Zamyatin <igor.zamyatin@intel.com>
5719 * c-parser.c (c_parser_cilk_for): New function.
5720 (c_parser_cilk_grainsize): Likewise.
5721 (c_get_temp_regvar): Likewise.
5722 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5723 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5724 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5725 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5728 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5730 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5731 with using HOST_WIDE_INT without truncation to 'int'
5733 2014-08-22 Marek Polacek <polacek@redhat.com>
5736 * c-typeck.c (parser_build_binary_op): Adjust call to
5737 warn_logical_not_parentheses.
5739 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5742 * c-parser.c (c_parser_array_notation): Check for correct
5743 type of an array added.
5745 2014-08-19 Marek Polacek <polacek@redhat.com>
5748 * c-typeck.c (build_binary_op): If either operand of a comparison
5749 is a boolean expression, call maybe_warn_bool_compare.
5751 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5754 * c-typeck.c (build_c_cast): Do a conversion even when the
5755 TYPE_MAIN_VARIANTs are the same.
5757 2014-08-19 Marek Polacek <polacek@redhat.com>
5759 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5760 pedwarn_c99 instead of pedwarn.
5761 (grokfield): Likewise.
5762 (warn_defaults_to): New function.
5763 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5764 Unconditionally call pedwarn_c99 instead of pedwarn.
5765 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5766 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5767 check flag_isoc11 before.
5768 * c-errors.c (pedwarn_c99): Change the return type to bool.
5769 Handle -Wc99-c11-compat.
5770 * c-parser.c (disable_extension_diagnostics): Handle
5771 warn_c99_c11_compat.
5772 (restore_extension_diagnostics): Likewise.
5773 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5774 instead of pedwarn, don't check flag_isoc11 before.
5775 (c_parser_declspecs): Likewise.
5776 (c_parser_alignas_specifier): Likewise.
5777 (c_parser_alignof_expression): Likewise.
5778 (c_parser_generic_selection): Likewise.
5779 * c-tree.h (pedwarn_c99): Update declaration.
5780 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5783 2014-08-19 Marek Polacek <polacek@redhat.com>
5785 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5787 * c-errors.c: Include "opts.h".
5788 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5789 * c-parser.c (disable_extension_diagnostics): Handle negative value
5790 of warn_c90_c99_compat, too.
5791 (restore_extension_diagnostics): Likewise.
5792 (c_parser_compound_statement_nostart): Pass
5793 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5795 2014-08-12 Marek Polacek <polacek@redhat.com>
5797 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5799 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5801 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5803 2014-08-10 Marek Polacek <polacek@redhat.com>
5806 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5807 Call pedwarn_c90 instead of pedwarn.
5808 (check_bitfield_type_and_width): Likewise.
5809 (declspecs_add_qual): Likewise.
5810 (declspecs_add_type): Likewise.
5811 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5812 Adjust to only call pedwarn_c90.
5813 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5814 pedwarn_c90 instead of pedwarn.
5815 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5816 * c-parser.c (disable_extension_diagnostics): Handle
5817 warn_c90_c99_compat.
5818 (restore_extension_diagnostics): Likewise.
5819 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5820 pedwarn_c90 instead of pedwarn.
5821 (c_parser_initelt): Likewise.
5822 (c_parser_postfix_expression): Likewise.
5823 (c_parser_postfix_expression_after_paren_type): Likewise.
5824 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5825 * c-tree.h: Fix formatting.
5826 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5827 pedwarn_c90 instead of pedwarn.
5829 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5831 * c-typeck.c: Remove include of pointer-set.h.
5833 2014-08-07 Marek Polacek <polacek@redhat.com>
5835 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5837 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5839 * c-typeck.c: Use hash_map instead of pointer_map.
5841 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5843 * c-decl.c: Use hash_set instead of pointer_set.
5845 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5848 * c-array-notation.c (expand_array_notations): Handling
5851 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5854 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5857 2014-07-30 Tom Tromey <tromey@redhat.com>
5859 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5861 (really_start_incremental_init, push_init_level): Initialize
5863 (pop_init_level): Set global designator_depth.
5864 (process_init_element): Check for designated_init attribute.
5866 2014-07-20 Marek Polacek <polacek@redhat.com>
5869 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5870 (implicitly_declare): Pass location to implicit_decl_warning.
5872 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5875 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5876 If non-NULL, call c_parser_check_literal_zero.
5877 (c_parser_check_literal_zero): New function.
5878 (c_parser_postfix_expression_after_primary): Adjust
5879 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5881 2014-07-06 Marek Polacek <polacek@redhat.com>
5884 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5885 * c-tree.h (C_ARRAY_PARAMETER): Define.
5886 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5889 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5890 Chen Gang <gang.chen.5i5j@gmail.com>
5892 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5895 2014-07-01 Marek Polacek <polacek@redhat.com>
5897 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5898 instead of 0 to WARN_FOR_ASSIGNMENT.
5900 2014-07-01 Marek Polacek <polacek@redhat.com>
5903 * c-typeck.c (convert_for_assignment): Pass
5904 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5906 2014-06-30 Marek Polacek <polacek@redhat.com>
5908 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5909 has no_sanitize_undefined attribute.
5911 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5914 * c-array-notation.c (fix_builtin_array_notation_fn):
5915 Check for 0 arguments in builtin call. Check that bultin argument is
5917 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5920 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5922 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5923 qualifiers in __auto_type for atomic types.
5924 (c_parser_typeof_specifier): Discard all type qualifiers in
5925 __typeof__ for atomic types.
5927 2014-06-25 Marek Polacek <polacek@redhat.com>
5930 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5931 the return expression to c_finish_return.
5933 2014-06-25 Jakub Jelinek <jakub@redhat.com>
5935 * c-typeck.c (c_finish_omp_clauses): Make sure
5936 OMP_CLAUSE_LINEAR_STEP has correct type.
5938 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5942 2014-06-24 Jakub Jelinek <jakub@redhat.com>
5944 * c-parser.c (c_parser_omp_for_loop): For
5945 #pragma omp parallel for simd move lastprivate clause from parallel
5946 to for rather than simd.
5948 2014-06-23 Marek Polacek <polacek@redhat.com>
5950 * c-typeck.c (parser_build_binary_op): Don't call
5951 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5953 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
5955 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5956 * c-decl.c (merge_decls): Likewise.
5958 2014-06-09 Marek Polacek <polacek@redhat.com>
5961 * c-typeck.c (error_init): Call inform instead of error_at.
5962 (pedwarn_init): Call inform instead of pedwarn.
5963 (warning_init): Call inform instead of warning_at.
5965 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
5967 * c-decl.c (merge_decls): Use set_decl_section_name.
5968 (duplicate_decls): Remove node if it exists.
5970 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5973 * c-typeck.c (push_init_level, process_init_element,
5974 pop_init_level): Correct check for zero initialization, move
5975 missing brace warning to respect zero initialization.
5977 2014-06-05 Marek Polacek <polacek@redhat.com>
5980 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5982 2014-06-05 Marek Polacek <polacek@redhat.com>
5985 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5986 on the left hand side operand of a comparison.
5988 2014-06-05 Marek Polacek <polacek@redhat.com>
5991 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5992 Print note only if the warning was printed.
5994 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5997 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6000 2014-06-03 Marek Polacek <polacek@redhat.com>
6003 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6005 * c-tree.h (c_start_case): Update.
6006 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6007 switch condition has boolean value.
6009 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
6011 * c-decl.c: Include builtins.h.
6012 * c-parser.c: Likewise.
6014 2014-05-27 Marek Polacek <polacek@redhat.com>
6017 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6018 error and warning calls to error_at and warning_at. Pass location of
6019 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6020 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6021 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6023 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6026 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6027 function parameters.
6029 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
6031 * c-decl.c (merge_decls): Preserve symtab node pointers.
6032 (duplicate_decls): Free new decl.
6034 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6036 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6039 * c-parser.c (c_parser_omp_target): Return bool values.
6041 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6043 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6044 num_teams_loc variable to num_thread_limit_loc.
6046 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6048 * c-array-notation.c (expand_array_notations): Use void_node
6049 instead of void_zero_node.
6051 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6053 * c-decl.c (finish_struct): Adjust.
6054 (finish_enum): Likewise.
6056 (record_inline_static): Likewise.
6057 (push_scope): Likewise.
6058 (make_label): Likewise.
6059 (lookup_label_for_goto): Likewise.
6060 (finish_struct): Likewise.
6061 (finish_enum): Likewise.
6062 (store_parm_decls): Likewise.
6063 (c_push_function_context): Likewise.
6064 * c-lang.h: Remove usage of variable_size gty attribute.
6065 * c-parser.c (c_parse_init): Adjust.
6066 (c_parse_file): Likewise.
6068 2014-05-13 Marek Polacek <polacek@redhat.com>
6071 * c-typeck.c (convert_for_assignment): Pass location to
6072 WARN_FOR_ASSIGNMENT instead of input_location.
6074 2014-05-10 Marek Polacek <polacek@redhat.com>
6076 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6077 maybe_warn_string_init.
6078 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6079 maybe_warn_string_init.
6080 * c-tree.h (maybe_warn_string_init): Update declaration.
6081 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6082 Call pedwarn_init with loc instead of with input_location.
6083 (digest_init): Pass init_loc to maybe_warn_string_init.
6084 (pop_init_level): Call pedwarn_init with loc instead of with
6086 (set_init_index): Likewise.
6087 (process_init_element): Likewise.
6089 2014-05-09 Marek Polacek <polacek@redhat.com>
6092 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6093 (c_parser_initelt): Pass location to set_init_label. Pass array index
6094 location to set_init_index.
6095 * c-tree.h (push_init_level): Update declaration.
6096 (pop_init_level): Likewise.
6097 (set_init_index): Likewise.
6098 (set_init_label): Likewise.
6099 * c-typeck.c (error_init): Add location parameter. Call error_at
6101 (digest_init): Pass init_loc to error_init.
6102 (really_start_incremental_init):
6103 (push_init_level): Add location parameter. Pass loc to pop_init_level
6105 (pop_init_level): Likewise.
6106 (set_designator): Add location parameter. Pass loc to pop_init_level,
6107 push_init_level, and error_init.
6108 (set_init_index): Add location parameter. Pass loc to error_init and
6110 (set_init_label): Likewise.
6111 (output_init_element): Pass loc to error_init.
6112 (process_init_element): Pass loc to error_init, pop_init_level,
6113 pedwarn_init, and push_init_level.
6115 2014-05-09 Marek Polacek <polacek@redhat.com>
6118 * c-parser.c (c_parser_attributes): Parse the arguments as an
6119 expression-list if the attribute takes identifier.
6121 2014-05-08 Marek Polacek <polacek@redhat.com>
6124 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6127 2014-05-08 Marek Polacek <polacek@redhat.com>
6130 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6133 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6134 Mike Stump <mikestump@comcast.net>
6135 Richard Sandiford <rdsandiford@googlemail.com>
6137 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6138 (finish_enum): Use wide-int interfaces.
6139 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6140 * c-typeck.c (build_c_cast): Likewise.
6141 (set_nonincremental_init_from_string): Likewise.
6142 (c_tree_equal): Likewise.
6144 2014-05-02 Marek Polacek <polacek@redhat.com>
6147 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6148 Return size_one_node when the type is not complete.
6149 (pointer_diff): Remove comment.
6150 (build_unary_op): Improve error messages.
6152 2014-05-02 Marek Polacek <polacek@redhat.com>
6154 * c-typeck.c (c_finish_return): Separate warning_at calls.
6156 2014-05-02 Marek Polacek <polacek@redhat.com>
6158 * c-tree.h (error_init): Remove declaration.
6159 (pedwarn_init): Likewise.
6160 * c-typeck.c (error_init): Make static and move above.
6161 (pedwarn_init): Likewise.
6162 (warning_init): Move above.
6163 (maybe_warn_string_init): Likewise.
6165 2014-05-01 Jeff Law <law@redhat.com>
6169 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6170 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6173 2014-05-02 Marek Polacek <polacek@redhat.com>
6176 * c-typeck.c (push_init_level): Set constructor_designated to
6177 p->designated for structures.
6179 2014-05-01 Marek Polacek <polacek@redhat.com>
6182 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6183 function-definition has an attribute after the declarator.
6185 2014-05-01 Marek Polacek <polacek@redhat.com>
6188 * c-typeck.c (warning_init): Add location_t parameter. Call
6189 warning_at instead of warning.
6190 (push_init_level): Pass input_location to warning_init.
6191 (add_pending_init): Add location_t parameter. Pass loc to
6193 (set_nonincremental_init): Pass input_location to add_pending_init.
6194 (set_nonincremental_init_from_string): Likewise.
6195 (output_init_element): Pass loc to warning_init and to
6198 2014-05-01 Marek Polacek <polacek@redhat.com>
6201 * c-typeck.c (c_finish_return): Distinguish between label and variable
6202 when warning about returning local address.
6204 2014-05-01 Marek Polacek <polacek@redhat.com>
6207 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6210 2014-05-01 Marek Polacek <polacek@redhat.com>
6213 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6214 instead of 0 to WARN_FOR_QUALIFIERS.
6216 2014-05-01 Marek Polacek <polacek@redhat.com>
6219 * c-typeck.c (default_conversion): Use better location for
6222 2014-04-30 Marek Polacek <polacek@redhat.com>
6224 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6225 also when SANITIZE_FLOAT_DIVIDE is on.
6227 2014-04-30 Marek Polacek <polacek@redhat.com>
6230 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6231 and pedwarn_init. Use loc insted of input_location.
6233 2014-04-30 Marek Polacek <polacek@redhat.com>
6236 * c-typeck.c (build_binary_op): Use location when warning about
6239 2014-04-25 Marek Polacek <polacek@redhat.com>
6242 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6243 always_inline/noinline and hot/cold attributes.
6245 2014-04-25 Marek Polacek <polacek@redhat.com>
6248 * c-parser.c (c_parser_initelt): Pass input_location to
6249 process_init_element.
6250 (c_parser_initval): Pass loc to process_init_element.
6251 * c-tree.h (process_init_element): Adjust declaration.
6252 * c-typeck.c (push_init_level): Pass input_location to
6253 process_init_element.
6254 (pop_init_level): Likewise.
6255 (set_designator): Likewise.
6256 (output_init_element): Add location_t parameter. Pass loc to
6258 (output_pending_init_elements): Pass input_location to
6259 output_init_element.
6260 (process_init_element): Add location_t parameter. Pass loc to
6261 output_init_element.
6263 2014-04-24 Jakub Jelinek <jakub@redhat.com>
6265 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6266 atomic-clause, allow comma in between atomic-clause and
6269 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6272 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6273 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6275 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6278 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6279 create_tmp_var instead build_decl for creating temps.
6280 (build_array_notation_expr): Likewise.
6281 (fix_conditional_array_notations_1): Likewise.
6282 (fix_array_notation_expr): Likewise.
6283 (fix_array_notation_call_expr): Likewise.
6285 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6288 * c-tree.h (c_build_function_call_vec): New prototype.
6289 * c-typeck.c (build_function_call_vec): Don't call
6290 resolve_overloaded_builtin here.
6291 (c_build_function_call_vec): New wrapper function around
6292 build_function_call_vec. Call resolve_overloaded_builtin here.
6293 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6294 Call c_build_function_call_vec instead of build_function_call_vec.
6295 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6296 * c-decl.c (finish_decl): Likewise.
6298 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6301 * c-typeck.c: Use correct format string in cast-qual warning
6303 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6305 * c-decl.c (c_decl_attributes): Use
6306 lang_hooks.types.omp_mappable_type.
6307 * c-typeck.c (c_finish_omp_clauses): Likewise.
6309 2014-03-06 Marek Polacek <polacek@redhat.com>
6312 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6313 of checking tree code.
6315 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6317 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6318 (c_parser_parameter_declaration): Likewise.
6320 2014-02-19 Marek Polacek <polacek@redhat.com>
6323 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6324 Call mark_exp_read on exp.value.
6325 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6326 TREE_ADDRESSABLE on old instead of val.
6327 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6329 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6331 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6332 C_EXPR_APPEND by vec_safe_push.
6333 * c-tree.h (C_EXPR_APPEND): Remove.
6335 2014-01-31 Marek Polacek <polacek@redhat.com>
6338 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6339 build_function_call_vec.
6340 (build_function_call): Likewise.
6341 (build_atomic_assign): Likewise.
6342 (build_function_call_vec): Add arg_loc parameter. Use it.
6343 (convert_arguments): Likewise.
6344 (convert_for_assignment): Rename rhs_loc to expr_loc.
6345 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6346 (c_parser_objc_keywordexpr): Likewise.
6347 (c_parser_postfix_expression_after_primary): Call
6348 build_function_call_vec with expr_loc rather than op_loc.
6349 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6350 build_function_call_vec.
6351 (c_parser_expr_list): Add locations parameter. Fill it with locations
6352 of function arguments.
6353 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6355 2014-01-30 Marek Polacek <polacek@redhat.com>
6358 * c-typeck.c (build_function_call_vec): Use loc parameter.
6359 (convert_arguments): Add location parameter. Use it.
6360 (ep_convert_and_check): Likewise.
6361 (build_atomic_assign): Adjust convert_for_assignment call.
6362 (build_modify_expr): Likewise.
6363 (digest_init): Likewise.
6364 (c_finish_return): Likewise.
6365 (build_conditional_expr): Adjust ep_convert_and_check calls.
6366 (convert_for_assignment): Add rhs_loc parameter. Use it.
6367 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6370 2014-01-30 Richard Biener <rguenther@suse.de>
6373 * c-typeck.c (build_function_call_vec): Do not replace calls
6374 to a function via an incompatible type with a runtime abort.
6376 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6378 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6379 flag_enable_cilkplus with flag_cilkplus.
6380 (c_parser_direct_declarator_inner): Likewise.
6381 (c_parser_attribute_any_word): Likewise.
6382 (c_parser_attributes): Likewise.
6383 (c_parser_compound_statement): Likewise.
6384 (c_parser_statement_after_labels): Likewise.
6385 (c_parser_if_statement): Likewise.
6386 (c_parser_switch_statement): Likewise.
6387 (c_parser_do_statement): Likewise.
6388 (c_parser_for_statement): Likewise.
6389 (c_parser_unary_expression): Likewise.
6390 (c_parser_postfix_expression): Likewise.
6391 (c_parser_postfix_expression_after_primary): Likewise.
6392 (c_parser_postfix_expression_after_primary): Likewise.
6393 (c_parser_omp_clause_name): Likewise.
6394 (c_finish_omp_declare_simd): Likewise.
6395 (c_parser_cilk_verify_simd): Likewise.
6396 * c-typeck.c (build_array_ref): Likewise.
6397 (build_function_call_vec): Likewise.
6398 (convert_arguments): Likewise.
6399 (build_compound_expr): Likewise.
6400 (c_finish_return): Likewise.
6401 (c_finish_if_stmt): Likewise.
6402 (c_finish_loop): Likewise.
6403 (build_binary_op): Likewise.
6405 2014-01-23 Marek Polacek <polacek@redhat.com>
6408 * c-typeck.c (parser_build_binary_op): Use location instead of
6410 (build_binary_op): Pass location to shorten_compare.
6412 2014-01-23 Marek Polacek <polacek@redhat.com>
6415 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6418 2014-01-23 Marek Polacek <polacek@redhat.com>
6421 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6422 of a comma expression.
6423 (emit_side_effect_warnings): Likewise.
6425 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6428 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6429 function to use walk_tree and moved a lot of its functionality to
6430 expand_array_notations.
6431 (expand_array_notations): New function.
6433 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6435 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6436 attribute an attribute without value.
6438 2014-01-23 Jakub Jelinek <jakub@redhat.com>
6441 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6442 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6444 2014-01-22 Marek Polacek <polacek@redhat.com>
6447 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6448 of remove_c_maybe_const_expr on op1 and op2.
6450 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6453 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6454 effects, preevaluate rhs using SAVE_EXPR first.
6456 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6459 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6460 statements with if-elseif statements.
6462 2014-01-06 Marek Polacek <polacek@redhat.com>
6465 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6466 defined bit-field types only in ISO C.
6468 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6470 Update copyright years
6472 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6474 * c-array-notation.c: Use the standard form for the copyright notice.
6476 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6478 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6479 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6480 field in parser is not empty. If not-empty, call the function
6481 c_parser_finish_omp_declare_simd.
6482 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6483 between SIMD-enabled functions and #pragma simd. Added new parameter.
6484 (c_parser_cilk_all_clauses): Modified the usage of the function
6485 c_parser_cilk_clause_vectorlength as mentioned above.
6486 (c_parser_cilk_simd_fn_vector_attrs): New function.
6487 (c_finish_cilk_simd_fn_tokens): Likewise.
6488 (is_cilkplus_vector_p): Likewise.
6489 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6490 "nomask," and "mask" strings in clause name.
6491 (c_parser_omp_all_clauses): Added 3 new case statements:
6492 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6493 PRAGMA_CILK_CLAUSE_NOMASK.
6494 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6495 check for vector attribute and if so call the function
6496 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6497 called the function c_finish_cilk_simd_fn_tokens.
6498 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6499 parser field is non-empty. If so, parse them as you would parse
6500 the omp declare simd pragma.
6501 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6502 Added a check when step is a parameter and flag it as error.
6503 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6504 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6507 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6509 * c-parser.c (c_parser_omp_parallel): Fix description.
6511 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6513 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6514 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6515 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6516 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6518 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6521 * c-parser.c (c_parser_alignas_specifier): Use
6522 c_sizeof_or_alignof_type instead of c_alignof.
6523 (c_parser_alignof_expression): Likewise, with min_alignof
6524 parameter depending on alignof spelling used.
6526 2013-12-04 Marek Polacek <polacek@redhat.com>
6529 * c-decl.c (start_function): Don't warn for missing prototype for
6532 2013-12-03 Marek Polacek <polacek@redhat.com>
6535 * c-decl.c (build_compound_literal): Allow compound literals with
6536 empty initial value.
6538 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6541 * c-typeck.c (build_modify_expr): Diagnose assignment to
6542 expression with array type.
6544 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6547 * c-typeck.c (process_init_element): Do not treat a string as
6548 initializing a whole array when used with a designator for an
6551 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6554 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6555 an inline function following a static declaration.
6557 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6560 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6561 to p_name before calling c_parser_omp_teams instead of after.
6562 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6563 argument. Remove unused p_name variable.
6565 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6566 Jakub Jelinek <jakub@redhat.com>
6568 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6569 external_scope is NULL.
6571 2013-11-27 Tom de Vries <tom@codesourcery.com>
6572 Marc Glisse <marc.glisse@inria.fr>
6575 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6577 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6579 * c-typeck.c: Add required include files from gimple.h.
6581 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6583 * c-decl.c (define_label, shadow_tag_warned)
6584 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6585 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6586 (declspecs_add_type): Remove use of in_system_header macro.
6587 * c-parser.c (c_parser_unary_expression): Likewise.
6588 * c-typeck.c (store_init_value, process_init_element)
6589 (c_start_case): Likewise.
6591 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6594 * c-parser.c (c_parser_set_source_position_from_token): Remove
6595 reference to in_system_header from comment.
6597 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6599 * c-decl.c (grokdeclarator): Update comment to refer to
6600 tree_to_[su]hwi rather than tree_low_cst.
6602 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6604 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6605 tree_to_uhwi throughout.
6607 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6609 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6612 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6614 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6617 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6619 * c-parser.c (c_parser_cilk_simd): New.
6620 (c_parser_cilk_verify_simd): New.
6621 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6622 (c_parser_omp_for_loop): Add case for NE_EXPR.
6623 Set c_break_label for CILK_SIMD.
6624 (c_parser_cilk_clause_vectorlength): New.
6625 (c_parser_cilk_clause_linear): New.
6626 (c_parser_cilk_clause_name): New.
6627 (c_parser_cilk_all_clauses): New.
6628 * c-typeck.c (build_unary_op): Pass location argument to
6630 (build_modify_expr): Same.
6631 (build_asm_expr): Same.
6632 (c_finish_bc_stmt): Error on break/continue in loops.
6634 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6636 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6638 2013-11-14 Diego Novillo <dnovillo@google.com>
6640 * c-decl.c: Include print-tree.h.
6641 Include stor-layout.h.
6644 Include stringpool.h.
6645 * c-lang.c: Include fold-const.h.
6646 * c-parser.c: Include stringpool.h.
6648 Include stor-layout.h.
6650 Include trans-mem.h.
6651 * c-typeck.c: Include stor-layout.h.
6652 Include trans-mem.h.
6656 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6658 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6659 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6661 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6662 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6664 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6665 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6666 (c_parser_declarator, c_parser_direct_declarator_inner)
6667 (c_parser_parameter_declaration, c_parser_type_name): All callers
6669 (c_parser_declaration_or_fndef): Handle declarations with type
6670 determined from the initializer.
6672 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6674 * c-typeck.c: Include gimplify.h.
6676 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6678 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6679 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6681 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6682 or _Thread_local as appropriate in diagnostics.
6683 (build_null_declspecs): Initialize ret->thread_gnu_p.
6684 (declspecs_add_scspec): Handle either __thread or _Thread_local
6685 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6686 pedantic. Do not disallow _Thread_local extern and _Thread_local
6689 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6690 Andrew MacLeod <amacleod@redhat.com>
6692 * c-aux-info.c (gen_type): Handle atomic qualifier.
6693 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6694 qualifiers when compating types.
6695 (shadow_tag_warned): Handle atomic_p in declspecs.
6696 (quals_from_declspecs): Likewise.
6697 (start_decl): Use c_type_promotes_to when promoting argument
6699 (grokdeclarator): Handle _Atomic.
6700 (get_parm_info): Diagnose any qualifier on "void" as only
6702 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6703 comparing types. Use c_type_promotes_to when promoting argument
6705 (finish_function): Use c_type_promotes_to when promoting argument
6707 (build_null_declspecs): Handle atomic_p in declspecs.
6708 (declspecs_add_qual): Handle RID_ATOMIC.
6709 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6710 (c_token_starts_declspecs): Handle RID_ATOMIC.
6711 (c_parser_declspecs): Handle atomic type specifiers and
6713 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6714 from types of expressions with atomic type.
6715 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6716 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6717 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6718 (c_parser_statement_after_labels, c_parser_switch_statement)
6719 (c_parser_for_statement, c_parser_expr_no_commas)
6720 (c_parser_conditional_expression, c_parser_binary_expression)
6721 (c_parser_cast_expression, c_parser_unary_expression)
6722 (c_parser_postfix_expression)
6723 (c_parser_postfix_expression_after_primary, c_parser_expression):
6724 Use convert_lvalue_to_rvalue.
6725 (c_parser_expression_conv, c_parser_expr_list): Document
6726 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6727 (c_parser_objc_synchronized_statement): Use
6728 convert_lvalue_to_rvalue.
6729 (c_parser_objc_selector): Handle RID_ATOMIC.
6730 (c_parser_objc_receiver, c_parser_array_notation): Use
6731 convert_lvalue_to_rvalue.
6732 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6733 _Atomic (type-name).
6734 (struct c_declspecs): Add atomic_p field.
6735 (convert_lvalue_to_rvalue): Declare.
6736 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6737 corresponding atomic types.
6738 (qualify_type): Don't add _Atomic qualifiers from second argument.
6739 (comp_target_types): Do not allow _Atomic mismatches.
6740 (type_lists_compatible_p): Do not remove atomic qualifiers when
6742 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6743 (build_atomic_assign): New functions.
6744 (build_unary_op): Use build_atomic_assign for atomic increment and
6746 (build_conditional_expr): Do not treat _Atomic void as a qualified
6748 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6749 (find_anonymous_field_with_type, convert_to_anonymous_field)
6750 (convert_for_assignment): Do not remove atomic qualifiers when
6752 (digest_init): Do not accept initialization of arrays of atomic
6753 elements by string constants.
6754 (build_asm_expr): Use convert_lvalue_to_rvalue.
6755 (build_binary_op): Do not treat _Atomic void as a qualified
6758 2013-11-06 DJ Delorie <dj@redhat.com>
6760 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6761 both explicit and builtin, print the location of the explicit one.
6763 2013-11-05 Tobias Burnus <burnus@net-b.de>
6765 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6766 c_parser_omp_distribute, c_parser_omp_teams,
6767 c_parser_omp_target, c_parser_omp_declare): Handle
6770 2013-11-03 Marek Polacek <polacek@redhat.com>
6772 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6774 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6776 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6777 check_dup_generic at the end, unless remove is true.
6778 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6780 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6782 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6784 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6785 with decl that is not pointer nor array.
6787 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6789 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6790 a spawning function is found.
6791 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6792 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6793 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6794 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6796 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6797 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6799 (c_finish_return): Added a check to reject _Cilk_spawn in return
6801 (build_cilk_spawn): New function.
6802 (build_cilk_sync): Likewise.
6803 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6805 2013-10-27 Tobias Burnus <burnus@net-b.de>
6808 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6809 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6810 (c_parser_statement_after_labels): Update calls.
6812 2013-10-24 Tobias Burnus <burnus@net-b.de>
6815 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6816 Handle PRAGMA_IVDEP.
6817 (c_parser_statement_after_labels): Update call.
6819 2013-10-24 Marek Polacek <polacek@redhat.com>
6821 * c-parser.c (c_parser_struct_declaration): Add a comment.
6822 (c_parser_declarator): Don't allow _Alignas here.
6824 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6826 * c-parser.c: Include omp-low.h.
6827 * c-typeck.c: Likewise.
6829 2013-10-17 Marek Polacek <polacek@redhat.com>
6832 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6833 Document syntax of the array-declarator.
6834 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6836 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6837 (c_parser_struct_declaration): Likewise.
6838 (c_parser_declarator): Likewise.
6839 (c_parser_direct_declarator_inner): Likewise.
6840 (c_parser_parameter_declaration): Likewise.
6841 (c_parser_type_name): Likewise.
6843 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6845 * c-lang.h (current_omp_declare_target_attribute): New extern
6847 * c-parser.c: Include c-lang.h.
6848 (struct c_parser): Change tokens to c_token *.
6849 Add tokens_buf field. Change tokens_avail type to unsigned int.
6850 (c_parser_consume_token): If parser->tokens isn't
6851 &parser->tokens_buf[0], increment parser->tokens.
6852 (c_parser_consume_pragma): Likewise.
6853 (enum pragma_context): Add pragma_struct and pragma_param.
6854 (c_parser_external_declaration): Adjust
6855 c_parser_declaration_or_fndef caller.
6856 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6857 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6858 Adjust recursive call.
6859 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6861 (c_parser_parameter_declaration): Use pragma_param instead of
6863 (c_parser_compound_statement_nostart, c_parser_label,
6864 c_parser_for_statement): Adjust
6865 c_parser_declaration_or_fndef callers.
6866 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6867 it through to c_parser_conditional_expression.
6868 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6869 pass it through to c_parser_binary_expression. Adjust recursive
6871 (c_parser_binary_expression): Remove prec argument, add
6872 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6873 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6874 binop matches it, use build2 instead of parser_build_binary_op.
6875 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6876 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6877 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6878 Handle pragma_struct and pragma_param the same as pragma_external.
6879 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6880 (c_parser_omp_variable_list): Parse array sections for
6881 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6882 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6883 (c_parser_omp_clause_reduction): Handle user defined reductions.
6884 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6885 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6886 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6887 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6888 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6889 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6890 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6891 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6892 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6893 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6894 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6895 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6896 (c_parser_omp_for_loop): Add CODE argument, pass it through
6897 to c_finish_omp_for. Change last argument to cclauses,
6898 and adjust uses to grab parallel clauses from the array of all
6899 the split clauses. Adjust c_parser_binary_expression,
6900 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6901 (omp_split_clauses): New function.
6902 (c_parser_omp_simd): New function.
6903 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6904 Allow the function to be called also when parsing combined constructs,
6905 and call c_parser_omp_simd when parsing for simd.
6906 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6907 #pragma omp section, require exactly one structured-block instead of
6908 sequence of statements.
6909 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6910 Allow the function to be called also when parsing combined constructs.
6911 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6912 Allow the function to be called also when parsing combined
6914 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6915 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6916 c_parser_omp_teams, c_parser_omp_target_data,
6917 c_parser_omp_target_update, c_parser_omp_target,
6918 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6919 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6920 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6921 (c_parser_omp_construct): Add p_name and mask vars. Handle
6922 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6923 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6924 and c_parser_omp_sections callers.
6925 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6926 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6927 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6928 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6929 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6931 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6932 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6933 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6934 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6935 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6936 * c-typeck.c: Include tree-inline.h.
6937 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6938 handle_omp_array_sections_1, handle_omp_array_sections,
6939 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6940 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6941 user defined reductions.
6942 (c_tree_equal): New function.
6943 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6944 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6945 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6946 c_check_omp_declare_reduction_r): New prototypes.
6947 * c-decl.c (current_omp_declare_target_attribute): New variable.
6948 (c_decl_attributes): New function.
6949 (start_decl, start_function): Use it instead of decl_attributes.
6950 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6951 c_omp_reduction_decl, c_omp_reduction_lookup,
6952 c_check_omp_declare_reduction_r): New functions.
6954 2013-09-25 Tom Tromey <tromey@redhat.com>
6956 * Make-lang.in (c/gccspec.o): Remove.
6957 (CFLAGS-c/gccspec.o): New variable.
6958 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6959 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6960 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6962 2013-09-25 Tom Tromey <tromey@redhat.com>
6964 * Make-lang.in (c/gccspec.o): Don't use subshell.
6966 2013-09-18 Marek Polacek <polacek@redhat.com>
6969 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6970 Remove unnecessary check.
6972 2013-09-18 Marek Polacek <polacek@redhat.com>
6975 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6976 no_sanitize_undefined attribute.
6978 2013-09-13 Kai Tietz <ktietz@redhat.com>
6981 * c-decl.c (c_builtin_function_ext_scope): Remove
6982 wrong assumption that it is never called on prexisting
6985 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6987 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6989 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6991 * c-objc-common.c (c_tree_printer): Tidy.
6993 2013-08-30 Marek Polacek <polacek@redhat.com>
6995 * c-typeck.c (build_binary_op): Add division by zero and shift
6998 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
6999 Joseph Myers <joseph@codesourcery.com>
7002 * c-typeck.c (c_common_type): Prefer double_type_node over
7003 other REAL_TYPE types with the same precision.
7004 (convert_arguments): Likewise.
7006 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7008 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7009 (c_initialize_diagnostics): Call a destructor for the early printer.
7011 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7013 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7014 printer initialization.
7016 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
7019 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7020 check for truth values.
7021 (expand_array_notation_exprs): Added truth values case. Removed an
7022 unwanted else. Added for-loop to walk through subtrees in default
7025 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7027 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7029 2013-07-23 Joseph Myers <joseph@codesourcery.com>
7031 * c-parser.c (struct c_generic_association): Fix typo.
7033 2013-07-23 Tom Tromey <tromey@redhat.com>
7034 Joseph Myers <joseph@codesourcery.com>
7036 * c-parser.c (struct c_generic_association): New.
7037 (c_generic_association_d): New typedef.
7038 (c_parser_generic_selection): New function.
7039 (c_parser_postfix_expression): Handle RID_GENERIC.
7041 2013-07-13 Jason Merrill <jason@redhat.com>
7044 * c-decl.c (finish_struct): Check for too-large class.
7046 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7049 * c-typeck.c (set_init_index): When folding, check for index overflow.
7051 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7053 * c-parser.c (c_parser_array_notation): Removed rejection of array
7054 notations in an array of function pointers.
7056 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7058 * c-array-notation.c (make_triplet_val_inv): New function.
7059 (create_cmp_incr): Likewise.
7060 (create_array_refs): Likewise.
7061 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7062 Also modularized common parts between functions and called the function.
7063 (build_array_notation_expr): Likewise.
7064 (fix_conditional_array_notations_1): Likewise.
7065 (fix_array_notation_expr): Likewise.
7066 (fix_array_notation_call_expr): Likewise.
7068 2013-06-18 Marek Polacek <polacek@redhat.com>
7071 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7073 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7075 * c-array-notation.c (build_array_notation_expr): Reject array notation
7076 mismatch between LHS and RHS even inside a call_expr. Also, removed
7077 a couple while statements that were dead code.
7079 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7081 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7082 excessive precision expressions in function parameters. Also removed
7083 couple unwanted while statements.
7085 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7087 * c-array-notation.c (expand_array_notation_exprs): Added
7088 ARRAY_NOTATION_REF case.
7090 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7092 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7093 function to c-family/array-notation-common.c.
7094 (is_cilkplus_reduce_builtin): Likewise.
7095 (find_rank): Likewise.
7096 (extract_array_notation_exprs): Likewise.
7097 (replace_array_notations): Likewise.
7098 (find_inv_trees): Likewise.
7099 (replace_inv_trees): Likewise.
7100 (contains_array_notation_expr): Likewise.
7101 (find_correct_array_notation_type): Likewise.
7102 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7103 (struct inv_list): Moved this to c-family/array-notation-common.c.
7104 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7106 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7108 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7109 reduction functions outside the for-loop. Added a check if the fundecl
7110 is non-NULL. Finally, removed an unwanted if-statement, and made the
7113 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7115 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7116 condition of the if-statement matches the rank of else-block and then-
7117 block when array notations are used.
7118 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7119 expression after the entire function body is parsed.
7120 (c_parser_expr_no_commas): Delayed creating array notation expressions
7121 to the end of function parsing.
7122 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7123 whole if-statement instead of just the condition.
7124 (expand_array_notation_exprs): Added MODIFY_EXPR case.
7126 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7129 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7130 array to NULL_TREE if they are unused. Also added a check for the
7131 field to be NULL before its fields are used in future.
7133 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7136 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7137 (build_array_notation_expr): Likewise.
7139 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7141 * c-typeck.c (build_array_ref): Added a check to see if array's
7142 index is greater than one. If true, then emit an error.
7143 (build_function_call_vec): Exclude error reporting and checking
7144 for builtin array-notation functions.
7145 (convert_arguments): Likewise.
7146 (c_finish_return): Added a check for array notations as a return
7147 expression. If true, then emit an error.
7148 (c_finish_loop): Added a check for array notations in a loop
7149 condition. If true then emit an error.
7150 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7151 (build_binary_op): Added a check for array notation expr inside
7152 op1 and op0. If present, we call another function to find correct
7154 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7155 * c-parser.c (c_parser_compound_statement): Check if array
7156 notation code is used in tree, if so, then transform them into
7158 (c_parser_expr_no_commas): Check if array notation is used in LHS
7159 or RHS, if so, then build array notation expression instead of
7161 (c_parser_postfix_expression_after_primary): Added a check for
7162 colon(s) after square braces, if so then handle it like an array
7163 notation. Also, break up array notations in unary op if found.
7164 (c_parser_direct_declarator_inner): Added a check for array
7166 (c_parser_compound_statement): Added a check for array notation in
7167 a stmt. If one is present, then expand array notation expr.
7168 (c_parser_if_statement): Likewise.
7169 (c_parser_switch_statement): Added a check for array notations in
7170 a switch statement's condition. If true, then output an error.
7171 (c_parser_while_statement): Similarly, but for a while.
7172 (c_parser_do_statement): Similarly, but for a do-while.
7173 (c_parser_for_statement): Similarly, but for a for-loop.
7174 (c_parser_unary_expression): Check if array notation is used in a
7175 pre-increment or pre-decrement expression. If true, then expand
7177 (c_parser_array_notation): New function.
7178 * c-array-notation.c: New file.
7179 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7181 2013-05-23 Mike Stump <mikestump@comcast.net>
7183 * c-typeck.c (convert_for_assignment): Handle references to memory
7186 2013-05-16 Jason Merrill <jason@redhat.com>
7188 * Make-lang.in (cc1$(exeext)): Use link mutex.
7190 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7192 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7193 to simply use OPT_Wpointer_arith.
7194 (build_unary_op): Likewise.
7196 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7199 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7200 argument. If set, or it temporarily for parsing of the first
7201 argument into force_folding_builtin_constant_p.
7202 (c_parser_postfix_expression): Adjust callers.
7204 2013-03-21 Richard Biener <rguenther@suse.de>
7206 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7207 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7209 2013-02-12 Marek Polacek <polacek@redhat.com>
7212 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7215 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7218 * c-typeck.c (set_nonincremental_init_from_string): If
7219 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7221 (process_init_element): Likewise.
7223 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7226 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7227 argument, don't call default_function_array_conversion
7228 nor c_fully_fold here.
7229 (c_parser_asm_statement): Adjust callers.
7230 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7231 and outputs here, and call default_function_array_conversion
7232 on inputs that don't need to be addressable.
7234 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7237 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7238 warning require that both c_common_unsigned_type as well as
7239 c_common_signed_type is the same for both mvl and mvr types.
7241 2012-11-16 Diego Novillo <dnovillo@google.com>
7243 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7245 * c-common.c: Use new vec API in vec.h.
7246 * c-common.h: Likewise.
7247 * c-gimplify.c: Likewise.
7248 * c-pragma.c: Likewise.
7249 * c-pretty-print.c: Likewise.
7250 * c-pretty-print.h: Likewise.
7251 * c-semantics.c: Likewise.
7252 * c-decl.c: Likewise.
7253 * c-parser.c: Likewise.
7254 * c-tree.h: Likewise.
7255 * c-typeck.c: Likewise.
7257 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7260 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7262 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7265 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7266 shadows a function, unless the variable is a function or a
7267 pointer-to-function.
7269 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7272 * c-parser.c (struct c_tree_loc_pair): Removed.
7273 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7274 add location_t * and tree * arguments, fill in array of 3
7275 sizeof_arg trees and corresponding locs.
7276 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7277 c_parser_expr_list callers.
7278 (c_parser_postfix_expression_after_primary): Likewise. Pass
7279 array of 3 sizeof_arg trees and locs (corresponding to first
7280 3 arguments) to sizeof_pointer_memaccess_warning.
7282 2012-10-09 Lawrence Crowl <crowl@google.com>
7284 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7285 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7288 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7291 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7294 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7297 * c-typeck.c: Include c-common.h.
7298 (enum stv_conv): Moved to c-common.h.
7299 (scalar_to_vector): Moved to c-common.c.
7300 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7301 * Make-lang.in: c-typeck.c depends on c-common.h.
7303 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7305 * c-decl.c (c_write_global_declarations): Fix handling of
7308 2012-09-30 Sharad Singhai <singhai@google.com>
7310 * c-decl.c (c_write_global_declarations): Use a different method
7311 to determine if the dump has ben initialized.
7313 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7316 * c-typeck.c (c_cast_expr): When casting to a type requiring
7317 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7320 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7323 * c-typeck.c (build_unary_op): Pass original argument of
7324 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7325 any C_MAYBE_CONST_EXPR, if it has integer operands.
7326 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7327 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7328 to c_objc_common_truthvalue_conversion, then remove any
7329 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7330 c_objc_common_truthvalue_conversion not
7331 c_common_truthvalue_conversion.
7332 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7333 call note_integer_operands for arguments with integer operands
7334 that are not integer constants.
7336 2012-09-13 Jakub Jelinek <jakub@redhat.com>
7339 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7340 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7342 2012-08-31 Jakub Jelinek <jakub@redhat.com>
7345 * c-convert.c (convert): Don't call fold_convert_loc if
7346 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7347 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7348 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7350 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7353 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7354 for nested and empty_ok arguments in the call to
7355 c_parser_declaration_or_fndef.
7357 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7359 * c-tree.h (c_last_sizeof_arg): Declare.
7360 * c-parser.c (struct c_tree_loc_pair): New type.
7361 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7363 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7364 (c_parser_postfix_expression_after_primary): Likewise. Call
7365 sizeof_pointer_memaccess_warning if needed.
7366 (sizeof_ptr_memacc_comptypes): New function.
7367 * c-typeck.c (c_last_sizeof_arg): New global variable.
7368 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7370 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7372 * c-lang.h (lang_decl): Add variable_size GTY option.
7374 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7376 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7377 * Make-lang.in: Fix dependencies.
7379 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7381 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7382 and add language Makefile hooks.
7383 * config-lang.in: New file.
7384 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7385 add the required "normal" config-lang.in rules.
7386 * c-lang.h: Moved from gcc/ to here.
7387 * c-tree.h: Likewise.
7388 * c-objc-common.c: Likewise.
7389 * c-objc-common.h: Likewise.
7390 * c-typeck.c: Likewise.
7391 * c-convert.c: Likewise.
7392 * c-lang.c: Likewise.
7393 * c-aux-info.c: Likewise.
7394 * c-errors.c: Likewise.
7395 * gccspec.c: Likewise.
7396 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7397 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7399 Copyright (C) 2012-2020 Free Software Foundation, Inc.
7401 Copying and distribution of this file, with or without modification,
7402 are permitted in any medium without royalty provided the copyright
7403 notice and this notice are preserved.