1 2021-03-19 Jakub Jelinek <jakub@redhat.com>
4 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
5 with modifycode NOP_EXPR produces and mark the _Atomic var as read
7 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
8 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
9 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
11 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
14 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
15 ensure that the varpool node is marked as offloadable.
17 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
20 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
22 2021-02-24 Martin Sebor <msebor@redhat.com>
25 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
27 2021-02-18 Jakub Jelinek <jakub@redhat.com>
30 * c-typeck.c (c_finish_return): Don't wrap retval into
31 EXCESS_PRECISION_EXPR in functions that return void.
33 2021-02-11 Marek Polacek <polacek@redhat.com>
35 * c-parser.c (c_parser_if_statement): Use vec_free.
37 2021-02-04 Martin Sebor <msebor@redhat.com>
40 * c-decl.c (locate_old_decl): Add type to diagnostic output.
41 (diagnose_mismatched_decls): Same.
42 (start_function): Introduce temporaries for better readability.
43 * c-typeck.c (comptypes_internal): Only consider complete enum
44 types in comparisons with integers.
46 2021-02-01 Martin Sebor <msebor@redhat.com>
49 * c-decl.c (free_attr_access_data): New function.
50 (c_parse_final_cleanups): Call free_attr_access_data.
52 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
54 * c-parser.c (c_parser_omp_clause_detach): New.
55 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
56 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
57 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
58 clause. Prevent use of detach with mergeable and overriding the
59 data sharing mode of the event handle.
61 2021-01-15 Jakub Jelinek <jakub@redhat.com>
63 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
64 unqualified element type and then call c_build_qualified_type on the
67 2021-01-07 Richard Biener <rguenther@suse.de>
69 * gimple-parser.c (c_parser_gimple_compound_statement): Only
70 reallocate loop array if it is too small.
72 2020-12-16 Martin Uecker <muecker@gwdg.de>
75 * c-typeck.c (build_modify_expr): Drop qualifiers.
77 2020-12-16 Martin Uecker <muecker@gwdg.de>
80 * c-parser.c (c_parser_expression): Look into
81 nop expression when marking expressions as read.
83 2020-12-14 Martin Liska <mliska@suse.cz>
86 * c-typeck.c (pointer_diff): Do not emit a top-level
88 (build_binary_op): Likewise.
90 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
92 * c-parser.c (c_parser_omp_allocate): New.
93 (c_parser_omp_construct): Call it.
95 2020-12-09 Richard Biener <rguenther@suse.de>
98 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
101 2020-12-07 Martin Uecker <muecker@gwdg.de>
104 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
105 that drops qualifiers to the end of the function.
107 2020-11-26 Martin Uecker <muecker@gwdg.de>
111 * c-parser.c (c_parser_declaration_or_fndef): Remove
112 redundant code to drop qualifiers of _Atomic types for __auto_type.
113 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
114 types for __typeof__.
116 2020-11-24 Jakub Jelinek <jakub@redhat.com>
119 * c-parser.c (c_parser_binary_expression): For omp atomic binary
120 expressions, use make_node instead of build2 to avoid checking build2
123 2020-11-23 Joseph Myers <joseph@codesourcery.com>
126 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
127 for comparisons of complete and incomplete pointers.
129 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
131 * c-aux-info.c (gen_type): Support opaque types.
133 2020-11-20 Martin Sebor <msebor@redhat.com>
136 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
138 2020-11-20 Jakub Jelinek <jakub@redhat.com>
141 * Make-lang.in (c.serial): Change from goal to a variable.
142 (.PHONY): Drop c.serial.
144 2020-11-20 Martin Uecker <muecker@gwdg.de>
146 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
148 2020-11-19 Jakub Jelinek <jakub@redhat.com>
151 * c-decl.c (get_parm_array_spec): Bail out of nelts is
154 2020-11-18 Jakub Jelinek <jakub@redhat.com>
156 * Make-lang.in (c.serial): New goal.
157 (.PHONY): Add c.serial c.prev.
158 (cc1$(exeext)): Call LINK_PROGRESS.
160 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
162 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
164 * c-typeck.c (build_asm_expr): Remove an assert checking output
165 absence for asm goto.
167 2020-11-13 Jakub Jelinek <jakub@redhat.com>
169 * c-typeck.c (c_finish_omp_clauses): Don't clear
170 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
172 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
175 * c-parser.c (c_parser_objc_class_definition): Pass the
176 location of the class name to the interface declaration.
178 2020-11-10 Strager Neds <strager.nds@gmail.com>
180 * c-decl.c (merge_decls): Use new overload of
181 set_decl_section_name.
183 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
185 * c-parser.c (c_parser_omp_target_data): Add use of
186 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
187 handled map clause kind.
188 (c_parser_omp_target_enter_data): Likewise.
189 (c_parser_omp_target_exit_data): Likewise.
190 (c_parser_omp_target): Likewise.
191 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
192 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
193 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
194 same struct field access to co-exist on OpenMP construct.
196 2020-11-07 Martin Uecker <muecker@gwdg.de>
198 * c-parser.c (c_parser_label): Implement mixing of labels and code.
199 (c_parser_all_labels): Likewise.
201 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
203 * c-parser.c (c_parser_objc_at_property_declaration):
204 Improve parsing fidelity. Associate better location info
205 with @property attributes. Clean up the interface to
206 objc_add_property_declaration ().
208 2020-11-06 Nathan Sidwell <nathan@acm.org>
210 * c-decl.c (diagnose_mismatched_decls): Rename
211 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
212 (warn_if_shadowing, implicitly_declare, names_builtin_p)
213 (collect_source_refs): Likewise.
214 * c-typeck.c (inform_declaration, inform_for_arg)
215 (convert_for_assignment): Likewise.
217 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
219 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
221 (c_parser_omp_construct): Update call.
223 2020-11-04 Jakub Jelinek <jakub@redhat.com>
226 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
227 find underlying decl to clear in the aligned_head bitmap.
229 2020-11-04 Joseph Myers <joseph@codesourcery.com>
231 * c-decl.c (handle_nodiscard_attribute): New.
232 (std_attribute_table): Add nodiscard.
233 * c-parser.c (c_parser_std_attribute): Expect argument to
234 nodiscard attribute to be a string. Do not special-case ignoring
236 * c-typeck.c (maybe_warn_nodiscard): New.
237 (build_compound_expr, emit_side_effect_warnings): Call
238 maybe_warn_nodiscard.
239 (c_process_expr_stmt, c_finish_stmt_expr): Also call
240 emit_side_effect_warnings if warn_unused_result.
242 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
244 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
246 (finish_init): Likewise.
247 (pop_init_level): Likewise.
249 2020-10-28 Joseph Myers <joseph@codesourcery.com>
251 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
252 error_at for omitted parameter name.
254 2020-10-28 Jakub Jelinek <jakub@redhat.com>
256 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
257 (c_parser_omp_clause_allocate): New function.
258 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
259 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
260 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
261 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
262 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
263 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
264 PRAGMA_OMP_CLAUSE_ALLOCATE.
265 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
267 2020-10-27 Joseph Myers <joseph@codesourcery.com>
269 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
272 2020-10-23 Marek Polacek <polacek@redhat.com>
275 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
276 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
277 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
278 * c-tree.h (char_type_p): Declare.
279 * c-typeck.c (char_type_p): No longer static.
281 2020-10-23 Martin Sebor <msebor@redhat.com>
284 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
286 2020-09-19 Martin Sebor <msebor@redhat.com>
289 * c-decl.c (lookup_last_decl): Define new function.
290 (c_decl_attributes): Call it.
291 (start_decl): Add argument and use it.
292 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
293 (get_parm_array_spec): Define new function.
294 (push_parm_decl): Call get_parm_array_spec.
295 (start_function): Call warn_parm_array_mismatch. Build attribute
296 access and add it to current function.
297 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
298 in forms of array parameters.
299 * c-tree.h (start_decl): Add argument.
301 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
303 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
306 (start_function): Adjust for above change.
307 (c_push_function_context, c_pop_function_context): Likewise.
308 * c-lang.h (struct language_function): Likewise.
309 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
310 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
312 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
313 (c_parser_switch_statement): Adjust break/switch context handling
314 and calls to renamed functions.
315 (c_parser_while_statement): Adjust break/switch context handling and
317 (c_parser_do_statement): Ditto, with DO_STMT respectively.
318 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
319 (c_parser_omp_for_loop): Adjust break/switch context handling.
320 * c-tree.h (c_break_label, c_cont_label): Delete.
321 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
322 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
323 (in_statement, switch_statement_break_seen_p): Declare.
324 (c_start_case, c_finish_case): Renamed to...
325 (c_start_switch, c_finish_switch).
326 (c_finish_bc_stmt): Adjust arguments.
327 * c-typeck.c (build_function_call_vec): Don't try to print
328 statements with %qE format.
329 (struct c_switch): Rename switch_expr field to switch_stmt.
330 Add break_stmt_seen_p field.
331 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
332 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
333 (do_case): Update for changes to struct c_switch.
334 (c_finish_case): Rename to c_finish_switch. Update for changes to
335 struct c_switch and change of representation from SWITCH_EXPR to
337 (c_finish_loop): Delete.
338 (c_finish_bc_stmt): Update to reflect changes to break/continue
339 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
340 of a GOTO_EXPR except for objc foreach loops.
342 2020-09-01 Jakub Jelinek <jakub@redhat.com>
345 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
348 2020-08-28 Martin Sebor <msebor@redhat.com>
351 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
354 2020-08-27 Martin Liska <mliska@suse.cz>
356 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
357 growth function to true.
359 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
362 * c-typeck.c (handle_omp_array_sections_1): Talk about
363 array function parameter in the error message.
365 2020-08-18 Jakub Jelinek <jakub@redhat.com>
368 * c-parser.c (c_parser_generic_selection): Change match_found from bool
369 to int, holding index of the match. Call mark_exp_read on the selector
370 expression and on expressions other than the selected one.
372 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
375 * c-typeck.c (process_init_element): Split test for whether to
376 recurse into a record, union or array into...
377 (initialize_elementwise_p): ...this new function. Don't recurse
378 into a vector type if the initialization value is also a vector.
380 2020-07-31 Richard Biener <rguenther@suse.de>
383 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
384 Define to c_common_finalize_early_debug.
386 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
388 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
389 (c_parser_omp_critical): Permit hint(0) clause without named critical.
390 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
392 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
395 * c-decl.c (finish_decl): Call target hook
396 lower_local_decl_alignment to lower local decl alignment.
398 2020-07-09 Julian Brown <julian@codesourcery.com>
399 Thomas Schwinge <thomas@codesourcery.com>
402 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
403 for standalone attach/detach clauses.
405 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
407 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
408 set, warn for conversion between pointers that point to incompatible
409 scalar storage orders.
411 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
413 * c-parser.c (c_parser_statement_after_labels): Pass correct
414 parameters to c_parser_do_statement.
416 2020-06-16 Jakub Jelinek <jakub@redhat.com>
418 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
420 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
421 premature c_fully_fold. Defer explicit c_fully_fold calls to after
423 * c-tree.h (c_in_omp_for): Declare.
424 * c-typeck.c (c_in_omp_for): Define.
425 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
426 (digest_init): Likewise.
427 (build_binary_op): Likewise.
429 2020-06-16 Jakub Jelinek <jakub@redhat.com>
431 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
432 from kind by comma rather than colon.
434 2020-06-05 Mark Wielaard <mark@klomp.org>
436 * c-decl.c (implicit_decl_warning): When warned and olddecl is
437 an undeclared builtin, then add a fixit header hint, if found.
438 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
439 warning_at about implicit builtin declaration type mismatch.
441 2020-06-03 Mark Wielaard <mark@klomp.org>
443 * c-parser.c (struct c_parser): Add seen_string_literal
445 (c_parser_consume_token): Reset seen_string_literal.
446 (c_parser_error_richloc): Add name_hint if seen_string_literal
447 and next token is a CPP_NAME and we have a missing header
448 suggestion for the name.
449 (c_parser_string_literal): Set seen_string_literal.
451 2020-06-03 Mark Wielaard <mark@klomp.org>
453 * c-parser.c (c_parser_postfix_expression_after_primary): Add
454 scope with matching_parens after CPP_OPEN_PAREN.
456 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
458 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
460 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
462 * Make-lang.in: Remove extra slash.
464 2020-05-19 Martin Liska <mliska@suse.cz>
466 * c-parser.c: Fix typo.
468 2020-05-14 Jakub Jelinek <jakub@redhat.com>
470 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
472 2020-05-07 Richard Biener <rguenther@suse.de>
475 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
478 2020-04-30 Jakub Jelinek <jakub@redhat.com>
481 * c-decl.c (set_labels_context_r): In addition to context-less
482 LABEL_DECLs adjust also LABEL_DECLs with context equal to
483 parent function if any.
484 (store_parm_decls): Adjust comment.
486 2020-04-19 Jakub Jelinek <jakub@redhat.com>
489 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
490 two CPP_COLON tokens.
492 2020-04-17 Jakub Jelinek <jakub@redhat.com>
495 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
498 2020-04-15 Jakub Jelinek <jakub@redhat.com>
501 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
502 requires directive when not at file scope.
504 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
507 * c-decl.c (c_check_in_current_scope): New function.
508 * c-tree.h (c_check_in_current_scope): Declare it.
509 * c-parser.c (c_parser_oacc_declare): Add check that variables
510 are declared in the same scope as the directive. Fix handling
513 2020-04-07 Jakub Jelinek <jakub@redhat.com>
516 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
517 if c_parser_omp_master succeeded.
519 2020-03-23 Jakub Jelinek <jakub@redhat.com>
521 PR gcov-profile/94029
523 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
524 the function_start_locus location. Don't do that afterwards for the
525 __GIMPLE body parsing.
527 2020-03-19 Jakub Jelinek <jakub@redhat.com>
529 PR gcov-profile/94029
530 * c-tree.h (finish_function): Add location_t argument defaulted to
532 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
533 set it to the locus of closing } if non-NULL.
534 (c_parser_compound_statement_nostart): Return locus of closing }.
535 (c_parser_parse_rtl_body): Likewise.
536 (c_parser_declaration_or_fndef): Propagate locus of closing } to
538 * c-decl.c (finish_function): Add end_loc argument, use it instead of
539 input_location to set function_end_locus.
541 2020-03-17 Jakub Jelinek <jakub@redhat.com>
544 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
545 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
546 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
547 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
549 (finish_incomplete_vars): New function, moved from finish_struct. Use
550 relayout_decl instead of layout_decl.
551 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
552 being TYPE_VFIELD. Use finish_incomplete_vars.
553 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
554 finish_incomplete_vars.
555 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
556 also on ENUMERAL_TYPEs.
558 2020-03-16 Jakub Jelinek <jakub@redhat.com>
561 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
563 2020-03-13 Martin Sebor <msebor@redhat.com>
566 * c-decl.c (builtin_structptr_type_count): New constant.
567 (match_builtin_function_types): Reject decls that are incompatible
568 in types pointed to by pointers.
569 (diagnose_mismatched_decls): Adjust comments.
571 2020-03-05 Joseph Myers <joseph@codesourcery.com>
574 * c-typeck.c (pop_init_level): Do not diagnose initializers as
575 empty when initialized type is error_mark_node.
576 (set_designator, process_init_element): Ignore initializers for
577 elements of a variable-size type or of error_mark_node.
579 2020-03-01 Martin Sebor <msebor@redhat.com>
582 * c-decl.c (types_close_enough_to_match): New function.
583 (match_builtin_function_types):
584 (diagnose_mismatched_decls): Add missing inform call to a warning.
586 2020-03-01 Martin Sebor <msebor@redhat.com>
589 * c-typeck.c (build_functype_attribute_variant): New function.
590 (composite_type): Call it.
592 2020-02-25 Jakub Jelinek <jakub@redhat.com>
595 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
596 Rename last argument from probablity to probability.
598 2020-02-13 Jakub Jelinek <jakub@redhat.com>
601 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
602 *expr if it has side effects.
604 2020-01-30 Jeff Law <law@redhat.com>
607 * c-parser.c (c_parser_switch_statement): Make sure to request
608 marking the switch expr as used.
610 2020-01-22 Joseph Myers <joseph@codesourcery.com>
613 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
614 argument with integer operands.
616 2020-01-16 Kerem Kat <keremkat@gmail.com>
619 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
620 to support 4 available tokens.
622 2020-01-15 Joseph Myers <joseph@codesourcery.com>
625 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
626 determine whether to set DECL_CONTEXT.
628 2020-01-13 Joseph Myers <joseph@codesourcery.com>
631 * c-typeck.c (build_c_cast): Check for expressions with integer
632 operands that can occur in an unevaluated part of an integer
633 constant expression and call note_integer_operands as needed.
635 2019-01-08 Richard Biener <rguenther@suse.de>
638 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
641 2020-01-01 Jakub Jelinek <jakub@redhat.com>
643 Update copyright years.
645 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
647 * c-decl.c (collect_source_ref_cb): Delete.
648 (for_each_global_decl): Rename into...
649 (collect_source_refs): ...this. Call collect_source_ref directly.
650 (c_parse_final_cleanups): Always call collect_source_ref on the main
653 2019-12-19 Julian Brown <julian@codesourcery.com>
654 Cesar Philippidis <cesar@codesourcery.com>
656 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
658 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
659 Allow deref (->) in variable lists if true.
660 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
661 Pass to c_parser_omp_variable_list.
662 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
663 call to c_parser_omp_variable_list.
664 (c_parser_oacc_all_clauses): Support attach and detach clauses.
665 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
666 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
667 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
668 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
669 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
670 and detach. Support deref.
671 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
672 GOMP_MAP_ALWAYS_POINTER for OpenACC.
673 (c_oacc_check_attachments): New function.
674 (c_finish_omp_clauses): Check attach/detach arguments for being
675 pointers using above. Support deref.
677 2019-12-19 Julian Brown <julian@codesourcery.com>
678 Maciej W. Rozycki <macro@codesourcery.com>
679 Tobias Burnus <tobias@codesourcery.com>
680 Thomas Schwinge <thomas@codesourcery.com>
682 * c-parser.c (c_parser_omp_clause_name): Support no_create.
683 (c_parser_oacc_data_clause): Likewise.
684 (c_parser_oacc_all_clauses): Likewise.
685 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
686 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
687 PRAGMA_OACC_CLAUSE_NO_CREATE.
688 * c-typeck.c (handle_omp_array_sections): Support
691 2019-12-09 David Malcolm <dmalcolm@redhat.com>
693 * c-objc-common.c (range_label_for_type_mismatch::get_text):
694 Replace label_text ctor calls.
696 2019-12-04 Joseph Myers <joseph@codesourcery.com>
700 * c-typeck.c (convert_lvalue_to_rvalue): Call
701 require_complete_type for arguments not of void types.
702 (build_indirect_ref): Do not diagnose dereferencing pointers to
704 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
706 2019-12-03 Joseph Myers <joseph@codesourcery.com>
709 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
710 old-style parameter definitions.
712 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
716 * c-decl.c (flexible_array_type_p): Move to common code.
718 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
720 * c-decl.c (start_decl): Allow initialization of variables whose
721 size is a POLY_INT_CST.
722 (finish_decl): Use verify_type_context to check whether the target
723 allows variables with a particular type to have static or thread-local
724 storage duration. Don't raise a second error if such variables do
725 not have a constant size.
726 (grokdeclarator): Use verify_type_context to check whether the
727 target allows fields or array elements to have a particular type.
728 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
729 the target allows pointer difference for the types involved.
730 (build_unary_op): Likewise for pointer increment and decrement.
732 2019-11-29 Joseph Myers <joseph@codesourcery.com>
734 * c-parser.c (struct c_parser): Add members raw_tokens and
736 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
737 using previously-lexed raw tokens.
738 (c_parser_peek_nth_token_raw)
739 (c_parser_check_balanced_raw_token_sequence): New functions.
740 (c_parser_nth_token_starts_std_attributes): Use
741 c_parser_check_balanced_raw_token_sequence for Objective-C.
743 2019-11-25 Joseph Myers <joseph@codesourcery.com>
746 * c-decl.c (finish_declspecs): Use int instead of decimal
747 floating-point types if decimal floating-point not supported.
749 2019-11-25 Joseph Myers <joseph@codesourcery.com>
751 * c-tree.h (struct c_declarator): Use a structure for id member.
752 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
753 declarators at the start, not when handling individual declarators
754 later. Use u.id.id instead of u.id.
755 (grokfield): Use u.id.id instead of u.id.
756 (build_id_declarator): Set u.id.id and u.id.attrs.
757 (finish_declspecs): Handle postfix attributes in case of typedef
759 * c-parser.c (c_parser_direct_declarator)
760 (c_parser_direct_declarator_inner): Place declarator for
761 attributes inside that for function or array, not outside. Set
762 u.id.attrs for identifiers.
763 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
764 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
767 2019-11-22 Jakub Jelinek <jakub@redhat.com>
770 * c-decl.c (identifier_global_tag): Define.
772 2019-11-20 Richard Biener <rguenther@suse.de>
775 * c-decl.c (grokdeclarator): Prevent inlining of nested
776 function with VLA arguments.
778 2019-11-20 Joseph Myers <joseph@codesourcery.com>
780 * c-decl.c (c_warn_type_attributes): New function.
781 (groktypename, grokdeclarator, finish_declspecs): Call
782 c_warn_type_attributes before applying attributes to types.
783 * c-tree.h (c_warn_type_attributes): Declare.
785 2019-11-19 Joseph Myers <joseph@codesourcery.com>
787 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
789 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
790 pedwarn for unknown standard attributes and return error_mark_node
793 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
795 * c-parser.c (c_parser_parse_rtl_body): Always call
796 run_rtl_passes, even if startwith pass is not provided.
798 2019-11-15 Joseph Myers <joseph@codesourcery.com>
800 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
801 duplicate standard attributes.
803 2019-11-15 Joseph Myers <joseph@codesourcery.com>
805 * c-decl.c (std_attribute_table): Add maybe_unused.
807 2019-11-15 Joseph Myers <joseph@codesourcery.com>
809 * c-decl.c (std_attribute_table): Add fallthrough.
810 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
811 attribute at top level.
813 2019-11-15 Joseph Myers <joseph@codesourcery.com>
815 * c-decl.c (std_attribute_table): New.
816 (c_init_decl_processing): Register attributes from
818 * c-parser.c (c_parser_attribute_arguments): Add arguments
819 require_string and allow_empty_args. All callers changed.
820 (c_parser_std_attribute): Set require_string argument for
821 "deprecated" attribute.
823 2019-11-14 Joseph Myers <joseph@codesourcery.com>
825 * c-parser.c (c_parser_postfix_expression)
826 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
827 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
829 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
831 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
832 of build_same_sized_truth_vector_type.
833 (build_vec_cmp): Likewise.
835 2019-11-14 Jakub Jelinek <jakub@redhat.com>
837 * c-parser.c (c_parser_omp_context_selector): Don't require score
838 argument to fit into shwi, just to be INTEGER_CST. Diagnose
841 * c-parser.c (c_parser_omp_context_selector): Rename
842 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
843 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
844 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
847 2019-11-14 Joseph Myers <joseph@codesourcery.com>
849 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
850 ctsk_tagfirstref_attrs.
851 (struct c_declspecs): Update description of attrs. Add
852 postfix_attrs and non_std_attrs_seen_p. Increase size of
853 typespec_kind bit-field.
854 (c_warn_unused_attributes): New declaration.
855 (parser_xref_tag): Update prototype.
856 * c-decl.c (c_warn_unused_attributes): New function.
857 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
858 ctsk_tagref_attrs. Handle attribute declarations.
859 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
860 (grokdeclarator): Handle standard attributes.
861 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
862 attributes to incomplete type reference.
863 (xref_tag): Update call to parser_xref_tag.
864 (declspecs_add_addrspace, declspecs_add_type)
865 (declspecs_add_scspec, declspecs_add_attrs): Set
866 non_std_attrs_seen_p.
867 (finish_declspecs): Apply postfix standard attributes to type.
868 * c-parser.c (c_token_starts_declspecs)
869 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
870 (c_parser_next_tokens_start_declaration): Update comments.
871 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
872 parser->tokens[2] to parser->tokens[1].
873 (c_parser_nth_token_starts_std_attributes)
874 (c_parser_std_attribute_specifier_sequence): New functions.
875 (c_parser_declaration_or_fndef): Add arguments have_attrs and
876 attrs. All callers changed. Handle standard attributes.
877 (c_parser_parms_declarator, c_parser_parms_list_declarator)
878 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
880 (c_parser_declspecs): Add arguments start_std_attr_ok and
881 end_std_attr_ok. All callers changed. Handle standard
883 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
884 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
885 (c_parser_compound_statement_nostart, c_parser_all_labels)
886 (c_parser_label, c_parser_statement, c_parser_for_statement):
887 Handle standard attributes.
888 * c-parser.h (c_parser_declspecs): Update prototype.
889 * gimple-parser.c (c_parser_gimple_declaration): Update call to
892 2019-11-12 Martin Liska <mliska@suse.cz>
894 * gimple-parser.c: Do not include params.h.
896 2019-11-12 Martin Liska <mliska@suse.cz>
898 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
899 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
902 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
903 Frederik Harwath <frederik@codesourcery.com>
906 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
907 (c_parser_oacc_kernels_parallel): Rename function to...
908 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
909 (c_parser_omp_construct): Update accordingly.
912 2019-11-11 Jakub Jelinek <jakub@redhat.com>
914 * c-parser.c (c_parser_translation_unit): Diagnose declare target
915 without corresponding end declare target.
917 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
919 * c-convert.c (convert): Only handle vector conversions if one of
920 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
922 * c-typeck.c (build_array_ref): Only allow vector indexing if the
923 vectors satisfy gnu_vector_type_p.
924 (build_unary_op): Only allow unary operators to be applied to
925 vectors if they satisfy gnu_vector_type_p.
926 (digest_init): Only allow by-element initialization of vectors
927 if they satisfy gnu_vector_type_p.
928 (really_start_incremental_init): Likewise.
929 (push_init_level): Likewise.
930 (pop_init_level): Likewise.
931 (process_init_element): Likewise.
932 (build_binary_op): Only allow binary operators to be applied to
933 vectors if they satisfy gnu_vector_type_p.
935 2019-11-08 Joseph Myers <joseph@codesourcery.com>
937 * c-decl.c (grokparms): Convert () in a function definition to
939 (store_parm_decls_oldstyle): Pedwarn for C2x.
940 (store_parm_decls): Update comment about () not generating a
943 2019-11-07 Joseph Myers <joseph@codesourcery.com>
945 * c-parser.c (c_parser_attribute_arguments): New function.
946 Factored out of c_parser_gnu_attribute.
947 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
948 (c_parser_balanced_token_sequence, c_parser_std_attribute)
949 (c_parser_std_attribute_specifier): New functions.
950 (c_parser_transaction_attributes): Use
951 c_parser_std_attribute_specifier.
953 2019-11-07 Joseph Myers <joseph@codesourcery.com>
955 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
956 lex_joined_string and translate_strings_p.
957 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
959 (c_parser_string_literal): New function.
960 (c_parser_static_assert_declaration_no_semi): Use
961 c_parser_string_literal. Do not set lex_untranslated_string.
962 (c_parser_asm_string_literal): Use c_parser_string_literal.
963 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
964 (c_parser_gnu_attributes): Set and restore translate_strings_p
965 instead of lex_untranslated_string.
966 (c_parser_asm_statement): Do not set lex_untranslated_string.
967 (c_parser_asm_operands): Likewise.
968 (c_parser_has_attribute_expression): Set and restore
969 translate_strings_p instead of lex_untranslated_string.
970 (c_parser_postfix_expression): Use c_parser_string_literal.
971 (pragma_lex): Likewise.
972 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
973 (c_parse_file): Set translate_strings_p.
974 * gimple-parser.c (c_parser_gimple_postfix_expression)
975 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
976 * c-parser.c (c_parser_string_literal): Declare function.
978 2019-11-02 Jakub Jelinek <jakub@redhat.com>
980 * c-parser.c (c_finish_omp_declare_variant): Use
981 omp_get_context_selector instead of c_omp_get_context_selector.
983 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
985 * c-tree.h (c_simulate_enum_decl): Declare.
986 * c-decl.c (c_simulate_enum_decl): New function.
987 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
989 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
991 * c-tree.h (c_simulate_builtin_function_decl): Declare.
992 * c-decl.c (c_simulate_builtin_function_decl): New function.
993 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
996 2019-10-28 Martin Sebor <msebor@redhat.com>
999 * c-decl.c (names_builtin_p): Define a new function.
1001 2019-10-28 Richard Biener <rguenther@suse.de>
1004 * gimple-parser.c (c_parser_parse_gimple_body): Make
1005 current_bb the entry block initially to easier recover
1007 (c_parser_gimple_compound_statement): Adjust.
1009 2019-10-24 Jakub Jelinek <jakub@redhat.com>
1011 * c-parser.c (c_finish_omp_declare_variant): Use
1012 omp_context_selector_matches instead of
1013 c_omp_context_selector_matches.
1014 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1015 attribute in between declare target and end declare target
1018 2019-10-15 Joseph Myers <joseph@codesourcery.com>
1020 * c-parser.c (c_parser_attribute_any_word): Rename to
1021 c_parser_gnu_attribute_any_word. All callers changed.
1022 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1024 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1026 (c_parser_declaration_or_fndef, c_parser_declspecs)
1027 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1028 (c_parser_struct_declaration, c_parser_declarator)
1029 (c_parser_gnu_attribute, c_parser_compound_statement)
1030 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1031 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1032 attribute-related syntax productions.
1034 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1036 * c-objc-common.c (useful_aka_type_p): Replace with...
1037 (get_aka_type): ...this new function. Given the original type,
1038 decide which aka type to print (if any). Only look through typedefs
1039 if user_facing_original_type_p.
1040 (print_type): Update accordingly.
1042 2019-10-14 Jakub Jelinek <jakub@redhat.com>
1044 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1045 into int NESTED, if it is 2, diagnose missing commas in between
1047 (c_parser_omp_context_selector): Pass 2 as last argument to
1048 c_parser_omp_all_clauses.
1050 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1052 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1053 For simd properties, put them directly into TREE_VALUE.
1054 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1055 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1056 add "omp declare variant base" attribute rather than
1057 "omp declare variant".
1059 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1061 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1063 2019-10-10 Jakub Jelinek <jakub@redhat.com>
1065 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1066 true, terminate processing on closing paren and don't skip to end of
1068 (c_parser_omp_declare_simd): Handle also declare variant.
1069 (omp_construct_selectors, omp_device_selectors,
1070 omp_implementation_selectors, omp_user_selectors): New variables.
1071 (c_parser_omp_context_selector,
1072 c_parser_omp_context_selector_specification,
1073 c_finish_omp_declare_variant): New functions.
1074 (c_finish_omp_declare_simd): Handle both declare simd and
1076 (c_parser_omp_declare): Handle declare variant.
1078 2019-10-02 Joseph Myers <joseph@codesourcery.com>
1080 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1083 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1085 * c-objc-common.c (useful_aka_type_p): New function.
1086 (print_type): Use it to decide whether an aka type is worth printing.
1088 2019-09-27 Jakub Jelinek <jakub@redhat.com>
1091 * c-parser.c (c_parser_predefined_identifier): New function.
1092 (c_parser_postfix_expression): Use it.
1093 (c_parser_omp_variable_list): Parse predefined identifiers.
1094 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1095 in shared and firstprivate clauses, even when they are predetermined
1098 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1100 * c-typeck.c (build_function_call_vec): Take the original function
1101 decl as an optional final parameter. Pass all built-in calls to
1102 check_builtin_function_arguments.
1104 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1107 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1108 of identifiers in the external scope only for variables and functions.
1110 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1113 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1115 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1118 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1119 after determining that the first token is not
1120 PRAGMA_GCC_PCH_PREPROCESS.
1122 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1124 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1125 FUNCTION_DECL to the right value in the presence of nested declarators.
1127 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1130 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1132 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1135 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1136 of a built_in_function.
1137 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1139 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1141 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1142 (c_parser_omp_clause_device_type): New function.
1143 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1144 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1145 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1146 diagnostics for declare target with clauses nested in clause-less
1147 declare target declaration-definition-seq.
1148 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1150 2019-08-09 Jakub Jelinek <jakub@redhat.com>
1152 * c-parser.c (check_no_duplicate_clause): Simplify using
1154 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1155 directive name modifiers.
1156 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1159 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1160 check_no_duplicate_clause call. Comment it out, instead emit a
1161 warning for duplicate dist_schedule clauses.
1163 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1165 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1167 2019-08-08 Jakub Jelinek <jakub@redhat.com>
1169 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1170 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1171 instead of generic_head to track duplicates.
1173 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1175 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1176 (c_parser_omp_clause_use_device_addr): New function.
1177 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1178 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1179 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1180 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1181 map or use_device_* clauses.
1182 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1183 in OpenMP, require pointer type rather than pointer or array type.
1184 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1186 2019-07-31 Jakub Jelinek <jakub@redhat.com>
1189 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1190 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1193 2019-07-25 Martin Liska <mliska@suse.cz>
1194 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1197 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1199 2019-07-25 Martin Liska <mliska@suse.cz>
1201 * c-decl.c (merge_decls): Use new macros
1202 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1204 2019-07-23 Richard Biener <rguenther@suse.de>
1206 PR tree-optimization/83518
1207 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1208 a CFG also rebuild cgraph edges.
1210 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1212 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1213 (c_parser_omp_clause_bind): New function.
1214 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1215 (OMP_LOOP_CLAUSE_MASK): Define.
1216 (c_parser_omp_loop): New function.
1217 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1218 loop combined with parallel or teams.
1219 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1220 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1222 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1225 * c-decl.c (finish_function): Check targetm.warn_func_return
1226 before issuing a -Wreturn-type warning.
1228 2019-07-12 Alexandre Oliva <oliva@adacore.com>
1230 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1231 (c_parser_compound_statement): Call it.
1233 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1235 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1236 (c_parser_omp_clause_order): New function.
1237 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1238 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1239 PRAGMA_OMP_CLAUSE_ORDER.
1240 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1242 2019-07-10 Richard Biener <rguenther@suse.de>
1244 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1245 _Literal (int *) &x for address literals.
1247 2019-07-09 Martin Sebor <msebor@redhat.com>
1250 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1252 (field_decl_cmp): Same.
1253 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1255 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1257 2019-07-09 Martin Sebor <msebor@redhat.com>
1260 * c-decl.c: Change class-key from class to struct and vice versa
1261 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1262 * gimple-parser.c: Same.
1264 2019-07-01 Richard Biener <rguenther@suse.de>
1266 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1267 _Literal (char *) &"foo" for address literals pointing to
1270 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1272 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1273 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1274 C incompatibility if alternate "__intN__" form is used.
1276 2019-06-24 Martin Sebor <msebor@redhat.com>
1278 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1280 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1282 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1283 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1284 (c_parser_omp_scan_loop_body): New function.
1285 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1286 inscan reduction clauses.
1287 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1288 non-inscan reductions on the same construct, or inscan reductions with
1289 ordered or schedule clauses, or inscan array reductions.
1291 2019-06-05 Martin Sebor <msebor@redhat.com>
1294 * c-typeck.c (c_finish_return): Only consider functions returning
1295 pointers as candidates for -Wreturn-local-addr.
1297 2019-06-05 Martin Sebor <msebor@redhat.com>
1299 * c-decl.c (start_decl): Adjust quoting and hyphenation
1301 (finish_decl): Same.
1302 (finish_enum): Same.
1303 (start_function): Same.
1304 (declspecs_add_type): Same.
1305 * c-parser.c (warn_for_abs): Same.
1306 * c-typeck.c (build_binary_op): Same.
1308 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1311 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1312 marked with an OpenACC 'routine' directive.
1315 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1316 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1319 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1320 clauses from "omp declare target" attribute.
1322 2019-05-16 Martin Sebor <msebor@redhat.com>
1324 * c-decl.c (start_decl): Quote keywords, operators, and
1325 types in diagnostics.
1326 (finish_decl): Same.
1327 * c-parser.c (c_parser_asm_statement): Same.
1328 (c_parser_conditional_expression): Same.
1329 (c_parser_transaction_cancel): Same.
1330 * c-typeck.c (c_common_type): Same.
1331 (build_conditional_expr): Same.
1332 (digest_init): Same.
1333 (process_init_element): Same.
1334 (build_binary_op): Same.
1336 2019-05-17 Richard Biener <rguenther@suse.de>
1338 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1339 (c_parser_gimple_unary_expression): Likewise.
1340 (c_parser_gimple_parentized_ternary_expression): New function.
1342 2019-05-16 Richard Biener <rguenther@suse.de>
1344 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1345 (c_parser_gimple_unary_expression): Likewise.
1347 2019-05-15 Richard Biener <rguenther@suse.de>
1349 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1352 2019-05-14 Richard Biener <rguenther@suse.de>
1354 * gimple-parser.c (c_parser_gimple_statement): Remove
1355 questionable auto-promotion to VIEW_CONVERT_EXPR.
1356 (c_parser_gimple_typespec): Split out from __MEM parsing.
1357 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1358 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1359 as __VIEW_CONVERT with -gimple.
1361 2019-05-09 Martin Liska <mliska@suse.cz>
1363 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1365 (c_parser_gimple_unary_expression): Parse also binary expression
1367 (c_parser_gimple_parentized_binary_expression): New function.
1369 2019-05-09 Martin Liska <mliska@suse.cz>
1371 * gimple-parser.c (struct gimple_parser): Add probability.
1372 for gimple_parser_edge.
1373 (gimple_parser::push_edge): Add new argument probability.
1374 (c_parser_gimple_parse_bb_spec): Parse also probability
1376 (c_parser_parse_gimple_body): Set edge probability.
1377 (c_parser_gimple_compound_statement): Consume token
1378 before calling c_parser_gimple_goto_stmt.
1380 (c_parser_gimple_statement): Pass new argument.
1381 (c_parser_gimple_goto_stmt): Likewise.
1382 (c_parser_gimple_if_stmt): Likewise.
1383 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1384 * c-parser.c (c_parser_declaration_or_fndef): Pass
1385 hot_bb_threshold argument.
1386 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1388 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1390 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1393 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1394 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1395 (c_parser_do_statement): Likewise.
1396 (c_parser_for_statement): Likewise. Formatting fixes.
1397 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1398 emit DEBUG_BEGIN_STMTs if needed.
1400 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1403 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1404 (c_start_case): Don't clear it.
1405 (do_case): Adjust c_add_case_label caller.
1406 (c_finish_case): Adjust c_do_switch_warnings caller.
1409 * c-decl.c (merge_decls): If remove is main variant and
1410 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1411 variant that has newdecl as TYPE_NAME if any.
1413 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1416 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1417 don't try to remove it from the variant list, but instead assert
1420 2019-04-01 Richard Biener <rguenther@suse.de>
1423 * c-tree.h (c_get_alias_set): Declare.
1424 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1425 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1426 as the underlying integer type.
1428 2019-03-19 Martin Sebor <msebor@redhat.com>
1430 PR tree-optimization/89688
1431 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1432 kinds of initializers.
1434 2019-03-19 Jakub Jelinek <jakub@redhat.com>
1437 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1438 return type even if quals_used is 0. Formatting fixes.
1440 2019-03-14 Richard Biener <rguenther@suse.de>
1442 * c-tree.h (enum c_declspec_il): New.
1443 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1445 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1446 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1447 (c_parser_declspecs): Adjust.
1448 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1449 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1451 (struct gimple_parser): New.
1452 (gimple_parser::push_edge): New method.
1453 (c_parser_gimple_parse_bb_spec): New helper.
1454 (c_parser_parse_gimple_body): Get start pass and IL specification.
1455 Initialize SSA and CFG.
1456 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1457 Build a gimple_parser parsing state and pass it along.
1458 (c_parser_gimple_statement): Change intermittend __PHI internal
1459 function argument for the edge.
1460 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1461 (c_parser_gimple_goto_stmt): Record edges to build.
1462 (c_parser_gimple_if_stmt): Likewise.
1463 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1464 (c_parser_gimple_or_rtl_pass_list): Likewise.
1466 2019-03-11 Martin Liska <mliska@suse.cz>
1468 * c-decl.c (check_for_loop_decls): Wrap an option name
1469 in a string format message and fix GNU coding style.
1470 * c-parser.c (c_parser_declspecs): Likewise.
1472 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1474 PR tree-optimization/89550
1475 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1477 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1478 or warning returned true.
1480 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1483 * c-typeck.c (convert_arguments): Call inform_declaration only if
1484 the previous warning_at call returned true.
1486 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1488 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1489 parameter. Adjust all users.
1490 (c_parser_oacc_simple_clause): Replace parser with loc formal
1491 parameter. Adjust all users.
1493 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1496 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1497 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1499 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1502 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1503 before c_decl_attributes rather than after it.
1505 2019-02-06 Jakub Jelinek <jakub@redhat.com>
1508 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1509 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1510 instead of 3 nested ifs.
1512 2019-02-06 Joseph Myers <joseph@codesourcery.com>
1515 * c-decl.c (finish_decl): Do not complete array types for arrays
1516 with external linkage not at file scope.
1518 2019-02-05 Richard Biener <rguenther@suse.de>
1521 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1522 all type variants when not supported.
1524 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1527 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1528 * c-decl.c (decl_jump_unsafe): Return false for
1529 C_DECL_COMPOUND_LITERAL_P decls.
1530 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1532 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1535 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1539 * c-decl.c (last_fileptr_type): Remove.
1540 (last_structptr_types): New variable.
1541 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1542 {old,new}rettype instead of the types themselves. Assert
1543 last_structptr_types array has the same number of elements
1544 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1545 argument oldtype and newtype. Instead of handling
1546 just fileptr_type_node specially, handle all builtin_structptr_types
1547 pointer nodes. Formatting fix.
1549 2019-01-24 Martin Sebor <msebor@redhat.com>
1554 * c-decl.c (match_builtin_function_types): Add arguments.
1555 (diagnose_mismatched_decls): Diagnose mismatched declarations
1556 of built-ins more strictly.
1558 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1561 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1562 on #pragma omp cancel with different modifiers.
1564 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1568 * c-typeck.c (convert_for_assignment): Upate the
1569 warn_for_address_or_pointer_of_packed_member call.
1571 2019-01-16 Tom Honermann <tom@honermann.net>
1572 Jason Merrill <jason@redhat.com>
1574 * c-typeck.c (digest_init): Revised the error message produced for
1575 ill-formed cases of array initialization with a string literal.
1576 (error_init): Make variadic.
1578 2019-01-12 Jakub Jelinek <jakub@redhat.com>
1580 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1582 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1585 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1586 if current_function_decl is non-NULL.
1588 2019-01-07 Joseph Myers <joseph@codesourcery.com>
1592 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1593 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1594 functions declared but never defined only for external scope, not
1597 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1600 * c-parser.c (c_parser_postfix_expression): Parse
1601 __builtin_convertvector.
1603 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1605 Update copyright years.
1607 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1610 * c-typeck.c (convert_for_assignment): Call
1611 warn_for_address_or_pointer_of_packed_member.
1613 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1615 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1616 a more specific error message (instead of just falling through).
1618 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1620 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1621 asm qualifier is first seen; use that to give nicer "duplicate asm
1622 qualifier" messages. Delete 'quals" variable, instead pass the
1623 "is_volatile_ flag to build_asm_stmt directly.
1624 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1625 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1627 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1629 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1630 "done" boolean variable.
1632 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1635 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1636 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1637 (build_binary_op): Use struct op_location_t and
1638 class binary_op_rich_location.
1640 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1643 * c-convert.c (convert): Call c_fully_fold before calling
1644 ubsan_instrument_float_cast.
1646 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1648 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1651 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1653 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1654 after asm. Pass a flag for it to build_asm_expr.
1655 * c-tree.h (build_asm_expr): Update declaration.
1656 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1659 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1662 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1663 combination of volatile and goto, in any order, without repetitions.
1665 2018-12-04 James Norris <jnorris@codesourcery.com>
1666 Cesar Philippidis <cesar@codesourcery.com>
1667 Julian Brown <julian@codesourcery.com>
1669 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1672 2018-11-30 Richard Biener <rguenther@suse.de>
1674 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1675 _Literal (type) { ... } as empty aggregate or vector constructor.
1677 2018-11-29 Martin Sebor <msebor@redhat.com>
1680 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1681 (convert_arguments): Add comments. Pass additional argument to
1684 2018-11-29 Martin Sebor <msebor@redhat.com>
1688 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1690 2018-11-23 Martin Sebor <msebor@redhat.com>
1693 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1694 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1696 2018-11-20 Martin Sebor <msebor@redhat.com>
1698 * c-parser.c (c_parser_has_attribute_expression): New function.
1699 (c_parser_attribute): New function.
1700 (c_parser_attributes): Move code into c_parser_attribute.
1701 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1703 2018-11-15 Martin Sebor <msebor@redhat.com>
1706 * c-decl.c (header_for_builtin_fn): Declare.
1707 (diagnose_mismatched_decls): Diagnose declarations of built-in
1708 functions without a prototype.
1709 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1710 (convert_argument): Same.
1711 (convert_arguments): Factor code out into convert_argument.
1712 Detect mismatches between built-in formal arguments in calls
1713 to built-in without prototype.
1714 (build_conditional_expr): Same.
1715 (type_or_builtin_type): New function.
1716 (convert_for_assignment): Add argument. Conditionally issue
1717 warnings instead of errors for mismatches.
1719 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1721 * c-decl.c: Replace "source_location" with "location_t".
1722 * c-tree.h: Likewise.
1723 * c-typeck.c: Likewise.
1724 * gimple-parser.c: Likewise.
1726 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1728 * c-parser.c (c_parser_omp_clause_final): Use
1729 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1730 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1731 parsing instead of c_parser_paren_condition.
1732 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1733 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1734 c_fully_fold instead of c_parser_condition.
1735 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1736 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1737 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1738 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1739 c_parser_expr_no_commas instead of c_parser_expression.
1741 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1742 reduction clause with inscan modifier.
1744 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1745 clauses other than atomic_default_mem_order.
1747 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1749 * c-parser.c: Include memmode.h.
1750 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1751 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1752 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1753 task_reduction clauses.
1754 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1755 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1756 section, or lvalue assignment expression.
1757 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1758 (c_parser_omp_clause_lastprivate): Parse optional
1759 conditional: modifier.
1760 (c_parser_omp_clause_hint): Require constant integer expression rather
1761 than just integer expression.
1762 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1764 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1765 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1766 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1768 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1769 iterators. Parse mutexinoutset and depobj kinds.
1770 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1772 (c_parser_omp_all_clauses): Likewise. Handle
1773 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1774 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1775 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1776 default memory order from requires directive if any. Adjust
1777 c_finish_omp_atomic caller.
1778 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1779 (c_parser_omp_flush): Parse flush with memory-order-clause.
1780 (c_parser_omp_for_loop): Allow NE_EXPR even in
1781 OpenMP loops, adjust c_finish_omp_for caller.
1782 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1783 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1784 Allow to be called while parsing combined parallel master.
1785 Parse combined master taskloop{, simd}.
1786 (c_parser_omp_parallel): Parse combined
1787 parallel master{, taskloop{, simd}} constructs.
1788 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1789 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1790 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1791 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1792 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1793 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1794 around teams body. Use SET_EXPR_LOCATION.
1795 (c_parser_omp_target_data): Allow target data
1796 with only use_device_ptr clauses.
1797 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1798 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1799 (c_parser_omp_requires): New function.
1800 (c_finish_taskloop_clauses): New function.
1801 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1802 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1803 declaration. Disallow in_reduction clause when combined with parallel
1805 (c_parser_omp_construct): Adjust c_parser_omp_master and
1806 c_parser_omp_taskgroup callers.
1807 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1809 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1810 like OMP_CLAUSE_REDUCTION.
1811 (handle_omp_array_sections): Likewise. Call save_expr on array
1812 reductions before calling build_index_type. Handle depend clauses
1814 (struct c_find_omp_var_s): New type.
1815 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1816 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1817 with static, runtime or auto schedule kinds. Call save_expr for whole
1818 array reduction sizes. Diagnose reductions with zero sized elements
1819 or variable length structures. Diagnose nogroup clause used with
1820 reduction clause(s). Handle depend clause with
1821 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1822 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1823 some different type for other kinds. Use build_unary_op with
1824 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1825 Handle depend clauses with iterators. Remove no longer needed special
1826 case that predetermined const qualified vars may be specified in
1827 firstprivate clause. Complain if const qualified vars are mentioned
1828 in data-sharing clauses other than firstprivate or shared. Use
1829 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1830 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1831 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1832 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1834 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1836 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1837 logic for change to name_hint::operator bool.
1838 (undeclared_variable): Likewise.
1839 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1840 (c_parser_parameter_declaration): Likewise.
1842 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1844 * c-errors.c (pedwarn_c11): New function.
1845 * c-parser.c (disable_extension_diagnostics): Save
1846 warn_c11_c2x_compat and set it to 0.
1847 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1848 (c_parser_static_assert_declaration_no_semi): Handle
1849 _Static_assert without string constant.
1850 * c-tree.h (pedwarn_c11): New prototype.
1852 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1854 * Make-lang.in (selftest-c): New.
1855 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1856 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1857 from gcc/Makefile.in.
1859 2018-10-02 Richard Biener <rguenther@suse.de>
1861 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1863 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1866 * c-typeck.c (build_binary_op): Use excess precision for
1867 comparisons of integers and floating-point for C11 and later.
1869 2018-09-26 Martin Jambor <mjambor@suse.cz>
1872 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1875 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1877 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1878 Update for new param.
1879 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1882 2018-09-17 Martin Jambor <mjambor@suse.cz>
1885 * c-parser.c: (warn_for_abs): New function.
1886 (c_parser_postfix_expression_after_primary): Call it.
1888 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1890 * c-typeck.c (digest_init): Shorten overlength strings.
1892 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1894 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1896 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1898 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1899 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1901 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1903 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1904 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1906 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1909 * c-decl.c (implicitly_declare): Update call to
1910 maybe_add_include_fixit to suggest overriding the location, as it
1912 * c-objc-common.c (c_tree_printer): Update for conversion of
1913 show_caret_p to a tri-state.
1915 2018-08-27 Martin Liska <mliska@suse.cz>
1917 * c-decl.c (locate_old_decl): Use new function
1918 fndecl_built_in_p and remove check for FUNCTION_DECL if
1920 (diagnose_mismatched_decls): Likewise.
1921 (merge_decls): Likewise.
1922 (warn_if_shadowing): Likewise.
1923 (pushdecl): Likewise.
1924 (implicitly_declare): Likewise.
1925 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1926 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1927 * c-typeck.c (build_function_call_vec): Likewise.
1928 (convert_arguments): Likewise.
1930 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1933 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1934 (diagnose_mismatched_decls): Likewise, in various places.
1935 (warn_if_shadowing): Likewise.
1936 (implicit_decl_warning): Likewise.
1937 (implicitly_declare): Likewise.
1938 (undeclared_variable): Likewise.
1939 (declare_label): Likewise.
1940 (grokdeclarator): Likewise.
1941 (start_function): Likewise.
1942 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1943 (c_parser_parameter_declaration): Likewise.
1944 (c_parser_binary_expression): Likewise.
1945 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1946 (parser_build_binary_op): Likewise.
1947 (build_unary_op): Likewise.
1948 (error_init): Likewise.
1949 (pedwarn_init): Likewise.
1950 (warning_init): Likewise.
1951 (convert_for_assignment): Likewise.
1953 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1955 * c-objc-common.c: Include "gcc-rich-location.h".
1956 (c_tree_printer): Move implemenation of '%T' to...
1957 (print_type): ...this new function.
1958 (range_label_for_type_mismatch::get_text): New function.
1959 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1960 range for the various ic_argpass cases.
1961 (class maybe_range_label_for_tree_type_mismatch): New class.
1962 (build_binary_op): Use it when calling binary_op_error.
1964 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1966 * c-decl.c (start_decl): Do not warn if variables is named as main
1967 and is a local variable.
1969 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1972 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1973 objects of unknown size.
1975 2018-08-13 Martin Sebor <msebor@redhat.com>
1977 PR tree-optimization/71625
1978 * c-parser.c (c_parser_declaration_or_fndef): Call
1979 braced_list_to_string.
1981 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1984 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1987 2018-08-01 Martin Sebor <msebor@redhat.com>
1989 PR tree-optimization/86650
1990 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1991 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1993 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1996 * c-typeck.c (init_field_decl_cmp): New function.
1997 (output_pending_init_elements): Use it for field comparisons
1998 instead of pure bit_position comparisons.
2000 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2002 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2003 type here, instead add "omp declare target implicit" attribute.
2004 (finish_decl): Diagnose vars without mappable type here.
2006 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2007 Thomas Schwinge <thomas@codesourcery.com>
2008 Cesar Philippidis <cesar@codesourcery.com>
2010 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2011 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2012 to their non-present_or_* counterparts. Make 'self' an alias to
2013 PRAGMA_OACC_CLAUSE_HOST.
2014 (c_parser_oacc_data_clause): Update GOMP mappings for
2015 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2016 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2017 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2018 Remove support for present_or_* clauses.
2019 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2020 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2021 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2022 (OACC_DATA_CLAUSE_MASK): Likewise.
2023 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2024 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2025 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2026 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2027 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2029 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2031 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2032 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2033 (c_parser_gimple_unary_expression): Likewise.
2035 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2038 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2039 before doing POINTER_DIFF_EXPR.
2041 2018-06-07 Marek Polacek <polacek@redhat.com>
2044 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2045 for loop initial declarations.
2047 2018-05-30 David Pagan <dave.pagan@oracle.com>
2050 * c-decl.c (grokdeclarator): Update check for return type warnings.
2051 (start_function): Likewise.
2052 (finish_function): Likewise.
2053 * c-typeck.c (c_finish_return): Update check for return type warnings.
2054 Pass OPT_Wreturn_type to pedwarn when appropriate.
2056 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2058 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2061 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2063 * gimple-parser.c: Include internal-fn.h.
2064 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2065 (c_parser_gimple_call_internal): New function.
2066 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2067 Fix typos in comment.
2069 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2072 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2073 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2075 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2076 fold_offsetof_1, pass argtype as TYPE to it and drop the
2079 2018-05-02 David Pagan <dave.pagan@oracle.com>
2082 * c-decl.c (old_style_parameter_scope): New function.
2083 * c-parser.c (c_parser_postfix_expression): Check for statement
2084 expressions in old-style function parameter list declarations.
2085 * c-parser.h (old_style_parameter_scope): New extern declaration.
2087 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2090 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2091 it is not TREE_STATIC.
2092 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2093 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2094 its COMPOUND_LITERAL_EXPR_DECL.
2096 2018-03-21 Joseph Myers <joseph@codesourcery.com>
2098 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2099 where all functions return the same _FloatN or _FloatNx type,
2100 treat integer types as _Float64 instead of double.
2102 2018-03-21 Jakub Jelinek <jakub@redhat.com>
2105 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2106 building vector comparison, diagnose it and return error_mark_node.
2108 2018-03-15 Jakub Jelinek <jakub@redhat.com>
2111 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2112 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2113 INTEGER_TYPE element type.
2115 2018-03-13 David Pagan <dave.pagan@oracle.com>
2118 * c-typeck.c (output_init_element): Ensure field initializer
2119 expression is always evaluated if there are side effects.
2121 2018-03-06 Jakub Jelinek <jakub@redhat.com>
2124 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2125 !building_stmt_list_p ().
2127 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2130 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2131 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2132 and include the BIND_EXPR in the list of things that need to be
2135 2018-02-09 Nathan Sidwell <nathan@acm.org>
2138 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2139 to strict_aliasing_warning.
2141 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2143 * c-typeck.c (really_start_incremental_init, push_init_level,
2144 set_nonincremental_init, output_init_element, process_init_element):
2145 Use DECL_UNNAMED_BIT_FIELD.
2147 2018-01-31 Marek Polacek <polacek@redhat.com>
2150 * c-parser.c (c_parser_compound_statement_nostart): Call
2151 expansion_point_location_if_in_system_header.
2153 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2156 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2159 2018-01-13 Jakub Jelinek <jakub@redhat.com>
2162 * c-tree.h (decl_constant_value_1): Add a bool argument.
2163 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2164 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2165 (decl_constant_value): Adjust caller.
2166 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2167 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2168 decl_constant_value returns initializer that has BLKmode or
2170 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2173 Alan Hayward <alan.hayward@arm.com>
2174 David Sherwood <david.sherwood@arm.com>
2176 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2177 TYPE_VECTOR_SUBPARTS.
2179 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2181 Update copyright years.
2183 2018-01-01 Jakub Jelinek <jakub@redhat.com>
2186 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2187 c_parser_conditional_expression, c_parser_cast_expression,
2188 c_parser_sizeof_expression, c_parser_alignof_expression,
2189 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2190 c_parser_transaction_expression): Use set_error () method instead
2191 of setting value member to error_mark_node.
2193 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2195 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2196 and _Float<N>X built-in functions.
2198 2017-12-22 Jakub Jelinek <jakub@redhat.com>
2201 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2202 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2203 incomplete vars rather than after it.
2206 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2207 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2208 and consider empty ones if there are no other stmts. For
2209 -Wunused-value walk all statements before the one only followed by
2212 2017-12-22 Mike Stump <mikestump@comcast.net>
2213 Eric Botcazou <ebotcazou@adacore.com>
2215 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2216 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2217 (c_parser_do_statement): Likewise.
2218 (c_parser_for_statement): Likewise.
2219 (c_parser_statement_after_labels): Adjust calls to above.
2220 (c_parse_pragma_ivdep): New static function.
2221 (c_parser_pragma_unroll): Likewise.
2222 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2223 <PRAGMA_UNROLL>: New case.
2225 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2227 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2228 perform_integral_promotions, digest_init): Replace Yoda conditions
2229 with typical order conditions.
2230 * c-decl.c (check_bitfield_type_and_width): Likewise.
2232 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2234 * c-typeck.c (c_safe_arg_type_equiv_p,
2235 c_safe_function_type_cast_p): New function.
2236 (build_c_cast): Implement -Wcast-function-type.
2238 2017-12-14 Richard Biener <rguenther@suse.de>
2241 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2242 like REALPART_EXPR for the behavior of whether its operand
2245 2017-12-12 Marek Polacek <polacek@redhat.com>
2248 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2250 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2252 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2253 * c-parser.c (add_debug_begin_stmt): New.
2254 (c_parser_declaration_or_fndef): Call it.
2255 (c_parser_compound_statement_nostart): Likewise.
2256 (c_parser_statement_after_labels): Likewise.
2257 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2259 2017-12-07 Joseph Myers <joseph@codesourcery.com>
2261 * c-decl.c (build_compound_literal): Add parameter alignas_align
2262 and set alignment of decl if nonzero.
2263 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2264 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2266 (c_parser_struct_declaration): Update syntax comment.
2267 (c_parser_type_name): Add alignas_ok argument and pass it to
2269 (c_parser_cast_expression): Pass true to c_parser_type_name and
2270 give error if a cast used an _Alignas specifier.
2271 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2272 give error if sizeof (type-name) used an _Alignas specifier.
2273 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2274 give error if _Alignof (type-name) used an _Alignas specifier.
2275 (c_parser_postfix_expression_after_paren_type): Check specified
2276 alignment for a compound literal and pass it to
2277 build_compound_literal.
2278 * c-parser.h (c_parser_type_name): Update prototype.
2279 * c-tree.h (build_compound_literal): Update prototype.
2281 2017-12-07 Martin Sebor <msebor@redhat.com>
2284 * c-decl.c (c_decl_attributes): Look up existing declaration and
2285 pass it to decl_attributes.
2287 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2290 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2291 reserved for use by the implementation.
2293 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2295 * c-decl.c: Include "c-family/c-spellcheck.h".
2297 2017-12-05 Martin Liska <mliska@suse.cz>
2298 Jakub Jelinek <jakub@redhat.com>
2300 * c-typeck.c (pointer_diff): Add new argument and instrument
2301 pointer subtraction.
2302 (build_binary_op): Similar for pointer comparison.
2304 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2307 * c-parser.c: Include tree-iterator.h.
2308 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2309 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2313 * c-tree.h (decl_constant_value_1): Declare.
2314 * c-typeck.c (decl_constant_value_1): New function.
2315 (decl_constant_value): Use it.
2316 * c-fold.c (c_fully_fold_internal): If in_init, use
2317 decl_constant_value_1 instead of decl_constant_value.
2319 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2321 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2323 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2326 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2327 c_switch_covers_all_cases_p returns true.
2329 2017-11-28 Julia Koval <julia.koval@intel.com>
2330 Sebastian Peryt <sebastian.peryt@intel.com>
2332 * Make-lang.in (c/c-array-notation.o): Remove.
2333 * c-array-notation.c: Delete.
2334 * c-decl.c: Remove cilkplus condition.
2335 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2336 c_parser_cilk_verify_simd, c_parser_array_notation,
2337 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2338 c_parser_cilk_simd_fn_vector_attrs,
2339 c_finish_cilk_simd_fn_tokens): Delete.
2340 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2341 (c_parser_direct_declarator_inner): Ditto.
2342 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2343 (c_parser_attributes, c_parser_compound_statement,
2344 c_parser_statement_after_labels, c_parser_if_statement,
2345 c_parser_switch_statement, c_parser_while_statement,
2346 c_parser_do_statement, c_parser_for_statement,
2347 c_parser_unary_expression, c_parser_postfix_expression,
2348 c_parser_postfix_expression_after_primary,
2349 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2350 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2352 * c-typeck.c (build_array_ref, build_function_call_vec,
2354 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2355 c_finish_loop, build_binary_op): Remove cilkplus support.
2357 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2359 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2362 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
2364 * Make-lang.in (c.install-plugin): Install backend import library.
2366 2017-11-23 Jakub Jelinek <jakub@redhat.com>
2368 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2369 pragma_stmt context.
2371 2017-11-23 Mike Stump <mikestump@comcast.net>
2372 Eric Botcazou <ebotcazou@adacore.com>
2374 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2376 (c_parser_do_statement): Likewise.
2377 (c_parser_for_statement): Likewise.
2379 2017-11-22 David Malcolm <dmalcolm@redhat.com>
2382 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2383 bool to bool *. Within '%T' handling, if showing an "aka", use
2384 "quoted" param to add appropriate quoting.
2386 2017-11-22 Marek Polacek <polacek@redhat.com>
2391 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2393 2017-11-21 David Malcolm <dmalcolm@redhat.com>
2396 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2397 earlier failed lookups.
2399 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2401 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2402 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2404 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2407 * c-decl.c: Include "c-family/known-headers.h".
2408 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2409 to known-headers.cc.
2410 (class suggest_missing_header): Move to known-header.h.
2411 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2412 than get_c_name_hint.
2414 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2416 * c-decl.c (get_c_name_hint): New function.
2417 (class suggest_missing_header): New class.
2418 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2419 suggest missing headers to the user.
2421 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2423 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2424 Include "c-family/name-hint.h"
2425 (implicit_decl_warning): Convert "hint" from
2426 const char * to name_hint. Pass location to
2427 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2428 warning was not printed.
2429 (undeclared_variable): Likewise for "guessed_id".
2430 (lookup_name_fuzzy): Convert return type from const char *
2431 to name_hint. Add location_t param.
2432 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2433 Include "c-family/name-hint.h"
2434 (c_parser_declaration_or_fndef): Convert "hint" from
2435 const char * to name_hint. Pass location to lookup_name_fuzzy.
2436 (c_parser_parameter_declaration): Likewise.
2438 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2442 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2444 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2445 handle_omp_array_sections): Likewise.
2446 (digest_init): Don't call decl_constant_value_for_optimization.
2447 * c-tree.h (decl_constant_value_for_optimization): Removed.
2448 * c-fold.c (c_fold_array_ref): New function.
2449 (c_fully_fold_internal): Add LVAL argument, propagate it through
2450 recursive calls. For VAR_P call decl_constant_value and
2451 unshare if not LVAL and either optimizing or IN_INIT. Remove
2452 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2453 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2454 (c_fully_fold): Add LVAL argument, pass it through to
2455 c_fully_fold_internal.
2456 (decl_constant_value_for_optimization): Removed.
2458 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2461 * c-parser.c (check_tgmath_function): New function.
2462 (enum tgmath_parm_kind): New enum.
2463 (c_parser_postfix_expression): Handle __builtin_tgmath.
2465 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2467 * c-decl.c (implicit_decl_warning): Update for renaming of
2468 pedwarn_at_rich_loc and warning_at_rich_loc.
2469 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2470 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2471 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2472 (c_parser_struct_or_union_specifier): Likewise for renaming of
2473 pedwarn_at_rich_loc.
2474 (c_parser_parameter_declaration): Likewise for renaming of
2476 * c-typeck.c (build_component_ref): Likewise.
2477 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2478 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2479 (set_init_label): Likewise for renaming of error_at_rich_loc.
2481 2017-10-30 Richard Biener <rguenther@suse.de>
2483 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2486 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2488 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2489 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2491 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2494 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2497 2017-10-25 Jakub Jelinek <jakub@redhat.com>
2500 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2501 newdecl to corresponding __builtin_ if any.
2503 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2506 * c-decl.c (diagnose_mismatched_decls): Use
2507 OPT_Wbuiltin_declaration_mismatch.
2509 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2511 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2512 use it to guard calls to maybe_suggest_missing_token_insertion.
2513 (c_parser_parms_list_declarator): Override default value of new
2514 "type_is_unique" param to c_parser_require.
2515 (c_parser_asm_statement): Likewise.
2516 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2519 2017-10-11 Nathan Sidwell <nathan@acm.org>
2521 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2523 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2525 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2526 operating on trees as wide_ints.
2527 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2528 (c_tree_equal): Likewise.
2530 2017-10-04 David Malcolm <dmalcolm@redhat.com>
2532 * c-decl.c (push_parm_decl): Store c_parm's location into the
2534 (build_c_parm): Add "loc" param and store it within the c_parm.
2535 * c-parser.c (struct c_parser): Add "last_token_location" field.
2536 (c_parser_consume_token): Store location of the token into the
2538 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2539 when handling a FUNCTION_DECL, if it doesn't already have them.
2540 (c_parser_parameter_declaration): Generate a location for the
2541 parameter, and pass it to the call to build_c_parm.
2542 * c-tree.h (struct c_parm): Add field "loc".
2543 (build_c_parm): Add location_t param.
2544 * c-typeck.c (get_fndecl_argument_location): New function.
2545 (inform_for_arg): New function.
2546 (convert_for_assignment): Use inform_for_arg when dealing with
2549 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2551 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2553 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2554 don't SET_DECL_C_BIT_FIELD here.
2557 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2558 instead of trying to set just TREE_READONLY manually.
2560 2017-09-16 Tom de Vries <tom@codesourcery.com>
2563 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2566 2017-09-15 Joseph Myers <joseph@codesourcery.com>
2569 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2571 (build_conditional_expr): For C11, generate result with excess
2572 precision when one argument is an integer and the other is of a
2573 type using excess precision.
2575 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2577 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2579 2017-09-13 Marek Polacek <polacek@redhat.com>
2582 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2583 than expr.original_type.
2585 2017-09-12 Nathan Sidwell <nathan@acm.org>
2587 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2588 resort_sorted_fields): Moved from c-family/c-common.c.
2589 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2591 2017-09-01 Joseph Myers <joseph@codesourcery.com>
2594 * c-typeck.c (build_atomic_assign): Handle argument with excess
2595 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2596 argument passed to build_binary_op and convert_for_assignment but
2597 not for call to c_fully_fold.
2598 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2599 Ensure build_binary_op is called with argument with original
2600 semantic type. Avoid calling c_fully_fold with an
2601 EXCESS_PRECISION_EXPR from build_binary_op.
2603 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2606 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2608 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2609 Alan Hayward <alan.hayward@arm.com>
2610 David Sherwood <david.sherwood@arm.com>
2612 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2613 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2614 m1 and m2 to the signed equivalent of a fixed-point
2617 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2619 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2620 than CAN_HAVE_LOCATION_P when determining whether to use the
2621 location_t value within "value".
2623 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2625 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2626 rather than peeking the location of the first token.
2627 * c-tree.h (c_expr::get_location): New method.
2629 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2631 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2632 to check_function_arguments.
2634 2017-08-18 Marek Polacek <polacek@redhat.com>
2636 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2639 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2642 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2643 (check_bitfield_type_and_width): Don't allow bit-field with
2644 warn_if_not_aligned type.
2646 2017-08-14 Martin Sebor <msebor@redhat.com>
2649 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2651 2017-08-11 Marek Polacek <polacek@redhat.com>
2654 * c-decl.c (pushtag): Only print inform if the warning was printed.
2655 (grokdeclarator): Likewise.
2657 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2659 * c-parser.c (c_parser_error): Rename to...
2660 (c_parser_error_richloc): ...this, making static, and adding
2661 "richloc" parameter, passing it to the c_parse_error call,
2662 rather than calling c_parser_set_source_position_from_token.
2663 (c_parser_error): Reintroduce, reimplementing in terms of the
2664 above, converting return type from void to bool.
2665 (class token_pair): New class.
2666 (struct matching_paren_traits): New struct.
2667 (matching_parens): New typedef.
2668 (struct matching_brace_traits): New struct.
2669 (matching_braces): New typedef.
2670 (get_matching_symbol): New function.
2671 (c_parser_require): Add param MATCHING_LOCATION, using it to
2672 highlight matching "opening" tokens for missing "closing" tokens.
2673 (c_parser_skip_until_found): Likewise.
2674 (c_parser_static_assert_declaration_no_semi): Convert explicit
2675 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2676 class matching_parens, so that the pertinent open parenthesis is
2677 highlighted when there are problems locating the close
2679 (c_parser_struct_or_union_specifier): Likewise.
2680 (c_parser_typeof_specifier): Likewise.
2681 (c_parser_alignas_specifier): Likewise.
2682 (c_parser_simple_asm_expr): Likewise.
2683 (c_parser_braced_init): Likewise, for matching_braces.
2684 (c_parser_paren_condition): Likewise, for matching_parens.
2685 (c_parser_switch_statement): Likewise.
2686 (c_parser_for_statement): Likewise.
2687 (c_parser_asm_statement): Likewise.
2688 (c_parser_asm_operands): Likewise.
2689 (c_parser_cast_expression): Likewise.
2690 (c_parser_sizeof_expression): Likewise.
2691 (c_parser_alignof_expression): Likewise.
2692 (c_parser_generic_selection): Likewise.
2693 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2694 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2695 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2696 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2697 c_parser_skip_until_found call.
2698 (c_parser_objc_class_definition): Use class matching_parens as
2700 (c_parser_objc_method_decl): Likewise.
2701 (c_parser_objc_try_catch_finally_statement): Likewise.
2702 (c_parser_objc_synchronized_statement): Likewise.
2703 (c_parser_objc_at_property_declaration): Likewise.
2704 (c_parser_oacc_wait_list): Likewise.
2705 (c_parser_omp_var_list_parens): Likewise.
2706 (c_parser_omp_clause_collapse): Likewise.
2707 (c_parser_omp_clause_default): Likewise.
2708 (c_parser_omp_clause_if): Likewise.
2709 (c_parser_omp_clause_num_threads): Likewise.
2710 (c_parser_omp_clause_num_tasks): Likewise.
2711 (c_parser_omp_clause_grainsize): Likewise.
2712 (c_parser_omp_clause_priority): Likewise.
2713 (c_parser_omp_clause_hint): Likewise.
2714 (c_parser_omp_clause_defaultmap): Likewise.
2715 (c_parser_oacc_single_int_clause): Likewise.
2716 (c_parser_omp_clause_ordered): Likewise.
2717 (c_parser_omp_clause_reduction): Likewise.
2718 (c_parser_omp_clause_schedule): Likewise.
2719 (c_parser_omp_clause_num_teams): Likewise.
2720 (c_parser_omp_clause_thread_limit): Likewise.
2721 (c_parser_omp_clause_aligned): Likewise.
2722 (c_parser_omp_clause_linear): Likewise.
2723 (c_parser_omp_clause_safelen): Likewise.
2724 (c_parser_omp_clause_simdlen): Likewise.
2725 (c_parser_omp_clause_depend): Likewise.
2726 (c_parser_omp_clause_map): Likewise.
2727 (c_parser_omp_clause_device): Likewise.
2728 (c_parser_omp_clause_dist_schedule): Likewise.
2729 (c_parser_omp_clause_proc_bind): Likewise.
2730 (c_parser_omp_clause_uniform): Likewise.
2731 (c_parser_omp_for_loop): Likewise.
2732 (c_parser_cilk_clause_vectorlength): Likewise.
2733 (c_parser_cilk_clause_linear): Likewise.
2734 (c_parser_transaction_expression): Likewise.
2735 * c-parser.h (c_parser_require): Add param matching_location with
2736 default UNKNOWN_LOCATION.
2737 (c_parser_error): Convert return type from void to bool.
2738 (c_parser_skip_until_found): Add param matching_location with
2739 default UNKNOWN_LOCATION.
2741 2017-08-09 Marek Polacek <polacek@redhat.com>
2743 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2744 * c-tree.h (build_external_ref): Update declaration.
2745 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2746 (build_external_ref): Change the type of a parameter to bool.
2747 (parser_build_binary_op): Use true/false instead of 1/0.
2748 (pointer_diff): Likewise.
2749 (build_modify_expr): Likewise.
2750 (set_designator): Change the type of a parameter to bool.
2751 (set_init_index): Use true/false instead of 1/0.
2752 (set_init_label): Likewise.
2753 (output_init_element): Change the type of a parameter to bool.
2754 (output_pending_init_elements): Use true/false instead of 1/0.
2755 (process_init_element): Likewise.
2756 (build_binary_op): Change the type of a parameter to bool.
2758 2017-08-09 Marek Polacek <polacek@redhat.com>
2761 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2762 Call emit_diagnostic_valist instead of pedwarn.
2763 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2764 Print the relevant types in diagnostics.
2766 2017-08-09 Marek Polacek <polacek@redhat.com>
2769 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2770 build_conditional_expr.
2771 * c-parser.c (c_parser_conditional_expression): Create locations for
2772 EXP1 and EXP2 from their source ranges. Pass the locations down to
2773 build_conditional_expr.
2774 * c-tree.h (build_conditional_expr): Update declaration.
2775 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2776 For -Wsign-compare, also print the types.
2778 2017-08-08 Martin Liska <mliska@suse.cz>
2780 * c-convert.c: Include header files.
2781 * c-typeck.c: Likewise.
2783 2017-08-07 Martin Liska <mliska@suse.cz>
2785 * c-parser.c (c_parser_attributes): Canonicalize name of an
2788 2017-08-02 Marek Polacek <polacek@redhat.com>
2791 * c-parser.c (c_parser_unary_expression): Use set_error.
2795 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2796 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2798 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2799 Martin Liska <mliska@suse.cz>
2801 * c-typeck.c (c_finish_goto_label): Build gimple predict
2804 2017-07-31 Martin Liska <mliska@suse.cz>
2807 * c-convert.c (convert): Guard condition with flag_sanitize_p
2808 also with current_function_decl non-null equality.
2809 * c-decl.c (grokdeclarator): Likewise.
2810 * c-typeck.c (build_binary_op): Likewise.
2812 2017-07-25 Marek Polacek <polacek@redhat.com>
2814 * c-decl.c (grokfield): Remove local variable.
2816 2017-07-25 Marek Polacek <polacek@redhat.com>
2819 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2820 macro expansion if the body is in { }.
2821 (c_parser_while_statement): Likewise.
2822 (c_parser_for_statement): Likewise.
2824 2017-07-18 Nathan Sidwell <nathan@acm.org>
2826 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2828 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2830 * c-decl.c (implicitly_declare): When suggesting a missing
2831 #include, provide a fix-it hint.
2833 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2835 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2836 and call that instead.
2837 * c-tree.h (selftest::run_c_tests): New decl.
2839 2017-06-26 Marek Polacek <polacek@redhat.com>
2842 * c-parser.c (c_parser_if_body): Set the location of the
2843 body of the conditional after parsing all the labels. Call
2844 warn_for_multistatement_macros.
2845 (c_parser_else_body): Likewise.
2846 (c_parser_switch_statement): Likewise.
2847 (c_parser_while_statement): Likewise.
2848 (c_parser_for_statement): Likewise.
2849 (c_parser_statement): Add a default argument. Save the location
2850 after labels have been parsed.
2851 (c_parser_c99_block_statement): Likewise.
2853 2017-06-19 Richard Biener <rguenther@suse.de>
2855 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2856 negated _Literals to parse _Literal (int) -1.
2858 2017-06-13 Martin Liska <mliska@suse.cz>
2861 * c-convert.c (convert): Use sanitize_flags_p.
2862 * c-decl.c (grokdeclarator): Likewise.
2863 * c-typeck.c (convert_for_assignment): Likewise.
2864 (c_finish_return): Likewise.
2865 (build_binary_op): Likewise.
2867 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2870 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2871 to sizetype before size_binop.
2873 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2875 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2878 2017-06-06 Marek Polacek <polacek@redhat.com>
2881 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2883 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2885 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2887 * c-parser.c (c_parser_binary_expression): Implement the
2888 -Wsizeof_pointer_div warning.
2889 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2890 from a parenthesized expression.
2891 (c_parser_expr_list): Use c_last_sizeof_loc.
2892 * c-tree.h (c_last_sizeof_loc): New external.
2893 * c-typeck.c (c_last_sizeof_loc): New variable.
2894 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2896 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2899 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2901 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2903 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2906 2017-05-24 Martin Sebor <msebor@redhat.com>
2909 * c-fold.c (c_fully_fold_internal): Adjust.
2910 * c-typeck.c (parser_build_unary_op): Adjust.
2912 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2914 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2915 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2918 2017-05-23 Marek Polacek <polacek@redhat.com>
2920 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2923 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2925 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2926 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2927 it returned invariant. Call tree_invariant_p unconditionally
2928 afterwards to decide whether to return expr or op0.
2930 2017-05-22 Nathan Sidwell <nathan@acm.org>
2932 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2934 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2936 * c-parser.c (c_parser_omp_clause_default): Handle
2937 "OMP_CLAUSE_DEFAULT_PRESENT".
2939 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2941 * config-lang.in (gtfiles): Add c-family/c-format.c.
2943 2017-05-18 Nathan Sidwell <nathan@acm.org>
2945 * c-decl.c (pushdecl_top_level): Delete unused function.
2947 2017-05-18 Marek Polacek <polacek@redhat.com>
2949 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2950 (check_earlier_gotos): Likewise.
2951 (define_label): Likewise.
2952 (pending_xref_error): Likewise.
2953 (smallest_type_quals_location): Likewise.
2954 (grokdeclarator): Likewise.
2955 (grokparms): Likewise.
2956 (identifier_global_value): Likewise.
2957 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2958 (find_init_member): Likewise.
2960 2017-05-18 Marek Polacek <polacek@redhat.com>
2962 * c-decl.c (start_decl): Use false/true instead of 0/1.
2963 (grokdeclarator): Likewise.
2964 (finish_struct): Likewise.
2965 (start_function): Change the return type to bool. Use false/true
2967 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2968 * c-tree.h (start_function): Update.
2969 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2970 (set_designator): Change the return type to bool. Use false/true
2973 2017-05-17 Marek Polacek <polacek@redhat.com>
2975 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2976 * c-typeck.c: Likewise.
2978 2017-05-17 Marek Polacek <polacek@redhat.com>
2981 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2982 DECL_IGNORED_P even for non-static compound literals.
2984 2017-05-17 Martin Liska <mliska@suse.cz>
2986 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2987 use it instead of int type.
2989 2017-05-17 Marek Polacek <polacek@redhat.com>
2991 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2993 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2994 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2995 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2996 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2998 (c_parser_conditional_expression): Likewise.
2999 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3000 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3001 (process_init_element): Likewise.
3002 (build_binary_op): Likewise.
3003 (handle_omp_array_sections_1): Likewise.
3005 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3007 * c-parser.c (c_parser_omp_clause_num_gangs)
3008 (c_parser_omp_clause_num_workers)
3009 (c_parser_omp_clause_vector_length): Merge functions into...
3010 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3013 2017-05-11 Nathan Sidwell <nathan@acm.org>
3015 * gimple-parser.c: Don't #include tree-dump.h.
3017 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3020 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3022 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3025 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3026 incorrect __MEM syntax.
3028 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3031 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3034 2017-05-09 Nathan Sidwell <nathan@acm.org>
3036 * c-tree.h (pushdecl): Declare.
3038 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3040 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3041 with diagnostic_report_diagnostic.
3042 * c-errors.c (pedwarn_c99): Likewise.
3043 (pedwarn_c90): Likewise.
3045 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3048 * c-gimplify.c (c_gimplify_expr): Remove calls to
3049 cilk_gimplifY_call_params_in_spawned_fn.
3051 2017-04-25 David Malcolm <dmalcolm@redhat.com>
3053 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3054 hint for removing extra semicolon.
3056 2017-04-21 Jakub Jelinek <jakub@redhat.com>
3059 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3060 enabled, set specs->type to integer_type_node.
3062 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3064 * c-array-notation.c: Fix typo in comment.
3066 2017-03-29 Marek Polacek <polacek@redhat.com>
3069 * c-decl.c (finish_decl): Check VAR_P.
3071 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3074 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3075 * c-typeck.c (c_mark_addressable): Likewise. Look through
3076 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3078 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3080 2017-03-23 Marek Polacek <polacek@redhat.com>
3082 * c-tree.h: Remove a C_RID_YYCODE reference.
3084 2017-03-21 Jakub Jelinek <jakub@redhat.com>
3087 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3088 optional COMPOUND_EXPR with ubsan instrumentation.
3090 2017-03-17 Marek Polacek <polacek@redhat.com>
3092 * c-parser.c: Add C11 references.
3094 2017-03-15 Marek Polacek <polacek@redhat.com>
3096 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3098 2017-03-11 Marek Polacek <polacek@redhat.com>
3100 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3102 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3104 PR translation/79848
3105 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3107 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3109 2017-03-09 Marek Polacek <polacek@redhat.com>
3112 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3113 parameter declarations with initializers.
3115 2017-03-09 Jakub Jelinek <jakub@redhat.com>
3118 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3121 2017-03-07 Jakub Jelinek <jakub@redhat.com>
3124 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3125 for "may only be used in compound statements" diagnostics, change it
3126 such that the same translatable string is used for all pragmas. For
3127 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3129 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3130 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3131 "may only be used in compound statements" diagnostics, such that the
3132 same translatable string is used for all pragmas.
3134 2017-03-04 Marek Polacek <polacek@redhat.com>
3137 * c-decl.c (implicit_decl_warning): Add missing space.
3139 2017-03-03 Marek Polacek <polacek@redhat.com>
3142 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3143 current_function_prototype_arg_types is error_mark_node. Fix
3144 formatting. Use TREE_VALUE instead of TREE_TYPE.
3146 2017-03-03 Jakub Jelinek <jakub@redhat.com>
3149 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3150 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3151 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3155 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3156 instead of %<_Generic>.
3157 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3158 (c_parser_omp_target_exit_data): Use %<release%> instead of
3161 2017-02-28 Jakub Jelinek <jakub@redhat.com>
3163 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3164 instead of just cond ? "..." : "...".
3165 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3166 for "enter"/"exit" keyword.
3167 (c_finish_oacc_routine): Don't use %s to supply portions of the
3170 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3173 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3174 handle -Wrestrict here.
3175 * c-typeck.c (build_function_call_vec): Adjust
3176 check_function_arguments caller.
3178 2017-02-23 Richard Biener <rguenther@suse.de>
3181 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3182 to initialize c_exprs to return.
3183 (c_parser_gimple_binary_expression): Likewise.
3184 (c_parser_gimple_unary_expression): Likewise.
3185 (c_parser_gimple_postfix_expression): Likewise.
3187 2017-02-22 Marek Polacek <polacek@redhat.com>
3190 * c-typeck.c (convert_arguments): Handle error_mark_node.
3192 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3194 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3195 value of c_parser_parse_ssa_name against error_mark_node and emit
3196 error if ssa name is anonymous and written as default definition.
3198 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3200 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3203 2017-02-16 Jakub Jelinek <jakub@redhat.com>
3206 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3207 ignore #pragma omp target even when not followed by identifier.
3209 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3211 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3212 (c_parser_gimple_unary_expression): Likewise.
3214 2017-02-13 Jakub Jelinek <jakub@redhat.com>
3216 * c-parser.c (c_parser_oacc_declare): Add missing space in
3219 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3222 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3223 set_c_expr_source_range when parsing ssa-name.
3225 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
3226 Richard Biener <rguenther@suse.de>
3228 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3229 building IL when arguments are error_mark_node.
3230 (c_parser_gimple_unary_expression): Likewise.
3231 (c_parser_gimple_if_stmt): Likewise.
3232 (c_parser_gimple_switch_stmt): Likewise.
3233 (c_parser_gimple_return_stmt): Likewise.
3234 (c_parser_parse_ssa_name): When name lookup fails do not build
3235 an SSA name. Use undeclared rather than not declared in error
3238 2017-02-09 Marek Polacek <polacek@redhat.com>
3241 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3242 instead of c_parser_skip_until_found.
3244 2017-02-09 Jakub Jelinek <jakub@redhat.com>
3247 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3248 symtab_node::get on automatic variables.
3250 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3251 Chung-Lin Tang <cltang@codesourcery.com>
3253 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3254 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3256 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3258 2017-02-07 Richard Biener <rguenther@suse.de>
3260 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3261 (c_parser_gimple_postfix_expression_after_primary):
3262 Do not use c_build_function_call_vec to avoid folding and promotion.
3265 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3268 * c-decl.c (pop_scope): Pass main_input_filename to
3269 build_translation_unit_decl.
3271 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3273 * c-parser.c: Include "read-rtl-function.h" and
3275 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3276 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3277 production. Update for renaming of field "gimple_pass" to
3278 "gimple_or_rtl_pass". If __RTL was seen, call
3279 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3280 to an auto_timevar, to cope with early exit.
3281 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3282 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3283 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3285 (c_parser_parse_rtl_body): New function.
3286 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3287 (struct c_declspecs): Rename field "gimple_pass" to
3288 "gimple_or_rtl_pass". Add field "rtl_p".
3289 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3290 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3291 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3292 (c_parser_gimple_or_rtl_pass_list): ...this.
3294 2017-01-20 Marek Polacek <polacek@redhat.com>
3297 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3299 2017-01-13 Richard Biener <rguenther@suse.de>
3301 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3304 2017-01-13 Richard Biener <rguenther@suse.de>
3306 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3307 _Literal ( type-name ) number.
3309 2017-01-12 Richard Biener <rguenther@suse.de>
3311 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3314 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3317 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3320 2017-01-11 Richard Biener <rguenther@suse.de>
3323 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3324 returns on parse errors.
3326 2017-01-04 Marek Polacek <polacek@redhat.com>
3329 * c-parser.c (c_parser_postfix_expression): Mark zero character
3330 constants by setting original_type in c_expr.
3331 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3332 with a zero character constant.
3333 (char_type_p): New function.
3335 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3337 * c-parser.c (c_parser_declaration_or_fndef): Create a
3338 rich_location at init_loc and parse it to start_init.
3339 (last_init_list_comma): New global.
3340 (c_parser_braced_init): Update last_init_list_comma when parsing
3341 commas. Pass it to pop_init_level. Pass location of closing
3342 brace to pop_init_level.
3343 (c_parser_postfix_expression_after_paren_type): Create a
3344 rich_location at type_loc and parse it to start_init.
3345 (c_parser_omp_declare_reduction): Likewise for loc.
3346 * c-tree.h (start_init): Add rich_location * param.
3347 (pop_init_level): Add location_t param.
3348 * c-typeck.c (struct initializer_stack): Add field
3349 "missing_brace_richloc".
3350 (start_init): Add richloc param, use it to initialize
3351 the stack node's missing_brace_richloc.
3352 (last_init_list_comma): New decl.
3353 (finish_implicit_inits): Pass last_init_list_comma to
3355 (push_init_level): When finding missing open braces, add fix-it
3356 hints to the richloc.
3357 (pop_init_level): Add "insert_before" param and pass it
3358 when calling pop_init_level. Add fixits about missing
3359 close braces to any richloc. Use the richloc for the
3360 -Wmissing-braces warning.
3361 (set_designator): Pass last_init_list_comma to pop_init_level.
3362 (process_init_element): Likewise.
3364 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3366 Update copyright years.
3368 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3371 * c-typeck.c (build_function_call_vec): If check_function_arguments
3372 returns true, set TREE_NO_WARNING on CALL_EXPR.
3375 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3376 to *expr instead of overwriting it.
3378 2016-12-20 Richard Biener <rguenther@suse.de>
3380 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3382 (c_parser_gimple_statement): Only build assigns for non-error
3384 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3386 2016-12-14 Martin Jambor <mjambor@suse.cz>
3388 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3390 (c_finish_oacc_routine): Adjusted call to
3391 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3392 to use their new names.
3393 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3395 (c_parser_oacc_update): Likewise.
3396 (c_parser_omp_simd): Likewise.
3397 (c_parser_omp_target_update): Likewise.
3398 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3399 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3401 (c_finish_omp_cancellation_point): Likewise.
3402 * gimple-parser.c: Do not include omp-low.h
3404 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3405 James Norris <jnorris@codesourcery.com>
3407 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3408 EXIT_DATA,WAIT} are not used in compound statements.
3409 (c_parser_oacc_enter_exit_data): Update diagnostics.
3411 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3414 * c-decl.c (diagnose_mismatched_decls): Use
3415 OPT_Wbuiltin_declaration_mismatch here too.
3417 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
3418 Alan Hayward <alan.hayward@arm.com>
3419 David Sherwood <david.sherwood@arm.com>
3421 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3422 (make_label, finish_struct): Likewise.
3424 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3425 Richard Biener <rguenther@suse.de>
3427 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3428 * config-lang.in (gtfiles): Add c/c-parser.h.
3429 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3430 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3431 * c-parser.c (enum c_id_kind, struct c_token,
3432 c_parser_next_token_is, c_parser_next_token_is_not,
3433 c_parser_next_token_is_keyword,
3434 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3436 * c-parser.h: ... new header.
3437 * c-parser.c: Include c-parser.h and gimple-parser.h.
3438 (c_parser_peek_token, c_parser_peek_2nd_token,
3439 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3440 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3441 c_parser_error, c_parser_require, c_parser_skip_until_found,
3442 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3443 c_parser_type_name): Export.
3444 (c_parser_tokens_buf): New function.
3445 (c_parser_error): Likewise.
3446 (c_parser_set_error): Likewise.
3447 (c_parser_declspecs): Handle RID_GIMPLE.
3448 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3449 via c_parser_parse_gimple_body.
3450 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3451 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3452 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3453 c_parser_error, c_parser_require, c_parser_skip_until_found,
3454 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3455 c_parser_type_name): Declare.
3456 (struct c_parser): Declare forward.
3457 (c_parser_tokens_buf): Declare.
3458 (c_parser_error): Likewise.
3459 (c_parser_set_error): Likewise.
3460 * gimple-parser.c: New file.
3461 * gimple-parser.h: Likewise.
3463 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3466 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3469 2016-09-11 Le-Chun Wu <lcwu@google.com>
3470 Mark Wielaard <mjw@redhat.com>
3472 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3473 to the given -Wshadow= variant.
3475 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3477 * c-typeck.c: Include memmodel.h.
3479 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3482 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3483 instead of lhd_return_null_tree_v.
3485 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3488 * c-decl.c (smallest_type_quals_location): New static function.
3489 (grokdeclarator): Try to find the correct location for an ignored
3492 2016-09-26 Marek Polacek <polacek@redhat.com>
3495 * c-decl.c (pop_scope): Add gcc_fallthrough.
3497 2016-09-26 Marek Polacek <polacek@redhat.com>
3500 * c-parser.c (struct c_token): Add flags field.
3501 (c_lex_one_token): Pass it to c_lex_with_flags.
3502 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3503 into IFN_FALLTHROUGH.
3504 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3505 attribute fallthrough after a case label or default label.
3506 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3508 2016-09-24 Marek Polacek <polacek@redhat.com>
3511 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3512 have boolean value. Warn about ++/-- on booleans.
3514 2016-09-23 Jakub Jelinek <jakub@redhat.com>
3516 * c-parser.c (incomplete_record_decls): Remove unnecessary
3517 = vNULL initialization of file scope vec.
3519 2016-09-16 Marek Polacek <polacek@redhat.com>
3521 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3523 2016-09-14 Marek Polacek <polacek@redhat.com>
3525 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3526 (fix_array_notation_expr): Likewise.
3527 * c-decl.c (finish_decl): Likewise.
3528 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3529 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3530 (function_to_pointer_conversion): Use false instead of 0.
3531 (convert_lvalue_to_rvalue): Likewise.
3532 (parser_build_unary_op): Likewise.
3533 (build_atomic_assign): Likewise.
3534 (build_unary_op): Change nonconvert parameter type to bool, use
3535 true/false instead of 1/0.
3536 (build_binary_op): Use true instead of 1.
3538 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3540 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3541 of add_fixit_insert to add_fixit_insert_before.
3543 2016-09-13 Marek Polacek <polacek@redhat.com>
3545 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3548 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3551 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3552 COMPOUND_EXPR to warn_for_omitted_condop.
3554 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3556 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3557 c_get_substring_location for this new langhook.
3559 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3562 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3564 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3565 instead of mark_exp_read on low_bound/length expression.
3566 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3567 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3568 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3569 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3570 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3571 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3572 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3573 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3574 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3575 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3576 instead of mark_expr_read.
3577 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3578 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3579 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3580 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3581 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3582 array section bases outside of depend clause, for depend clause
3583 use convert_lvalue_to_rvalue on the base.
3584 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3585 linear, aligned, map, to and from clauses.
3586 (c_omp_clause_copy_ctor): New function.
3588 2016-09-01 Marek Polacek <polacek@redhat.com>
3591 * c-typeck.c (composite_type): Add FALLTHRU comment.
3593 2016-08-31 David Malcolm <dmalcolm@redhat.com>
3595 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3596 to the insertion fixits for "struct", "union", and "enum".
3598 2016-08-30 David Malcolm <dmalcolm@redhat.com>
3600 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3601 rather than add_fixit_misspelled_id.
3602 (undeclared_variable): Likewise.
3603 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3604 now-redundant "here" params from add_fixit_insert method calls.
3605 (c_parser_parameter_declaration): Likewise.
3606 * c-typeck.c (build_component_ref): Remove now-redundant range
3607 param from add_fixit_replace method calls.
3609 2016-08-25 Marek Polacek <polacek@redhat.com>
3611 * c-typeck.c (parser_build_binary_op): Pass LHS to
3612 warn_logical_not_parentheses.
3614 2016-08-25 Marek Polacek <polacek@redhat.com>
3617 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3618 or _FloatN or _FloatNx is not supported.
3619 (finish_declspecs): Set type to integer_type_node when _FloatN or
3620 _FloatNx is not supported.
3622 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3625 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3626 (struct c_declspecs): Add field floatn_nx_idx.
3627 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3628 and _FloatNx type specifiers.
3629 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3630 (c_parser_declspecs, c_parser_attribute_any_word)
3631 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3632 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3633 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3634 narrower than double.
3636 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3637 Martin Liska <mliska@suse.cz>
3640 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3641 % to determine val element to change. Assert that
3642 wchar_bytes * charwidth fits into val array.
3644 2016-08-12 Marek Polacek <polacek@redhat.com>
3647 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3648 (c_parser_postfix_expression): Likewise.
3649 * c-typeck.c (build_unary_op): Adjust fall through comment.
3650 (c_mark_addressable): Likewise.
3652 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3655 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3656 array member through typedef, for orig_qual_indirect == 0 clear
3659 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3662 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3663 this up to selftest::run_c_tests.
3664 (selftest::run_c_tests): New function.
3666 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3668 * c-parser.c (struct oacc_routine_data): Add error_seen and
3669 fndecl_seen members.
3670 (c_finish_oacc_routine): Use these.
3671 (c_parser_declaration_or_fndef): Adjust.
3672 (c_parser_oacc_routine): Likewise. Support more C language
3673 constructs, and improve diagnostics. Move pragma context
3675 (c_parser_pragma): ... here.
3677 * c-parser.c (struct oacc_routine_data): New.
3678 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3680 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3681 declare target" attribute.
3683 2016-08-01 Jan Beulich <jbeulich@suse.com>
3685 * c-fold.c (c_fully_fold_internal): Also emit shift count
3686 warnings for vector types.
3687 * c-typeck.c (build_binary_op): Likewise.
3689 2016-07-29 Marek Polacek <polacek@redhat.com>
3692 * c-decl.c (finish_struct): Rephrase an error message.
3695 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3696 to error node for invalid code.
3699 * c-decl.c (implicitly_declare): Return decl early not only for
3700 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3702 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3705 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3706 on GNU extern inline functions.
3708 2016-07-29 Marek Polacek <polacek@redhat.com>
3711 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3714 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3716 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3718 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3720 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3722 (best_macro_match): Likewise, converting from a typedef to a
3724 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3725 (lookup_name_fuzzy): Update for change of best_macro_match to a
3726 subclass with a ctor that calls cpp_forall_identifiers.
3728 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3730 * c-decl.c (implicit_decl_warning): Update for conversion of
3731 return type of lookup_name_fuzzy to const char *.
3732 (undeclared_variable): Likewise.
3733 (lookup_name_fuzzy): Convert return type from tree to
3735 * c-parser.c (c_parser_declaration_or_fndef): Update for
3736 conversion of return type of lookup_name_fuzzy to const char *.
3737 (c_parser_parameter_declaration): Likewise.
3739 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3741 * c-parser.c (c_parser_oacc_declare): Don't scan for
3743 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3744 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3745 zero-length subarrays.
3747 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3750 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3751 instead of FUZZY_LOOKUP_NAME.
3752 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3753 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3755 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3758 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3760 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3762 * c-parser.c (c_parser_generic_selection): Make type of variable
3764 (c_parser_omp_declare_simd): Likewise.
3766 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3768 * c-decl.c (struct c_struct_parse_info): Change member types
3769 from vec to auto_vec.
3770 (start_struct): Adjust.
3771 (finish_struct): Likewise.
3773 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3776 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3778 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3780 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3781 Move pragma context checking into...
3782 (c_parser_omp_cancellation_point): ... here, and improve
3783 diagnostic messages.
3784 * c-typeck.c (c_finish_omp_cancel)
3785 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3787 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3790 * c-typeck.c (c_build_qualified_type): Don't clear
3791 C_TYPE_INCOMPLETE_VARS for the main variant.
3793 2016-06-28 Martin Sebor <msebor@redhat.com>
3796 * c-typeck.c (output_init_element): Diagnose incompatible types
3797 before non-constant initializers.
3799 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3801 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3803 2016-06-23 Andi Kleen <ak@linux.intel.com>
3805 * Make-lang.in: Add support for autofdo.
3807 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3810 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3811 (implicit_decl_warning): When issuing warnings for implicit
3812 declarations, attempt to provide a suggestion via
3814 (undeclared_variable): Likewise when issuing errors.
3815 (lookup_name_in_scope): Likewise.
3816 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3817 (best_macro_match): New typedef.
3818 (find_closest_macro_cpp_cb): New function.
3819 (lookup_name_fuzzy): New function.
3820 * c-parser.c: Include gcc-rich-location.h.
3821 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3822 (c_keyword_starts_typename): ...this new function.
3823 (c_parser_declaration_or_fndef): When issuing errors about
3824 missing "struct" etc, add a fixit. For other kinds of errors,
3825 attempt to provide a suggestion via lookup_name_fuzzy.
3826 (c_parser_parms_declarator): When looking ahead to detect typos in
3827 type names, also reject CPP_KEYWORD.
3828 (c_parser_parameter_declaration): When issuing errors about
3829 unknown type names, attempt to provide a suggestion via
3831 * c-tree.h (c_keyword_starts_typename): New prototype.
3833 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3836 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3837 c_common_type returns error_mark_node.
3839 2016-06-19 Martin Sebor <msebor@redhat.com>
3842 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3843 __alignof__ (expression).
3845 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3847 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3849 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3851 * c-typeck.c (build_component_ref): Simplify fixit code by
3852 using gcc_rich_location::add_fixit_misspelled_id.
3853 (set_init_label): Likewise.
3855 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3857 * c-parser.c (c_parser_initelt): Provide location of name for new
3858 location_t param of set_init_label.
3859 * c-tree.h (set_init_label): Add location_t param.
3860 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3861 param and use it when issuing error messages about unrecognized
3862 field names. Attempt to provide a fixit hint if appropriate,
3863 otherwise update the error message to provide the type name.
3865 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3868 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3871 2016-06-08 Martin Sebor <msebor@redhat.com>
3872 Jakub Jelinek <jakub@redhat.com>
3876 * c-typeck.c (convert_arguments): Don't promote last argument
3877 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3879 2016-06-08 Marek Polacek <polacek@redhat.com>
3882 * c-decl.c (grokdeclarator): Check TYPE_P.
3885 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3888 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3890 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3891 and structure element reference, capture the location of the
3892 element name token and pass it to build_component_ref.
3893 (c_parser_postfix_expression_after_primary): Likewise for
3894 structure element dereference.
3895 (c_parser_omp_variable_list): Likewise for
3896 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3897 * c-tree.h (build_component_ref): Add location_t param.
3898 * c-typeck.c (build_component_ref): Add location_t param
3899 COMPONENT_LOC. Use it, if available, when issuing hints about
3900 mispelled member names to provide a fixit replacement hint.
3902 2016-06-06 Marek Polacek <polacek@redhat.com>
3905 * c-parser.c (c_parser_direct_declarator): Set location.
3907 2016-06-06 Marek Polacek <polacek@redhat.com>
3909 * c-typeck.c (comptypes_internal): Handle comparisons of
3910 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3911 TYPE_REF_CAN_ALIAS_ALL.
3913 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3915 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3916 arguments as addressable when async clause exists.
3918 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3921 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3922 when combined with target construct.
3924 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3926 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3927 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3929 2016-05-25 Marek Polacek <polacek@redhat.com>
3932 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3935 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3937 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3939 * c-parser.c (c_parser_oacc_declare): Add support for
3940 GOMP_MAP_FIRSTPRIVATE_POINTER.
3941 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3942 argument with enum c_omp_region_type ort.
3943 (handle_omp_array_sections): Likewise. Update call to
3944 handle_omp_array_sections_1.
3945 (c_finish_omp_clauses): Add specific errors and warning messages for
3946 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3947 call to handle_omp_array_sections.
3949 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3951 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3953 2016-05-24 Richard Biener <rguenther@suse.de>
3957 * c-typeck.c (build_array_ref): Do not complain about indexing
3958 non-lvalue vectors. Adjust for function name change.
3960 2016-05-20 Martin Sebor <msebor@redhat.com>
3963 * c-typeck.c (error_init): Use
3964 expansion_point_location_if_in_system_header.
3965 (warning_init): Same.
3967 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3970 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3972 (c_parser_postfix_expression): Likewise.
3973 * c-tree.h (c_expr::set_error): New method.
3974 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3975 that result's range is initialized.
3977 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3979 * c-typeck.c (parser_build_unary_op): Fix formatting.
3981 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3983 * c-decl.c (grokdeclarator): Remove errmsg and use of
3984 targetm.invalid_return_type.
3985 (grokparms): Remove errmsg and use of
3986 targetm.invalid_parameter_type.
3988 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3990 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3991 function return type.
3993 2016-05-12 Marek Polacek <polacek@redhat.com>
3996 * c-decl.c (build_compound_literal): Pass LOC down to
3997 c_incomplete_type_error.
3998 * c-tree.h (require_complete_type): Adjust declaration.
3999 (c_incomplete_type_error): Likewise.
4000 * c-typeck.c (require_complete_type): Add location parameter, pass it
4001 down to c_incomplete_type_error.
4002 (c_incomplete_type_error): Add location parameter, pass it down to
4004 (build_component_ref): Pass location down to c_incomplete_type_error.
4005 (default_conversion): Pass location down to require_complete_type.
4006 (build_array_ref): Likewise.
4007 (build_function_call_vec): Likewise.
4008 (convert_arguments): Likewise.
4009 (build_unary_op): Likewise.
4010 (build_c_cast): Likewise.
4011 (build_modify_expr): Likewise.
4012 (convert_for_assignment): Likewise.
4013 (c_finish_omp_clauses): Likewise.
4015 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4018 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4020 * c-errors.c (pedwarn_c90): Return true if warned.
4021 * c-tree.h (pedwarn_c90): Change return type to bool.
4022 (enum c_declspec_word): Add new enumerator cdw_atomic.
4024 2016-05-11 Marek Polacek <polacek@redhat.com>
4027 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4028 diagnose_mismatched_attributes and call it.
4030 2016-05-10 Marek Polacek <polacek@redhat.com>
4033 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4034 on a declaration following the definition.
4036 2016-05-05 Jakub Jelinek <jakub@redhat.com>
4038 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4039 parse it through to c_parser_c99_block_statement.
4040 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4043 2016-05-04 Marek Polacek <polacek@redhat.com>
4045 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4048 2016-05-04 Marek Polacek <polacek@redhat.com>
4051 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4052 for macro expansions.
4054 2016-05-03 Marek Polacek <polacek@redhat.com>
4057 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4058 check_builtin_function_arguments.
4060 2016-05-03 Richard Biener <rguenther@suse.de>
4062 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4063 the checksum from the previous stage.
4065 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4067 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4068 c_finish_omp_clauses.
4069 (c_parser_omp_all_clauses): Likewise.
4070 (c_parser_oacc_cache): Likewise.
4071 (c_parser_oacc_loop): Likewise.
4072 (omp_split_clauses): Likewise.
4073 (c_parser_omp_declare_target): Likewise.
4074 (c_parser_cilk_all_clauses): Likewise.
4075 (c_parser_cilk_for): Likewise.
4076 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4077 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4079 2016-05-02 Marek Polacek <polacek@redhat.com>
4082 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4085 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4088 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4089 OACC_LOOP_CLAUSE_MASK.
4090 (c_parser_oacc_kernels_parallel): Update call to
4091 c_oacc_split_loop_clauses.
4093 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
4095 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4096 argument to build_modify_expr in two cases.
4098 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4100 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4101 warn_for_memset instead of warning directly here.
4103 2016-04-26 Marek Polacek <polacek@redhat.com>
4106 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4108 (c_parser_for_statement): ... here.
4109 (c_parser_if_statement): Use it.
4110 (c_parser_switch_statement): Use it.
4111 (c_parser_while_statement): Use it.
4114 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4116 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4119 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4120 instead of c_finish_cilk_clauses.
4121 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4122 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4123 floating-point variables in the linear clause for Cilk Plus.
4125 2016-04-18 Michael Matz <matz@suse.de>
4127 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4128 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4130 2016-04-15 Marek Polacek <polacek@redhat.com>
4133 * c-typeck.c (build_unary_op): Pass location down to error and
4136 2016-04-15 Jakub Jelinek <jakub@redhat.com>
4139 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4141 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4142 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4143 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4144 Adjust c_parser_pragma callers.
4145 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4147 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4149 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4150 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4151 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4152 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4153 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4154 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4155 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4156 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4158 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4159 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4162 2016-04-13 Marek Polacek <polacek@redhat.com>
4165 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4167 (c_parser_statement): Likewise.
4168 (c_parser_c99_block_statement): Likewise.
4169 (c_parser_while_statement): Likewise.
4170 (c_parser_for_statement): Likewise.
4171 (c_parser_if_body): Don't set IF_P here.
4172 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4173 about dangling else here.
4174 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4175 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4176 warn about dangling else here.
4178 2016-04-04 Marek Polacek <polacek@redhat.com>
4181 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4183 2016-03-31 Marek Polacek <polacek@redhat.com>
4186 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4188 2016-03-18 David Malcolm <dmalcolm@redhat.com>
4191 * c-parser.c (c_parser_postfix_expression): Set the source range
4192 for uses of "__builtin_types_compatible_p".
4194 2016-03-17 Jakub Jelinek <jakub@redhat.com>
4197 * c-typeck.c (composite_type): Don't count void_list_node
4198 into len, if the list is terminated by void_list_node, start
4199 with void_list_node instead of NULL for newargs. Stop
4202 2016-03-16 Marek Polacek <polacek@redhat.com>
4205 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4206 nested functions returning VM types.
4208 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4210 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4211 when calling c_finish_omp_clauses.
4213 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4216 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4219 2016-03-04 Marek Polacek <polacek@redhat.com>
4222 * c-parser.c (c_parser_postfix_expression): Call
4223 c_parser_cast_expression rather than c_parser_postfix_expression.
4225 2016-03-01 Jakub Jelinek <jakub@redhat.com>
4229 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4230 of incomplete decls to error_mark_node.
4232 2016-02-24 Marek Polacek <polacek@redhat.com>
4235 * c-decl.c (finish_decl): Don't update the copy of the type of a
4236 different decl type.
4238 2016-02-23 Jakub Jelinek <jakub@redhat.com>
4241 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4242 in id_kind reclassification.
4244 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4247 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4249 2016-02-16 James Norris <jnorris@codesourcery.com>
4252 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4254 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4256 * c-decl.c (build_null_declspecs): Zero the entire struct.
4259 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4260 callers changed. If nested_p is true, use it to call
4261 finish_implicit_inits.
4262 * c-tree.h (finish_implicit_inits): Declare.
4263 * c-typeck.c (finish_implicit_inits): New function. Move code
4265 (push_init_level): ... here.
4266 (set_designator, process_init_element): Call finish_implicit_inits.
4268 2016-02-11 Jakub Jelinek <jakub@redhat.com>
4271 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4272 arguments for -Waddress warning.
4274 2016-02-04 Jakub Jelinek <jakub@redhat.com>
4277 * c-decl.c (finish_enum): When honoring mode attribute,
4278 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4280 2016-01-29 Jakub Jelinek <jakub@redhat.com>
4283 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4284 all type variants, not just TYPE_MAIN_VARIANT.
4286 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4289 * c-decl.c (c_write_global_declarations_1): Warn with
4290 warn_unused_function if static prototype without definition
4293 2016-01-27 Marek Polacek <polacek@redhat.com>
4296 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4297 to unsigned, if needed. Add -Wsign-compare warning.
4299 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4301 PR tree-optimization/69483
4302 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4304 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4307 * c-tree.h (incomplete_record_decls): Declare.
4308 * c-parser.c (incomplete_record_decls): Define.
4309 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4310 report error if any decl has zero size.
4311 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4312 or enum type to incomplete_record_decls.
4314 2016-01-14 Tom de Vries <tom@codesourcery.com>
4316 PR tree-optimization/68773
4317 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4320 2016-01-14 Marek Polacek <polacek@redhat.com>
4323 * c-decl.c (grokdeclarator): Provide more information for invalid
4326 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4328 * c-parser.c (c_parser_unary_expression): For dereferences, build
4329 a combined location before calling build_indirect_ref, so that
4330 error reports cover the full range, manually updating the c_expr
4333 2016-01-06 Marek Polacek <polacek@redhat.com>
4336 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4337 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4340 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4342 Update copyright years.
4344 2016-01-04 Marek Polacek <polacek@redhat.com>
4347 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4348 optimization to use __atomic_fetch_* built-in if possible.
4350 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4352 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4354 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4357 2015-12-22 Marek Polacek <polacek@redhat.com>
4360 * c-typeck.c (build_component_ref): Warn when acessing elements of
4361 atomic structures or unions.
4363 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4365 * c-typeck.c: Include "gcc-rich-location.h".
4366 (build_binary_op): In the two places that call binary_op_error,
4367 create a gcc_rich_location and populate it with the location of
4368 the binary op and its two operands.
4370 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4372 * c-parser.c (c_parser_statement_after_labels): When calling
4373 c_finish_return, Use the return expression's location if it has
4374 one, falling back to the location of the first token within it.
4375 * c-typeck.c (c_finish_return): When issuing warnings about
4376 the incorrect presence/absence of a return value, issue a note
4377 showing the declaration of the function.
4379 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4381 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4383 (c_parser_peek_nth_token): New function.
4384 (c_parser_peek_conflict_marker): New function.
4385 (c_parser_error): Detect conflict markers and report them as such.
4387 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4389 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4390 to preserve range information for the primary expression
4391 in the call to c_parser_postfix_expression_after_primary.
4393 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4395 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4396 expression location, falling back on the first token location,
4397 rather than always using the latter.
4399 2015-12-16 Marek Polacek <polacek@redhat.com>
4402 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4405 2015-12-15 Marek Polacek <polacek@redhat.com>
4408 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4411 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4413 * c-parser.c (c_parser_alignof_expression): Capture location of
4414 closing parenthesis (if any), or of end of unary expression, and
4415 use it to build a src_range for the expression.
4417 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4420 * c-parser.c (c_parser_get_builtin_args): Add
4421 "out_close_paren_loc" param, and write back to it.
4422 (c_parser_postfix_expression): Capture the closing
4423 parenthesis location for RID_CHOOSE_EXPR,
4424 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4425 RID_BUILTIN_SHUFFLE and use it to set the source range
4426 for such expressions; within RID_BUILTIN_COMPLEX set
4427 the underlying location.
4429 2015-12-07 Marek Polacek <polacek@redhat.com>
4432 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4433 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4435 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4437 * c-tree.h (c_build_va_arg): Adjust prototype.
4438 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4439 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4440 parameter, adjust throughout and issue an error if EXPR is a component
4441 with reverse storage order.
4443 2015-12-02 Jason Merrill <jason@redhat.com>
4445 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4446 (c_fully_fold_internal, decl_constant_value_for_optimization):
4447 Move from c-common.c.
4448 * c-tree.h: Declare decl_constant_value_for_optimization.
4449 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4451 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4454 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4455 following link from declarator to next declarator. Track original
4456 qualified type and pass it to c_build_qualified_type.
4457 * c-typeck.c (c_build_qualified_type): Add arguments
4458 orig_qual_type and orig_qual_indirect.
4460 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4462 * c-parser.c (c_parser_omp_clause_name)
4463 (c_parser_oacc_all_clauses): Alphabetical sorting.
4465 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4468 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4471 2015-12-01 Julian Brown <julian@codesourcery.com>
4472 Cesar Philippidis <cesar@codesourcery.com>
4473 James Norris <James_Norris@mentor.com>
4475 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4476 (c_parser_oacc_clause_use_device): New function.
4477 (c_parser_oacc_all_clauses): Add use_device support.
4478 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4479 (c_parser_oacc_host_data): New function.
4480 (c_parser_omp_construct): Add host_data support.
4481 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4482 * c-typeck.c (c_finish_oacc_host_data): New function.
4483 (c_finish_omp_clauses): Add use_device support.
4485 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4488 * c-decl.c: Set TYPE_PACKED in variants.
4490 2015-11-27 Martin Liska <mliska@suse.cz>
4493 * c-array-notation.c (fix_builtin_array_notation_fn):
4494 Use release_vec_vec instead of vec::release.
4495 (build_array_notation_expr): Likewise.
4496 (fix_conditional_array_notations_1): Likewise.
4497 (fix_array_notation_expr): Likewise.
4498 (fix_array_notation_call_expr): Likewise.
4500 2015-11-27 Jakub Jelinek <jakub@redhat.com>
4503 * c-parser.c (c_parser_compound_statement_nostart): If
4504 last_label is true, use pragma_stmt instead of pragma_compound
4505 as second c_parser_pragma argument.
4506 (c_parser_omp_ordered, c_parser_omp_target_update,
4507 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4508 false as second argument to c_parser_skip_to_pragma_eol after
4509 diagnosing standalone directives used in pragma_stmt context.
4511 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4513 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4514 with "if (ENABLE_OFFLOADING)".
4516 2015-11-23 David Malcolm <dmalcolm@redhat.com>
4519 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4520 for various Objective-C constructs: Class.name syntax,
4521 @selector(), @protocol(), @encode(), and [] message syntax.
4523 2015-11-20 David Malcolm <dmalcolm@redhat.com>
4526 * c-typeck.c (should_suggest_deref_p): New function.
4527 (build_component_ref): Special-case POINTER_TYPE when
4528 generating a "not a structure of union" error message, and
4529 suggest a "->" rather than a ".", providing a fix-it hint.
4531 2015-11-19 David Malcolm <dmalcolm@redhat.com>
4533 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4534 candidate into a new function, find_closest_identifier.
4536 2015-11-19 Marek Polacek <polacek@redhat.com>
4539 * c-typeck.c (parser_build_binary_op): Properly handle
4540 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4542 2015-11-17 David Malcolm <dmalcolm@redhat.com>
4544 * c-parser.c (set_c_expr_source_range): Bulletproof both
4545 overloaded implementations against NULL expr->value.
4546 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4548 (c_parser_unary_expression): Likewise when handling addresses of
4550 (c_parser_postfix_expression): Likewise for statement expressions,
4551 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4552 __builtin_va_arg, and for __builtin_offset_of.
4553 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4554 src_range using the range of the braced initializer.
4555 (c_parser_transaction_expression): Set src_range for "ret" to a
4556 sane pair of values.
4558 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4560 * c-parser.c (c_finish_omp_declare_simd): Look for
4561 "simd" attribute as well. Update error message.
4563 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4565 * c-parser.c (c_parser_omp_declare_target): Adjust.
4567 2015-11-14 Jakub Jelinek <jakub@redhat.com>
4569 * c-typeck.c (c_finish_omp_clauses): Don't mark
4570 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4572 2015-11-14 Marek Polacek <polacek@redhat.com>
4574 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4575 * c-typeck.c: Likewise.
4577 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4579 * c-decl.c (warn_defaults_to): Pass line_table to
4581 * c-errors.c (pedwarn_c99): Likewise.
4582 (pedwarn_c90): Likewise.
4583 * c-parser.c (set_c_expr_source_range): New functions.
4584 (c_token::get_range): New method.
4585 (c_token::get_finish): New method.
4586 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4587 based on the range from the start of the LHS to the end of the
4589 (c_parser_conditional_expression): Likewise, based on the range
4590 from the start of the cond.value to the end of exp2.value.
4591 (c_parser_binary_expression): Call set_c_expr_source_range on
4592 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4593 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4594 based on the cast_loc through to the end of the expr.
4595 (c_parser_unary_expression): Likewise, based on the
4596 op_loc through to the end of op.
4597 (c_parser_sizeof_expression) Likewise, based on the start of the
4598 sizeof token through to either the closing paren or the end of
4600 (c_parser_postfix_expression): Likewise, using the token range,
4601 or from the open paren through to the close paren for
4602 parenthesized expressions.
4603 (c_parser_postfix_expression_after_primary): Likewise, for
4604 various kinds of expression.
4605 * c-tree.h (struct c_expr): Add field "src_range".
4606 (c_expr::get_start): New method.
4607 (c_expr::get_finish): New method.
4608 (set_c_expr_source_range): New decls.
4609 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4610 on ret for prefix unary ops.
4611 (parser_build_binary_op): Likewise, running from the start of
4612 arg1.value through to the end of arg2.value.
4614 2015-11-13 Marek Polacek <polacek@redhat.com>
4617 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4619 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4621 * c-typeck.c: Include spellcheck.h.
4622 (lookup_field_fuzzy_find_candidates): New function.
4623 (lookup_field_fuzzy): New function.
4624 (build_component_ref): If the field was not found, try using
4625 lookup_field_fuzzy and potentially offer a suggestion.
4627 2015-11-12 James Norris <jnorris@codesourcery.com>
4628 Joseph Myers <joseph@codesourcery.com>
4630 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4631 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4632 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4633 and PRAGMA_OMP_CLAUSE_LINK.
4634 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4635 and PRAGMA_OACC_CLAUSE_LINK.
4636 (OACC_DECLARE_CLAUSE_MASK): New definition.
4637 (c_parser_oacc_declare): New function.
4639 2015-11-12 Marek Polacek <polacek@redhat.com>
4642 * c-parser.c (c_parser_for_statement): Reclassify the token in
4645 2015-11-11 Marek Polacek <polacek@redhat.com>
4649 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4650 checking the size of an array.
4652 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4654 * c-array-notation.c: Remove unused header files.
4655 * c-aux-info.c: Likewise.
4656 * c-convert.c: Likewise.
4657 * c-decl.c: Likewise.
4658 * c-errors.c: Likewise.
4659 * c-lang.c: Likewise.
4660 * c-objc-common.c: Likewise.
4661 * c-parser.c: Likewise.
4662 * c-typeck.c: Likewise.
4663 * gccspec.c: Likewise.
4665 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4666 Cesar Philippidis <cesar@codesourcery.com>
4667 James Norris <jnorris@codesourcery.com>
4668 Julian Brown <julian@codesourcery.com>
4669 Nathan Sidwell <nathan@codesourcery.com>
4671 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4673 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4674 (c_parser_pragma): Parse 'acc routine'.
4675 (OACC_ROUTINE_CLAUSE_MARK): Define.
4676 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4678 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4681 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4682 location of the backward-goto to the start of the loop body.
4684 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4687 * c-parser.c (c_parser_while_statement): Finish the loop before
4688 parsing ahead for misleading indentation.
4689 (c_parser_for_statement): Likewise.
4691 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4693 * c-decl.c (finish_struct): If the structure has reverse storage
4694 order, rewrite the type of array fields with scalar component. Call
4695 maybe_apply_pragma_scalar_storage_order on entry.
4696 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4697 errors on bit-fields and reverse SSO here and not...
4698 (c_mark_addressable): ...here.
4699 (output_init_element): Adjust call to initializer_constant_valid_p.
4700 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4702 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4704 * c-decl.c (warn_defaults_to): Update for change in signature
4705 of diagnostic_set_info.
4706 * c-errors.c (pedwarn_c99): Likewise.
4707 (pedwarn_c90): Likewise.
4708 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4709 for textinfo::set_location.
4711 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4712 Thomas Schwinge <thomas@codesourcery.com>
4713 James Norris <jnorris@codesourcery.com>
4715 * c-parser.c (c_parser_omp_clause_name): Add support for
4716 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4717 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4718 default(none) in OpenACC.
4719 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4721 (c_parser_oacc_clause_tile): New function.
4722 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4723 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4724 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4726 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4727 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4729 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4730 (c_parser_oacc_update): Update the error message for missing clauses.
4731 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4732 and OMP_CLAUSE_INDEPENDENT.
4734 2015-11-05 Marek Polacek <polacek@redhat.com>
4737 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4738 deal with pre-evaluation on invalid types.
4740 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4741 Ilya Verbin <ilya.verbin@intel.com>
4743 * c-parser.c: Include context.h and gimple-expr.h.
4744 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4745 monotonic together with nonmonotonic.
4746 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4747 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4748 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4749 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4750 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4751 expressions on combined target teams before the target.
4752 (c_parser_omp_declare_target): If decl has "omp declare target" or
4753 "omp declare target link" attribute, and cgraph or varpool node already
4754 exists, then set corresponding flags. Call c_finish_omp_clauses
4755 in the parenthesized extended-list syntax case.
4756 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4758 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4759 on OMP_CLAUSE_REDUCTION array sections.
4760 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4761 into the constant offset, or for variable low-bound using
4762 POINTER_PLUS_EXPR. For structure element based array sections use
4763 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4764 (c_finish_omp_clauses): Drop generic_field_head, structure
4765 elements are now always mapped even as array section bases,
4766 diagnose same var in data sharing and mapping clauses. Diagnose if
4767 linear step on declare simd is neither a constant nor a uniform
4768 parameter. Look through POINTER_PLUS_EXPR for array section
4769 reductions. Diagnose the same var or function appearing multiple
4770 times on the same directive. Fix up wording for the to clause if t
4771 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4772 modifier on kinds other than dynamic or guided or nonmonotonic
4773 modifier together with ordered clause.
4775 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4776 Chung-Lin Tang <cltang@codesourcery.com>
4778 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4780 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4782 * c-array-notation.c: Reorder #include's and remove duplicates.
4783 * c-aux-info.c: Likewise.
4784 * c-convert.c: Likewise.
4785 * c-decl.c: Likewise.
4786 * c-errors.c: Likewise.
4787 * c-lang.c: Likewise.
4788 * c-objc-common.c: Likewise.
4789 * c-parser.c: Likewise.
4790 * c-typeck.c: Likewise.
4792 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4795 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4796 after calling build_qualified_type.
4798 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4799 Thomas Schwinge <thomas@codesourcery.com>
4800 James Norris <jnorris@codesourcery.com>
4801 Joseph Myers <joseph@codesourcery.com>
4802 Julian Brown <julian@codesourcery.com>
4803 Bernd Schmidt <bschmidt@redhat.com>
4805 * c-parser.c (c_parser_oacc_shape_clause): New.
4806 (c_parser_oacc_simple_clause): New.
4807 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4808 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4810 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4811 James Norris <jnorris@codesourcery.com>
4812 Cesar Philippidis <cesar@codesourcery.com>
4816 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4817 parameters, and handle these. Adjust all users.
4818 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4820 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4822 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4824 (c_finish_omp_construct): Declare function.
4825 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4826 Merge functions into...
4827 (c_finish_omp_construct): ... this new function.
4829 2015-10-22 Richard Biener <rguenther@suse.de>
4831 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4832 before folding a MINUS_EXPR.
4834 2015-10-21 Marek Polacek <polacek@redhat.com>
4837 * c-decl.c (start_function): Warn about vararg functions without
4840 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4842 * c-typeck.c (build_conditional_expr): Use boolean vector
4843 type for vector comparison.
4844 (build_vec_cmp): New.
4845 (build_binary_op): Use build_vec_cmp for comparison.
4847 2015-10-20 Marek Polacek <polacek@redhat.com>
4849 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4851 2015-10-20 Marek Polacek <polacek@redhat.com>
4854 * c-parser.c (c_parser_attributes): Break out of the loop if the
4855 token after an attribute isn't a comma.
4857 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4858 Aldy Hernandez <aldyh@redhat.com>
4860 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4861 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4862 (c_parser_omp_variable_list): Handle structure elements for
4863 map, to and from clauses. Handle array sections in reduction
4864 clause. Formatting fixes.
4865 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4866 if clause modifiers.
4867 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4868 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4869 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4870 c_parser_omp_clause_is_device_ptr): New functions.
4871 (c_parser_omp_clause_ordered): Parse optional parameter.
4872 (c_parser_omp_clause_reduction): Handle array reductions.
4873 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4874 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4876 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4877 (c_parser_omp_clause_depend_sink): New function.
4878 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4879 (c_parser_omp_clause_map): Parse release/delete map kinds and
4880 optional always modifier.
4881 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4882 and c_finish_omp_clauses callers.
4883 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4884 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4885 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4886 (OMP_CRITICAL_CLAUSE_MASK): Define.
4887 (c_parser_omp_critical): Parse critical clauses.
4888 (c_parser_omp_for_loop): Handle doacross loops, adjust
4889 c_finish_omp_for and c_finish_omp_clauses callers.
4890 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4891 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4892 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4893 (c_parser_omp_for): Disallow ordered clause when combined with
4894 distribute. Disallow linear clause when combined with distribute
4895 and not combined with simd.
4896 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4897 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4898 parse clauses and if depend clause is found, don't parse a body.
4899 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4900 Allow target parallel without for after it.
4901 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4902 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4903 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4905 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4906 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4907 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4908 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4910 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4911 defaultmap and is_device_ptr clauses.
4912 (c_parser_omp_target): Parse target parallel and target simd. Set
4913 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4914 and target exit data. Diagnose invalid map kinds.
4915 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4916 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4918 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4920 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4921 (c_parser_omp_taskloop): New function.
4922 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4923 handle PRAGMA_OMP_TASKLOOP.
4924 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4925 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4926 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4927 Add IS_OMP argument, handle structure element bases, diagnose
4928 bitfields, pass IS_OMP recursively, diagnose known zero length
4929 array sections in depend clauses, handle array sections in reduction
4930 clause, diagnose negative length even for pointers.
4931 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4932 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4933 array sections in reduction clause, set
4934 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4935 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4936 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4937 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4939 2015-10-06 Marek Polacek <polacek@redhat.com>
4941 * c-parser.c (c_parser_statement_after_labels): Use
4942 protected_set_expr_location.
4943 (c_parser_omp_clause_num_gangs): Likewise.
4944 (c_parser_omp_clause_num_threads): Likewise.
4945 (c_parser_omp_clause_num_workers): Likewise.
4946 (c_parser_omp_clause_vector_length): Likewise.
4947 (c_parser_omp_clause_num_teams): Likewise.
4948 (c_parser_omp_clause_thread_limit): Likewise.
4949 * c-typeck.c (build_c_cast): Likewise.
4950 (c_cast_expr): Likewise.
4952 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4954 * c-typeck.c (c_tree_equal): Use real_equal instead of
4957 2015-10-04 Jason Merrill <jason@redhat.com>
4959 * c-parser.c (c_lex_one_token): Handle @synchronized.
4960 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4961 can change whether the function is transaction_safe.
4963 2015-10-02 Marek Polacek <polacek@redhat.com>
4966 * c-typeck.c (convert_for_assignment): Use the expansion point
4967 location throughout.
4969 2015-10-02 Marek Polacek <polacek@redhat.com>
4972 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4973 and pass it down to c_parser_if_statement.
4974 (c_parser_else_body): Add CHAIN parameter and pass it down to
4975 c_parser_statement_after_labels.
4976 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4977 duplicated if-else-if conditions.
4979 2015-10-01 Marek Polacek <polacek@redhat.com>
4981 * c-typeck.c (convert_for_assignment): Improve commentary.
4983 2015-09-30 Marek Polacek <polacek@redhat.com>
4986 * c-typeck.c (c_finish_return): Use the expansion point location for
4987 certain "return with value" warnings.
4989 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4991 * c-parser.c (pragma_lex): Add loc argument.
4993 2015-09-15 Marek Polacek <polacek@redhat.com>
4996 * c-decl.c (tag_exists_p): New function.
4997 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4998 struct/union/enum keywords are missing.
4999 * c-tree.h (tag_exists_p): Declare.
5001 2015-09-15 Marek Polacek <polacek@redhat.com>
5003 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5004 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5005 Return NULL_TREE instead of 0.
5006 (lookup_name): Return NULL_TREE instead of 0.
5007 (lookup_name_in_scope): Likewise.
5008 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5009 (parser_xref_tag): Use false instead of 0.
5010 (start_struct): Use true instead of 1.
5011 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5013 2015-09-14 Marek Polacek <polacek@redhat.com>
5015 * c-typeck.c (set_nonincremental_init_from_string): Use
5016 HOST_WIDE_INT_M1U when shifting a negative value.
5018 2015-09-09 Mark Wielaard <mjw@redhat.com>
5020 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5023 2015-09-10 Jakub Jelinek <jakub@redhat.com>
5026 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5027 into OMP_FOR_PRE_BODY rather than before the loop.
5029 2015-09-09 Jakub Jelinek <jakub@redhat.com>
5032 * c-parser.c (c_parser_oacc_all_clauses,
5033 c_parser_omp_all_clauses): Remove invalid clause from
5034 list of clauses even if parser->error is set.
5037 * c-parser.c (c_parser_omp_clause_aligned,
5038 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5040 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5044 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5045 instead of c_parser_unary_expression. If the result is !lvalue_p,
5046 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5048 2015-09-04 Marek Polacek <polacek@redhat.com>
5051 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5053 2015-09-03 Martin Sebor <msebor@redhat.com>
5056 * c-typeck.c (convert_arguments, parser_build_unary_op,
5057 build_conditional_expr, c_cast_expr, convert_for_assignment,
5058 build_binary_op, _objc_common_truthvalue_conversion): Call
5060 (c_decl_implicit): Define.
5062 2015-09-02 Marek Polacek <polacek@redhat.com>
5065 * c-parser.c (c_parser_enum_specifier): Give a better error for
5068 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5070 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5072 2015-08-12 Marek Polacek <polacek@redhat.com>
5074 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5077 2015-08-03 Marek Polacek <polacek@redhat.com>
5080 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5082 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5084 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5086 * c-parser.c (c_parser_if_body): Take token_indent_info
5087 argument. Call warn_for_misleading_indentation even when the
5088 body is a semicolon. Extract token_indent_infos corresponding
5089 to the guard, body and next tokens. Adjust call to
5090 warn_for_misleading_indentation accordingly.
5091 (c_parser_else_body): Likewise.
5092 (c_parser_if_statement): Likewise.
5093 (c_parser_while_statement): Likewise.
5094 (c_parser_for_statement): Likewise.
5096 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5097 Manuel López-Ibáñez <manu@gcc.gnu.org>
5099 * c-decl.c (get_parm_info): Remove static var. Update warning
5102 2015-07-27 Marek Polacek <polacek@redhat.com>
5106 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5108 2015-07-20 Marek Polacek <polacek@redhat.com>
5111 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5112 (build_binary_op): Warn about left shift overflows.
5114 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5116 * c-array-notation.c: Adjust includes for flags.h changes.
5117 * c-objc-common.c: Likewise.
5119 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5121 * c-array-notation.c: Adjust includes.
5122 * c-aux-info.c: Likewise.
5123 * c-convert.c: Likewise.
5124 * c-decl.c: Likewise.
5125 * c-errors.c: Likewise.
5126 * c-lang.c: Likewise.
5127 * c-objc-common.c: Likewise.
5128 * c-parser.c: Likewise.
5129 * c-typeck.c: Likewise.
5131 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5134 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5136 2015-06-29 Marek Polacek <polacek@redhat.com>
5139 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5140 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5141 about -Wswitch-bool here.
5142 (do_case): Update c_add_case_label call.
5143 (c_finish_case): Update c_do_switch_warnings call.
5145 2015-06-27 Marek Polacek <polacek@redhat.com>
5147 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5149 2015-06-26 Marek Polacek <polacek@redhat.com>
5151 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5153 * c-typeck.c (array_to_pointer_conversion): Likewise.
5154 (build_unary_op): Likewise.
5155 (c_finish_return): Likewise.
5157 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5159 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5160 * c-parser.c: Likewise.
5162 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5164 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5165 instead of pointer_hash.
5166 (detect_field_duplicates): Likewise.
5168 2015-06-25 Marek Polacek <polacek@redhat.com>
5170 * c-array-notation.c: Use VAR_P throughout.
5171 * c-decl.c: Likewise.
5172 * c-objc-common.c: Likewise.
5173 * c-parser.c: Likewise.
5174 * c-typeck.c: Likewise.
5176 2015-06-25 Marek Polacek <polacek@redhat.com>
5178 * c-decl.c: Use is_global_var throughout.
5179 * c-parser.c: Likewise.
5180 * c-typeck.c: Likewise.
5182 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5184 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5185 * c-aux-info.c: Likewise.
5186 * c-convert.c: Likewise.
5187 * c-decl.c: Likewise.
5188 * c-errors.c: Likewise.
5189 * c-lang.c: Likewise.
5190 * c-objc-common.c: Likewise.
5191 * c-parser.c: Likewise.
5192 * c-typeck.c: Likewise.
5194 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
5197 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5200 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5202 * c-decl.c (pop_scope): Register the main translation unit
5203 through the new debug hook.
5205 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5207 * c-array-notation.c : Adjust include files.
5208 * c-aux-info.c : Likewise.
5209 * c-convert.c : Likewise.
5210 * c-decl.c : Likewise.
5211 * c-errors.c : Likewise.
5212 * c-lang.c : Likewise.
5213 * c-lang.h : Likewise.
5214 * c-objc-common.c : Likewise.
5215 * c-parser.c : Likewise.
5216 * c-typeck.c : Likewise.
5218 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5220 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5221 immediately clobber it.
5222 (c_write_global_declarations_1): Remove call to
5223 check_global_declaration_1.
5224 (c_write_global_declarations_2): Remove.
5225 (c_write_final_cleanups): Rename from c_write_global_declarations.
5226 Remove call to finalize_compilation_unit.
5227 Remove calls to debugging hooks.
5228 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5229 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5230 * c-tree.h: Remove c_write_global_declarations.
5232 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5234 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5235 * c-aux-info.c: Likewise.
5236 * c-convert.c: Likewise.
5237 * c-decl.c: Likewise.
5238 * c-errors.c: Likewise.
5239 * c-lang.c: Likewise.
5240 * c-objc-common.c: Likewise.
5241 * c-parser.c: Likewise.
5242 * c-typeck.c: Likewise.
5244 2015-06-04 Marek Polacek <polacek@redhat.com>
5247 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5250 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5252 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5253 Warn for empty struct.
5254 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5256 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5258 * c-decl.c (start_function): Call plugin before parsing.
5259 (finish_function): Call plugin after parsing.
5261 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5264 * c-decl.c (merge_decls): Merge DECL_COMMON.
5266 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
5268 * Make-lang.in (check_gcc_pallelize): Define.
5270 2015-05-22 Marek Polacek <polacek@redhat.com>
5273 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5276 2015-05-21 Marek Polacek <polacek@redhat.com>
5278 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5281 2015-05-20 Marek Polacek <polacek@redhat.com>
5283 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5284 * c-typeck.c: Likewise.
5286 2015-05-19 Marek Polacek <polacek@redhat.com>
5288 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5290 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5293 * c-parser.c (c_parser_omp_for_loop): Don't add
5294 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5295 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5296 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5299 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5301 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5304 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5307 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5310 2015-05-14 Marek Polacek <polacek@redhat.com>
5314 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5317 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5319 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5320 to add a call to warn_for_misleading_indentation.
5321 (c_parser_else_body): Likewise, adding param "else_loc".
5322 (c_parser_if_statement): Check for misleading indentation.
5323 (c_parser_while_statement): Likewise.
5324 (c_parser_for_statement): Likewise.
5326 2015-05-08 Marek Polacek <polacek@redhat.com>
5329 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5330 (output_init_element): Likewise.
5332 2015-05-07 Marek Polacek <polacek@redhat.com>
5335 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5338 2015-04-30 Marek Polacek <polacek@redhat.com>
5340 * c-typeck.c (set_init_label): Call error_at instead of error and
5343 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5346 * c-typeck.c (c_build_va_arg): Clarify the error message.
5348 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5350 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5351 OMP_STANDALONE_CLAUSES.
5353 2015-04-28 Marek Polacek <polacek@redhat.com>
5355 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5357 2015-04-28 Marek Polacek <polacek@redhat.com>
5360 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5362 2015-04-25 Marek Polacek <polacek@redhat.com>
5365 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5368 2015-04-23 Marek Polacek <polacek@redhat.com>
5371 * c-decl.c (set_labels_context_r): New function.
5372 (store_parm_decls): Call it via walk_tree_without_duplicates.
5373 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5374 instead of create_tmp_var. Build TARGET_EXPR instead of
5376 (build_atomic_assign): Use create_tmp_var_raw instead of
5377 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5379 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5381 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5382 (c_parser_omp_target_update): Add missed %> to error_at ().
5384 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5387 * c-decl.c (c_default_pointer_mode): Remove definition.
5388 * c-tree.h (c_default_pointer_mode): Remove declaration.
5390 2015-03-27 Tobias Burnus <burnus@net-b.de>
5393 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5395 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5396 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5397 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5399 2015-03-19 Jakub Jelinek <jakub@redhat.com>
5401 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5402 attribute for DECL_EXTERNAL VAR_DECLs.
5404 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5406 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5409 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5412 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5413 before preparing arguments to warn_logical_not_parentheses.
5415 2015-03-09 Jakub Jelinek <jakub@redhat.com>
5418 * c-typeck.c (parser_build_binary_op): Don't warn for
5419 !!x == y or !b == y where b is _Bool.
5421 2015-03-09 Marek Polacek <polacek@redhat.com>
5423 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5424 * c-decl.c (grokdeclarator): Likewise.
5425 * c-typeck.c (build_binary_op): Likewise.
5427 2015-02-27 Marek Polacek <polacek@redhat.com>
5430 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5432 2015-02-14 Marek Polacek <polacek@redhat.com>
5435 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5436 declared through a typedef name.
5438 2015-02-13 Marek Polacek <polacek@redhat.com>
5441 * c-decl.c (grokdeclarator): Print also the type when giving
5442 the error message about array's incomplete element type.
5444 2015-02-11 Jakub Jelinek <jakub@redhat.com>
5447 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5448 check in the POP macro.
5450 2015-02-09 Marek Polacek <polacek@redhat.com>
5453 * c-typeck.c (process_init_element): Don't always wrap
5454 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5455 initializing a range of elements.
5457 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5461 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5463 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5465 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5466 processing enum declaration.
5468 2015-01-29 Marek Polacek <polacek@redhat.com>
5471 * c-typeck.c (pop_init_level): If constructor_elements has
5472 exactly one element with integer_zerop value, set constructor_zeroinit
5473 to 1. Remove braces around warning_init call.
5475 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5478 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5479 of FUNCTION_DECLs with error_mark_node.
5481 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5484 * c-typeck.c (convert_arguments): Return -1 if there are
5485 error_args, even if we've diagnosed too many arguments.
5487 2015-01-21 Richard Biener <rguenther@suse.de>
5490 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5491 for builtins the user declared correctly.
5493 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5494 Bernd Schmidt <bernds@codesourcery.com>
5495 Cesar Philippidis <cesar@codesourcery.com>
5496 James Norris <jnorris@codesourcery.com>
5497 Jakub Jelinek <jakub@redhat.com>
5498 Ilmir Usmanov <i.usmanov@samsung.com>
5500 * c-parser.c: Include "gomp-constants.h".
5501 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5502 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5503 Use OMP_CLAUSE_SET_MAP_KIND.
5504 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5505 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5506 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5507 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5508 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5509 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5510 "copyout", "create", "delete", "deviceptr", "gang", "host",
5511 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5512 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5513 "present_or_create", "pcreate", "seq", "self", "vector",
5514 "vector_length", "wait", "worker".
5515 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5516 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5517 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5518 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5519 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5520 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5521 (c_parser_oacc_data_clause_deviceptr)
5522 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5523 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5524 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5525 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5526 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5527 (c_parser_oacc_parallel, c_parser_oacc_update)
5528 (c_parser_oacc_wait): New functions.
5529 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5530 (c_finish_oacc_data): New prototypes.
5531 * c-typeck.c: Include "gomp-constants.h".
5532 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5533 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5534 OMP_CLAUSE_SET_MAP_KIND.
5535 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5536 (c_finish_oacc_data): New functions.
5537 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5538 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5539 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5540 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5541 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5542 GOMP_MAP_FORCE_DEVICEPTR.
5544 2015-01-09 Michael Collison <michael.collison@linaro.org>
5546 * c-array-notation.c: Include hash-set.h, machmode.h,
5547 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5548 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5549 * c-aux-info.c: Ditto.
5550 * c-convert.c: Ditto.
5552 * c-errors.c: Ditto.
5553 * c-lang.c: Dittoxs.
5554 * c-objc-common.c: Ditto.
5555 * c-parser.c: Ditto.
5556 * c-typeck.c: Include hash-set.h, machmode.h,
5557 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5558 fold-const.h, wide-int.h, inchash.h, real.h and
5559 fixed-value.h due to flattening of tree.h.
5561 2015-01-07 Marek Polacek <polacek@redhat.com>
5564 * c-typeck.c (process_init_element): Disallow initialization of
5565 a flexible array member with a string constant if the structure
5568 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5571 * c-typeck.c (convert_for_assignment, c_finish_return): For
5572 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5573 types also set in_late_binary_op around convert call.
5574 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5575 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5576 result on expr as last argument to ubsan_instrument_float_cast,
5577 if in_late_binary_op, don't use c_save_expr but save_expr.
5579 Update copyright years.
5581 2015-01-05 Marek Polacek <polacek@redhat.com>
5584 * c-typeck.c (build_array_ref): Pass loc down to
5585 warn_array_subscript_with_type_char.
5587 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5589 * c-typeck.c: New behavious for pointers to arrays with qualifiers
5590 (common-pointer-type): For pointers to arrays take qualifiers from
5592 (build_conditional_expr): Add warnings for lost qualifiers.
5593 (comp-target-types): Allow pointers to arrays with different qualifiers.
5594 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5595 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5596 to PEDWARN_FOR_QUALIFIERS.
5598 2014-12-17 Jakub Jelinek <jakub@redhat.com>
5601 * c-convert.c: Include ubsan.h.
5602 (convert): For real -> integral casts and
5603 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5604 instead instrument the float cast directly.
5606 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5608 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5609 c_finish_stmt_expr): Remove NULL last argument from
5610 create_tmp_var_raw and create_tmp_var calls.
5611 * c-array-notation.c (fix_builtin_array_notation_fn,
5612 build_array_notation_expr, fix_conditional_array_notations_1,
5613 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5615 2014-11-28 Marek Polacek <polacek@redhat.com>
5618 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5619 convert the right operand to integer type.
5621 2014-11-25 Marek Polacek <polacek@redhat.com>
5624 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5625 for inline functions.
5627 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5630 * c-typeck.c (build_array_ref): Adjust
5631 convert_vector_to_pointer_for_subscript caller. If it returns true,
5632 call non_lvalue_loc on the result.
5634 2014-11-11 Richard Biener <rguenther@suse.de>
5636 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5639 2014-11-10 Andi Kleen <ak@linux.intel.com>
5642 * c-parser.c (c_parser_statement_after_labels): Call
5644 (c_parser_if_statement): Dito.
5645 (c_parser_switch_statement): Dito.
5646 (c_parser_while_statement): Dito.
5647 (c_parser_do_statement): Dito.
5648 (c_parser_for_statement): Dito.
5649 * c-typeck.c (c_finish_loop): Dito.
5651 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5653 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5654 OPT_Wshift_count_overflow in the warnings.
5656 2014-10-30 Marek Polacek <polacek@redhat.com>
5658 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5659 print the stripped version as well, if they're not the same.
5661 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5663 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5666 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5668 * c-decl.c: Adjust include files.
5669 * c-parser.c: Ditto.
5671 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5672 Tom Tromey <tromey@redhat.com>
5674 * c-tree.h (enum c_oracle_request): New.
5675 (c_binding_oracle_function): New typedef.
5676 (c_binding_oracle, c_pushtag, c_bind): Declare.
5677 * c-decl.c (c_binding_oracle): New global.
5678 (I_SYMBOL_CHECKED): New macro.
5679 (i_symbol_binding): New function.
5680 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5681 (I_TAG_CHECKED): New macro.
5682 (i_tag_binding): New function.
5683 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5684 (I_LABEL_CHECKED): New macro.
5685 (i_label_binding): New function.
5686 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5687 (c_print_identifier): Save and restore c_binding_oracle.
5688 (c_pushtag, c_bind): New functions.
5690 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5692 * c-typeck.c: Adjust include files.
5694 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5697 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5698 initialization here...
5699 (c_initialize_diagnostics): ... but here. Set defaults after
5700 building pretty-printer.
5702 2014-10-23 Marek Polacek <polacek@redhat.com>
5705 * c-decl.c (pop_scope): Don't print warning in external_scope.
5707 2014-10-19 Marek Polacek <polacek@redhat.com>
5710 * c-typeck.c (output_init_element): Allow initializing objects with
5711 static storage duration with compound literals even in C99 and add
5714 2014-10-17 Marek Polacek <polacek@redhat.com>
5717 * c-typeck.c (digest_init): Allow initializing objects with static
5718 storage duration with compound literals even in C99 and add pedwarn
5721 2014-10-17 Marek Polacek <polacek@redhat.com>
5724 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5725 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5726 error multiple times. Print the type.
5728 2014-10-17 Marek Polacek <polacek@redhat.com>
5731 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5734 2014-10-17 Marek Polacek <polacek@redhat.com>
5736 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5737 (start_function): Use OPT_Wimplicit_int instead of 0.
5738 (store_parm_decls_oldstyle): Likewise.
5740 2014-10-17 Alan Modra <amodra@gmail.com>
5743 * c-decl.c (merge_decls): Don't merge section name or tls model
5744 to newdecl symtab node, instead merge to olddecl. Override
5745 existing olddecl section name. Set tls_model for all thread-local
5746 vars, not just OMP thread-private ones. Remove incorrect comment.
5748 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5750 * c-decl.c: Adjust include files.
5752 2014-10-14 DJ Delorie <dj@redhat.com>
5754 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5755 (c_token_starts_typename): Check all __intN, not just __int128.
5756 (c_token_starts_declspecs): Likewise.
5757 (c_parser_declspecs): Likewise.
5758 (c_parser_attribute_any_word): Likewise.
5759 (c_parser_objc_selector): Likewise.
5760 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5761 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5763 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5765 (finish_declspecs): Likewise.
5767 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5769 * c-parser.c (c_parser_all_labels): New function to replace
5771 (c_parser_statement): Call the new function.
5773 2014-10-09 Marek Polacek <polacek@redhat.com>
5776 * c-typeck.c (pop_init_level): Don't warn about initializing
5779 2014-10-07 Marek Polacek <polacek@redhat.com>
5782 * c-decl.c (header_for_builtin_fn): New function.
5783 (implicitly_declare): Suggest which header to include.
5785 2014-10-07 Marek Polacek <polacek@redhat.com>
5787 * c-convert.c (convert): Use error_operand_p.
5788 * c-typeck.c (require_complete_type): Likewise.
5789 (really_atomic_lvalue): Likewise.
5790 (digest_init): Likewise.
5791 (handle_omp_array_sections_1): Likewise.
5793 2014-10-03 Marek Polacek <polacek@redhat.com>
5796 * c-decl.c (pop_scope): Don't warn about "inline function declared
5797 but never defined" for functions marked with gnu_inline attribute.
5799 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5802 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5803 on low_bound and length.
5805 2014-09-24 Marek Polacek <polacek@redhat.com>
5809 * c-parser.c: Don't define CPP_KEYWORD.
5810 (c_parser_switch_statement): Pass original type to c_finish_case.
5811 * c-tree.h (c_finish_case): Update declaration.
5812 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5813 conditionally to c_do_switch_warnings.
5815 2014-09-03 Marek Polacek <polacek@redhat.com>
5818 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5821 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5822 Balaji V. Iyer <balaji.v.iyer@intel.com>
5823 Igor Zamyatin <igor.zamyatin@intel.com>
5825 * c-parser.c (c_parser_cilk_for): New function.
5826 (c_parser_cilk_grainsize): Likewise.
5827 (c_get_temp_regvar): Likewise.
5828 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5829 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5830 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5831 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5834 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5836 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5837 with using HOST_WIDE_INT without truncation to 'int'
5839 2014-08-22 Marek Polacek <polacek@redhat.com>
5842 * c-typeck.c (parser_build_binary_op): Adjust call to
5843 warn_logical_not_parentheses.
5845 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5848 * c-parser.c (c_parser_array_notation): Check for correct
5849 type of an array added.
5851 2014-08-19 Marek Polacek <polacek@redhat.com>
5854 * c-typeck.c (build_binary_op): If either operand of a comparison
5855 is a boolean expression, call maybe_warn_bool_compare.
5857 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5860 * c-typeck.c (build_c_cast): Do a conversion even when the
5861 TYPE_MAIN_VARIANTs are the same.
5863 2014-08-19 Marek Polacek <polacek@redhat.com>
5865 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5866 pedwarn_c99 instead of pedwarn.
5867 (grokfield): Likewise.
5868 (warn_defaults_to): New function.
5869 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5870 Unconditionally call pedwarn_c99 instead of pedwarn.
5871 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5872 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5873 check flag_isoc11 before.
5874 * c-errors.c (pedwarn_c99): Change the return type to bool.
5875 Handle -Wc99-c11-compat.
5876 * c-parser.c (disable_extension_diagnostics): Handle
5877 warn_c99_c11_compat.
5878 (restore_extension_diagnostics): Likewise.
5879 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5880 instead of pedwarn, don't check flag_isoc11 before.
5881 (c_parser_declspecs): Likewise.
5882 (c_parser_alignas_specifier): Likewise.
5883 (c_parser_alignof_expression): Likewise.
5884 (c_parser_generic_selection): Likewise.
5885 * c-tree.h (pedwarn_c99): Update declaration.
5886 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5889 2014-08-19 Marek Polacek <polacek@redhat.com>
5891 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5893 * c-errors.c: Include "opts.h".
5894 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5895 * c-parser.c (disable_extension_diagnostics): Handle negative value
5896 of warn_c90_c99_compat, too.
5897 (restore_extension_diagnostics): Likewise.
5898 (c_parser_compound_statement_nostart): Pass
5899 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5901 2014-08-12 Marek Polacek <polacek@redhat.com>
5903 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5905 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5907 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5909 2014-08-10 Marek Polacek <polacek@redhat.com>
5912 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5913 Call pedwarn_c90 instead of pedwarn.
5914 (check_bitfield_type_and_width): Likewise.
5915 (declspecs_add_qual): Likewise.
5916 (declspecs_add_type): Likewise.
5917 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5918 Adjust to only call pedwarn_c90.
5919 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5920 pedwarn_c90 instead of pedwarn.
5921 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5922 * c-parser.c (disable_extension_diagnostics): Handle
5923 warn_c90_c99_compat.
5924 (restore_extension_diagnostics): Likewise.
5925 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5926 pedwarn_c90 instead of pedwarn.
5927 (c_parser_initelt): Likewise.
5928 (c_parser_postfix_expression): Likewise.
5929 (c_parser_postfix_expression_after_paren_type): Likewise.
5930 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5931 * c-tree.h: Fix formatting.
5932 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5933 pedwarn_c90 instead of pedwarn.
5935 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5937 * c-typeck.c: Remove include of pointer-set.h.
5939 2014-08-07 Marek Polacek <polacek@redhat.com>
5941 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5943 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5945 * c-typeck.c: Use hash_map instead of pointer_map.
5947 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5949 * c-decl.c: Use hash_set instead of pointer_set.
5951 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5954 * c-array-notation.c (expand_array_notations): Handling
5957 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5960 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5963 2014-07-30 Tom Tromey <tromey@redhat.com>
5965 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5967 (really_start_incremental_init, push_init_level): Initialize
5969 (pop_init_level): Set global designator_depth.
5970 (process_init_element): Check for designated_init attribute.
5972 2014-07-20 Marek Polacek <polacek@redhat.com>
5975 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5976 (implicitly_declare): Pass location to implicit_decl_warning.
5978 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5981 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5982 If non-NULL, call c_parser_check_literal_zero.
5983 (c_parser_check_literal_zero): New function.
5984 (c_parser_postfix_expression_after_primary): Adjust
5985 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5987 2014-07-06 Marek Polacek <polacek@redhat.com>
5990 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5991 * c-tree.h (C_ARRAY_PARAMETER): Define.
5992 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5995 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5996 Chen Gang <gang.chen.5i5j@gmail.com>
5998 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6001 2014-07-01 Marek Polacek <polacek@redhat.com>
6003 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6004 instead of 0 to WARN_FOR_ASSIGNMENT.
6006 2014-07-01 Marek Polacek <polacek@redhat.com>
6009 * c-typeck.c (convert_for_assignment): Pass
6010 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6012 2014-06-30 Marek Polacek <polacek@redhat.com>
6014 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6015 has no_sanitize_undefined attribute.
6017 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6020 * c-array-notation.c (fix_builtin_array_notation_fn):
6021 Check for 0 arguments in builtin call. Check that bultin argument is
6023 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6026 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6028 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6029 qualifiers in __auto_type for atomic types.
6030 (c_parser_typeof_specifier): Discard all type qualifiers in
6031 __typeof__ for atomic types.
6033 2014-06-25 Marek Polacek <polacek@redhat.com>
6036 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6037 the return expression to c_finish_return.
6039 2014-06-25 Jakub Jelinek <jakub@redhat.com>
6041 * c-typeck.c (c_finish_omp_clauses): Make sure
6042 OMP_CLAUSE_LINEAR_STEP has correct type.
6044 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6048 2014-06-24 Jakub Jelinek <jakub@redhat.com>
6050 * c-parser.c (c_parser_omp_for_loop): For
6051 #pragma omp parallel for simd move lastprivate clause from parallel
6052 to for rather than simd.
6054 2014-06-23 Marek Polacek <polacek@redhat.com>
6056 * c-typeck.c (parser_build_binary_op): Don't call
6057 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6059 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6061 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6062 * c-decl.c (merge_decls): Likewise.
6064 2014-06-09 Marek Polacek <polacek@redhat.com>
6067 * c-typeck.c (error_init): Call inform instead of error_at.
6068 (pedwarn_init): Call inform instead of pedwarn.
6069 (warning_init): Call inform instead of warning_at.
6071 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
6073 * c-decl.c (merge_decls): Use set_decl_section_name.
6074 (duplicate_decls): Remove node if it exists.
6076 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6079 * c-typeck.c (push_init_level, process_init_element,
6080 pop_init_level): Correct check for zero initialization, move
6081 missing brace warning to respect zero initialization.
6083 2014-06-05 Marek Polacek <polacek@redhat.com>
6086 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6088 2014-06-05 Marek Polacek <polacek@redhat.com>
6091 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6092 on the left hand side operand of a comparison.
6094 2014-06-05 Marek Polacek <polacek@redhat.com>
6097 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6098 Print note only if the warning was printed.
6100 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6103 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6106 2014-06-03 Marek Polacek <polacek@redhat.com>
6109 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6111 * c-tree.h (c_start_case): Update.
6112 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6113 switch condition has boolean value.
6115 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
6117 * c-decl.c: Include builtins.h.
6118 * c-parser.c: Likewise.
6120 2014-05-27 Marek Polacek <polacek@redhat.com>
6123 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6124 error and warning calls to error_at and warning_at. Pass location of
6125 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6126 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6127 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6129 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6132 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6133 function parameters.
6135 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
6137 * c-decl.c (merge_decls): Preserve symtab node pointers.
6138 (duplicate_decls): Free new decl.
6140 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6142 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6145 * c-parser.c (c_parser_omp_target): Return bool values.
6147 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6149 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6150 num_teams_loc variable to num_thread_limit_loc.
6152 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6154 * c-array-notation.c (expand_array_notations): Use void_node
6155 instead of void_zero_node.
6157 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6159 * c-decl.c (finish_struct): Adjust.
6160 (finish_enum): Likewise.
6162 (record_inline_static): Likewise.
6163 (push_scope): Likewise.
6164 (make_label): Likewise.
6165 (lookup_label_for_goto): Likewise.
6166 (finish_struct): Likewise.
6167 (finish_enum): Likewise.
6168 (store_parm_decls): Likewise.
6169 (c_push_function_context): Likewise.
6170 * c-lang.h: Remove usage of variable_size gty attribute.
6171 * c-parser.c (c_parse_init): Adjust.
6172 (c_parse_file): Likewise.
6174 2014-05-13 Marek Polacek <polacek@redhat.com>
6177 * c-typeck.c (convert_for_assignment): Pass location to
6178 WARN_FOR_ASSIGNMENT instead of input_location.
6180 2014-05-10 Marek Polacek <polacek@redhat.com>
6182 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6183 maybe_warn_string_init.
6184 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6185 maybe_warn_string_init.
6186 * c-tree.h (maybe_warn_string_init): Update declaration.
6187 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6188 Call pedwarn_init with loc instead of with input_location.
6189 (digest_init): Pass init_loc to maybe_warn_string_init.
6190 (pop_init_level): Call pedwarn_init with loc instead of with
6192 (set_init_index): Likewise.
6193 (process_init_element): Likewise.
6195 2014-05-09 Marek Polacek <polacek@redhat.com>
6198 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6199 (c_parser_initelt): Pass location to set_init_label. Pass array index
6200 location to set_init_index.
6201 * c-tree.h (push_init_level): Update declaration.
6202 (pop_init_level): Likewise.
6203 (set_init_index): Likewise.
6204 (set_init_label): Likewise.
6205 * c-typeck.c (error_init): Add location parameter. Call error_at
6207 (digest_init): Pass init_loc to error_init.
6208 (really_start_incremental_init):
6209 (push_init_level): Add location parameter. Pass loc to pop_init_level
6211 (pop_init_level): Likewise.
6212 (set_designator): Add location parameter. Pass loc to pop_init_level,
6213 push_init_level, and error_init.
6214 (set_init_index): Add location parameter. Pass loc to error_init and
6216 (set_init_label): Likewise.
6217 (output_init_element): Pass loc to error_init.
6218 (process_init_element): Pass loc to error_init, pop_init_level,
6219 pedwarn_init, and push_init_level.
6221 2014-05-09 Marek Polacek <polacek@redhat.com>
6224 * c-parser.c (c_parser_attributes): Parse the arguments as an
6225 expression-list if the attribute takes identifier.
6227 2014-05-08 Marek Polacek <polacek@redhat.com>
6230 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6233 2014-05-08 Marek Polacek <polacek@redhat.com>
6236 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6239 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6240 Mike Stump <mikestump@comcast.net>
6241 Richard Sandiford <rdsandiford@googlemail.com>
6243 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6244 (finish_enum): Use wide-int interfaces.
6245 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6246 * c-typeck.c (build_c_cast): Likewise.
6247 (set_nonincremental_init_from_string): Likewise.
6248 (c_tree_equal): Likewise.
6250 2014-05-02 Marek Polacek <polacek@redhat.com>
6253 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6254 Return size_one_node when the type is not complete.
6255 (pointer_diff): Remove comment.
6256 (build_unary_op): Improve error messages.
6258 2014-05-02 Marek Polacek <polacek@redhat.com>
6260 * c-typeck.c (c_finish_return): Separate warning_at calls.
6262 2014-05-02 Marek Polacek <polacek@redhat.com>
6264 * c-tree.h (error_init): Remove declaration.
6265 (pedwarn_init): Likewise.
6266 * c-typeck.c (error_init): Make static and move above.
6267 (pedwarn_init): Likewise.
6268 (warning_init): Move above.
6269 (maybe_warn_string_init): Likewise.
6271 2014-05-01 Jeff Law <law@redhat.com>
6275 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6276 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6279 2014-05-02 Marek Polacek <polacek@redhat.com>
6282 * c-typeck.c (push_init_level): Set constructor_designated to
6283 p->designated for structures.
6285 2014-05-01 Marek Polacek <polacek@redhat.com>
6288 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6289 function-definition has an attribute after the declarator.
6291 2014-05-01 Marek Polacek <polacek@redhat.com>
6294 * c-typeck.c (warning_init): Add location_t parameter. Call
6295 warning_at instead of warning.
6296 (push_init_level): Pass input_location to warning_init.
6297 (add_pending_init): Add location_t parameter. Pass loc to
6299 (set_nonincremental_init): Pass input_location to add_pending_init.
6300 (set_nonincremental_init_from_string): Likewise.
6301 (output_init_element): Pass loc to warning_init and to
6304 2014-05-01 Marek Polacek <polacek@redhat.com>
6307 * c-typeck.c (c_finish_return): Distinguish between label and variable
6308 when warning about returning local address.
6310 2014-05-01 Marek Polacek <polacek@redhat.com>
6313 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6316 2014-05-01 Marek Polacek <polacek@redhat.com>
6319 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6320 instead of 0 to WARN_FOR_QUALIFIERS.
6322 2014-05-01 Marek Polacek <polacek@redhat.com>
6325 * c-typeck.c (default_conversion): Use better location for
6328 2014-04-30 Marek Polacek <polacek@redhat.com>
6330 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6331 also when SANITIZE_FLOAT_DIVIDE is on.
6333 2014-04-30 Marek Polacek <polacek@redhat.com>
6336 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6337 and pedwarn_init. Use loc insted of input_location.
6339 2014-04-30 Marek Polacek <polacek@redhat.com>
6342 * c-typeck.c (build_binary_op): Use location when warning about
6345 2014-04-25 Marek Polacek <polacek@redhat.com>
6348 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6349 always_inline/noinline and hot/cold attributes.
6351 2014-04-25 Marek Polacek <polacek@redhat.com>
6354 * c-parser.c (c_parser_initelt): Pass input_location to
6355 process_init_element.
6356 (c_parser_initval): Pass loc to process_init_element.
6357 * c-tree.h (process_init_element): Adjust declaration.
6358 * c-typeck.c (push_init_level): Pass input_location to
6359 process_init_element.
6360 (pop_init_level): Likewise.
6361 (set_designator): Likewise.
6362 (output_init_element): Add location_t parameter. Pass loc to
6364 (output_pending_init_elements): Pass input_location to
6365 output_init_element.
6366 (process_init_element): Add location_t parameter. Pass loc to
6367 output_init_element.
6369 2014-04-24 Jakub Jelinek <jakub@redhat.com>
6371 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6372 atomic-clause, allow comma in between atomic-clause and
6375 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6378 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6379 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6381 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6384 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6385 create_tmp_var instead build_decl for creating temps.
6386 (build_array_notation_expr): Likewise.
6387 (fix_conditional_array_notations_1): Likewise.
6388 (fix_array_notation_expr): Likewise.
6389 (fix_array_notation_call_expr): Likewise.
6391 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6394 * c-tree.h (c_build_function_call_vec): New prototype.
6395 * c-typeck.c (build_function_call_vec): Don't call
6396 resolve_overloaded_builtin here.
6397 (c_build_function_call_vec): New wrapper function around
6398 build_function_call_vec. Call resolve_overloaded_builtin here.
6399 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6400 Call c_build_function_call_vec instead of build_function_call_vec.
6401 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6402 * c-decl.c (finish_decl): Likewise.
6404 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6407 * c-typeck.c: Use correct format string in cast-qual warning
6409 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6411 * c-decl.c (c_decl_attributes): Use
6412 lang_hooks.types.omp_mappable_type.
6413 * c-typeck.c (c_finish_omp_clauses): Likewise.
6415 2014-03-06 Marek Polacek <polacek@redhat.com>
6418 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6419 of checking tree code.
6421 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6423 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6424 (c_parser_parameter_declaration): Likewise.
6426 2014-02-19 Marek Polacek <polacek@redhat.com>
6429 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6430 Call mark_exp_read on exp.value.
6431 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6432 TREE_ADDRESSABLE on old instead of val.
6433 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6435 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6437 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6438 C_EXPR_APPEND by vec_safe_push.
6439 * c-tree.h (C_EXPR_APPEND): Remove.
6441 2014-01-31 Marek Polacek <polacek@redhat.com>
6444 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6445 build_function_call_vec.
6446 (build_function_call): Likewise.
6447 (build_atomic_assign): Likewise.
6448 (build_function_call_vec): Add arg_loc parameter. Use it.
6449 (convert_arguments): Likewise.
6450 (convert_for_assignment): Rename rhs_loc to expr_loc.
6451 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6452 (c_parser_objc_keywordexpr): Likewise.
6453 (c_parser_postfix_expression_after_primary): Call
6454 build_function_call_vec with expr_loc rather than op_loc.
6455 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6456 build_function_call_vec.
6457 (c_parser_expr_list): Add locations parameter. Fill it with locations
6458 of function arguments.
6459 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6461 2014-01-30 Marek Polacek <polacek@redhat.com>
6464 * c-typeck.c (build_function_call_vec): Use loc parameter.
6465 (convert_arguments): Add location parameter. Use it.
6466 (ep_convert_and_check): Likewise.
6467 (build_atomic_assign): Adjust convert_for_assignment call.
6468 (build_modify_expr): Likewise.
6469 (digest_init): Likewise.
6470 (c_finish_return): Likewise.
6471 (build_conditional_expr): Adjust ep_convert_and_check calls.
6472 (convert_for_assignment): Add rhs_loc parameter. Use it.
6473 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6476 2014-01-30 Richard Biener <rguenther@suse.de>
6479 * c-typeck.c (build_function_call_vec): Do not replace calls
6480 to a function via an incompatible type with a runtime abort.
6482 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6484 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6485 flag_enable_cilkplus with flag_cilkplus.
6486 (c_parser_direct_declarator_inner): Likewise.
6487 (c_parser_attribute_any_word): Likewise.
6488 (c_parser_attributes): Likewise.
6489 (c_parser_compound_statement): Likewise.
6490 (c_parser_statement_after_labels): Likewise.
6491 (c_parser_if_statement): Likewise.
6492 (c_parser_switch_statement): Likewise.
6493 (c_parser_do_statement): Likewise.
6494 (c_parser_for_statement): Likewise.
6495 (c_parser_unary_expression): Likewise.
6496 (c_parser_postfix_expression): Likewise.
6497 (c_parser_postfix_expression_after_primary): Likewise.
6498 (c_parser_postfix_expression_after_primary): Likewise.
6499 (c_parser_omp_clause_name): Likewise.
6500 (c_finish_omp_declare_simd): Likewise.
6501 (c_parser_cilk_verify_simd): Likewise.
6502 * c-typeck.c (build_array_ref): Likewise.
6503 (build_function_call_vec): Likewise.
6504 (convert_arguments): Likewise.
6505 (build_compound_expr): Likewise.
6506 (c_finish_return): Likewise.
6507 (c_finish_if_stmt): Likewise.
6508 (c_finish_loop): Likewise.
6509 (build_binary_op): Likewise.
6511 2014-01-23 Marek Polacek <polacek@redhat.com>
6514 * c-typeck.c (parser_build_binary_op): Use location instead of
6516 (build_binary_op): Pass location to shorten_compare.
6518 2014-01-23 Marek Polacek <polacek@redhat.com>
6521 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6524 2014-01-23 Marek Polacek <polacek@redhat.com>
6527 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6528 of a comma expression.
6529 (emit_side_effect_warnings): Likewise.
6531 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6534 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6535 function to use walk_tree and moved a lot of its functionality to
6536 expand_array_notations.
6537 (expand_array_notations): New function.
6539 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6541 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6542 attribute an attribute without value.
6544 2014-01-23 Jakub Jelinek <jakub@redhat.com>
6547 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6548 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6550 2014-01-22 Marek Polacek <polacek@redhat.com>
6553 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6554 of remove_c_maybe_const_expr on op1 and op2.
6556 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6559 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6560 effects, preevaluate rhs using SAVE_EXPR first.
6562 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6565 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6566 statements with if-elseif statements.
6568 2014-01-06 Marek Polacek <polacek@redhat.com>
6571 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6572 defined bit-field types only in ISO C.
6574 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6576 Update copyright years
6578 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6580 * c-array-notation.c: Use the standard form for the copyright notice.
6582 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6584 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6585 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6586 field in parser is not empty. If not-empty, call the function
6587 c_parser_finish_omp_declare_simd.
6588 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6589 between SIMD-enabled functions and #pragma simd. Added new parameter.
6590 (c_parser_cilk_all_clauses): Modified the usage of the function
6591 c_parser_cilk_clause_vectorlength as mentioned above.
6592 (c_parser_cilk_simd_fn_vector_attrs): New function.
6593 (c_finish_cilk_simd_fn_tokens): Likewise.
6594 (is_cilkplus_vector_p): Likewise.
6595 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6596 "nomask," and "mask" strings in clause name.
6597 (c_parser_omp_all_clauses): Added 3 new case statements:
6598 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6599 PRAGMA_CILK_CLAUSE_NOMASK.
6600 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6601 check for vector attribute and if so call the function
6602 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6603 called the function c_finish_cilk_simd_fn_tokens.
6604 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6605 parser field is non-empty. If so, parse them as you would parse
6606 the omp declare simd pragma.
6607 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6608 Added a check when step is a parameter and flag it as error.
6609 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6610 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6613 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6615 * c-parser.c (c_parser_omp_parallel): Fix description.
6617 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6619 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6620 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6621 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6622 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6624 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6627 * c-parser.c (c_parser_alignas_specifier): Use
6628 c_sizeof_or_alignof_type instead of c_alignof.
6629 (c_parser_alignof_expression): Likewise, with min_alignof
6630 parameter depending on alignof spelling used.
6632 2013-12-04 Marek Polacek <polacek@redhat.com>
6635 * c-decl.c (start_function): Don't warn for missing prototype for
6638 2013-12-03 Marek Polacek <polacek@redhat.com>
6641 * c-decl.c (build_compound_literal): Allow compound literals with
6642 empty initial value.
6644 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6647 * c-typeck.c (build_modify_expr): Diagnose assignment to
6648 expression with array type.
6650 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6653 * c-typeck.c (process_init_element): Do not treat a string as
6654 initializing a whole array when used with a designator for an
6657 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6660 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6661 an inline function following a static declaration.
6663 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6666 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6667 to p_name before calling c_parser_omp_teams instead of after.
6668 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6669 argument. Remove unused p_name variable.
6671 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6672 Jakub Jelinek <jakub@redhat.com>
6674 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6675 external_scope is NULL.
6677 2013-11-27 Tom de Vries <tom@codesourcery.com>
6678 Marc Glisse <marc.glisse@inria.fr>
6681 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6683 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6685 * c-typeck.c: Add required include files from gimple.h.
6687 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6689 * c-decl.c (define_label, shadow_tag_warned)
6690 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6691 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6692 (declspecs_add_type): Remove use of in_system_header macro.
6693 * c-parser.c (c_parser_unary_expression): Likewise.
6694 * c-typeck.c (store_init_value, process_init_element)
6695 (c_start_case): Likewise.
6697 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6700 * c-parser.c (c_parser_set_source_position_from_token): Remove
6701 reference to in_system_header from comment.
6703 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6705 * c-decl.c (grokdeclarator): Update comment to refer to
6706 tree_to_[su]hwi rather than tree_low_cst.
6708 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6710 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6711 tree_to_uhwi throughout.
6713 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6715 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6718 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6720 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6723 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6725 * c-parser.c (c_parser_cilk_simd): New.
6726 (c_parser_cilk_verify_simd): New.
6727 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6728 (c_parser_omp_for_loop): Add case for NE_EXPR.
6729 Set c_break_label for CILK_SIMD.
6730 (c_parser_cilk_clause_vectorlength): New.
6731 (c_parser_cilk_clause_linear): New.
6732 (c_parser_cilk_clause_name): New.
6733 (c_parser_cilk_all_clauses): New.
6734 * c-typeck.c (build_unary_op): Pass location argument to
6736 (build_modify_expr): Same.
6737 (build_asm_expr): Same.
6738 (c_finish_bc_stmt): Error on break/continue in loops.
6740 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6742 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6744 2013-11-14 Diego Novillo <dnovillo@google.com>
6746 * c-decl.c: Include print-tree.h.
6747 Include stor-layout.h.
6750 Include stringpool.h.
6751 * c-lang.c: Include fold-const.h.
6752 * c-parser.c: Include stringpool.h.
6754 Include stor-layout.h.
6756 Include trans-mem.h.
6757 * c-typeck.c: Include stor-layout.h.
6758 Include trans-mem.h.
6762 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6764 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6765 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6767 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6768 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6770 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6771 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6772 (c_parser_declarator, c_parser_direct_declarator_inner)
6773 (c_parser_parameter_declaration, c_parser_type_name): All callers
6775 (c_parser_declaration_or_fndef): Handle declarations with type
6776 determined from the initializer.
6778 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6780 * c-typeck.c: Include gimplify.h.
6782 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6784 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6785 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6787 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6788 or _Thread_local as appropriate in diagnostics.
6789 (build_null_declspecs): Initialize ret->thread_gnu_p.
6790 (declspecs_add_scspec): Handle either __thread or _Thread_local
6791 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6792 pedantic. Do not disallow _Thread_local extern and _Thread_local
6795 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6796 Andrew MacLeod <amacleod@redhat.com>
6798 * c-aux-info.c (gen_type): Handle atomic qualifier.
6799 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6800 qualifiers when compating types.
6801 (shadow_tag_warned): Handle atomic_p in declspecs.
6802 (quals_from_declspecs): Likewise.
6803 (start_decl): Use c_type_promotes_to when promoting argument
6805 (grokdeclarator): Handle _Atomic.
6806 (get_parm_info): Diagnose any qualifier on "void" as only
6808 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6809 comparing types. Use c_type_promotes_to when promoting argument
6811 (finish_function): Use c_type_promotes_to when promoting argument
6813 (build_null_declspecs): Handle atomic_p in declspecs.
6814 (declspecs_add_qual): Handle RID_ATOMIC.
6815 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6816 (c_token_starts_declspecs): Handle RID_ATOMIC.
6817 (c_parser_declspecs): Handle atomic type specifiers and
6819 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6820 from types of expressions with atomic type.
6821 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6822 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6823 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6824 (c_parser_statement_after_labels, c_parser_switch_statement)
6825 (c_parser_for_statement, c_parser_expr_no_commas)
6826 (c_parser_conditional_expression, c_parser_binary_expression)
6827 (c_parser_cast_expression, c_parser_unary_expression)
6828 (c_parser_postfix_expression)
6829 (c_parser_postfix_expression_after_primary, c_parser_expression):
6830 Use convert_lvalue_to_rvalue.
6831 (c_parser_expression_conv, c_parser_expr_list): Document
6832 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6833 (c_parser_objc_synchronized_statement): Use
6834 convert_lvalue_to_rvalue.
6835 (c_parser_objc_selector): Handle RID_ATOMIC.
6836 (c_parser_objc_receiver, c_parser_array_notation): Use
6837 convert_lvalue_to_rvalue.
6838 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6839 _Atomic (type-name).
6840 (struct c_declspecs): Add atomic_p field.
6841 (convert_lvalue_to_rvalue): Declare.
6842 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6843 corresponding atomic types.
6844 (qualify_type): Don't add _Atomic qualifiers from second argument.
6845 (comp_target_types): Do not allow _Atomic mismatches.
6846 (type_lists_compatible_p): Do not remove atomic qualifiers when
6848 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6849 (build_atomic_assign): New functions.
6850 (build_unary_op): Use build_atomic_assign for atomic increment and
6852 (build_conditional_expr): Do not treat _Atomic void as a qualified
6854 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6855 (find_anonymous_field_with_type, convert_to_anonymous_field)
6856 (convert_for_assignment): Do not remove atomic qualifiers when
6858 (digest_init): Do not accept initialization of arrays of atomic
6859 elements by string constants.
6860 (build_asm_expr): Use convert_lvalue_to_rvalue.
6861 (build_binary_op): Do not treat _Atomic void as a qualified
6864 2013-11-06 DJ Delorie <dj@redhat.com>
6866 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6867 both explicit and builtin, print the location of the explicit one.
6869 2013-11-05 Tobias Burnus <burnus@net-b.de>
6871 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6872 c_parser_omp_distribute, c_parser_omp_teams,
6873 c_parser_omp_target, c_parser_omp_declare): Handle
6876 2013-11-03 Marek Polacek <polacek@redhat.com>
6878 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6880 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6882 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6883 check_dup_generic at the end, unless remove is true.
6884 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6886 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6888 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6890 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6891 with decl that is not pointer nor array.
6893 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6895 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6896 a spawning function is found.
6897 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6898 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6899 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6900 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6902 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6903 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6905 (c_finish_return): Added a check to reject _Cilk_spawn in return
6907 (build_cilk_spawn): New function.
6908 (build_cilk_sync): Likewise.
6909 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6911 2013-10-27 Tobias Burnus <burnus@net-b.de>
6914 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6915 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6916 (c_parser_statement_after_labels): Update calls.
6918 2013-10-24 Tobias Burnus <burnus@net-b.de>
6921 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6922 Handle PRAGMA_IVDEP.
6923 (c_parser_statement_after_labels): Update call.
6925 2013-10-24 Marek Polacek <polacek@redhat.com>
6927 * c-parser.c (c_parser_struct_declaration): Add a comment.
6928 (c_parser_declarator): Don't allow _Alignas here.
6930 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6932 * c-parser.c: Include omp-low.h.
6933 * c-typeck.c: Likewise.
6935 2013-10-17 Marek Polacek <polacek@redhat.com>
6938 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6939 Document syntax of the array-declarator.
6940 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6942 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6943 (c_parser_struct_declaration): Likewise.
6944 (c_parser_declarator): Likewise.
6945 (c_parser_direct_declarator_inner): Likewise.
6946 (c_parser_parameter_declaration): Likewise.
6947 (c_parser_type_name): Likewise.
6949 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6951 * c-lang.h (current_omp_declare_target_attribute): New extern
6953 * c-parser.c: Include c-lang.h.
6954 (struct c_parser): Change tokens to c_token *.
6955 Add tokens_buf field. Change tokens_avail type to unsigned int.
6956 (c_parser_consume_token): If parser->tokens isn't
6957 &parser->tokens_buf[0], increment parser->tokens.
6958 (c_parser_consume_pragma): Likewise.
6959 (enum pragma_context): Add pragma_struct and pragma_param.
6960 (c_parser_external_declaration): Adjust
6961 c_parser_declaration_or_fndef caller.
6962 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6963 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6964 Adjust recursive call.
6965 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6967 (c_parser_parameter_declaration): Use pragma_param instead of
6969 (c_parser_compound_statement_nostart, c_parser_label,
6970 c_parser_for_statement): Adjust
6971 c_parser_declaration_or_fndef callers.
6972 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6973 it through to c_parser_conditional_expression.
6974 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6975 pass it through to c_parser_binary_expression. Adjust recursive
6977 (c_parser_binary_expression): Remove prec argument, add
6978 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6979 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6980 binop matches it, use build2 instead of parser_build_binary_op.
6981 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6982 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6983 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6984 Handle pragma_struct and pragma_param the same as pragma_external.
6985 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6986 (c_parser_omp_variable_list): Parse array sections for
6987 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6988 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6989 (c_parser_omp_clause_reduction): Handle user defined reductions.
6990 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6991 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6992 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6993 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6994 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6995 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6996 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6997 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6998 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6999 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7000 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7001 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7002 (c_parser_omp_for_loop): Add CODE argument, pass it through
7003 to c_finish_omp_for. Change last argument to cclauses,
7004 and adjust uses to grab parallel clauses from the array of all
7005 the split clauses. Adjust c_parser_binary_expression,
7006 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7007 (omp_split_clauses): New function.
7008 (c_parser_omp_simd): New function.
7009 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7010 Allow the function to be called also when parsing combined constructs,
7011 and call c_parser_omp_simd when parsing for simd.
7012 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7013 #pragma omp section, require exactly one structured-block instead of
7014 sequence of statements.
7015 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7016 Allow the function to be called also when parsing combined constructs.
7017 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7018 Allow the function to be called also when parsing combined
7020 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7021 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7022 c_parser_omp_teams, c_parser_omp_target_data,
7023 c_parser_omp_target_update, c_parser_omp_target,
7024 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7025 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7026 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7027 (c_parser_omp_construct): Add p_name and mask vars. Handle
7028 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7029 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7030 and c_parser_omp_sections callers.
7031 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7032 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7033 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7034 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7035 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7037 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7038 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7039 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7040 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7041 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7042 * c-typeck.c: Include tree-inline.h.
7043 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7044 handle_omp_array_sections_1, handle_omp_array_sections,
7045 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7046 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7047 user defined reductions.
7048 (c_tree_equal): New function.
7049 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7050 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7051 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7052 c_check_omp_declare_reduction_r): New prototypes.
7053 * c-decl.c (current_omp_declare_target_attribute): New variable.
7054 (c_decl_attributes): New function.
7055 (start_decl, start_function): Use it instead of decl_attributes.
7056 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7057 c_omp_reduction_decl, c_omp_reduction_lookup,
7058 c_check_omp_declare_reduction_r): New functions.
7060 2013-09-25 Tom Tromey <tromey@redhat.com>
7062 * Make-lang.in (c/gccspec.o): Remove.
7063 (CFLAGS-c/gccspec.o): New variable.
7064 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7065 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7066 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7068 2013-09-25 Tom Tromey <tromey@redhat.com>
7070 * Make-lang.in (c/gccspec.o): Don't use subshell.
7072 2013-09-18 Marek Polacek <polacek@redhat.com>
7075 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7076 Remove unnecessary check.
7078 2013-09-18 Marek Polacek <polacek@redhat.com>
7081 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7082 no_sanitize_undefined attribute.
7084 2013-09-13 Kai Tietz <ktietz@redhat.com>
7087 * c-decl.c (c_builtin_function_ext_scope): Remove
7088 wrong assumption that it is never called on prexisting
7091 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7093 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7095 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7097 * c-objc-common.c (c_tree_printer): Tidy.
7099 2013-08-30 Marek Polacek <polacek@redhat.com>
7101 * c-typeck.c (build_binary_op): Add division by zero and shift
7104 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
7105 Joseph Myers <joseph@codesourcery.com>
7108 * c-typeck.c (c_common_type): Prefer double_type_node over
7109 other REAL_TYPE types with the same precision.
7110 (convert_arguments): Likewise.
7112 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7114 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7115 (c_initialize_diagnostics): Call a destructor for the early printer.
7117 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7119 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7120 printer initialization.
7122 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
7125 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7126 check for truth values.
7127 (expand_array_notation_exprs): Added truth values case. Removed an
7128 unwanted else. Added for-loop to walk through subtrees in default
7131 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7133 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7135 2013-07-23 Joseph Myers <joseph@codesourcery.com>
7137 * c-parser.c (struct c_generic_association): Fix typo.
7139 2013-07-23 Tom Tromey <tromey@redhat.com>
7140 Joseph Myers <joseph@codesourcery.com>
7142 * c-parser.c (struct c_generic_association): New.
7143 (c_generic_association_d): New typedef.
7144 (c_parser_generic_selection): New function.
7145 (c_parser_postfix_expression): Handle RID_GENERIC.
7147 2013-07-13 Jason Merrill <jason@redhat.com>
7150 * c-decl.c (finish_struct): Check for too-large class.
7152 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7155 * c-typeck.c (set_init_index): When folding, check for index overflow.
7157 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7159 * c-parser.c (c_parser_array_notation): Removed rejection of array
7160 notations in an array of function pointers.
7162 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7164 * c-array-notation.c (make_triplet_val_inv): New function.
7165 (create_cmp_incr): Likewise.
7166 (create_array_refs): Likewise.
7167 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7168 Also modularized common parts between functions and called the function.
7169 (build_array_notation_expr): Likewise.
7170 (fix_conditional_array_notations_1): Likewise.
7171 (fix_array_notation_expr): Likewise.
7172 (fix_array_notation_call_expr): Likewise.
7174 2013-06-18 Marek Polacek <polacek@redhat.com>
7177 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7179 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7181 * c-array-notation.c (build_array_notation_expr): Reject array notation
7182 mismatch between LHS and RHS even inside a call_expr. Also, removed
7183 a couple while statements that were dead code.
7185 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7187 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7188 excessive precision expressions in function parameters. Also removed
7189 couple unwanted while statements.
7191 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7193 * c-array-notation.c (expand_array_notation_exprs): Added
7194 ARRAY_NOTATION_REF case.
7196 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7198 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7199 function to c-family/array-notation-common.c.
7200 (is_cilkplus_reduce_builtin): Likewise.
7201 (find_rank): Likewise.
7202 (extract_array_notation_exprs): Likewise.
7203 (replace_array_notations): Likewise.
7204 (find_inv_trees): Likewise.
7205 (replace_inv_trees): Likewise.
7206 (contains_array_notation_expr): Likewise.
7207 (find_correct_array_notation_type): Likewise.
7208 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7209 (struct inv_list): Moved this to c-family/array-notation-common.c.
7210 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7212 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7214 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7215 reduction functions outside the for-loop. Added a check if the fundecl
7216 is non-NULL. Finally, removed an unwanted if-statement, and made the
7219 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7221 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7222 condition of the if-statement matches the rank of else-block and then-
7223 block when array notations are used.
7224 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7225 expression after the entire function body is parsed.
7226 (c_parser_expr_no_commas): Delayed creating array notation expressions
7227 to the end of function parsing.
7228 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7229 whole if-statement instead of just the condition.
7230 (expand_array_notation_exprs): Added MODIFY_EXPR case.
7232 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7235 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7236 array to NULL_TREE if they are unused. Also added a check for the
7237 field to be NULL before its fields are used in future.
7239 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7242 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7243 (build_array_notation_expr): Likewise.
7245 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7247 * c-typeck.c (build_array_ref): Added a check to see if array's
7248 index is greater than one. If true, then emit an error.
7249 (build_function_call_vec): Exclude error reporting and checking
7250 for builtin array-notation functions.
7251 (convert_arguments): Likewise.
7252 (c_finish_return): Added a check for array notations as a return
7253 expression. If true, then emit an error.
7254 (c_finish_loop): Added a check for array notations in a loop
7255 condition. If true then emit an error.
7256 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7257 (build_binary_op): Added a check for array notation expr inside
7258 op1 and op0. If present, we call another function to find correct
7260 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7261 * c-parser.c (c_parser_compound_statement): Check if array
7262 notation code is used in tree, if so, then transform them into
7264 (c_parser_expr_no_commas): Check if array notation is used in LHS
7265 or RHS, if so, then build array notation expression instead of
7267 (c_parser_postfix_expression_after_primary): Added a check for
7268 colon(s) after square braces, if so then handle it like an array
7269 notation. Also, break up array notations in unary op if found.
7270 (c_parser_direct_declarator_inner): Added a check for array
7272 (c_parser_compound_statement): Added a check for array notation in
7273 a stmt. If one is present, then expand array notation expr.
7274 (c_parser_if_statement): Likewise.
7275 (c_parser_switch_statement): Added a check for array notations in
7276 a switch statement's condition. If true, then output an error.
7277 (c_parser_while_statement): Similarly, but for a while.
7278 (c_parser_do_statement): Similarly, but for a do-while.
7279 (c_parser_for_statement): Similarly, but for a for-loop.
7280 (c_parser_unary_expression): Check if array notation is used in a
7281 pre-increment or pre-decrement expression. If true, then expand
7283 (c_parser_array_notation): New function.
7284 * c-array-notation.c: New file.
7285 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7287 2013-05-23 Mike Stump <mikestump@comcast.net>
7289 * c-typeck.c (convert_for_assignment): Handle references to memory
7292 2013-05-16 Jason Merrill <jason@redhat.com>
7294 * Make-lang.in (cc1$(exeext)): Use link mutex.
7296 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7298 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7299 to simply use OPT_Wpointer_arith.
7300 (build_unary_op): Likewise.
7302 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7305 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7306 argument. If set, or it temporarily for parsing of the first
7307 argument into force_folding_builtin_constant_p.
7308 (c_parser_postfix_expression): Adjust callers.
7310 2013-03-21 Richard Biener <rguenther@suse.de>
7312 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7313 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7315 2013-02-12 Marek Polacek <polacek@redhat.com>
7318 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7321 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7324 * c-typeck.c (set_nonincremental_init_from_string): If
7325 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7327 (process_init_element): Likewise.
7329 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7332 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7333 argument, don't call default_function_array_conversion
7334 nor c_fully_fold here.
7335 (c_parser_asm_statement): Adjust callers.
7336 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7337 and outputs here, and call default_function_array_conversion
7338 on inputs that don't need to be addressable.
7340 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7343 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7344 warning require that both c_common_unsigned_type as well as
7345 c_common_signed_type is the same for both mvl and mvr types.
7347 2012-11-16 Diego Novillo <dnovillo@google.com>
7349 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7351 * c-common.c: Use new vec API in vec.h.
7352 * c-common.h: Likewise.
7353 * c-gimplify.c: Likewise.
7354 * c-pragma.c: Likewise.
7355 * c-pretty-print.c: Likewise.
7356 * c-pretty-print.h: Likewise.
7357 * c-semantics.c: Likewise.
7358 * c-decl.c: Likewise.
7359 * c-parser.c: Likewise.
7360 * c-tree.h: Likewise.
7361 * c-typeck.c: Likewise.
7363 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7366 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7368 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7371 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7372 shadows a function, unless the variable is a function or a
7373 pointer-to-function.
7375 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7378 * c-parser.c (struct c_tree_loc_pair): Removed.
7379 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7380 add location_t * and tree * arguments, fill in array of 3
7381 sizeof_arg trees and corresponding locs.
7382 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7383 c_parser_expr_list callers.
7384 (c_parser_postfix_expression_after_primary): Likewise. Pass
7385 array of 3 sizeof_arg trees and locs (corresponding to first
7386 3 arguments) to sizeof_pointer_memaccess_warning.
7388 2012-10-09 Lawrence Crowl <crowl@google.com>
7390 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7391 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7394 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7397 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7400 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7403 * c-typeck.c: Include c-common.h.
7404 (enum stv_conv): Moved to c-common.h.
7405 (scalar_to_vector): Moved to c-common.c.
7406 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7407 * Make-lang.in: c-typeck.c depends on c-common.h.
7409 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7411 * c-decl.c (c_write_global_declarations): Fix handling of
7414 2012-09-30 Sharad Singhai <singhai@google.com>
7416 * c-decl.c (c_write_global_declarations): Use a different method
7417 to determine if the dump has ben initialized.
7419 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7422 * c-typeck.c (c_cast_expr): When casting to a type requiring
7423 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7426 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7429 * c-typeck.c (build_unary_op): Pass original argument of
7430 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7431 any C_MAYBE_CONST_EXPR, if it has integer operands.
7432 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7433 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7434 to c_objc_common_truthvalue_conversion, then remove any
7435 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7436 c_objc_common_truthvalue_conversion not
7437 c_common_truthvalue_conversion.
7438 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7439 call note_integer_operands for arguments with integer operands
7440 that are not integer constants.
7442 2012-09-13 Jakub Jelinek <jakub@redhat.com>
7445 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7446 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7448 2012-08-31 Jakub Jelinek <jakub@redhat.com>
7451 * c-convert.c (convert): Don't call fold_convert_loc if
7452 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7453 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7454 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7456 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7459 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7460 for nested and empty_ok arguments in the call to
7461 c_parser_declaration_or_fndef.
7463 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7465 * c-tree.h (c_last_sizeof_arg): Declare.
7466 * c-parser.c (struct c_tree_loc_pair): New type.
7467 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7469 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7470 (c_parser_postfix_expression_after_primary): Likewise. Call
7471 sizeof_pointer_memaccess_warning if needed.
7472 (sizeof_ptr_memacc_comptypes): New function.
7473 * c-typeck.c (c_last_sizeof_arg): New global variable.
7474 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7476 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7478 * c-lang.h (lang_decl): Add variable_size GTY option.
7480 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7482 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7483 * Make-lang.in: Fix dependencies.
7485 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7487 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7488 and add language Makefile hooks.
7489 * config-lang.in: New file.
7490 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7491 add the required "normal" config-lang.in rules.
7492 * c-lang.h: Moved from gcc/ to here.
7493 * c-tree.h: Likewise.
7494 * c-objc-common.c: Likewise.
7495 * c-objc-common.h: Likewise.
7496 * c-typeck.c: Likewise.
7497 * c-convert.c: Likewise.
7498 * c-lang.c: Likewise.
7499 * c-aux-info.c: Likewise.
7500 * c-errors.c: Likewise.
7501 * gccspec.c: Likewise.
7502 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7503 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7505 Copyright (C) 2012-2021 Free Software Foundation, Inc.
7507 Copying and distribution of this file, with or without modification,
7508 are permitted in any medium without royalty provided the copyright
7509 notice and this notice are preserved.