1 2020-09-19 Martin Sebor <msebor@redhat.com>
4 * c-decl.c (lookup_last_decl): Define new function.
5 (c_decl_attributes): Call it.
6 (start_decl): Add argument and use it.
7 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
8 (get_parm_array_spec): Define new function.
9 (push_parm_decl): Call get_parm_array_spec.
10 (start_function): Call warn_parm_array_mismatch. Build attribute
11 access and add it to current function.
12 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
13 in forms of array parameters.
14 * c-tree.h (start_decl): Add argument.
16 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
18 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
21 (start_function): Adjust for above change.
22 (c_push_function_context, c_pop_function_context): Likewise.
23 * c-lang.h (struct language_function): Likewise.
24 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
25 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
27 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
28 (c_parser_switch_statement): Adjust break/switch context handling
29 and calls to renamed functions.
30 (c_parser_while_statement): Adjust break/switch context handling and
32 (c_parser_do_statement): Ditto, with DO_STMT respectively.
33 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
34 (c_parser_omp_for_loop): Adjust break/switch context handling.
35 * c-tree.h (c_break_label, c_cont_label): Delete.
36 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
37 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
38 (in_statement, switch_statement_break_seen_p): Declare.
39 (c_start_case, c_finish_case): Renamed to...
40 (c_start_switch, c_finish_switch).
41 (c_finish_bc_stmt): Adjust arguments.
42 * c-typeck.c (build_function_call_vec): Don't try to print
43 statements with %qE format.
44 (struct c_switch): Rename switch_expr field to switch_stmt.
45 Add break_stmt_seen_p field.
46 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
47 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
48 (do_case): Update for changes to struct c_switch.
49 (c_finish_case): Rename to c_finish_switch. Update for changes to
50 struct c_switch and change of representation from SWITCH_EXPR to
52 (c_finish_loop): Delete.
53 (c_finish_bc_stmt): Update to reflect changes to break/continue
54 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
55 of a GOTO_EXPR except for objc foreach loops.
57 2020-09-01 Jakub Jelinek <jakub@redhat.com>
60 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
63 2020-08-28 Martin Sebor <msebor@redhat.com>
66 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
69 2020-08-27 Martin Liska <mliska@suse.cz>
71 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
72 growth function to true.
74 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
77 * c-typeck.c (handle_omp_array_sections_1): Talk about
78 array function parameter in the error message.
80 2020-08-18 Jakub Jelinek <jakub@redhat.com>
83 * c-parser.c (c_parser_generic_selection): Change match_found from bool
84 to int, holding index of the match. Call mark_exp_read on the selector
85 expression and on expressions other than the selected one.
87 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
90 * c-typeck.c (process_init_element): Split test for whether to
91 recurse into a record, union or array into...
92 (initialize_elementwise_p): ...this new function. Don't recurse
93 into a vector type if the initialization value is also a vector.
95 2020-07-31 Richard Biener <rguenther@suse.de>
98 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
99 Define to c_common_finalize_early_debug.
101 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
103 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
104 (c_parser_omp_critical): Permit hint(0) clause without named critical.
105 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
107 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
110 * c-decl.c (finish_decl): Call target hook
111 lower_local_decl_alignment to lower local decl alignment.
113 2020-07-09 Julian Brown <julian@codesourcery.com>
114 Thomas Schwinge <thomas@codesourcery.com>
117 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
118 for standalone attach/detach clauses.
120 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
122 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
123 set, warn for conversion between pointers that point to incompatible
124 scalar storage orders.
126 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
128 * c-parser.c (c_parser_statement_after_labels): Pass correct
129 parameters to c_parser_do_statement.
131 2020-06-16 Jakub Jelinek <jakub@redhat.com>
133 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
135 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
136 premature c_fully_fold. Defer explicit c_fully_fold calls to after
138 * c-tree.h (c_in_omp_for): Declare.
139 * c-typeck.c (c_in_omp_for): Define.
140 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
141 (digest_init): Likewise.
142 (build_binary_op): Likewise.
144 2020-06-16 Jakub Jelinek <jakub@redhat.com>
146 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
147 from kind by comma rather than colon.
149 2020-06-05 Mark Wielaard <mark@klomp.org>
151 * c-decl.c (implicit_decl_warning): When warned and olddecl is
152 an undeclared builtin, then add a fixit header hint, if found.
153 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
154 warning_at about implicit builtin declaration type mismatch.
156 2020-06-03 Mark Wielaard <mark@klomp.org>
158 * c-parser.c (struct c_parser): Add seen_string_literal
160 (c_parser_consume_token): Reset seen_string_literal.
161 (c_parser_error_richloc): Add name_hint if seen_string_literal
162 and next token is a CPP_NAME and we have a missing header
163 suggestion for the name.
164 (c_parser_string_literal): Set seen_string_literal.
166 2020-06-03 Mark Wielaard <mark@klomp.org>
168 * c-parser.c (c_parser_postfix_expression_after_primary): Add
169 scope with matching_parens after CPP_OPEN_PAREN.
171 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
173 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
175 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
177 * Make-lang.in: Remove extra slash.
179 2020-05-19 Martin Liska <mliska@suse.cz>
181 * c-parser.c: Fix typo.
183 2020-05-14 Jakub Jelinek <jakub@redhat.com>
185 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
187 2020-05-07 Richard Biener <rguenther@suse.de>
190 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
193 2020-04-30 Jakub Jelinek <jakub@redhat.com>
196 * c-decl.c (set_labels_context_r): In addition to context-less
197 LABEL_DECLs adjust also LABEL_DECLs with context equal to
198 parent function if any.
199 (store_parm_decls): Adjust comment.
201 2020-04-19 Jakub Jelinek <jakub@redhat.com>
204 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
205 two CPP_COLON tokens.
207 2020-04-17 Jakub Jelinek <jakub@redhat.com>
210 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
213 2020-04-15 Jakub Jelinek <jakub@redhat.com>
216 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
217 requires directive when not at file scope.
219 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
222 * c-decl.c (c_check_in_current_scope): New function.
223 * c-tree.h (c_check_in_current_scope): Declare it.
224 * c-parser.c (c_parser_oacc_declare): Add check that variables
225 are declared in the same scope as the directive. Fix handling
228 2020-04-07 Jakub Jelinek <jakub@redhat.com>
231 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
232 if c_parser_omp_master succeeded.
234 2020-03-23 Jakub Jelinek <jakub@redhat.com>
236 PR gcov-profile/94029
238 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
239 the function_start_locus location. Don't do that afterwards for the
240 __GIMPLE body parsing.
242 2020-03-19 Jakub Jelinek <jakub@redhat.com>
244 PR gcov-profile/94029
245 * c-tree.h (finish_function): Add location_t argument defaulted to
247 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
248 set it to the locus of closing } if non-NULL.
249 (c_parser_compound_statement_nostart): Return locus of closing }.
250 (c_parser_parse_rtl_body): Likewise.
251 (c_parser_declaration_or_fndef): Propagate locus of closing } to
253 * c-decl.c (finish_function): Add end_loc argument, use it instead of
254 input_location to set function_end_locus.
256 2020-03-17 Jakub Jelinek <jakub@redhat.com>
259 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
260 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
261 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
262 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
264 (finish_incomplete_vars): New function, moved from finish_struct. Use
265 relayout_decl instead of layout_decl.
266 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
267 being TYPE_VFIELD. Use finish_incomplete_vars.
268 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
269 finish_incomplete_vars.
270 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
271 also on ENUMERAL_TYPEs.
273 2020-03-16 Jakub Jelinek <jakub@redhat.com>
276 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
278 2020-03-13 Martin Sebor <msebor@redhat.com>
281 * c-decl.c (builtin_structptr_type_count): New constant.
282 (match_builtin_function_types): Reject decls that are incompatible
283 in types pointed to by pointers.
284 (diagnose_mismatched_decls): Adjust comments.
286 2020-03-05 Joseph Myers <joseph@codesourcery.com>
289 * c-typeck.c (pop_init_level): Do not diagnose initializers as
290 empty when initialized type is error_mark_node.
291 (set_designator, process_init_element): Ignore initializers for
292 elements of a variable-size type or of error_mark_node.
294 2020-03-01 Martin Sebor <msebor@redhat.com>
297 * c-decl.c (types_close_enough_to_match): New function.
298 (match_builtin_function_types):
299 (diagnose_mismatched_decls): Add missing inform call to a warning.
301 2020-03-01 Martin Sebor <msebor@redhat.com>
304 * c-typeck.c (build_functype_attribute_variant): New function.
305 (composite_type): Call it.
307 2020-02-25 Jakub Jelinek <jakub@redhat.com>
310 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
311 Rename last argument from probablity to probability.
313 2020-02-13 Jakub Jelinek <jakub@redhat.com>
316 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
317 *expr if it has side effects.
319 2020-01-30 Jeff Law <law@redhat.com>
322 * c-parser.c (c_parser_switch_statement): Make sure to request
323 marking the switch expr as used.
325 2020-01-22 Joseph Myers <joseph@codesourcery.com>
328 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
329 argument with integer operands.
331 2020-01-16 Kerem Kat <keremkat@gmail.com>
334 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
335 to support 4 available tokens.
337 2020-01-15 Joseph Myers <joseph@codesourcery.com>
340 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
341 determine whether to set DECL_CONTEXT.
343 2020-01-13 Joseph Myers <joseph@codesourcery.com>
346 * c-typeck.c (build_c_cast): Check for expressions with integer
347 operands that can occur in an unevaluated part of an integer
348 constant expression and call note_integer_operands as needed.
350 2019-01-08 Richard Biener <rguenther@suse.de>
353 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
356 2020-01-01 Jakub Jelinek <jakub@redhat.com>
358 Update copyright years.
360 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
362 * c-decl.c (collect_source_ref_cb): Delete.
363 (for_each_global_decl): Rename into...
364 (collect_source_refs): ...this. Call collect_source_ref directly.
365 (c_parse_final_cleanups): Always call collect_source_ref on the main
368 2019-12-19 Julian Brown <julian@codesourcery.com>
369 Cesar Philippidis <cesar@codesourcery.com>
371 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
373 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
374 Allow deref (->) in variable lists if true.
375 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
376 Pass to c_parser_omp_variable_list.
377 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
378 call to c_parser_omp_variable_list.
379 (c_parser_oacc_all_clauses): Support attach and detach clauses.
380 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
381 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
382 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
383 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
384 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
385 and detach. Support deref.
386 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
387 GOMP_MAP_ALWAYS_POINTER for OpenACC.
388 (c_oacc_check_attachments): New function.
389 (c_finish_omp_clauses): Check attach/detach arguments for being
390 pointers using above. Support deref.
392 2019-12-19 Julian Brown <julian@codesourcery.com>
393 Maciej W. Rozycki <macro@codesourcery.com>
394 Tobias Burnus <tobias@codesourcery.com>
395 Thomas Schwinge <thomas@codesourcery.com>
397 * c-parser.c (c_parser_omp_clause_name): Support no_create.
398 (c_parser_oacc_data_clause): Likewise.
399 (c_parser_oacc_all_clauses): Likewise.
400 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
401 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
402 PRAGMA_OACC_CLAUSE_NO_CREATE.
403 * c-typeck.c (handle_omp_array_sections): Support
406 2019-12-09 David Malcolm <dmalcolm@redhat.com>
408 * c-objc-common.c (range_label_for_type_mismatch::get_text):
409 Replace label_text ctor calls.
411 2019-12-04 Joseph Myers <joseph@codesourcery.com>
415 * c-typeck.c (convert_lvalue_to_rvalue): Call
416 require_complete_type for arguments not of void types.
417 (build_indirect_ref): Do not diagnose dereferencing pointers to
419 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
421 2019-12-03 Joseph Myers <joseph@codesourcery.com>
424 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
425 old-style parameter definitions.
427 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
431 * c-decl.c (flexible_array_type_p): Move to common code.
433 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
435 * c-decl.c (start_decl): Allow initialization of variables whose
436 size is a POLY_INT_CST.
437 (finish_decl): Use verify_type_context to check whether the target
438 allows variables with a particular type to have static or thread-local
439 storage duration. Don't raise a second error if such variables do
440 not have a constant size.
441 (grokdeclarator): Use verify_type_context to check whether the
442 target allows fields or array elements to have a particular type.
443 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
444 the target allows pointer difference for the types involved.
445 (build_unary_op): Likewise for pointer increment and decrement.
447 2019-11-29 Joseph Myers <joseph@codesourcery.com>
449 * c-parser.c (struct c_parser): Add members raw_tokens and
451 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
452 using previously-lexed raw tokens.
453 (c_parser_peek_nth_token_raw)
454 (c_parser_check_balanced_raw_token_sequence): New functions.
455 (c_parser_nth_token_starts_std_attributes): Use
456 c_parser_check_balanced_raw_token_sequence for Objective-C.
458 2019-11-25 Joseph Myers <joseph@codesourcery.com>
461 * c-decl.c (finish_declspecs): Use int instead of decimal
462 floating-point types if decimal floating-point not supported.
464 2019-11-25 Joseph Myers <joseph@codesourcery.com>
466 * c-tree.h (struct c_declarator): Use a structure for id member.
467 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
468 declarators at the start, not when handling individual declarators
469 later. Use u.id.id instead of u.id.
470 (grokfield): Use u.id.id instead of u.id.
471 (build_id_declarator): Set u.id.id and u.id.attrs.
472 (finish_declspecs): Handle postfix attributes in case of typedef
474 * c-parser.c (c_parser_direct_declarator)
475 (c_parser_direct_declarator_inner): Place declarator for
476 attributes inside that for function or array, not outside. Set
477 u.id.attrs for identifiers.
478 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
479 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
482 2019-11-22 Jakub Jelinek <jakub@redhat.com>
485 * c-decl.c (identifier_global_tag): Define.
487 2019-11-20 Richard Biener <rguenther@suse.de>
490 * c-decl.c (grokdeclarator): Prevent inlining of nested
491 function with VLA arguments.
493 2019-11-20 Joseph Myers <joseph@codesourcery.com>
495 * c-decl.c (c_warn_type_attributes): New function.
496 (groktypename, grokdeclarator, finish_declspecs): Call
497 c_warn_type_attributes before applying attributes to types.
498 * c-tree.h (c_warn_type_attributes): Declare.
500 2019-11-19 Joseph Myers <joseph@codesourcery.com>
502 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
504 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
505 pedwarn for unknown standard attributes and return error_mark_node
508 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
510 * c-parser.c (c_parser_parse_rtl_body): Always call
511 run_rtl_passes, even if startwith pass is not provided.
513 2019-11-15 Joseph Myers <joseph@codesourcery.com>
515 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
516 duplicate standard attributes.
518 2019-11-15 Joseph Myers <joseph@codesourcery.com>
520 * c-decl.c (std_attribute_table): Add maybe_unused.
522 2019-11-15 Joseph Myers <joseph@codesourcery.com>
524 * c-decl.c (std_attribute_table): Add fallthrough.
525 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
526 attribute at top level.
528 2019-11-15 Joseph Myers <joseph@codesourcery.com>
530 * c-decl.c (std_attribute_table): New.
531 (c_init_decl_processing): Register attributes from
533 * c-parser.c (c_parser_attribute_arguments): Add arguments
534 require_string and allow_empty_args. All callers changed.
535 (c_parser_std_attribute): Set require_string argument for
536 "deprecated" attribute.
538 2019-11-14 Joseph Myers <joseph@codesourcery.com>
540 * c-parser.c (c_parser_postfix_expression)
541 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
542 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
544 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
546 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
547 of build_same_sized_truth_vector_type.
548 (build_vec_cmp): Likewise.
550 2019-11-14 Jakub Jelinek <jakub@redhat.com>
552 * c-parser.c (c_parser_omp_context_selector): Don't require score
553 argument to fit into shwi, just to be INTEGER_CST. Diagnose
556 * c-parser.c (c_parser_omp_context_selector): Rename
557 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
558 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
559 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
562 2019-11-14 Joseph Myers <joseph@codesourcery.com>
564 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
565 ctsk_tagfirstref_attrs.
566 (struct c_declspecs): Update description of attrs. Add
567 postfix_attrs and non_std_attrs_seen_p. Increase size of
568 typespec_kind bit-field.
569 (c_warn_unused_attributes): New declaration.
570 (parser_xref_tag): Update prototype.
571 * c-decl.c (c_warn_unused_attributes): New function.
572 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
573 ctsk_tagref_attrs. Handle attribute declarations.
574 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
575 (grokdeclarator): Handle standard attributes.
576 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
577 attributes to incomplete type reference.
578 (xref_tag): Update call to parser_xref_tag.
579 (declspecs_add_addrspace, declspecs_add_type)
580 (declspecs_add_scspec, declspecs_add_attrs): Set
581 non_std_attrs_seen_p.
582 (finish_declspecs): Apply postfix standard attributes to type.
583 * c-parser.c (c_token_starts_declspecs)
584 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
585 (c_parser_next_tokens_start_declaration): Update comments.
586 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
587 parser->tokens[2] to parser->tokens[1].
588 (c_parser_nth_token_starts_std_attributes)
589 (c_parser_std_attribute_specifier_sequence): New functions.
590 (c_parser_declaration_or_fndef): Add arguments have_attrs and
591 attrs. All callers changed. Handle standard attributes.
592 (c_parser_parms_declarator, c_parser_parms_list_declarator)
593 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
595 (c_parser_declspecs): Add arguments start_std_attr_ok and
596 end_std_attr_ok. All callers changed. Handle standard
598 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
599 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
600 (c_parser_compound_statement_nostart, c_parser_all_labels)
601 (c_parser_label, c_parser_statement, c_parser_for_statement):
602 Handle standard attributes.
603 * c-parser.h (c_parser_declspecs): Update prototype.
604 * gimple-parser.c (c_parser_gimple_declaration): Update call to
607 2019-11-12 Martin Liska <mliska@suse.cz>
609 * gimple-parser.c: Do not include params.h.
611 2019-11-12 Martin Liska <mliska@suse.cz>
613 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
614 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
617 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
618 Frederik Harwath <frederik@codesourcery.com>
621 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
622 (c_parser_oacc_kernels_parallel): Rename function to...
623 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
624 (c_parser_omp_construct): Update accordingly.
627 2019-11-11 Jakub Jelinek <jakub@redhat.com>
629 * c-parser.c (c_parser_translation_unit): Diagnose declare target
630 without corresponding end declare target.
632 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
634 * c-convert.c (convert): Only handle vector conversions if one of
635 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
637 * c-typeck.c (build_array_ref): Only allow vector indexing if the
638 vectors satisfy gnu_vector_type_p.
639 (build_unary_op): Only allow unary operators to be applied to
640 vectors if they satisfy gnu_vector_type_p.
641 (digest_init): Only allow by-element initialization of vectors
642 if they satisfy gnu_vector_type_p.
643 (really_start_incremental_init): Likewise.
644 (push_init_level): Likewise.
645 (pop_init_level): Likewise.
646 (process_init_element): Likewise.
647 (build_binary_op): Only allow binary operators to be applied to
648 vectors if they satisfy gnu_vector_type_p.
650 2019-11-08 Joseph Myers <joseph@codesourcery.com>
652 * c-decl.c (grokparms): Convert () in a function definition to
654 (store_parm_decls_oldstyle): Pedwarn for C2x.
655 (store_parm_decls): Update comment about () not generating a
658 2019-11-07 Joseph Myers <joseph@codesourcery.com>
660 * c-parser.c (c_parser_attribute_arguments): New function.
661 Factored out of c_parser_gnu_attribute.
662 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
663 (c_parser_balanced_token_sequence, c_parser_std_attribute)
664 (c_parser_std_attribute_specifier): New functions.
665 (c_parser_transaction_attributes): Use
666 c_parser_std_attribute_specifier.
668 2019-11-07 Joseph Myers <joseph@codesourcery.com>
670 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
671 lex_joined_string and translate_strings_p.
672 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
674 (c_parser_string_literal): New function.
675 (c_parser_static_assert_declaration_no_semi): Use
676 c_parser_string_literal. Do not set lex_untranslated_string.
677 (c_parser_asm_string_literal): Use c_parser_string_literal.
678 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
679 (c_parser_gnu_attributes): Set and restore translate_strings_p
680 instead of lex_untranslated_string.
681 (c_parser_asm_statement): Do not set lex_untranslated_string.
682 (c_parser_asm_operands): Likewise.
683 (c_parser_has_attribute_expression): Set and restore
684 translate_strings_p instead of lex_untranslated_string.
685 (c_parser_postfix_expression): Use c_parser_string_literal.
686 (pragma_lex): Likewise.
687 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
688 (c_parse_file): Set translate_strings_p.
689 * gimple-parser.c (c_parser_gimple_postfix_expression)
690 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
691 * c-parser.c (c_parser_string_literal): Declare function.
693 2019-11-02 Jakub Jelinek <jakub@redhat.com>
695 * c-parser.c (c_finish_omp_declare_variant): Use
696 omp_get_context_selector instead of c_omp_get_context_selector.
698 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
700 * c-tree.h (c_simulate_enum_decl): Declare.
701 * c-decl.c (c_simulate_enum_decl): New function.
702 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
704 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
706 * c-tree.h (c_simulate_builtin_function_decl): Declare.
707 * c-decl.c (c_simulate_builtin_function_decl): New function.
708 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
711 2019-10-28 Martin Sebor <msebor@redhat.com>
714 * c-decl.c (names_builtin_p): Define a new function.
716 2019-10-28 Richard Biener <rguenther@suse.de>
719 * gimple-parser.c (c_parser_parse_gimple_body): Make
720 current_bb the entry block initially to easier recover
722 (c_parser_gimple_compound_statement): Adjust.
724 2019-10-24 Jakub Jelinek <jakub@redhat.com>
726 * c-parser.c (c_finish_omp_declare_variant): Use
727 omp_context_selector_matches instead of
728 c_omp_context_selector_matches.
729 * c-decl.c (c_decl_attributes): Add "omp declare target block"
730 attribute in between declare target and end declare target
733 2019-10-15 Joseph Myers <joseph@codesourcery.com>
735 * c-parser.c (c_parser_attribute_any_word): Rename to
736 c_parser_gnu_attribute_any_word. All callers changed.
737 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
739 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
741 (c_parser_declaration_or_fndef, c_parser_declspecs)
742 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
743 (c_parser_struct_declaration, c_parser_declarator)
744 (c_parser_gnu_attribute, c_parser_compound_statement)
745 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
746 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
747 attribute-related syntax productions.
749 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
751 * c-objc-common.c (useful_aka_type_p): Replace with...
752 (get_aka_type): ...this new function. Given the original type,
753 decide which aka type to print (if any). Only look through typedefs
754 if user_facing_original_type_p.
755 (print_type): Update accordingly.
757 2019-10-14 Jakub Jelinek <jakub@redhat.com>
759 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
760 into int NESTED, if it is 2, diagnose missing commas in between
762 (c_parser_omp_context_selector): Pass 2 as last argument to
763 c_parser_omp_all_clauses.
765 2019-10-12 Jakub Jelinek <jakub@redhat.com>
767 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
768 For simd properties, put them directly into TREE_VALUE.
769 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
770 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
771 add "omp declare variant base" attribute rather than
772 "omp declare variant".
774 2019-10-11 Joseph Myers <joseph@codesourcery.com>
776 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
778 2019-10-10 Jakub Jelinek <jakub@redhat.com>
780 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
781 true, terminate processing on closing paren and don't skip to end of
783 (c_parser_omp_declare_simd): Handle also declare variant.
784 (omp_construct_selectors, omp_device_selectors,
785 omp_implementation_selectors, omp_user_selectors): New variables.
786 (c_parser_omp_context_selector,
787 c_parser_omp_context_selector_specification,
788 c_finish_omp_declare_variant): New functions.
789 (c_finish_omp_declare_simd): Handle both declare simd and
791 (c_parser_omp_declare): Handle declare variant.
793 2019-10-02 Joseph Myers <joseph@codesourcery.com>
795 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
798 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
800 * c-objc-common.c (useful_aka_type_p): New function.
801 (print_type): Use it to decide whether an aka type is worth printing.
803 2019-09-27 Jakub Jelinek <jakub@redhat.com>
806 * c-parser.c (c_parser_predefined_identifier): New function.
807 (c_parser_postfix_expression): Use it.
808 (c_parser_omp_variable_list): Parse predefined identifiers.
809 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
810 in shared and firstprivate clauses, even when they are predetermined
813 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
815 * c-typeck.c (build_function_call_vec): Take the original function
816 decl as an optional final parameter. Pass all built-in calls to
817 check_builtin_function_arguments.
819 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
822 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
823 of identifiers in the external scope only for variables and functions.
825 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
828 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
830 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
833 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
834 after determining that the first token is not
835 PRAGMA_GCC_PCH_PREPROCESS.
837 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
839 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
840 FUNCTION_DECL to the right value in the presence of nested declarators.
842 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
845 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
847 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
850 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
851 of a built_in_function.
852 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
854 2019-08-10 Jakub Jelinek <jakub@redhat.com>
856 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
857 (c_parser_omp_clause_device_type): New function.
858 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
859 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
860 (c_parser_omp_declare_target): Handle device_type clauses. Remove
861 diagnostics for declare target with clauses nested in clause-less
862 declare target declaration-definition-seq.
863 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
865 2019-08-09 Jakub Jelinek <jakub@redhat.com>
867 * c-parser.c (check_no_duplicate_clause): Simplify using
869 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
870 directive name modifiers.
871 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
874 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
875 check_no_duplicate_clause call. Comment it out, instead emit a
876 warning for duplicate dist_schedule clauses.
878 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
880 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
882 2019-08-08 Jakub Jelinek <jakub@redhat.com>
884 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
885 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
886 instead of generic_head to track duplicates.
888 2019-08-07 Jakub Jelinek <jakub@redhat.com>
890 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
891 (c_parser_omp_clause_use_device_addr): New function.
892 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
893 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
894 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
895 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
896 map or use_device_* clauses.
897 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
898 in OpenMP, require pointer type rather than pointer or array type.
899 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
901 2019-07-31 Jakub Jelinek <jakub@redhat.com>
904 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
905 even if finish is UNKNOWN_LOCATION, just use start as finish in that
908 2019-07-25 Martin Liska <mliska@suse.cz>
909 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
912 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
914 2019-07-25 Martin Liska <mliska@suse.cz>
916 * c-decl.c (merge_decls): Use new macros
917 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
919 2019-07-23 Richard Biener <rguenther@suse.de>
921 PR tree-optimization/83518
922 * gimple-parser.c (c_parser_parse_gimple_body): When we have
923 a CFG also rebuild cgraph edges.
925 2019-07-20 Jakub Jelinek <jakub@redhat.com>
927 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
928 (c_parser_omp_clause_bind): New function.
929 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
930 (OMP_LOOP_CLAUSE_MASK): Define.
931 (c_parser_omp_loop): New function.
932 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
933 loop combined with parallel or teams.
934 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
935 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
937 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
940 * c-decl.c (finish_function): Check targetm.warn_func_return
941 before issuing a -Wreturn-type warning.
943 2019-07-12 Alexandre Oliva <oliva@adacore.com>
945 * gimple-parser.c (c_parser_gimple_try_stmt): New.
946 (c_parser_compound_statement): Call it.
948 2019-07-12 Jakub Jelinek <jakub@redhat.com>
950 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
951 (c_parser_omp_clause_order): New function.
952 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
953 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
954 PRAGMA_OMP_CLAUSE_ORDER.
955 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
957 2019-07-10 Richard Biener <rguenther@suse.de>
959 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
960 _Literal (int *) &x for address literals.
962 2019-07-09 Martin Sebor <msebor@redhat.com>
965 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
967 (field_decl_cmp): Same.
968 * c-parser.c (c_parser_struct_or_union_specifier): Same.
970 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
972 2019-07-09 Martin Sebor <msebor@redhat.com>
975 * c-decl.c: Change class-key from class to struct and vice versa
976 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
977 * gimple-parser.c: Same.
979 2019-07-01 Richard Biener <rguenther@suse.de>
981 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
982 _Literal (char *) &"foo" for address literals pointing to
985 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
987 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
988 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
989 C incompatibility if alternate "__intN__" form is used.
991 2019-06-24 Martin Sebor <msebor@redhat.com>
993 * c-typeck.c (build_binary_op): Hyphenate floating-point.
995 2019-06-10 Jakub Jelinek <jakub@redhat.com>
997 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
998 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
999 (c_parser_omp_scan_loop_body): New function.
1000 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1001 inscan reduction clauses.
1002 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1003 non-inscan reductions on the same construct, or inscan reductions with
1004 ordered or schedule clauses, or inscan array reductions.
1006 2019-06-05 Martin Sebor <msebor@redhat.com>
1009 * c-typeck.c (c_finish_return): Only consider functions returning
1010 pointers as candidates for -Wreturn-local-addr.
1012 2019-06-05 Martin Sebor <msebor@redhat.com>
1014 * c-decl.c (start_decl): Adjust quoting and hyphenation
1016 (finish_decl): Same.
1017 (finish_enum): Same.
1018 (start_function): Same.
1019 (declspecs_add_type): Same.
1020 * c-parser.c (warn_for_abs): Same.
1021 * c-typeck.c (build_binary_op): Same.
1023 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1026 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1027 marked with an OpenACC 'routine' directive.
1030 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1031 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1034 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1035 clauses from "omp declare target" attribute.
1037 2019-05-16 Martin Sebor <msebor@redhat.com>
1039 * c-decl.c (start_decl): Quote keywords, operators, and
1040 types in diagnostics.
1041 (finish_decl): Same.
1042 * c-parser.c (c_parser_asm_statement): Same.
1043 (c_parser_conditional_expression): Same.
1044 (c_parser_transaction_cancel): Same.
1045 * c-typeck.c (c_common_type): Same.
1046 (build_conditional_expr): Same.
1047 (digest_init): Same.
1048 (process_init_element): Same.
1049 (build_binary_op): Same.
1051 2019-05-17 Richard Biener <rguenther@suse.de>
1053 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1054 (c_parser_gimple_unary_expression): Likewise.
1055 (c_parser_gimple_parentized_ternary_expression): New function.
1057 2019-05-16 Richard Biener <rguenther@suse.de>
1059 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1060 (c_parser_gimple_unary_expression): Likewise.
1062 2019-05-15 Richard Biener <rguenther@suse.de>
1064 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1067 2019-05-14 Richard Biener <rguenther@suse.de>
1069 * gimple-parser.c (c_parser_gimple_statement): Remove
1070 questionable auto-promotion to VIEW_CONVERT_EXPR.
1071 (c_parser_gimple_typespec): Split out from __MEM parsing.
1072 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1073 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1074 as __VIEW_CONVERT with -gimple.
1076 2019-05-09 Martin Liska <mliska@suse.cz>
1078 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1080 (c_parser_gimple_unary_expression): Parse also binary expression
1082 (c_parser_gimple_parentized_binary_expression): New function.
1084 2019-05-09 Martin Liska <mliska@suse.cz>
1086 * gimple-parser.c (struct gimple_parser): Add probability.
1087 for gimple_parser_edge.
1088 (gimple_parser::push_edge): Add new argument probability.
1089 (c_parser_gimple_parse_bb_spec): Parse also probability
1091 (c_parser_parse_gimple_body): Set edge probability.
1092 (c_parser_gimple_compound_statement): Consume token
1093 before calling c_parser_gimple_goto_stmt.
1095 (c_parser_gimple_statement): Pass new argument.
1096 (c_parser_gimple_goto_stmt): Likewise.
1097 (c_parser_gimple_if_stmt): Likewise.
1098 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1099 * c-parser.c (c_parser_declaration_or_fndef): Pass
1100 hot_bb_threshold argument.
1101 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1103 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1105 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1108 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1109 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1110 (c_parser_do_statement): Likewise.
1111 (c_parser_for_statement): Likewise. Formatting fixes.
1112 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1113 emit DEBUG_BEGIN_STMTs if needed.
1115 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1118 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1119 (c_start_case): Don't clear it.
1120 (do_case): Adjust c_add_case_label caller.
1121 (c_finish_case): Adjust c_do_switch_warnings caller.
1124 * c-decl.c (merge_decls): If remove is main variant and
1125 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1126 variant that has newdecl as TYPE_NAME if any.
1128 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1131 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1132 don't try to remove it from the variant list, but instead assert
1135 2019-04-01 Richard Biener <rguenther@suse.de>
1138 * c-tree.h (c_get_alias_set): Declare.
1139 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1140 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1141 as the underlying integer type.
1143 2019-03-19 Martin Sebor <msebor@redhat.com>
1145 PR tree-optimization/89688
1146 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1147 kinds of initializers.
1149 2019-03-19 Jakub Jelinek <jakub@redhat.com>
1152 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1153 return type even if quals_used is 0. Formatting fixes.
1155 2019-03-14 Richard Biener <rguenther@suse.de>
1157 * c-tree.h (enum c_declspec_il): New.
1158 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1160 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1161 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1162 (c_parser_declspecs): Adjust.
1163 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1164 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1166 (struct gimple_parser): New.
1167 (gimple_parser::push_edge): New method.
1168 (c_parser_gimple_parse_bb_spec): New helper.
1169 (c_parser_parse_gimple_body): Get start pass and IL specification.
1170 Initialize SSA and CFG.
1171 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1172 Build a gimple_parser parsing state and pass it along.
1173 (c_parser_gimple_statement): Change intermittend __PHI internal
1174 function argument for the edge.
1175 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1176 (c_parser_gimple_goto_stmt): Record edges to build.
1177 (c_parser_gimple_if_stmt): Likewise.
1178 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1179 (c_parser_gimple_or_rtl_pass_list): Likewise.
1181 2019-03-11 Martin Liska <mliska@suse.cz>
1183 * c-decl.c (check_for_loop_decls): Wrap an option name
1184 in a string format message and fix GNU coding style.
1185 * c-parser.c (c_parser_declspecs): Likewise.
1187 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1189 PR tree-optimization/89550
1190 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1192 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1193 or warning returned true.
1195 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1198 * c-typeck.c (convert_arguments): Call inform_declaration only if
1199 the previous warning_at call returned true.
1201 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1203 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1204 parameter. Adjust all users.
1205 (c_parser_oacc_simple_clause): Replace parser with loc formal
1206 parameter. Adjust all users.
1208 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1211 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1212 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1214 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1217 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1218 before c_decl_attributes rather than after it.
1220 2019-02-06 Jakub Jelinek <jakub@redhat.com>
1223 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1224 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1225 instead of 3 nested ifs.
1227 2019-02-06 Joseph Myers <joseph@codesourcery.com>
1230 * c-decl.c (finish_decl): Do not complete array types for arrays
1231 with external linkage not at file scope.
1233 2019-02-05 Richard Biener <rguenther@suse.de>
1236 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1237 all type variants when not supported.
1239 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1242 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1243 * c-decl.c (decl_jump_unsafe): Return false for
1244 C_DECL_COMPOUND_LITERAL_P decls.
1245 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1247 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1250 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1254 * c-decl.c (last_fileptr_type): Remove.
1255 (last_structptr_types): New variable.
1256 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1257 {old,new}rettype instead of the types themselves. Assert
1258 last_structptr_types array has the same number of elements
1259 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1260 argument oldtype and newtype. Instead of handling
1261 just fileptr_type_node specially, handle all builtin_structptr_types
1262 pointer nodes. Formatting fix.
1264 2019-01-24 Martin Sebor <msebor@redhat.com>
1269 * c-decl.c (match_builtin_function_types): Add arguments.
1270 (diagnose_mismatched_decls): Diagnose mismatched declarations
1271 of built-ins more strictly.
1273 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1276 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1277 on #pragma omp cancel with different modifiers.
1279 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1283 * c-typeck.c (convert_for_assignment): Upate the
1284 warn_for_address_or_pointer_of_packed_member call.
1286 2019-01-16 Tom Honermann <tom@honermann.net>
1287 Jason Merrill <jason@redhat.com>
1289 * c-typeck.c (digest_init): Revised the error message produced for
1290 ill-formed cases of array initialization with a string literal.
1291 (error_init): Make variadic.
1293 2019-01-12 Jakub Jelinek <jakub@redhat.com>
1295 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1297 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1300 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1301 if current_function_decl is non-NULL.
1303 2019-01-07 Joseph Myers <joseph@codesourcery.com>
1307 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1308 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1309 functions declared but never defined only for external scope, not
1312 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1315 * c-parser.c (c_parser_postfix_expression): Parse
1316 __builtin_convertvector.
1318 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1320 Update copyright years.
1322 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1325 * c-typeck.c (convert_for_assignment): Call
1326 warn_for_address_or_pointer_of_packed_member.
1328 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1330 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1331 a more specific error message (instead of just falling through).
1333 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1335 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1336 asm qualifier is first seen; use that to give nicer "duplicate asm
1337 qualifier" messages. Delete 'quals" variable, instead pass the
1338 "is_volatile_ flag to build_asm_stmt directly.
1339 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1340 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1342 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1344 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1345 "done" boolean variable.
1347 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1350 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1351 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1352 (build_binary_op): Use struct op_location_t and
1353 class binary_op_rich_location.
1355 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1358 * c-convert.c (convert): Call c_fully_fold before calling
1359 ubsan_instrument_float_cast.
1361 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1363 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1366 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1368 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1369 after asm. Pass a flag for it to build_asm_expr.
1370 * c-tree.h (build_asm_expr): Update declaration.
1371 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1374 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1377 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1378 combination of volatile and goto, in any order, without repetitions.
1380 2018-12-04 James Norris <jnorris@codesourcery.com>
1381 Cesar Philippidis <cesar@codesourcery.com>
1382 Julian Brown <julian@codesourcery.com>
1384 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1387 2018-11-30 Richard Biener <rguenther@suse.de>
1389 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1390 _Literal (type) { ... } as empty aggregate or vector constructor.
1392 2018-11-29 Martin Sebor <msebor@redhat.com>
1395 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1396 (convert_arguments): Add comments. Pass additional argument to
1399 2018-11-29 Martin Sebor <msebor@redhat.com>
1403 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1405 2018-11-23 Martin Sebor <msebor@redhat.com>
1408 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1409 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1411 2018-11-20 Martin Sebor <msebor@redhat.com>
1413 * c-parser.c (c_parser_has_attribute_expression): New function.
1414 (c_parser_attribute): New function.
1415 (c_parser_attributes): Move code into c_parser_attribute.
1416 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1418 2018-11-15 Martin Sebor <msebor@redhat.com>
1421 * c-decl.c (header_for_builtin_fn): Declare.
1422 (diagnose_mismatched_decls): Diagnose declarations of built-in
1423 functions without a prototype.
1424 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1425 (convert_argument): Same.
1426 (convert_arguments): Factor code out into convert_argument.
1427 Detect mismatches between built-in formal arguments in calls
1428 to built-in without prototype.
1429 (build_conditional_expr): Same.
1430 (type_or_builtin_type): New function.
1431 (convert_for_assignment): Add argument. Conditionally issue
1432 warnings instead of errors for mismatches.
1434 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1436 * c-decl.c: Replace "source_location" with "location_t".
1437 * c-tree.h: Likewise.
1438 * c-typeck.c: Likewise.
1439 * gimple-parser.c: Likewise.
1441 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1443 * c-parser.c (c_parser_omp_clause_final): Use
1444 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1445 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1446 parsing instead of c_parser_paren_condition.
1447 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1448 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1449 c_fully_fold instead of c_parser_condition.
1450 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1451 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1452 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1453 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1454 c_parser_expr_no_commas instead of c_parser_expression.
1456 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1457 reduction clause with inscan modifier.
1459 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1460 clauses other than atomic_default_mem_order.
1462 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1464 * c-parser.c: Include memmode.h.
1465 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1466 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1467 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1468 task_reduction clauses.
1469 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1470 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1471 section, or lvalue assignment expression.
1472 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1473 (c_parser_omp_clause_lastprivate): Parse optional
1474 conditional: modifier.
1475 (c_parser_omp_clause_hint): Require constant integer expression rather
1476 than just integer expression.
1477 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1479 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1480 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1481 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1483 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1484 iterators. Parse mutexinoutset and depobj kinds.
1485 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1487 (c_parser_omp_all_clauses): Likewise. Handle
1488 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1489 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1490 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1491 default memory order from requires directive if any. Adjust
1492 c_finish_omp_atomic caller.
1493 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1494 (c_parser_omp_flush): Parse flush with memory-order-clause.
1495 (c_parser_omp_for_loop): Allow NE_EXPR even in
1496 OpenMP loops, adjust c_finish_omp_for caller.
1497 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1498 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1499 Allow to be called while parsing combined parallel master.
1500 Parse combined master taskloop{, simd}.
1501 (c_parser_omp_parallel): Parse combined
1502 parallel master{, taskloop{, simd}} constructs.
1503 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1504 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1505 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1506 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1507 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1508 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1509 around teams body. Use SET_EXPR_LOCATION.
1510 (c_parser_omp_target_data): Allow target data
1511 with only use_device_ptr clauses.
1512 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1513 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1514 (c_parser_omp_requires): New function.
1515 (c_finish_taskloop_clauses): New function.
1516 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1517 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1518 declaration. Disallow in_reduction clause when combined with parallel
1520 (c_parser_omp_construct): Adjust c_parser_omp_master and
1521 c_parser_omp_taskgroup callers.
1522 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1524 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1525 like OMP_CLAUSE_REDUCTION.
1526 (handle_omp_array_sections): Likewise. Call save_expr on array
1527 reductions before calling build_index_type. Handle depend clauses
1529 (struct c_find_omp_var_s): New type.
1530 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1531 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1532 with static, runtime or auto schedule kinds. Call save_expr for whole
1533 array reduction sizes. Diagnose reductions with zero sized elements
1534 or variable length structures. Diagnose nogroup clause used with
1535 reduction clause(s). Handle depend clause with
1536 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1537 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1538 some different type for other kinds. Use build_unary_op with
1539 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1540 Handle depend clauses with iterators. Remove no longer needed special
1541 case that predetermined const qualified vars may be specified in
1542 firstprivate clause. Complain if const qualified vars are mentioned
1543 in data-sharing clauses other than firstprivate or shared. Use
1544 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1545 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1546 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1547 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1549 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1551 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1552 logic for change to name_hint::operator bool.
1553 (undeclared_variable): Likewise.
1554 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1555 (c_parser_parameter_declaration): Likewise.
1557 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1559 * c-errors.c (pedwarn_c11): New function.
1560 * c-parser.c (disable_extension_diagnostics): Save
1561 warn_c11_c2x_compat and set it to 0.
1562 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1563 (c_parser_static_assert_declaration_no_semi): Handle
1564 _Static_assert without string constant.
1565 * c-tree.h (pedwarn_c11): New prototype.
1567 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1569 * Make-lang.in (selftest-c): New.
1570 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1571 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1572 from gcc/Makefile.in.
1574 2018-10-02 Richard Biener <rguenther@suse.de>
1576 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1578 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1581 * c-typeck.c (build_binary_op): Use excess precision for
1582 comparisons of integers and floating-point for C11 and later.
1584 2018-09-26 Martin Jambor <mjambor@suse.cz>
1587 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1590 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1592 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1593 Update for new param.
1594 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1597 2018-09-17 Martin Jambor <mjambor@suse.cz>
1600 * c-parser.c: (warn_for_abs): New function.
1601 (c_parser_postfix_expression_after_primary): Call it.
1603 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1605 * c-typeck.c (digest_init): Shorten overlength strings.
1607 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1609 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1611 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1613 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1614 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1616 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1618 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1619 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1621 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1624 * c-decl.c (implicitly_declare): Update call to
1625 maybe_add_include_fixit to suggest overriding the location, as it
1627 * c-objc-common.c (c_tree_printer): Update for conversion of
1628 show_caret_p to a tri-state.
1630 2018-08-27 Martin Liska <mliska@suse.cz>
1632 * c-decl.c (locate_old_decl): Use new function
1633 fndecl_built_in_p and remove check for FUNCTION_DECL if
1635 (diagnose_mismatched_decls): Likewise.
1636 (merge_decls): Likewise.
1637 (warn_if_shadowing): Likewise.
1638 (pushdecl): Likewise.
1639 (implicitly_declare): Likewise.
1640 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1641 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1642 * c-typeck.c (build_function_call_vec): Likewise.
1643 (convert_arguments): Likewise.
1645 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1648 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1649 (diagnose_mismatched_decls): Likewise, in various places.
1650 (warn_if_shadowing): Likewise.
1651 (implicit_decl_warning): Likewise.
1652 (implicitly_declare): Likewise.
1653 (undeclared_variable): Likewise.
1654 (declare_label): Likewise.
1655 (grokdeclarator): Likewise.
1656 (start_function): Likewise.
1657 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1658 (c_parser_parameter_declaration): Likewise.
1659 (c_parser_binary_expression): Likewise.
1660 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1661 (parser_build_binary_op): Likewise.
1662 (build_unary_op): Likewise.
1663 (error_init): Likewise.
1664 (pedwarn_init): Likewise.
1665 (warning_init): Likewise.
1666 (convert_for_assignment): Likewise.
1668 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1670 * c-objc-common.c: Include "gcc-rich-location.h".
1671 (c_tree_printer): Move implemenation of '%T' to...
1672 (print_type): ...this new function.
1673 (range_label_for_type_mismatch::get_text): New function.
1674 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1675 range for the various ic_argpass cases.
1676 (class maybe_range_label_for_tree_type_mismatch): New class.
1677 (build_binary_op): Use it when calling binary_op_error.
1679 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1681 * c-decl.c (start_decl): Do not warn if variables is named as main
1682 and is a local variable.
1684 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1687 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1688 objects of unknown size.
1690 2018-08-13 Martin Sebor <msebor@redhat.com>
1692 PR tree-optimization/71625
1693 * c-parser.c (c_parser_declaration_or_fndef): Call
1694 braced_list_to_string.
1696 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1699 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1702 2018-08-01 Martin Sebor <msebor@redhat.com>
1704 PR tree-optimization/86650
1705 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1706 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1708 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1711 * c-typeck.c (init_field_decl_cmp): New function.
1712 (output_pending_init_elements): Use it for field comparisons
1713 instead of pure bit_position comparisons.
1715 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1717 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1718 type here, instead add "omp declare target implicit" attribute.
1719 (finish_decl): Diagnose vars without mappable type here.
1721 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1722 Thomas Schwinge <thomas@codesourcery.com>
1723 Cesar Philippidis <cesar@codesourcery.com>
1725 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1726 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1727 to their non-present_or_* counterparts. Make 'self' an alias to
1728 PRAGMA_OACC_CLAUSE_HOST.
1729 (c_parser_oacc_data_clause): Update GOMP mappings for
1730 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1731 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1732 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1733 Remove support for present_or_* clauses.
1734 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1735 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1736 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1737 (OACC_DATA_CLAUSE_MASK): Likewise.
1738 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1739 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1740 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1741 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1742 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1744 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1746 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1747 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1748 (c_parser_gimple_unary_expression): Likewise.
1750 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1753 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1754 before doing POINTER_DIFF_EXPR.
1756 2018-06-07 Marek Polacek <polacek@redhat.com>
1759 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1760 for loop initial declarations.
1762 2018-05-30 David Pagan <dave.pagan@oracle.com>
1765 * c-decl.c (grokdeclarator): Update check for return type warnings.
1766 (start_function): Likewise.
1767 (finish_function): Likewise.
1768 * c-typeck.c (c_finish_return): Update check for return type warnings.
1769 Pass OPT_Wreturn_type to pedwarn when appropriate.
1771 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1773 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1776 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1778 * gimple-parser.c: Include internal-fn.h.
1779 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1780 (c_parser_gimple_call_internal): New function.
1781 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1782 Fix typos in comment.
1784 2018-05-10 Jakub Jelinek <jakub@redhat.com>
1787 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1788 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1790 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1791 fold_offsetof_1, pass argtype as TYPE to it and drop the
1794 2018-05-02 David Pagan <dave.pagan@oracle.com>
1797 * c-decl.c (old_style_parameter_scope): New function.
1798 * c-parser.c (c_parser_postfix_expression): Check for statement
1799 expressions in old-style function parameter list declarations.
1800 * c-parser.h (old_style_parameter_scope): New extern declaration.
1802 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1805 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1806 it is not TREE_STATIC.
1807 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1808 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1809 its COMPOUND_LITERAL_EXPR_DECL.
1811 2018-03-21 Joseph Myers <joseph@codesourcery.com>
1813 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1814 where all functions return the same _FloatN or _FloatNx type,
1815 treat integer types as _Float64 instead of double.
1817 2018-03-21 Jakub Jelinek <jakub@redhat.com>
1820 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1821 building vector comparison, diagnose it and return error_mark_node.
1823 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1826 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1827 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1828 INTEGER_TYPE element type.
1830 2018-03-13 David Pagan <dave.pagan@oracle.com>
1833 * c-typeck.c (output_init_element): Ensure field initializer
1834 expression is always evaluated if there are side effects.
1836 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1839 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1840 !building_stmt_list_p ().
1842 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1845 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1846 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1847 and include the BIND_EXPR in the list of things that need to be
1850 2018-02-09 Nathan Sidwell <nathan@acm.org>
1853 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1854 to strict_aliasing_warning.
1856 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1858 * c-typeck.c (really_start_incremental_init, push_init_level,
1859 set_nonincremental_init, output_init_element, process_init_element):
1860 Use DECL_UNNAMED_BIT_FIELD.
1862 2018-01-31 Marek Polacek <polacek@redhat.com>
1865 * c-parser.c (c_parser_compound_statement_nostart): Call
1866 expansion_point_location_if_in_system_header.
1868 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1871 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1874 2018-01-13 Jakub Jelinek <jakub@redhat.com>
1877 * c-tree.h (decl_constant_value_1): Add a bool argument.
1878 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1879 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1880 (decl_constant_value): Adjust caller.
1881 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1882 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1883 decl_constant_value returns initializer that has BLKmode or
1885 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1888 Alan Hayward <alan.hayward@arm.com>
1889 David Sherwood <david.sherwood@arm.com>
1891 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1892 TYPE_VECTOR_SUBPARTS.
1894 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1896 Update copyright years.
1898 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1901 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1902 c_parser_conditional_expression, c_parser_cast_expression,
1903 c_parser_sizeof_expression, c_parser_alignof_expression,
1904 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1905 c_parser_transaction_expression): Use set_error () method instead
1906 of setting value member to error_mark_node.
1908 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1910 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1911 and _Float<N>X built-in functions.
1913 2017-12-22 Jakub Jelinek <jakub@redhat.com>
1916 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1917 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1918 incomplete vars rather than after it.
1921 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1922 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1923 and consider empty ones if there are no other stmts. For
1924 -Wunused-value walk all statements before the one only followed by
1927 2017-12-22 Mike Stump <mikestump@comcast.net>
1928 Eric Botcazou <ebotcazou@adacore.com>
1930 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1931 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1932 (c_parser_do_statement): Likewise.
1933 (c_parser_for_statement): Likewise.
1934 (c_parser_statement_after_labels): Adjust calls to above.
1935 (c_parse_pragma_ivdep): New static function.
1936 (c_parser_pragma_unroll): Likewise.
1937 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1938 <PRAGMA_UNROLL>: New case.
1940 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1942 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1943 perform_integral_promotions, digest_init): Replace Yoda conditions
1944 with typical order conditions.
1945 * c-decl.c (check_bitfield_type_and_width): Likewise.
1947 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1949 * c-typeck.c (c_safe_arg_type_equiv_p,
1950 c_safe_function_type_cast_p): New function.
1951 (build_c_cast): Implement -Wcast-function-type.
1953 2017-12-14 Richard Biener <rguenther@suse.de>
1956 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1957 like REALPART_EXPR for the behavior of whether its operand
1960 2017-12-12 Marek Polacek <polacek@redhat.com>
1963 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1965 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1967 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1968 * c-parser.c (add_debug_begin_stmt): New.
1969 (c_parser_declaration_or_fndef): Call it.
1970 (c_parser_compound_statement_nostart): Likewise.
1971 (c_parser_statement_after_labels): Likewise.
1972 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1974 2017-12-07 Joseph Myers <joseph@codesourcery.com>
1976 * c-decl.c (build_compound_literal): Add parameter alignas_align
1977 and set alignment of decl if nonzero.
1978 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1979 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1981 (c_parser_struct_declaration): Update syntax comment.
1982 (c_parser_type_name): Add alignas_ok argument and pass it to
1984 (c_parser_cast_expression): Pass true to c_parser_type_name and
1985 give error if a cast used an _Alignas specifier.
1986 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1987 give error if sizeof (type-name) used an _Alignas specifier.
1988 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1989 give error if _Alignof (type-name) used an _Alignas specifier.
1990 (c_parser_postfix_expression_after_paren_type): Check specified
1991 alignment for a compound literal and pass it to
1992 build_compound_literal.
1993 * c-parser.h (c_parser_type_name): Update prototype.
1994 * c-tree.h (build_compound_literal): Update prototype.
1996 2017-12-07 Martin Sebor <msebor@redhat.com>
1999 * c-decl.c (c_decl_attributes): Look up existing declaration and
2000 pass it to decl_attributes.
2002 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2005 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2006 reserved for use by the implementation.
2008 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2010 * c-decl.c: Include "c-family/c-spellcheck.h".
2012 2017-12-05 Martin Liska <mliska@suse.cz>
2013 Jakub Jelinek <jakub@redhat.com>
2015 * c-typeck.c (pointer_diff): Add new argument and instrument
2016 pointer subtraction.
2017 (build_binary_op): Similar for pointer comparison.
2019 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2022 * c-parser.c: Include tree-iterator.h.
2023 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2024 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2028 * c-tree.h (decl_constant_value_1): Declare.
2029 * c-typeck.c (decl_constant_value_1): New function.
2030 (decl_constant_value): Use it.
2031 * c-fold.c (c_fully_fold_internal): If in_init, use
2032 decl_constant_value_1 instead of decl_constant_value.
2034 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2036 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2038 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2041 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2042 c_switch_covers_all_cases_p returns true.
2044 2017-11-28 Julia Koval <julia.koval@intel.com>
2045 Sebastian Peryt <sebastian.peryt@intel.com>
2047 * Make-lang.in (c/c-array-notation.o): Remove.
2048 * c-array-notation.c: Delete.
2049 * c-decl.c: Remove cilkplus condition.
2050 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2051 c_parser_cilk_verify_simd, c_parser_array_notation,
2052 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2053 c_parser_cilk_simd_fn_vector_attrs,
2054 c_finish_cilk_simd_fn_tokens): Delete.
2055 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2056 (c_parser_direct_declarator_inner): Ditto.
2057 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2058 (c_parser_attributes, c_parser_compound_statement,
2059 c_parser_statement_after_labels, c_parser_if_statement,
2060 c_parser_switch_statement, c_parser_while_statement,
2061 c_parser_do_statement, c_parser_for_statement,
2062 c_parser_unary_expression, c_parser_postfix_expression,
2063 c_parser_postfix_expression_after_primary,
2064 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2065 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2067 * c-typeck.c (build_array_ref, build_function_call_vec,
2069 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2070 c_finish_loop, build_binary_op): Remove cilkplus support.
2072 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2074 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2077 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
2079 * Make-lang.in (c.install-plugin): Install backend import library.
2081 2017-11-23 Jakub Jelinek <jakub@redhat.com>
2083 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2084 pragma_stmt context.
2086 2017-11-23 Mike Stump <mikestump@comcast.net>
2087 Eric Botcazou <ebotcazou@adacore.com>
2089 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2091 (c_parser_do_statement): Likewise.
2092 (c_parser_for_statement): Likewise.
2094 2017-11-22 David Malcolm <dmalcolm@redhat.com>
2097 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2098 bool to bool *. Within '%T' handling, if showing an "aka", use
2099 "quoted" param to add appropriate quoting.
2101 2017-11-22 Marek Polacek <polacek@redhat.com>
2106 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2108 2017-11-21 David Malcolm <dmalcolm@redhat.com>
2111 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2112 earlier failed lookups.
2114 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2116 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2117 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2119 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2122 * c-decl.c: Include "c-family/known-headers.h".
2123 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2124 to known-headers.cc.
2125 (class suggest_missing_header): Move to known-header.h.
2126 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2127 than get_c_name_hint.
2129 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2131 * c-decl.c (get_c_name_hint): New function.
2132 (class suggest_missing_header): New class.
2133 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2134 suggest missing headers to the user.
2136 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2138 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2139 Include "c-family/name-hint.h"
2140 (implicit_decl_warning): Convert "hint" from
2141 const char * to name_hint. Pass location to
2142 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2143 warning was not printed.
2144 (undeclared_variable): Likewise for "guessed_id".
2145 (lookup_name_fuzzy): Convert return type from const char *
2146 to name_hint. Add location_t param.
2147 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2148 Include "c-family/name-hint.h"
2149 (c_parser_declaration_or_fndef): Convert "hint" from
2150 const char * to name_hint. Pass location to lookup_name_fuzzy.
2151 (c_parser_parameter_declaration): Likewise.
2153 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2157 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2159 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2160 handle_omp_array_sections): Likewise.
2161 (digest_init): Don't call decl_constant_value_for_optimization.
2162 * c-tree.h (decl_constant_value_for_optimization): Removed.
2163 * c-fold.c (c_fold_array_ref): New function.
2164 (c_fully_fold_internal): Add LVAL argument, propagate it through
2165 recursive calls. For VAR_P call decl_constant_value and
2166 unshare if not LVAL and either optimizing or IN_INIT. Remove
2167 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2168 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2169 (c_fully_fold): Add LVAL argument, pass it through to
2170 c_fully_fold_internal.
2171 (decl_constant_value_for_optimization): Removed.
2173 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2176 * c-parser.c (check_tgmath_function): New function.
2177 (enum tgmath_parm_kind): New enum.
2178 (c_parser_postfix_expression): Handle __builtin_tgmath.
2180 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2182 * c-decl.c (implicit_decl_warning): Update for renaming of
2183 pedwarn_at_rich_loc and warning_at_rich_loc.
2184 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2185 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2186 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2187 (c_parser_struct_or_union_specifier): Likewise for renaming of
2188 pedwarn_at_rich_loc.
2189 (c_parser_parameter_declaration): Likewise for renaming of
2191 * c-typeck.c (build_component_ref): Likewise.
2192 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2193 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2194 (set_init_label): Likewise for renaming of error_at_rich_loc.
2196 2017-10-30 Richard Biener <rguenther@suse.de>
2198 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2201 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2203 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2204 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2206 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2209 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2212 2017-10-25 Jakub Jelinek <jakub@redhat.com>
2215 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2216 newdecl to corresponding __builtin_ if any.
2218 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2221 * c-decl.c (diagnose_mismatched_decls): Use
2222 OPT_Wbuiltin_declaration_mismatch.
2224 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2226 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2227 use it to guard calls to maybe_suggest_missing_token_insertion.
2228 (c_parser_parms_list_declarator): Override default value of new
2229 "type_is_unique" param to c_parser_require.
2230 (c_parser_asm_statement): Likewise.
2231 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2234 2017-10-11 Nathan Sidwell <nathan@acm.org>
2236 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2238 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2240 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2241 operating on trees as wide_ints.
2242 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2243 (c_tree_equal): Likewise.
2245 2017-10-04 David Malcolm <dmalcolm@redhat.com>
2247 * c-decl.c (push_parm_decl): Store c_parm's location into the
2249 (build_c_parm): Add "loc" param and store it within the c_parm.
2250 * c-parser.c (struct c_parser): Add "last_token_location" field.
2251 (c_parser_consume_token): Store location of the token into the
2253 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2254 when handling a FUNCTION_DECL, if it doesn't already have them.
2255 (c_parser_parameter_declaration): Generate a location for the
2256 parameter, and pass it to the call to build_c_parm.
2257 * c-tree.h (struct c_parm): Add field "loc".
2258 (build_c_parm): Add location_t param.
2259 * c-typeck.c (get_fndecl_argument_location): New function.
2260 (inform_for_arg): New function.
2261 (convert_for_assignment): Use inform_for_arg when dealing with
2264 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2266 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2268 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2269 don't SET_DECL_C_BIT_FIELD here.
2272 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2273 instead of trying to set just TREE_READONLY manually.
2275 2017-09-16 Tom de Vries <tom@codesourcery.com>
2278 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2281 2017-09-15 Joseph Myers <joseph@codesourcery.com>
2284 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2286 (build_conditional_expr): For C11, generate result with excess
2287 precision when one argument is an integer and the other is of a
2288 type using excess precision.
2290 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2292 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2294 2017-09-13 Marek Polacek <polacek@redhat.com>
2297 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2298 than expr.original_type.
2300 2017-09-12 Nathan Sidwell <nathan@acm.org>
2302 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2303 resort_sorted_fields): Moved from c-family/c-common.c.
2304 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2306 2017-09-01 Joseph Myers <joseph@codesourcery.com>
2309 * c-typeck.c (build_atomic_assign): Handle argument with excess
2310 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2311 argument passed to build_binary_op and convert_for_assignment but
2312 not for call to c_fully_fold.
2313 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2314 Ensure build_binary_op is called with argument with original
2315 semantic type. Avoid calling c_fully_fold with an
2316 EXCESS_PRECISION_EXPR from build_binary_op.
2318 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2321 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2323 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2324 Alan Hayward <alan.hayward@arm.com>
2325 David Sherwood <david.sherwood@arm.com>
2327 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2328 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2329 m1 and m2 to the signed equivalent of a fixed-point
2332 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2334 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2335 than CAN_HAVE_LOCATION_P when determining whether to use the
2336 location_t value within "value".
2338 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2340 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2341 rather than peeking the location of the first token.
2342 * c-tree.h (c_expr::get_location): New method.
2344 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2346 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2347 to check_function_arguments.
2349 2017-08-18 Marek Polacek <polacek@redhat.com>
2351 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2354 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2357 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2358 (check_bitfield_type_and_width): Don't allow bit-field with
2359 warn_if_not_aligned type.
2361 2017-08-14 Martin Sebor <msebor@redhat.com>
2364 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2366 2017-08-11 Marek Polacek <polacek@redhat.com>
2369 * c-decl.c (pushtag): Only print inform if the warning was printed.
2370 (grokdeclarator): Likewise.
2372 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2374 * c-parser.c (c_parser_error): Rename to...
2375 (c_parser_error_richloc): ...this, making static, and adding
2376 "richloc" parameter, passing it to the c_parse_error call,
2377 rather than calling c_parser_set_source_position_from_token.
2378 (c_parser_error): Reintroduce, reimplementing in terms of the
2379 above, converting return type from void to bool.
2380 (class token_pair): New class.
2381 (struct matching_paren_traits): New struct.
2382 (matching_parens): New typedef.
2383 (struct matching_brace_traits): New struct.
2384 (matching_braces): New typedef.
2385 (get_matching_symbol): New function.
2386 (c_parser_require): Add param MATCHING_LOCATION, using it to
2387 highlight matching "opening" tokens for missing "closing" tokens.
2388 (c_parser_skip_until_found): Likewise.
2389 (c_parser_static_assert_declaration_no_semi): Convert explicit
2390 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2391 class matching_parens, so that the pertinent open parenthesis is
2392 highlighted when there are problems locating the close
2394 (c_parser_struct_or_union_specifier): Likewise.
2395 (c_parser_typeof_specifier): Likewise.
2396 (c_parser_alignas_specifier): Likewise.
2397 (c_parser_simple_asm_expr): Likewise.
2398 (c_parser_braced_init): Likewise, for matching_braces.
2399 (c_parser_paren_condition): Likewise, for matching_parens.
2400 (c_parser_switch_statement): Likewise.
2401 (c_parser_for_statement): Likewise.
2402 (c_parser_asm_statement): Likewise.
2403 (c_parser_asm_operands): Likewise.
2404 (c_parser_cast_expression): Likewise.
2405 (c_parser_sizeof_expression): Likewise.
2406 (c_parser_alignof_expression): Likewise.
2407 (c_parser_generic_selection): Likewise.
2408 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2409 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2410 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2411 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2412 c_parser_skip_until_found call.
2413 (c_parser_objc_class_definition): Use class matching_parens as
2415 (c_parser_objc_method_decl): Likewise.
2416 (c_parser_objc_try_catch_finally_statement): Likewise.
2417 (c_parser_objc_synchronized_statement): Likewise.
2418 (c_parser_objc_at_property_declaration): Likewise.
2419 (c_parser_oacc_wait_list): Likewise.
2420 (c_parser_omp_var_list_parens): Likewise.
2421 (c_parser_omp_clause_collapse): Likewise.
2422 (c_parser_omp_clause_default): Likewise.
2423 (c_parser_omp_clause_if): Likewise.
2424 (c_parser_omp_clause_num_threads): Likewise.
2425 (c_parser_omp_clause_num_tasks): Likewise.
2426 (c_parser_omp_clause_grainsize): Likewise.
2427 (c_parser_omp_clause_priority): Likewise.
2428 (c_parser_omp_clause_hint): Likewise.
2429 (c_parser_omp_clause_defaultmap): Likewise.
2430 (c_parser_oacc_single_int_clause): Likewise.
2431 (c_parser_omp_clause_ordered): Likewise.
2432 (c_parser_omp_clause_reduction): Likewise.
2433 (c_parser_omp_clause_schedule): Likewise.
2434 (c_parser_omp_clause_num_teams): Likewise.
2435 (c_parser_omp_clause_thread_limit): Likewise.
2436 (c_parser_omp_clause_aligned): Likewise.
2437 (c_parser_omp_clause_linear): Likewise.
2438 (c_parser_omp_clause_safelen): Likewise.
2439 (c_parser_omp_clause_simdlen): Likewise.
2440 (c_parser_omp_clause_depend): Likewise.
2441 (c_parser_omp_clause_map): Likewise.
2442 (c_parser_omp_clause_device): Likewise.
2443 (c_parser_omp_clause_dist_schedule): Likewise.
2444 (c_parser_omp_clause_proc_bind): Likewise.
2445 (c_parser_omp_clause_uniform): Likewise.
2446 (c_parser_omp_for_loop): Likewise.
2447 (c_parser_cilk_clause_vectorlength): Likewise.
2448 (c_parser_cilk_clause_linear): Likewise.
2449 (c_parser_transaction_expression): Likewise.
2450 * c-parser.h (c_parser_require): Add param matching_location with
2451 default UNKNOWN_LOCATION.
2452 (c_parser_error): Convert return type from void to bool.
2453 (c_parser_skip_until_found): Add param matching_location with
2454 default UNKNOWN_LOCATION.
2456 2017-08-09 Marek Polacek <polacek@redhat.com>
2458 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2459 * c-tree.h (build_external_ref): Update declaration.
2460 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2461 (build_external_ref): Change the type of a parameter to bool.
2462 (parser_build_binary_op): Use true/false instead of 1/0.
2463 (pointer_diff): Likewise.
2464 (build_modify_expr): Likewise.
2465 (set_designator): Change the type of a parameter to bool.
2466 (set_init_index): Use true/false instead of 1/0.
2467 (set_init_label): Likewise.
2468 (output_init_element): Change the type of a parameter to bool.
2469 (output_pending_init_elements): Use true/false instead of 1/0.
2470 (process_init_element): Likewise.
2471 (build_binary_op): Change the type of a parameter to bool.
2473 2017-08-09 Marek Polacek <polacek@redhat.com>
2476 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2477 Call emit_diagnostic_valist instead of pedwarn.
2478 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2479 Print the relevant types in diagnostics.
2481 2017-08-09 Marek Polacek <polacek@redhat.com>
2484 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2485 build_conditional_expr.
2486 * c-parser.c (c_parser_conditional_expression): Create locations for
2487 EXP1 and EXP2 from their source ranges. Pass the locations down to
2488 build_conditional_expr.
2489 * c-tree.h (build_conditional_expr): Update declaration.
2490 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2491 For -Wsign-compare, also print the types.
2493 2017-08-08 Martin Liska <mliska@suse.cz>
2495 * c-convert.c: Include header files.
2496 * c-typeck.c: Likewise.
2498 2017-08-07 Martin Liska <mliska@suse.cz>
2500 * c-parser.c (c_parser_attributes): Canonicalize name of an
2503 2017-08-02 Marek Polacek <polacek@redhat.com>
2506 * c-parser.c (c_parser_unary_expression): Use set_error.
2510 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2511 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2513 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2514 Martin Liska <mliska@suse.cz>
2516 * c-typeck.c (c_finish_goto_label): Build gimple predict
2519 2017-07-31 Martin Liska <mliska@suse.cz>
2522 * c-convert.c (convert): Guard condition with flag_sanitize_p
2523 also with current_function_decl non-null equality.
2524 * c-decl.c (grokdeclarator): Likewise.
2525 * c-typeck.c (build_binary_op): Likewise.
2527 2017-07-25 Marek Polacek <polacek@redhat.com>
2529 * c-decl.c (grokfield): Remove local variable.
2531 2017-07-25 Marek Polacek <polacek@redhat.com>
2534 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2535 macro expansion if the body is in { }.
2536 (c_parser_while_statement): Likewise.
2537 (c_parser_for_statement): Likewise.
2539 2017-07-18 Nathan Sidwell <nathan@acm.org>
2541 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2543 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2545 * c-decl.c (implicitly_declare): When suggesting a missing
2546 #include, provide a fix-it hint.
2548 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2550 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2551 and call that instead.
2552 * c-tree.h (selftest::run_c_tests): New decl.
2554 2017-06-26 Marek Polacek <polacek@redhat.com>
2557 * c-parser.c (c_parser_if_body): Set the location of the
2558 body of the conditional after parsing all the labels. Call
2559 warn_for_multistatement_macros.
2560 (c_parser_else_body): Likewise.
2561 (c_parser_switch_statement): Likewise.
2562 (c_parser_while_statement): Likewise.
2563 (c_parser_for_statement): Likewise.
2564 (c_parser_statement): Add a default argument. Save the location
2565 after labels have been parsed.
2566 (c_parser_c99_block_statement): Likewise.
2568 2017-06-19 Richard Biener <rguenther@suse.de>
2570 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2571 negated _Literals to parse _Literal (int) -1.
2573 2017-06-13 Martin Liska <mliska@suse.cz>
2576 * c-convert.c (convert): Use sanitize_flags_p.
2577 * c-decl.c (grokdeclarator): Likewise.
2578 * c-typeck.c (convert_for_assignment): Likewise.
2579 (c_finish_return): Likewise.
2580 (build_binary_op): Likewise.
2582 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2585 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2586 to sizetype before size_binop.
2588 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2590 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2593 2017-06-06 Marek Polacek <polacek@redhat.com>
2596 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2598 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2600 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2602 * c-parser.c (c_parser_binary_expression): Implement the
2603 -Wsizeof_pointer_div warning.
2604 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2605 from a parenthesized expression.
2606 (c_parser_expr_list): Use c_last_sizeof_loc.
2607 * c-tree.h (c_last_sizeof_loc): New external.
2608 * c-typeck.c (c_last_sizeof_loc): New variable.
2609 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2611 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2614 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2616 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2618 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2621 2017-05-24 Martin Sebor <msebor@redhat.com>
2624 * c-fold.c (c_fully_fold_internal): Adjust.
2625 * c-typeck.c (parser_build_unary_op): Adjust.
2627 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2629 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2630 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2633 2017-05-23 Marek Polacek <polacek@redhat.com>
2635 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2638 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2640 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2641 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2642 it returned invariant. Call tree_invariant_p unconditionally
2643 afterwards to decide whether to return expr or op0.
2645 2017-05-22 Nathan Sidwell <nathan@acm.org>
2647 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2649 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2651 * c-parser.c (c_parser_omp_clause_default): Handle
2652 "OMP_CLAUSE_DEFAULT_PRESENT".
2654 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2656 * config-lang.in (gtfiles): Add c-family/c-format.c.
2658 2017-05-18 Nathan Sidwell <nathan@acm.org>
2660 * c-decl.c (pushdecl_top_level): Delete unused function.
2662 2017-05-18 Marek Polacek <polacek@redhat.com>
2664 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2665 (check_earlier_gotos): Likewise.
2666 (define_label): Likewise.
2667 (pending_xref_error): Likewise.
2668 (smallest_type_quals_location): Likewise.
2669 (grokdeclarator): Likewise.
2670 (grokparms): Likewise.
2671 (identifier_global_value): Likewise.
2672 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2673 (find_init_member): Likewise.
2675 2017-05-18 Marek Polacek <polacek@redhat.com>
2677 * c-decl.c (start_decl): Use false/true instead of 0/1.
2678 (grokdeclarator): Likewise.
2679 (finish_struct): Likewise.
2680 (start_function): Change the return type to bool. Use false/true
2682 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2683 * c-tree.h (start_function): Update.
2684 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2685 (set_designator): Change the return type to bool. Use false/true
2688 2017-05-17 Marek Polacek <polacek@redhat.com>
2690 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2691 * c-typeck.c: Likewise.
2693 2017-05-17 Marek Polacek <polacek@redhat.com>
2696 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2697 DECL_IGNORED_P even for non-static compound literals.
2699 2017-05-17 Martin Liska <mliska@suse.cz>
2701 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2702 use it instead of int type.
2704 2017-05-17 Marek Polacek <polacek@redhat.com>
2706 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2708 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2709 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2710 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2711 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2713 (c_parser_conditional_expression): Likewise.
2714 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2715 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2716 (process_init_element): Likewise.
2717 (build_binary_op): Likewise.
2718 (handle_omp_array_sections_1): Likewise.
2720 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2722 * c-parser.c (c_parser_omp_clause_num_gangs)
2723 (c_parser_omp_clause_num_workers)
2724 (c_parser_omp_clause_vector_length): Merge functions into...
2725 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2728 2017-05-11 Nathan Sidwell <nathan@acm.org>
2730 * gimple-parser.c: Don't #include tree-dump.h.
2732 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2735 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2737 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2740 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2741 incorrect __MEM syntax.
2743 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2746 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2749 2017-05-09 Nathan Sidwell <nathan@acm.org>
2751 * c-tree.h (pushdecl): Declare.
2753 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2755 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2756 with diagnostic_report_diagnostic.
2757 * c-errors.c (pedwarn_c99): Likewise.
2758 (pedwarn_c90): Likewise.
2760 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2763 * c-gimplify.c (c_gimplify_expr): Remove calls to
2764 cilk_gimplifY_call_params_in_spawned_fn.
2766 2017-04-25 David Malcolm <dmalcolm@redhat.com>
2768 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2769 hint for removing extra semicolon.
2771 2017-04-21 Jakub Jelinek <jakub@redhat.com>
2774 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2775 enabled, set specs->type to integer_type_node.
2777 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2779 * c-array-notation.c: Fix typo in comment.
2781 2017-03-29 Marek Polacek <polacek@redhat.com>
2784 * c-decl.c (finish_decl): Check VAR_P.
2786 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2789 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2790 * c-typeck.c (c_mark_addressable): Likewise. Look through
2791 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2793 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2795 2017-03-23 Marek Polacek <polacek@redhat.com>
2797 * c-tree.h: Remove a C_RID_YYCODE reference.
2799 2017-03-21 Jakub Jelinek <jakub@redhat.com>
2802 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2803 optional COMPOUND_EXPR with ubsan instrumentation.
2805 2017-03-17 Marek Polacek <polacek@redhat.com>
2807 * c-parser.c: Add C11 references.
2809 2017-03-15 Marek Polacek <polacek@redhat.com>
2811 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2813 2017-03-11 Marek Polacek <polacek@redhat.com>
2815 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2817 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2819 PR translation/79848
2820 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2822 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2824 2017-03-09 Marek Polacek <polacek@redhat.com>
2827 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2828 parameter declarations with initializers.
2830 2017-03-09 Jakub Jelinek <jakub@redhat.com>
2833 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2836 2017-03-07 Jakub Jelinek <jakub@redhat.com>
2839 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2840 for "may only be used in compound statements" diagnostics, change it
2841 such that the same translatable string is used for all pragmas. For
2842 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2844 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2845 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2846 "may only be used in compound statements" diagnostics, such that the
2847 same translatable string is used for all pragmas.
2849 2017-03-04 Marek Polacek <polacek@redhat.com>
2852 * c-decl.c (implicit_decl_warning): Add missing space.
2854 2017-03-03 Marek Polacek <polacek@redhat.com>
2857 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2858 current_function_prototype_arg_types is error_mark_node. Fix
2859 formatting. Use TREE_VALUE instead of TREE_TYPE.
2861 2017-03-03 Jakub Jelinek <jakub@redhat.com>
2864 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2865 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2866 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2870 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2871 instead of %<_Generic>.
2872 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2873 (c_parser_omp_target_exit_data): Use %<release%> instead of
2876 2017-02-28 Jakub Jelinek <jakub@redhat.com>
2878 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2879 instead of just cond ? "..." : "...".
2880 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2881 for "enter"/"exit" keyword.
2882 (c_finish_oacc_routine): Don't use %s to supply portions of the
2885 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2888 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2889 handle -Wrestrict here.
2890 * c-typeck.c (build_function_call_vec): Adjust
2891 check_function_arguments caller.
2893 2017-02-23 Richard Biener <rguenther@suse.de>
2896 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2897 to initialize c_exprs to return.
2898 (c_parser_gimple_binary_expression): Likewise.
2899 (c_parser_gimple_unary_expression): Likewise.
2900 (c_parser_gimple_postfix_expression): Likewise.
2902 2017-02-22 Marek Polacek <polacek@redhat.com>
2905 * c-typeck.c (convert_arguments): Handle error_mark_node.
2907 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2909 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2910 value of c_parser_parse_ssa_name against error_mark_node and emit
2911 error if ssa name is anonymous and written as default definition.
2913 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2915 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2918 2017-02-16 Jakub Jelinek <jakub@redhat.com>
2921 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2922 ignore #pragma omp target even when not followed by identifier.
2924 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2926 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2927 (c_parser_gimple_unary_expression): Likewise.
2929 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2931 * c-parser.c (c_parser_oacc_declare): Add missing space in
2934 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2937 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2938 set_c_expr_source_range when parsing ssa-name.
2940 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2941 Richard Biener <rguenther@suse.de>
2943 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2944 building IL when arguments are error_mark_node.
2945 (c_parser_gimple_unary_expression): Likewise.
2946 (c_parser_gimple_if_stmt): Likewise.
2947 (c_parser_gimple_switch_stmt): Likewise.
2948 (c_parser_gimple_return_stmt): Likewise.
2949 (c_parser_parse_ssa_name): When name lookup fails do not build
2950 an SSA name. Use undeclared rather than not declared in error
2953 2017-02-09 Marek Polacek <polacek@redhat.com>
2956 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2957 instead of c_parser_skip_until_found.
2959 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2962 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2963 symtab_node::get on automatic variables.
2965 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2966 Chung-Lin Tang <cltang@codesourcery.com>
2968 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2969 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2971 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2973 2017-02-07 Richard Biener <rguenther@suse.de>
2975 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2976 (c_parser_gimple_postfix_expression_after_primary):
2977 Do not use c_build_function_call_vec to avoid folding and promotion.
2980 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2983 * c-decl.c (pop_scope): Pass main_input_filename to
2984 build_translation_unit_decl.
2986 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2988 * c-parser.c: Include "read-rtl-function.h" and
2990 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2991 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2992 production. Update for renaming of field "gimple_pass" to
2993 "gimple_or_rtl_pass". If __RTL was seen, call
2994 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2995 to an auto_timevar, to cope with early exit.
2996 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2997 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2998 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3000 (c_parser_parse_rtl_body): New function.
3001 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3002 (struct c_declspecs): Rename field "gimple_pass" to
3003 "gimple_or_rtl_pass". Add field "rtl_p".
3004 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3005 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3006 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3007 (c_parser_gimple_or_rtl_pass_list): ...this.
3009 2017-01-20 Marek Polacek <polacek@redhat.com>
3012 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3014 2017-01-13 Richard Biener <rguenther@suse.de>
3016 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3019 2017-01-13 Richard Biener <rguenther@suse.de>
3021 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3022 _Literal ( type-name ) number.
3024 2017-01-12 Richard Biener <rguenther@suse.de>
3026 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3029 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3032 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3035 2017-01-11 Richard Biener <rguenther@suse.de>
3038 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3039 returns on parse errors.
3041 2017-01-04 Marek Polacek <polacek@redhat.com>
3044 * c-parser.c (c_parser_postfix_expression): Mark zero character
3045 constants by setting original_type in c_expr.
3046 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3047 with a zero character constant.
3048 (char_type_p): New function.
3050 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3052 * c-parser.c (c_parser_declaration_or_fndef): Create a
3053 rich_location at init_loc and parse it to start_init.
3054 (last_init_list_comma): New global.
3055 (c_parser_braced_init): Update last_init_list_comma when parsing
3056 commas. Pass it to pop_init_level. Pass location of closing
3057 brace to pop_init_level.
3058 (c_parser_postfix_expression_after_paren_type): Create a
3059 rich_location at type_loc and parse it to start_init.
3060 (c_parser_omp_declare_reduction): Likewise for loc.
3061 * c-tree.h (start_init): Add rich_location * param.
3062 (pop_init_level): Add location_t param.
3063 * c-typeck.c (struct initializer_stack): Add field
3064 "missing_brace_richloc".
3065 (start_init): Add richloc param, use it to initialize
3066 the stack node's missing_brace_richloc.
3067 (last_init_list_comma): New decl.
3068 (finish_implicit_inits): Pass last_init_list_comma to
3070 (push_init_level): When finding missing open braces, add fix-it
3071 hints to the richloc.
3072 (pop_init_level): Add "insert_before" param and pass it
3073 when calling pop_init_level. Add fixits about missing
3074 close braces to any richloc. Use the richloc for the
3075 -Wmissing-braces warning.
3076 (set_designator): Pass last_init_list_comma to pop_init_level.
3077 (process_init_element): Likewise.
3079 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3081 Update copyright years.
3083 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3086 * c-typeck.c (build_function_call_vec): If check_function_arguments
3087 returns true, set TREE_NO_WARNING on CALL_EXPR.
3090 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3091 to *expr instead of overwriting it.
3093 2016-12-20 Richard Biener <rguenther@suse.de>
3095 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3097 (c_parser_gimple_statement): Only build assigns for non-error
3099 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3101 2016-12-14 Martin Jambor <mjambor@suse.cz>
3103 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3105 (c_finish_oacc_routine): Adjusted call to
3106 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3107 to use their new names.
3108 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3110 (c_parser_oacc_update): Likewise.
3111 (c_parser_omp_simd): Likewise.
3112 (c_parser_omp_target_update): Likewise.
3113 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3114 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3116 (c_finish_omp_cancellation_point): Likewise.
3117 * gimple-parser.c: Do not include omp-low.h
3119 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3120 James Norris <jnorris@codesourcery.com>
3122 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3123 EXIT_DATA,WAIT} are not used in compound statements.
3124 (c_parser_oacc_enter_exit_data): Update diagnostics.
3126 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3129 * c-decl.c (diagnose_mismatched_decls): Use
3130 OPT_Wbuiltin_declaration_mismatch here too.
3132 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
3133 Alan Hayward <alan.hayward@arm.com>
3134 David Sherwood <david.sherwood@arm.com>
3136 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3137 (make_label, finish_struct): Likewise.
3139 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3140 Richard Biener <rguenther@suse.de>
3142 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3143 * config-lang.in (gtfiles): Add c/c-parser.h.
3144 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3145 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3146 * c-parser.c (enum c_id_kind, struct c_token,
3147 c_parser_next_token_is, c_parser_next_token_is_not,
3148 c_parser_next_token_is_keyword,
3149 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3151 * c-parser.h: ... new header.
3152 * c-parser.c: Include c-parser.h and gimple-parser.h.
3153 (c_parser_peek_token, c_parser_peek_2nd_token,
3154 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3155 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3156 c_parser_error, c_parser_require, c_parser_skip_until_found,
3157 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3158 c_parser_type_name): Export.
3159 (c_parser_tokens_buf): New function.
3160 (c_parser_error): Likewise.
3161 (c_parser_set_error): Likewise.
3162 (c_parser_declspecs): Handle RID_GIMPLE.
3163 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3164 via c_parser_parse_gimple_body.
3165 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3166 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3167 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3168 c_parser_error, c_parser_require, c_parser_skip_until_found,
3169 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3170 c_parser_type_name): Declare.
3171 (struct c_parser): Declare forward.
3172 (c_parser_tokens_buf): Declare.
3173 (c_parser_error): Likewise.
3174 (c_parser_set_error): Likewise.
3175 * gimple-parser.c: New file.
3176 * gimple-parser.h: Likewise.
3178 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3181 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3184 2016-09-11 Le-Chun Wu <lcwu@google.com>
3185 Mark Wielaard <mjw@redhat.com>
3187 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3188 to the given -Wshadow= variant.
3190 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3192 * c-typeck.c: Include memmodel.h.
3194 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3197 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3198 instead of lhd_return_null_tree_v.
3200 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3203 * c-decl.c (smallest_type_quals_location): New static function.
3204 (grokdeclarator): Try to find the correct location for an ignored
3207 2016-09-26 Marek Polacek <polacek@redhat.com>
3210 * c-decl.c (pop_scope): Add gcc_fallthrough.
3212 2016-09-26 Marek Polacek <polacek@redhat.com>
3215 * c-parser.c (struct c_token): Add flags field.
3216 (c_lex_one_token): Pass it to c_lex_with_flags.
3217 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3218 into IFN_FALLTHROUGH.
3219 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3220 attribute fallthrough after a case label or default label.
3221 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3223 2016-09-24 Marek Polacek <polacek@redhat.com>
3226 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3227 have boolean value. Warn about ++/-- on booleans.
3229 2016-09-23 Jakub Jelinek <jakub@redhat.com>
3231 * c-parser.c (incomplete_record_decls): Remove unnecessary
3232 = vNULL initialization of file scope vec.
3234 2016-09-16 Marek Polacek <polacek@redhat.com>
3236 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3238 2016-09-14 Marek Polacek <polacek@redhat.com>
3240 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3241 (fix_array_notation_expr): Likewise.
3242 * c-decl.c (finish_decl): Likewise.
3243 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3244 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3245 (function_to_pointer_conversion): Use false instead of 0.
3246 (convert_lvalue_to_rvalue): Likewise.
3247 (parser_build_unary_op): Likewise.
3248 (build_atomic_assign): Likewise.
3249 (build_unary_op): Change nonconvert parameter type to bool, use
3250 true/false instead of 1/0.
3251 (build_binary_op): Use true instead of 1.
3253 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3255 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3256 of add_fixit_insert to add_fixit_insert_before.
3258 2016-09-13 Marek Polacek <polacek@redhat.com>
3260 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3263 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3266 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3267 COMPOUND_EXPR to warn_for_omitted_condop.
3269 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3271 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3272 c_get_substring_location for this new langhook.
3274 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3277 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3279 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3280 instead of mark_exp_read on low_bound/length expression.
3281 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3282 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3283 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3284 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3285 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3286 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3287 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3288 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3289 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3290 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3291 instead of mark_expr_read.
3292 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3293 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3294 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3295 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3296 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3297 array section bases outside of depend clause, for depend clause
3298 use convert_lvalue_to_rvalue on the base.
3299 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3300 linear, aligned, map, to and from clauses.
3301 (c_omp_clause_copy_ctor): New function.
3303 2016-09-01 Marek Polacek <polacek@redhat.com>
3306 * c-typeck.c (composite_type): Add FALLTHRU comment.
3308 2016-08-31 David Malcolm <dmalcolm@redhat.com>
3310 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3311 to the insertion fixits for "struct", "union", and "enum".
3313 2016-08-30 David Malcolm <dmalcolm@redhat.com>
3315 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3316 rather than add_fixit_misspelled_id.
3317 (undeclared_variable): Likewise.
3318 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3319 now-redundant "here" params from add_fixit_insert method calls.
3320 (c_parser_parameter_declaration): Likewise.
3321 * c-typeck.c (build_component_ref): Remove now-redundant range
3322 param from add_fixit_replace method calls.
3324 2016-08-25 Marek Polacek <polacek@redhat.com>
3326 * c-typeck.c (parser_build_binary_op): Pass LHS to
3327 warn_logical_not_parentheses.
3329 2016-08-25 Marek Polacek <polacek@redhat.com>
3332 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3333 or _FloatN or _FloatNx is not supported.
3334 (finish_declspecs): Set type to integer_type_node when _FloatN or
3335 _FloatNx is not supported.
3337 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3340 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3341 (struct c_declspecs): Add field floatn_nx_idx.
3342 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3343 and _FloatNx type specifiers.
3344 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3345 (c_parser_declspecs, c_parser_attribute_any_word)
3346 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3347 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3348 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3349 narrower than double.
3351 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3352 Martin Liska <mliska@suse.cz>
3355 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3356 % to determine val element to change. Assert that
3357 wchar_bytes * charwidth fits into val array.
3359 2016-08-12 Marek Polacek <polacek@redhat.com>
3362 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3363 (c_parser_postfix_expression): Likewise.
3364 * c-typeck.c (build_unary_op): Adjust fall through comment.
3365 (c_mark_addressable): Likewise.
3367 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3370 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3371 array member through typedef, for orig_qual_indirect == 0 clear
3374 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3377 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3378 this up to selftest::run_c_tests.
3379 (selftest::run_c_tests): New function.
3381 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3383 * c-parser.c (struct oacc_routine_data): Add error_seen and
3384 fndecl_seen members.
3385 (c_finish_oacc_routine): Use these.
3386 (c_parser_declaration_or_fndef): Adjust.
3387 (c_parser_oacc_routine): Likewise. Support more C language
3388 constructs, and improve diagnostics. Move pragma context
3390 (c_parser_pragma): ... here.
3392 * c-parser.c (struct oacc_routine_data): New.
3393 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3395 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3396 declare target" attribute.
3398 2016-08-01 Jan Beulich <jbeulich@suse.com>
3400 * c-fold.c (c_fully_fold_internal): Also emit shift count
3401 warnings for vector types.
3402 * c-typeck.c (build_binary_op): Likewise.
3404 2016-07-29 Marek Polacek <polacek@redhat.com>
3407 * c-decl.c (finish_struct): Rephrase an error message.
3410 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3411 to error node for invalid code.
3414 * c-decl.c (implicitly_declare): Return decl early not only for
3415 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3417 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3420 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3421 on GNU extern inline functions.
3423 2016-07-29 Marek Polacek <polacek@redhat.com>
3426 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3429 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3431 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3433 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3435 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3437 (best_macro_match): Likewise, converting from a typedef to a
3439 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3440 (lookup_name_fuzzy): Update for change of best_macro_match to a
3441 subclass with a ctor that calls cpp_forall_identifiers.
3443 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3445 * c-decl.c (implicit_decl_warning): Update for conversion of
3446 return type of lookup_name_fuzzy to const char *.
3447 (undeclared_variable): Likewise.
3448 (lookup_name_fuzzy): Convert return type from tree to
3450 * c-parser.c (c_parser_declaration_or_fndef): Update for
3451 conversion of return type of lookup_name_fuzzy to const char *.
3452 (c_parser_parameter_declaration): Likewise.
3454 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3456 * c-parser.c (c_parser_oacc_declare): Don't scan for
3458 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3459 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3460 zero-length subarrays.
3462 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3465 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3466 instead of FUZZY_LOOKUP_NAME.
3467 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3468 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3470 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3473 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3475 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3477 * c-parser.c (c_parser_generic_selection): Make type of variable
3479 (c_parser_omp_declare_simd): Likewise.
3481 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3483 * c-decl.c (struct c_struct_parse_info): Change member types
3484 from vec to auto_vec.
3485 (start_struct): Adjust.
3486 (finish_struct): Likewise.
3488 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3491 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3493 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3495 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3496 Move pragma context checking into...
3497 (c_parser_omp_cancellation_point): ... here, and improve
3498 diagnostic messages.
3499 * c-typeck.c (c_finish_omp_cancel)
3500 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3502 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3505 * c-typeck.c (c_build_qualified_type): Don't clear
3506 C_TYPE_INCOMPLETE_VARS for the main variant.
3508 2016-06-28 Martin Sebor <msebor@redhat.com>
3511 * c-typeck.c (output_init_element): Diagnose incompatible types
3512 before non-constant initializers.
3514 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3516 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3518 2016-06-23 Andi Kleen <ak@linux.intel.com>
3520 * Make-lang.in: Add support for autofdo.
3522 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3525 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3526 (implicit_decl_warning): When issuing warnings for implicit
3527 declarations, attempt to provide a suggestion via
3529 (undeclared_variable): Likewise when issuing errors.
3530 (lookup_name_in_scope): Likewise.
3531 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3532 (best_macro_match): New typedef.
3533 (find_closest_macro_cpp_cb): New function.
3534 (lookup_name_fuzzy): New function.
3535 * c-parser.c: Include gcc-rich-location.h.
3536 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3537 (c_keyword_starts_typename): ...this new function.
3538 (c_parser_declaration_or_fndef): When issuing errors about
3539 missing "struct" etc, add a fixit. For other kinds of errors,
3540 attempt to provide a suggestion via lookup_name_fuzzy.
3541 (c_parser_parms_declarator): When looking ahead to detect typos in
3542 type names, also reject CPP_KEYWORD.
3543 (c_parser_parameter_declaration): When issuing errors about
3544 unknown type names, attempt to provide a suggestion via
3546 * c-tree.h (c_keyword_starts_typename): New prototype.
3548 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3551 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3552 c_common_type returns error_mark_node.
3554 2016-06-19 Martin Sebor <msebor@redhat.com>
3557 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3558 __alignof__ (expression).
3560 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3562 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3564 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3566 * c-typeck.c (build_component_ref): Simplify fixit code by
3567 using gcc_rich_location::add_fixit_misspelled_id.
3568 (set_init_label): Likewise.
3570 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3572 * c-parser.c (c_parser_initelt): Provide location of name for new
3573 location_t param of set_init_label.
3574 * c-tree.h (set_init_label): Add location_t param.
3575 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3576 param and use it when issuing error messages about unrecognized
3577 field names. Attempt to provide a fixit hint if appropriate,
3578 otherwise update the error message to provide the type name.
3580 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3583 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3586 2016-06-08 Martin Sebor <msebor@redhat.com>
3587 Jakub Jelinek <jakub@redhat.com>
3591 * c-typeck.c (convert_arguments): Don't promote last argument
3592 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3594 2016-06-08 Marek Polacek <polacek@redhat.com>
3597 * c-decl.c (grokdeclarator): Check TYPE_P.
3600 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3603 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3605 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3606 and structure element reference, capture the location of the
3607 element name token and pass it to build_component_ref.
3608 (c_parser_postfix_expression_after_primary): Likewise for
3609 structure element dereference.
3610 (c_parser_omp_variable_list): Likewise for
3611 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3612 * c-tree.h (build_component_ref): Add location_t param.
3613 * c-typeck.c (build_component_ref): Add location_t param
3614 COMPONENT_LOC. Use it, if available, when issuing hints about
3615 mispelled member names to provide a fixit replacement hint.
3617 2016-06-06 Marek Polacek <polacek@redhat.com>
3620 * c-parser.c (c_parser_direct_declarator): Set location.
3622 2016-06-06 Marek Polacek <polacek@redhat.com>
3624 * c-typeck.c (comptypes_internal): Handle comparisons of
3625 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3626 TYPE_REF_CAN_ALIAS_ALL.
3628 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3630 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3631 arguments as addressable when async clause exists.
3633 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3636 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3637 when combined with target construct.
3639 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3641 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3642 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3644 2016-05-25 Marek Polacek <polacek@redhat.com>
3647 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3650 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3652 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3654 * c-parser.c (c_parser_oacc_declare): Add support for
3655 GOMP_MAP_FIRSTPRIVATE_POINTER.
3656 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3657 argument with enum c_omp_region_type ort.
3658 (handle_omp_array_sections): Likewise. Update call to
3659 handle_omp_array_sections_1.
3660 (c_finish_omp_clauses): Add specific errors and warning messages for
3661 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3662 call to handle_omp_array_sections.
3664 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3666 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3668 2016-05-24 Richard Biener <rguenther@suse.de>
3672 * c-typeck.c (build_array_ref): Do not complain about indexing
3673 non-lvalue vectors. Adjust for function name change.
3675 2016-05-20 Martin Sebor <msebor@redhat.com>
3678 * c-typeck.c (error_init): Use
3679 expansion_point_location_if_in_system_header.
3680 (warning_init): Same.
3682 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3685 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3687 (c_parser_postfix_expression): Likewise.
3688 * c-tree.h (c_expr::set_error): New method.
3689 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3690 that result's range is initialized.
3692 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3694 * c-typeck.c (parser_build_unary_op): Fix formatting.
3696 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3698 * c-decl.c (grokdeclarator): Remove errmsg and use of
3699 targetm.invalid_return_type.
3700 (grokparms): Remove errmsg and use of
3701 targetm.invalid_parameter_type.
3703 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3705 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3706 function return type.
3708 2016-05-12 Marek Polacek <polacek@redhat.com>
3711 * c-decl.c (build_compound_literal): Pass LOC down to
3712 c_incomplete_type_error.
3713 * c-tree.h (require_complete_type): Adjust declaration.
3714 (c_incomplete_type_error): Likewise.
3715 * c-typeck.c (require_complete_type): Add location parameter, pass it
3716 down to c_incomplete_type_error.
3717 (c_incomplete_type_error): Add location parameter, pass it down to
3719 (build_component_ref): Pass location down to c_incomplete_type_error.
3720 (default_conversion): Pass location down to require_complete_type.
3721 (build_array_ref): Likewise.
3722 (build_function_call_vec): Likewise.
3723 (convert_arguments): Likewise.
3724 (build_unary_op): Likewise.
3725 (build_c_cast): Likewise.
3726 (build_modify_expr): Likewise.
3727 (convert_for_assignment): Likewise.
3728 (c_finish_omp_clauses): Likewise.
3730 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3733 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3735 * c-errors.c (pedwarn_c90): Return true if warned.
3736 * c-tree.h (pedwarn_c90): Change return type to bool.
3737 (enum c_declspec_word): Add new enumerator cdw_atomic.
3739 2016-05-11 Marek Polacek <polacek@redhat.com>
3742 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3743 diagnose_mismatched_attributes and call it.
3745 2016-05-10 Marek Polacek <polacek@redhat.com>
3748 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3749 on a declaration following the definition.
3751 2016-05-05 Jakub Jelinek <jakub@redhat.com>
3753 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3754 parse it through to c_parser_c99_block_statement.
3755 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3758 2016-05-04 Marek Polacek <polacek@redhat.com>
3760 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3763 2016-05-04 Marek Polacek <polacek@redhat.com>
3766 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3767 for macro expansions.
3769 2016-05-03 Marek Polacek <polacek@redhat.com>
3772 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3773 check_builtin_function_arguments.
3775 2016-05-03 Richard Biener <rguenther@suse.de>
3777 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3778 the checksum from the previous stage.
3780 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3782 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3783 c_finish_omp_clauses.
3784 (c_parser_omp_all_clauses): Likewise.
3785 (c_parser_oacc_cache): Likewise.
3786 (c_parser_oacc_loop): Likewise.
3787 (omp_split_clauses): Likewise.
3788 (c_parser_omp_declare_target): Likewise.
3789 (c_parser_cilk_all_clauses): Likewise.
3790 (c_parser_cilk_for): Likewise.
3791 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3792 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3794 2016-05-02 Marek Polacek <polacek@redhat.com>
3797 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3800 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3803 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3804 OACC_LOOP_CLAUSE_MASK.
3805 (c_parser_oacc_kernels_parallel): Update call to
3806 c_oacc_split_loop_clauses.
3808 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
3810 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3811 argument to build_modify_expr in two cases.
3813 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3815 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3816 warn_for_memset instead of warning directly here.
3818 2016-04-26 Marek Polacek <polacek@redhat.com>
3821 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3823 (c_parser_for_statement): ... here.
3824 (c_parser_if_statement): Use it.
3825 (c_parser_switch_statement): Use it.
3826 (c_parser_while_statement): Use it.
3829 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3831 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3834 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3835 instead of c_finish_cilk_clauses.
3836 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3837 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3838 floating-point variables in the linear clause for Cilk Plus.
3840 2016-04-18 Michael Matz <matz@suse.de>
3842 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3843 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3845 2016-04-15 Marek Polacek <polacek@redhat.com>
3848 * c-typeck.c (build_unary_op): Pass location down to error and
3851 2016-04-15 Jakub Jelinek <jakub@redhat.com>
3854 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3856 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3857 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3858 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3859 Adjust c_parser_pragma callers.
3860 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3862 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3864 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3865 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3866 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3867 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3868 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3869 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3870 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3871 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3873 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3874 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3877 2016-04-13 Marek Polacek <polacek@redhat.com>
3880 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3882 (c_parser_statement): Likewise.
3883 (c_parser_c99_block_statement): Likewise.
3884 (c_parser_while_statement): Likewise.
3885 (c_parser_for_statement): Likewise.
3886 (c_parser_if_body): Don't set IF_P here.
3887 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3888 about dangling else here.
3889 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3890 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3891 warn about dangling else here.
3893 2016-04-04 Marek Polacek <polacek@redhat.com>
3896 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3898 2016-03-31 Marek Polacek <polacek@redhat.com>
3901 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3903 2016-03-18 David Malcolm <dmalcolm@redhat.com>
3906 * c-parser.c (c_parser_postfix_expression): Set the source range
3907 for uses of "__builtin_types_compatible_p".
3909 2016-03-17 Jakub Jelinek <jakub@redhat.com>
3912 * c-typeck.c (composite_type): Don't count void_list_node
3913 into len, if the list is terminated by void_list_node, start
3914 with void_list_node instead of NULL for newargs. Stop
3917 2016-03-16 Marek Polacek <polacek@redhat.com>
3920 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3921 nested functions returning VM types.
3923 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3925 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3926 when calling c_finish_omp_clauses.
3928 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3931 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3934 2016-03-04 Marek Polacek <polacek@redhat.com>
3937 * c-parser.c (c_parser_postfix_expression): Call
3938 c_parser_cast_expression rather than c_parser_postfix_expression.
3940 2016-03-01 Jakub Jelinek <jakub@redhat.com>
3944 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3945 of incomplete decls to error_mark_node.
3947 2016-02-24 Marek Polacek <polacek@redhat.com>
3950 * c-decl.c (finish_decl): Don't update the copy of the type of a
3951 different decl type.
3953 2016-02-23 Jakub Jelinek <jakub@redhat.com>
3956 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3957 in id_kind reclassification.
3959 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3962 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3964 2016-02-16 James Norris <jnorris@codesourcery.com>
3967 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3969 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3971 * c-decl.c (build_null_declspecs): Zero the entire struct.
3974 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3975 callers changed. If nested_p is true, use it to call
3976 finish_implicit_inits.
3977 * c-tree.h (finish_implicit_inits): Declare.
3978 * c-typeck.c (finish_implicit_inits): New function. Move code
3980 (push_init_level): ... here.
3981 (set_designator, process_init_element): Call finish_implicit_inits.
3983 2016-02-11 Jakub Jelinek <jakub@redhat.com>
3986 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3987 arguments for -Waddress warning.
3989 2016-02-04 Jakub Jelinek <jakub@redhat.com>
3992 * c-decl.c (finish_enum): When honoring mode attribute,
3993 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3995 2016-01-29 Jakub Jelinek <jakub@redhat.com>
3998 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3999 all type variants, not just TYPE_MAIN_VARIANT.
4001 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4004 * c-decl.c (c_write_global_declarations_1): Warn with
4005 warn_unused_function if static prototype without definition
4008 2016-01-27 Marek Polacek <polacek@redhat.com>
4011 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4012 to unsigned, if needed. Add -Wsign-compare warning.
4014 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4016 PR tree-optimization/69483
4017 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4019 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4022 * c-tree.h (incomplete_record_decls): Declare.
4023 * c-parser.c (incomplete_record_decls): Define.
4024 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4025 report error if any decl has zero size.
4026 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4027 or enum type to incomplete_record_decls.
4029 2016-01-14 Tom de Vries <tom@codesourcery.com>
4031 PR tree-optimization/68773
4032 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4035 2016-01-14 Marek Polacek <polacek@redhat.com>
4038 * c-decl.c (grokdeclarator): Provide more information for invalid
4041 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4043 * c-parser.c (c_parser_unary_expression): For dereferences, build
4044 a combined location before calling build_indirect_ref, so that
4045 error reports cover the full range, manually updating the c_expr
4048 2016-01-06 Marek Polacek <polacek@redhat.com>
4051 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4052 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4055 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4057 Update copyright years.
4059 2016-01-04 Marek Polacek <polacek@redhat.com>
4062 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4063 optimization to use __atomic_fetch_* built-in if possible.
4065 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4067 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4069 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4072 2015-12-22 Marek Polacek <polacek@redhat.com>
4075 * c-typeck.c (build_component_ref): Warn when acessing elements of
4076 atomic structures or unions.
4078 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4080 * c-typeck.c: Include "gcc-rich-location.h".
4081 (build_binary_op): In the two places that call binary_op_error,
4082 create a gcc_rich_location and populate it with the location of
4083 the binary op and its two operands.
4085 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4087 * c-parser.c (c_parser_statement_after_labels): When calling
4088 c_finish_return, Use the return expression's location if it has
4089 one, falling back to the location of the first token within it.
4090 * c-typeck.c (c_finish_return): When issuing warnings about
4091 the incorrect presence/absence of a return value, issue a note
4092 showing the declaration of the function.
4094 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4096 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4098 (c_parser_peek_nth_token): New function.
4099 (c_parser_peek_conflict_marker): New function.
4100 (c_parser_error): Detect conflict markers and report them as such.
4102 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4104 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4105 to preserve range information for the primary expression
4106 in the call to c_parser_postfix_expression_after_primary.
4108 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4110 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4111 expression location, falling back on the first token location,
4112 rather than always using the latter.
4114 2015-12-16 Marek Polacek <polacek@redhat.com>
4117 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4120 2015-12-15 Marek Polacek <polacek@redhat.com>
4123 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4126 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4128 * c-parser.c (c_parser_alignof_expression): Capture location of
4129 closing parenthesis (if any), or of end of unary expression, and
4130 use it to build a src_range for the expression.
4132 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4135 * c-parser.c (c_parser_get_builtin_args): Add
4136 "out_close_paren_loc" param, and write back to it.
4137 (c_parser_postfix_expression): Capture the closing
4138 parenthesis location for RID_CHOOSE_EXPR,
4139 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4140 RID_BUILTIN_SHUFFLE and use it to set the source range
4141 for such expressions; within RID_BUILTIN_COMPLEX set
4142 the underlying location.
4144 2015-12-07 Marek Polacek <polacek@redhat.com>
4147 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4148 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4150 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4152 * c-tree.h (c_build_va_arg): Adjust prototype.
4153 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4154 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4155 parameter, adjust throughout and issue an error if EXPR is a component
4156 with reverse storage order.
4158 2015-12-02 Jason Merrill <jason@redhat.com>
4160 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4161 (c_fully_fold_internal, decl_constant_value_for_optimization):
4162 Move from c-common.c.
4163 * c-tree.h: Declare decl_constant_value_for_optimization.
4164 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4166 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4169 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4170 following link from declarator to next declarator. Track original
4171 qualified type and pass it to c_build_qualified_type.
4172 * c-typeck.c (c_build_qualified_type): Add arguments
4173 orig_qual_type and orig_qual_indirect.
4175 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4177 * c-parser.c (c_parser_omp_clause_name)
4178 (c_parser_oacc_all_clauses): Alphabetical sorting.
4180 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4183 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4186 2015-12-01 Julian Brown <julian@codesourcery.com>
4187 Cesar Philippidis <cesar@codesourcery.com>
4188 James Norris <James_Norris@mentor.com>
4190 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4191 (c_parser_oacc_clause_use_device): New function.
4192 (c_parser_oacc_all_clauses): Add use_device support.
4193 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4194 (c_parser_oacc_host_data): New function.
4195 (c_parser_omp_construct): Add host_data support.
4196 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4197 * c-typeck.c (c_finish_oacc_host_data): New function.
4198 (c_finish_omp_clauses): Add use_device support.
4200 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4203 * c-decl.c: Set TYPE_PACKED in variants.
4205 2015-11-27 Martin Liska <mliska@suse.cz>
4208 * c-array-notation.c (fix_builtin_array_notation_fn):
4209 Use release_vec_vec instead of vec::release.
4210 (build_array_notation_expr): Likewise.
4211 (fix_conditional_array_notations_1): Likewise.
4212 (fix_array_notation_expr): Likewise.
4213 (fix_array_notation_call_expr): Likewise.
4215 2015-11-27 Jakub Jelinek <jakub@redhat.com>
4218 * c-parser.c (c_parser_compound_statement_nostart): If
4219 last_label is true, use pragma_stmt instead of pragma_compound
4220 as second c_parser_pragma argument.
4221 (c_parser_omp_ordered, c_parser_omp_target_update,
4222 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4223 false as second argument to c_parser_skip_to_pragma_eol after
4224 diagnosing standalone directives used in pragma_stmt context.
4226 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4228 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4229 with "if (ENABLE_OFFLOADING)".
4231 2015-11-23 David Malcolm <dmalcolm@redhat.com>
4234 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4235 for various Objective-C constructs: Class.name syntax,
4236 @selector(), @protocol(), @encode(), and [] message syntax.
4238 2015-11-20 David Malcolm <dmalcolm@redhat.com>
4241 * c-typeck.c (should_suggest_deref_p): New function.
4242 (build_component_ref): Special-case POINTER_TYPE when
4243 generating a "not a structure of union" error message, and
4244 suggest a "->" rather than a ".", providing a fix-it hint.
4246 2015-11-19 David Malcolm <dmalcolm@redhat.com>
4248 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4249 candidate into a new function, find_closest_identifier.
4251 2015-11-19 Marek Polacek <polacek@redhat.com>
4254 * c-typeck.c (parser_build_binary_op): Properly handle
4255 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4257 2015-11-17 David Malcolm <dmalcolm@redhat.com>
4259 * c-parser.c (set_c_expr_source_range): Bulletproof both
4260 overloaded implementations against NULL expr->value.
4261 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4263 (c_parser_unary_expression): Likewise when handling addresses of
4265 (c_parser_postfix_expression): Likewise for statement expressions,
4266 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4267 __builtin_va_arg, and for __builtin_offset_of.
4268 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4269 src_range using the range of the braced initializer.
4270 (c_parser_transaction_expression): Set src_range for "ret" to a
4271 sane pair of values.
4273 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4275 * c-parser.c (c_finish_omp_declare_simd): Look for
4276 "simd" attribute as well. Update error message.
4278 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4280 * c-parser.c (c_parser_omp_declare_target): Adjust.
4282 2015-11-14 Jakub Jelinek <jakub@redhat.com>
4284 * c-typeck.c (c_finish_omp_clauses): Don't mark
4285 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4287 2015-11-14 Marek Polacek <polacek@redhat.com>
4289 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4290 * c-typeck.c: Likewise.
4292 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4294 * c-decl.c (warn_defaults_to): Pass line_table to
4296 * c-errors.c (pedwarn_c99): Likewise.
4297 (pedwarn_c90): Likewise.
4298 * c-parser.c (set_c_expr_source_range): New functions.
4299 (c_token::get_range): New method.
4300 (c_token::get_finish): New method.
4301 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4302 based on the range from the start of the LHS to the end of the
4304 (c_parser_conditional_expression): Likewise, based on the range
4305 from the start of the cond.value to the end of exp2.value.
4306 (c_parser_binary_expression): Call set_c_expr_source_range on
4307 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4308 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4309 based on the cast_loc through to the end of the expr.
4310 (c_parser_unary_expression): Likewise, based on the
4311 op_loc through to the end of op.
4312 (c_parser_sizeof_expression) Likewise, based on the start of the
4313 sizeof token through to either the closing paren or the end of
4315 (c_parser_postfix_expression): Likewise, using the token range,
4316 or from the open paren through to the close paren for
4317 parenthesized expressions.
4318 (c_parser_postfix_expression_after_primary): Likewise, for
4319 various kinds of expression.
4320 * c-tree.h (struct c_expr): Add field "src_range".
4321 (c_expr::get_start): New method.
4322 (c_expr::get_finish): New method.
4323 (set_c_expr_source_range): New decls.
4324 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4325 on ret for prefix unary ops.
4326 (parser_build_binary_op): Likewise, running from the start of
4327 arg1.value through to the end of arg2.value.
4329 2015-11-13 Marek Polacek <polacek@redhat.com>
4332 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4334 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4336 * c-typeck.c: Include spellcheck.h.
4337 (lookup_field_fuzzy_find_candidates): New function.
4338 (lookup_field_fuzzy): New function.
4339 (build_component_ref): If the field was not found, try using
4340 lookup_field_fuzzy and potentially offer a suggestion.
4342 2015-11-12 James Norris <jnorris@codesourcery.com>
4343 Joseph Myers <joseph@codesourcery.com>
4345 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4346 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4347 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4348 and PRAGMA_OMP_CLAUSE_LINK.
4349 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4350 and PRAGMA_OACC_CLAUSE_LINK.
4351 (OACC_DECLARE_CLAUSE_MASK): New definition.
4352 (c_parser_oacc_declare): New function.
4354 2015-11-12 Marek Polacek <polacek@redhat.com>
4357 * c-parser.c (c_parser_for_statement): Reclassify the token in
4360 2015-11-11 Marek Polacek <polacek@redhat.com>
4364 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4365 checking the size of an array.
4367 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4369 * c-array-notation.c: Remove unused header files.
4370 * c-aux-info.c: Likewise.
4371 * c-convert.c: Likewise.
4372 * c-decl.c: Likewise.
4373 * c-errors.c: Likewise.
4374 * c-lang.c: Likewise.
4375 * c-objc-common.c: Likewise.
4376 * c-parser.c: Likewise.
4377 * c-typeck.c: Likewise.
4378 * gccspec.c: Likewise.
4380 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4381 Cesar Philippidis <cesar@codesourcery.com>
4382 James Norris <jnorris@codesourcery.com>
4383 Julian Brown <julian@codesourcery.com>
4384 Nathan Sidwell <nathan@codesourcery.com>
4386 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4388 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4389 (c_parser_pragma): Parse 'acc routine'.
4390 (OACC_ROUTINE_CLAUSE_MARK): Define.
4391 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4393 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4396 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4397 location of the backward-goto to the start of the loop body.
4399 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4402 * c-parser.c (c_parser_while_statement): Finish the loop before
4403 parsing ahead for misleading indentation.
4404 (c_parser_for_statement): Likewise.
4406 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4408 * c-decl.c (finish_struct): If the structure has reverse storage
4409 order, rewrite the type of array fields with scalar component. Call
4410 maybe_apply_pragma_scalar_storage_order on entry.
4411 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4412 errors on bit-fields and reverse SSO here and not...
4413 (c_mark_addressable): ...here.
4414 (output_init_element): Adjust call to initializer_constant_valid_p.
4415 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4417 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4419 * c-decl.c (warn_defaults_to): Update for change in signature
4420 of diagnostic_set_info.
4421 * c-errors.c (pedwarn_c99): Likewise.
4422 (pedwarn_c90): Likewise.
4423 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4424 for textinfo::set_location.
4426 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4427 Thomas Schwinge <thomas@codesourcery.com>
4428 James Norris <jnorris@codesourcery.com>
4430 * c-parser.c (c_parser_omp_clause_name): Add support for
4431 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4432 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4433 default(none) in OpenACC.
4434 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4436 (c_parser_oacc_clause_tile): New function.
4437 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4438 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4439 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4441 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4442 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4444 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4445 (c_parser_oacc_update): Update the error message for missing clauses.
4446 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4447 and OMP_CLAUSE_INDEPENDENT.
4449 2015-11-05 Marek Polacek <polacek@redhat.com>
4452 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4453 deal with pre-evaluation on invalid types.
4455 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4456 Ilya Verbin <ilya.verbin@intel.com>
4458 * c-parser.c: Include context.h and gimple-expr.h.
4459 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4460 monotonic together with nonmonotonic.
4461 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4462 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4463 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4464 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4465 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4466 expressions on combined target teams before the target.
4467 (c_parser_omp_declare_target): If decl has "omp declare target" or
4468 "omp declare target link" attribute, and cgraph or varpool node already
4469 exists, then set corresponding flags. Call c_finish_omp_clauses
4470 in the parenthesized extended-list syntax case.
4471 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4473 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4474 on OMP_CLAUSE_REDUCTION array sections.
4475 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4476 into the constant offset, or for variable low-bound using
4477 POINTER_PLUS_EXPR. For structure element based array sections use
4478 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4479 (c_finish_omp_clauses): Drop generic_field_head, structure
4480 elements are now always mapped even as array section bases,
4481 diagnose same var in data sharing and mapping clauses. Diagnose if
4482 linear step on declare simd is neither a constant nor a uniform
4483 parameter. Look through POINTER_PLUS_EXPR for array section
4484 reductions. Diagnose the same var or function appearing multiple
4485 times on the same directive. Fix up wording for the to clause if t
4486 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4487 modifier on kinds other than dynamic or guided or nonmonotonic
4488 modifier together with ordered clause.
4490 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4491 Chung-Lin Tang <cltang@codesourcery.com>
4493 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4495 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4497 * c-array-notation.c: Reorder #include's and remove duplicates.
4498 * c-aux-info.c: Likewise.
4499 * c-convert.c: Likewise.
4500 * c-decl.c: Likewise.
4501 * c-errors.c: Likewise.
4502 * c-lang.c: Likewise.
4503 * c-objc-common.c: Likewise.
4504 * c-parser.c: Likewise.
4505 * c-typeck.c: Likewise.
4507 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4510 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4511 after calling build_qualified_type.
4513 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4514 Thomas Schwinge <thomas@codesourcery.com>
4515 James Norris <jnorris@codesourcery.com>
4516 Joseph Myers <joseph@codesourcery.com>
4517 Julian Brown <julian@codesourcery.com>
4518 Bernd Schmidt <bschmidt@redhat.com>
4520 * c-parser.c (c_parser_oacc_shape_clause): New.
4521 (c_parser_oacc_simple_clause): New.
4522 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4523 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4525 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4526 James Norris <jnorris@codesourcery.com>
4527 Cesar Philippidis <cesar@codesourcery.com>
4531 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4532 parameters, and handle these. Adjust all users.
4533 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4535 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4537 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4539 (c_finish_omp_construct): Declare function.
4540 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4541 Merge functions into...
4542 (c_finish_omp_construct): ... this new function.
4544 2015-10-22 Richard Biener <rguenther@suse.de>
4546 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4547 before folding a MINUS_EXPR.
4549 2015-10-21 Marek Polacek <polacek@redhat.com>
4552 * c-decl.c (start_function): Warn about vararg functions without
4555 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4557 * c-typeck.c (build_conditional_expr): Use boolean vector
4558 type for vector comparison.
4559 (build_vec_cmp): New.
4560 (build_binary_op): Use build_vec_cmp for comparison.
4562 2015-10-20 Marek Polacek <polacek@redhat.com>
4564 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4566 2015-10-20 Marek Polacek <polacek@redhat.com>
4569 * c-parser.c (c_parser_attributes): Break out of the loop if the
4570 token after an attribute isn't a comma.
4572 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4573 Aldy Hernandez <aldyh@redhat.com>
4575 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4576 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4577 (c_parser_omp_variable_list): Handle structure elements for
4578 map, to and from clauses. Handle array sections in reduction
4579 clause. Formatting fixes.
4580 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4581 if clause modifiers.
4582 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4583 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4584 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4585 c_parser_omp_clause_is_device_ptr): New functions.
4586 (c_parser_omp_clause_ordered): Parse optional parameter.
4587 (c_parser_omp_clause_reduction): Handle array reductions.
4588 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4589 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4591 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4592 (c_parser_omp_clause_depend_sink): New function.
4593 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4594 (c_parser_omp_clause_map): Parse release/delete map kinds and
4595 optional always modifier.
4596 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4597 and c_finish_omp_clauses callers.
4598 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4599 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4600 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4601 (OMP_CRITICAL_CLAUSE_MASK): Define.
4602 (c_parser_omp_critical): Parse critical clauses.
4603 (c_parser_omp_for_loop): Handle doacross loops, adjust
4604 c_finish_omp_for and c_finish_omp_clauses callers.
4605 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4606 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4607 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4608 (c_parser_omp_for): Disallow ordered clause when combined with
4609 distribute. Disallow linear clause when combined with distribute
4610 and not combined with simd.
4611 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4612 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4613 parse clauses and if depend clause is found, don't parse a body.
4614 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4615 Allow target parallel without for after it.
4616 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4617 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4618 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4620 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4621 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4622 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4623 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4625 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4626 defaultmap and is_device_ptr clauses.
4627 (c_parser_omp_target): Parse target parallel and target simd. Set
4628 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4629 and target exit data. Diagnose invalid map kinds.
4630 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4631 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4633 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4635 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4636 (c_parser_omp_taskloop): New function.
4637 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4638 handle PRAGMA_OMP_TASKLOOP.
4639 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4640 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4641 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4642 Add IS_OMP argument, handle structure element bases, diagnose
4643 bitfields, pass IS_OMP recursively, diagnose known zero length
4644 array sections in depend clauses, handle array sections in reduction
4645 clause, diagnose negative length even for pointers.
4646 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4647 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4648 array sections in reduction clause, set
4649 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4650 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4651 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4652 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4654 2015-10-06 Marek Polacek <polacek@redhat.com>
4656 * c-parser.c (c_parser_statement_after_labels): Use
4657 protected_set_expr_location.
4658 (c_parser_omp_clause_num_gangs): Likewise.
4659 (c_parser_omp_clause_num_threads): Likewise.
4660 (c_parser_omp_clause_num_workers): Likewise.
4661 (c_parser_omp_clause_vector_length): Likewise.
4662 (c_parser_omp_clause_num_teams): Likewise.
4663 (c_parser_omp_clause_thread_limit): Likewise.
4664 * c-typeck.c (build_c_cast): Likewise.
4665 (c_cast_expr): Likewise.
4667 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4669 * c-typeck.c (c_tree_equal): Use real_equal instead of
4672 2015-10-04 Jason Merrill <jason@redhat.com>
4674 * c-parser.c (c_lex_one_token): Handle @synchronized.
4675 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4676 can change whether the function is transaction_safe.
4678 2015-10-02 Marek Polacek <polacek@redhat.com>
4681 * c-typeck.c (convert_for_assignment): Use the expansion point
4682 location throughout.
4684 2015-10-02 Marek Polacek <polacek@redhat.com>
4687 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4688 and pass it down to c_parser_if_statement.
4689 (c_parser_else_body): Add CHAIN parameter and pass it down to
4690 c_parser_statement_after_labels.
4691 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4692 duplicated if-else-if conditions.
4694 2015-10-01 Marek Polacek <polacek@redhat.com>
4696 * c-typeck.c (convert_for_assignment): Improve commentary.
4698 2015-09-30 Marek Polacek <polacek@redhat.com>
4701 * c-typeck.c (c_finish_return): Use the expansion point location for
4702 certain "return with value" warnings.
4704 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4706 * c-parser.c (pragma_lex): Add loc argument.
4708 2015-09-15 Marek Polacek <polacek@redhat.com>
4711 * c-decl.c (tag_exists_p): New function.
4712 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4713 struct/union/enum keywords are missing.
4714 * c-tree.h (tag_exists_p): Declare.
4716 2015-09-15 Marek Polacek <polacek@redhat.com>
4718 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4719 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4720 Return NULL_TREE instead of 0.
4721 (lookup_name): Return NULL_TREE instead of 0.
4722 (lookup_name_in_scope): Likewise.
4723 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4724 (parser_xref_tag): Use false instead of 0.
4725 (start_struct): Use true instead of 1.
4726 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4728 2015-09-14 Marek Polacek <polacek@redhat.com>
4730 * c-typeck.c (set_nonincremental_init_from_string): Use
4731 HOST_WIDE_INT_M1U when shifting a negative value.
4733 2015-09-09 Mark Wielaard <mjw@redhat.com>
4735 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4738 2015-09-10 Jakub Jelinek <jakub@redhat.com>
4741 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4742 into OMP_FOR_PRE_BODY rather than before the loop.
4744 2015-09-09 Jakub Jelinek <jakub@redhat.com>
4747 * c-parser.c (c_parser_oacc_all_clauses,
4748 c_parser_omp_all_clauses): Remove invalid clause from
4749 list of clauses even if parser->error is set.
4752 * c-parser.c (c_parser_omp_clause_aligned,
4753 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4755 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4759 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4760 instead of c_parser_unary_expression. If the result is !lvalue_p,
4761 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4763 2015-09-04 Marek Polacek <polacek@redhat.com>
4766 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4768 2015-09-03 Martin Sebor <msebor@redhat.com>
4771 * c-typeck.c (convert_arguments, parser_build_unary_op,
4772 build_conditional_expr, c_cast_expr, convert_for_assignment,
4773 build_binary_op, _objc_common_truthvalue_conversion): Call
4775 (c_decl_implicit): Define.
4777 2015-09-02 Marek Polacek <polacek@redhat.com>
4780 * c-parser.c (c_parser_enum_specifier): Give a better error for
4783 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4785 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4787 2015-08-12 Marek Polacek <polacek@redhat.com>
4789 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4792 2015-08-03 Marek Polacek <polacek@redhat.com>
4795 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4797 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4799 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4801 * c-parser.c (c_parser_if_body): Take token_indent_info
4802 argument. Call warn_for_misleading_indentation even when the
4803 body is a semicolon. Extract token_indent_infos corresponding
4804 to the guard, body and next tokens. Adjust call to
4805 warn_for_misleading_indentation accordingly.
4806 (c_parser_else_body): Likewise.
4807 (c_parser_if_statement): Likewise.
4808 (c_parser_while_statement): Likewise.
4809 (c_parser_for_statement): Likewise.
4811 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4812 Manuel López-Ibáñez <manu@gcc.gnu.org>
4814 * c-decl.c (get_parm_info): Remove static var. Update warning
4817 2015-07-27 Marek Polacek <polacek@redhat.com>
4821 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4823 2015-07-20 Marek Polacek <polacek@redhat.com>
4826 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4827 (build_binary_op): Warn about left shift overflows.
4829 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4831 * c-array-notation.c: Adjust includes for flags.h changes.
4832 * c-objc-common.c: Likewise.
4834 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4836 * c-array-notation.c: Adjust includes.
4837 * c-aux-info.c: Likewise.
4838 * c-convert.c: Likewise.
4839 * c-decl.c: Likewise.
4840 * c-errors.c: Likewise.
4841 * c-lang.c: Likewise.
4842 * c-objc-common.c: Likewise.
4843 * c-parser.c: Likewise.
4844 * c-typeck.c: Likewise.
4846 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4849 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4851 2015-06-29 Marek Polacek <polacek@redhat.com>
4854 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4855 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4856 about -Wswitch-bool here.
4857 (do_case): Update c_add_case_label call.
4858 (c_finish_case): Update c_do_switch_warnings call.
4860 2015-06-27 Marek Polacek <polacek@redhat.com>
4862 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4864 2015-06-26 Marek Polacek <polacek@redhat.com>
4866 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4868 * c-typeck.c (array_to_pointer_conversion): Likewise.
4869 (build_unary_op): Likewise.
4870 (c_finish_return): Likewise.
4872 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4874 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4875 * c-parser.c: Likewise.
4877 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4879 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4880 instead of pointer_hash.
4881 (detect_field_duplicates): Likewise.
4883 2015-06-25 Marek Polacek <polacek@redhat.com>
4885 * c-array-notation.c: Use VAR_P throughout.
4886 * c-decl.c: Likewise.
4887 * c-objc-common.c: Likewise.
4888 * c-parser.c: Likewise.
4889 * c-typeck.c: Likewise.
4891 2015-06-25 Marek Polacek <polacek@redhat.com>
4893 * c-decl.c: Use is_global_var throughout.
4894 * c-parser.c: Likewise.
4895 * c-typeck.c: Likewise.
4897 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4899 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4900 * c-aux-info.c: Likewise.
4901 * c-convert.c: Likewise.
4902 * c-decl.c: Likewise.
4903 * c-errors.c: Likewise.
4904 * c-lang.c: Likewise.
4905 * c-objc-common.c: Likewise.
4906 * c-parser.c: Likewise.
4907 * c-typeck.c: Likewise.
4909 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
4912 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4915 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4917 * c-decl.c (pop_scope): Register the main translation unit
4918 through the new debug hook.
4920 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4922 * c-array-notation.c : Adjust include files.
4923 * c-aux-info.c : Likewise.
4924 * c-convert.c : Likewise.
4925 * c-decl.c : Likewise.
4926 * c-errors.c : Likewise.
4927 * c-lang.c : Likewise.
4928 * c-lang.h : Likewise.
4929 * c-objc-common.c : Likewise.
4930 * c-parser.c : Likewise.
4931 * c-typeck.c : Likewise.
4933 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4935 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4936 immediately clobber it.
4937 (c_write_global_declarations_1): Remove call to
4938 check_global_declaration_1.
4939 (c_write_global_declarations_2): Remove.
4940 (c_write_final_cleanups): Rename from c_write_global_declarations.
4941 Remove call to finalize_compilation_unit.
4942 Remove calls to debugging hooks.
4943 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4944 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4945 * c-tree.h: Remove c_write_global_declarations.
4947 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4949 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4950 * c-aux-info.c: Likewise.
4951 * c-convert.c: Likewise.
4952 * c-decl.c: Likewise.
4953 * c-errors.c: Likewise.
4954 * c-lang.c: Likewise.
4955 * c-objc-common.c: Likewise.
4956 * c-parser.c: Likewise.
4957 * c-typeck.c: Likewise.
4959 2015-06-04 Marek Polacek <polacek@redhat.com>
4962 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4965 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4967 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4968 Warn for empty struct.
4969 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4971 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4973 * c-decl.c (start_function): Call plugin before parsing.
4974 (finish_function): Call plugin after parsing.
4976 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4979 * c-decl.c (merge_decls): Merge DECL_COMMON.
4981 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
4983 * Make-lang.in (check_gcc_pallelize): Define.
4985 2015-05-22 Marek Polacek <polacek@redhat.com>
4988 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4991 2015-05-21 Marek Polacek <polacek@redhat.com>
4993 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4996 2015-05-20 Marek Polacek <polacek@redhat.com>
4998 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4999 * c-typeck.c: Likewise.
5001 2015-05-19 Marek Polacek <polacek@redhat.com>
5003 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5005 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5008 * c-parser.c (c_parser_omp_for_loop): Don't add
5009 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5010 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5011 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5014 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5016 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5019 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5022 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5025 2015-05-14 Marek Polacek <polacek@redhat.com>
5029 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5032 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5034 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5035 to add a call to warn_for_misleading_indentation.
5036 (c_parser_else_body): Likewise, adding param "else_loc".
5037 (c_parser_if_statement): Check for misleading indentation.
5038 (c_parser_while_statement): Likewise.
5039 (c_parser_for_statement): Likewise.
5041 2015-05-08 Marek Polacek <polacek@redhat.com>
5044 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5045 (output_init_element): Likewise.
5047 2015-05-07 Marek Polacek <polacek@redhat.com>
5050 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5053 2015-04-30 Marek Polacek <polacek@redhat.com>
5055 * c-typeck.c (set_init_label): Call error_at instead of error and
5058 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5061 * c-typeck.c (c_build_va_arg): Clarify the error message.
5063 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5065 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5066 OMP_STANDALONE_CLAUSES.
5068 2015-04-28 Marek Polacek <polacek@redhat.com>
5070 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5072 2015-04-28 Marek Polacek <polacek@redhat.com>
5075 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5077 2015-04-25 Marek Polacek <polacek@redhat.com>
5080 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5083 2015-04-23 Marek Polacek <polacek@redhat.com>
5086 * c-decl.c (set_labels_context_r): New function.
5087 (store_parm_decls): Call it via walk_tree_without_duplicates.
5088 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5089 instead of create_tmp_var. Build TARGET_EXPR instead of
5091 (build_atomic_assign): Use create_tmp_var_raw instead of
5092 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5094 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5096 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5097 (c_parser_omp_target_update): Add missed %> to error_at ().
5099 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5102 * c-decl.c (c_default_pointer_mode): Remove definition.
5103 * c-tree.h (c_default_pointer_mode): Remove declaration.
5105 2015-03-27 Tobias Burnus <burnus@net-b.de>
5108 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5110 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5111 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5112 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5114 2015-03-19 Jakub Jelinek <jakub@redhat.com>
5116 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5117 attribute for DECL_EXTERNAL VAR_DECLs.
5119 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5121 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5124 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5127 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5128 before preparing arguments to warn_logical_not_parentheses.
5130 2015-03-09 Jakub Jelinek <jakub@redhat.com>
5133 * c-typeck.c (parser_build_binary_op): Don't warn for
5134 !!x == y or !b == y where b is _Bool.
5136 2015-03-09 Marek Polacek <polacek@redhat.com>
5138 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5139 * c-decl.c (grokdeclarator): Likewise.
5140 * c-typeck.c (build_binary_op): Likewise.
5142 2015-02-27 Marek Polacek <polacek@redhat.com>
5145 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5147 2015-02-14 Marek Polacek <polacek@redhat.com>
5150 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5151 declared through a typedef name.
5153 2015-02-13 Marek Polacek <polacek@redhat.com>
5156 * c-decl.c (grokdeclarator): Print also the type when giving
5157 the error message about array's incomplete element type.
5159 2015-02-11 Jakub Jelinek <jakub@redhat.com>
5162 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5163 check in the POP macro.
5165 2015-02-09 Marek Polacek <polacek@redhat.com>
5168 * c-typeck.c (process_init_element): Don't always wrap
5169 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5170 initializing a range of elements.
5172 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5176 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5178 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5180 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5181 processing enum declaration.
5183 2015-01-29 Marek Polacek <polacek@redhat.com>
5186 * c-typeck.c (pop_init_level): If constructor_elements has
5187 exactly one element with integer_zerop value, set constructor_zeroinit
5188 to 1. Remove braces around warning_init call.
5190 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5193 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5194 of FUNCTION_DECLs with error_mark_node.
5196 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5199 * c-typeck.c (convert_arguments): Return -1 if there are
5200 error_args, even if we've diagnosed too many arguments.
5202 2015-01-21 Richard Biener <rguenther@suse.de>
5205 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5206 for builtins the user declared correctly.
5208 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5209 Bernd Schmidt <bernds@codesourcery.com>
5210 Cesar Philippidis <cesar@codesourcery.com>
5211 James Norris <jnorris@codesourcery.com>
5212 Jakub Jelinek <jakub@redhat.com>
5213 Ilmir Usmanov <i.usmanov@samsung.com>
5215 * c-parser.c: Include "gomp-constants.h".
5216 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5217 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5218 Use OMP_CLAUSE_SET_MAP_KIND.
5219 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5220 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5221 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5222 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5223 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5224 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5225 "copyout", "create", "delete", "deviceptr", "gang", "host",
5226 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5227 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5228 "present_or_create", "pcreate", "seq", "self", "vector",
5229 "vector_length", "wait", "worker".
5230 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5231 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5232 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5233 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5234 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5235 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5236 (c_parser_oacc_data_clause_deviceptr)
5237 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5238 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5239 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5240 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5241 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5242 (c_parser_oacc_parallel, c_parser_oacc_update)
5243 (c_parser_oacc_wait): New functions.
5244 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5245 (c_finish_oacc_data): New prototypes.
5246 * c-typeck.c: Include "gomp-constants.h".
5247 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5248 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5249 OMP_CLAUSE_SET_MAP_KIND.
5250 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5251 (c_finish_oacc_data): New functions.
5252 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5253 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5254 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5255 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5256 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5257 GOMP_MAP_FORCE_DEVICEPTR.
5259 2015-01-09 Michael Collison <michael.collison@linaro.org>
5261 * c-array-notation.c: Include hash-set.h, machmode.h,
5262 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5263 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5264 * c-aux-info.c: Ditto.
5265 * c-convert.c: Ditto.
5267 * c-errors.c: Ditto.
5268 * c-lang.c: Dittoxs.
5269 * c-objc-common.c: Ditto.
5270 * c-parser.c: Ditto.
5271 * c-typeck.c: Include hash-set.h, machmode.h,
5272 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5273 fold-const.h, wide-int.h, inchash.h, real.h and
5274 fixed-value.h due to flattening of tree.h.
5276 2015-01-07 Marek Polacek <polacek@redhat.com>
5279 * c-typeck.c (process_init_element): Disallow initialization of
5280 a flexible array member with a string constant if the structure
5283 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5286 * c-typeck.c (convert_for_assignment, c_finish_return): For
5287 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5288 types also set in_late_binary_op around convert call.
5289 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5290 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5291 result on expr as last argument to ubsan_instrument_float_cast,
5292 if in_late_binary_op, don't use c_save_expr but save_expr.
5294 Update copyright years.
5296 2015-01-05 Marek Polacek <polacek@redhat.com>
5299 * c-typeck.c (build_array_ref): Pass loc down to
5300 warn_array_subscript_with_type_char.
5302 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5304 * c-typeck.c: New behavious for pointers to arrays with qualifiers
5305 (common-pointer-type): For pointers to arrays take qualifiers from
5307 (build_conditional_expr): Add warnings for lost qualifiers.
5308 (comp-target-types): Allow pointers to arrays with different qualifiers.
5309 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5310 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5311 to PEDWARN_FOR_QUALIFIERS.
5313 2014-12-17 Jakub Jelinek <jakub@redhat.com>
5316 * c-convert.c: Include ubsan.h.
5317 (convert): For real -> integral casts and
5318 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5319 instead instrument the float cast directly.
5321 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5323 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5324 c_finish_stmt_expr): Remove NULL last argument from
5325 create_tmp_var_raw and create_tmp_var calls.
5326 * c-array-notation.c (fix_builtin_array_notation_fn,
5327 build_array_notation_expr, fix_conditional_array_notations_1,
5328 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5330 2014-11-28 Marek Polacek <polacek@redhat.com>
5333 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5334 convert the right operand to integer type.
5336 2014-11-25 Marek Polacek <polacek@redhat.com>
5339 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5340 for inline functions.
5342 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5345 * c-typeck.c (build_array_ref): Adjust
5346 convert_vector_to_pointer_for_subscript caller. If it returns true,
5347 call non_lvalue_loc on the result.
5349 2014-11-11 Richard Biener <rguenther@suse.de>
5351 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5354 2014-11-10 Andi Kleen <ak@linux.intel.com>
5357 * c-parser.c (c_parser_statement_after_labels): Call
5359 (c_parser_if_statement): Dito.
5360 (c_parser_switch_statement): Dito.
5361 (c_parser_while_statement): Dito.
5362 (c_parser_do_statement): Dito.
5363 (c_parser_for_statement): Dito.
5364 * c-typeck.c (c_finish_loop): Dito.
5366 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5368 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5369 OPT_Wshift_count_overflow in the warnings.
5371 2014-10-30 Marek Polacek <polacek@redhat.com>
5373 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5374 print the stripped version as well, if they're not the same.
5376 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5378 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5381 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5383 * c-decl.c: Adjust include files.
5384 * c-parser.c: Ditto.
5386 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5387 Tom Tromey <tromey@redhat.com>
5389 * c-tree.h (enum c_oracle_request): New.
5390 (c_binding_oracle_function): New typedef.
5391 (c_binding_oracle, c_pushtag, c_bind): Declare.
5392 * c-decl.c (c_binding_oracle): New global.
5393 (I_SYMBOL_CHECKED): New macro.
5394 (i_symbol_binding): New function.
5395 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5396 (I_TAG_CHECKED): New macro.
5397 (i_tag_binding): New function.
5398 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5399 (I_LABEL_CHECKED): New macro.
5400 (i_label_binding): New function.
5401 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5402 (c_print_identifier): Save and restore c_binding_oracle.
5403 (c_pushtag, c_bind): New functions.
5405 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5407 * c-typeck.c: Adjust include files.
5409 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5412 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5413 initialization here...
5414 (c_initialize_diagnostics): ... but here. Set defaults after
5415 building pretty-printer.
5417 2014-10-23 Marek Polacek <polacek@redhat.com>
5420 * c-decl.c (pop_scope): Don't print warning in external_scope.
5422 2014-10-19 Marek Polacek <polacek@redhat.com>
5425 * c-typeck.c (output_init_element): Allow initializing objects with
5426 static storage duration with compound literals even in C99 and add
5429 2014-10-17 Marek Polacek <polacek@redhat.com>
5432 * c-typeck.c (digest_init): Allow initializing objects with static
5433 storage duration with compound literals even in C99 and add pedwarn
5436 2014-10-17 Marek Polacek <polacek@redhat.com>
5439 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5440 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5441 error multiple times. Print the type.
5443 2014-10-17 Marek Polacek <polacek@redhat.com>
5446 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5449 2014-10-17 Marek Polacek <polacek@redhat.com>
5451 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5452 (start_function): Use OPT_Wimplicit_int instead of 0.
5453 (store_parm_decls_oldstyle): Likewise.
5455 2014-10-17 Alan Modra <amodra@gmail.com>
5458 * c-decl.c (merge_decls): Don't merge section name or tls model
5459 to newdecl symtab node, instead merge to olddecl. Override
5460 existing olddecl section name. Set tls_model for all thread-local
5461 vars, not just OMP thread-private ones. Remove incorrect comment.
5463 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5465 * c-decl.c: Adjust include files.
5467 2014-10-14 DJ Delorie <dj@redhat.com>
5469 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5470 (c_token_starts_typename): Check all __intN, not just __int128.
5471 (c_token_starts_declspecs): Likewise.
5472 (c_parser_declspecs): Likewise.
5473 (c_parser_attribute_any_word): Likewise.
5474 (c_parser_objc_selector): Likewise.
5475 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5476 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5478 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5480 (finish_declspecs): Likewise.
5482 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5484 * c-parser.c (c_parser_all_labels): New function to replace
5486 (c_parser_statement): Call the new function.
5488 2014-10-09 Marek Polacek <polacek@redhat.com>
5491 * c-typeck.c (pop_init_level): Don't warn about initializing
5494 2014-10-07 Marek Polacek <polacek@redhat.com>
5497 * c-decl.c (header_for_builtin_fn): New function.
5498 (implicitly_declare): Suggest which header to include.
5500 2014-10-07 Marek Polacek <polacek@redhat.com>
5502 * c-convert.c (convert): Use error_operand_p.
5503 * c-typeck.c (require_complete_type): Likewise.
5504 (really_atomic_lvalue): Likewise.
5505 (digest_init): Likewise.
5506 (handle_omp_array_sections_1): Likewise.
5508 2014-10-03 Marek Polacek <polacek@redhat.com>
5511 * c-decl.c (pop_scope): Don't warn about "inline function declared
5512 but never defined" for functions marked with gnu_inline attribute.
5514 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5517 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5518 on low_bound and length.
5520 2014-09-24 Marek Polacek <polacek@redhat.com>
5524 * c-parser.c: Don't define CPP_KEYWORD.
5525 (c_parser_switch_statement): Pass original type to c_finish_case.
5526 * c-tree.h (c_finish_case): Update declaration.
5527 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5528 conditionally to c_do_switch_warnings.
5530 2014-09-03 Marek Polacek <polacek@redhat.com>
5533 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5536 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5537 Balaji V. Iyer <balaji.v.iyer@intel.com>
5538 Igor Zamyatin <igor.zamyatin@intel.com>
5540 * c-parser.c (c_parser_cilk_for): New function.
5541 (c_parser_cilk_grainsize): Likewise.
5542 (c_get_temp_regvar): Likewise.
5543 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5544 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5545 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5546 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5549 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5551 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5552 with using HOST_WIDE_INT without truncation to 'int'
5554 2014-08-22 Marek Polacek <polacek@redhat.com>
5557 * c-typeck.c (parser_build_binary_op): Adjust call to
5558 warn_logical_not_parentheses.
5560 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5563 * c-parser.c (c_parser_array_notation): Check for correct
5564 type of an array added.
5566 2014-08-19 Marek Polacek <polacek@redhat.com>
5569 * c-typeck.c (build_binary_op): If either operand of a comparison
5570 is a boolean expression, call maybe_warn_bool_compare.
5572 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5575 * c-typeck.c (build_c_cast): Do a conversion even when the
5576 TYPE_MAIN_VARIANTs are the same.
5578 2014-08-19 Marek Polacek <polacek@redhat.com>
5580 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5581 pedwarn_c99 instead of pedwarn.
5582 (grokfield): Likewise.
5583 (warn_defaults_to): New function.
5584 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5585 Unconditionally call pedwarn_c99 instead of pedwarn.
5586 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5587 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5588 check flag_isoc11 before.
5589 * c-errors.c (pedwarn_c99): Change the return type to bool.
5590 Handle -Wc99-c11-compat.
5591 * c-parser.c (disable_extension_diagnostics): Handle
5592 warn_c99_c11_compat.
5593 (restore_extension_diagnostics): Likewise.
5594 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5595 instead of pedwarn, don't check flag_isoc11 before.
5596 (c_parser_declspecs): Likewise.
5597 (c_parser_alignas_specifier): Likewise.
5598 (c_parser_alignof_expression): Likewise.
5599 (c_parser_generic_selection): Likewise.
5600 * c-tree.h (pedwarn_c99): Update declaration.
5601 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5604 2014-08-19 Marek Polacek <polacek@redhat.com>
5606 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5608 * c-errors.c: Include "opts.h".
5609 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5610 * c-parser.c (disable_extension_diagnostics): Handle negative value
5611 of warn_c90_c99_compat, too.
5612 (restore_extension_diagnostics): Likewise.
5613 (c_parser_compound_statement_nostart): Pass
5614 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5616 2014-08-12 Marek Polacek <polacek@redhat.com>
5618 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5620 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5622 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5624 2014-08-10 Marek Polacek <polacek@redhat.com>
5627 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5628 Call pedwarn_c90 instead of pedwarn.
5629 (check_bitfield_type_and_width): Likewise.
5630 (declspecs_add_qual): Likewise.
5631 (declspecs_add_type): Likewise.
5632 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5633 Adjust to only call pedwarn_c90.
5634 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5635 pedwarn_c90 instead of pedwarn.
5636 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5637 * c-parser.c (disable_extension_diagnostics): Handle
5638 warn_c90_c99_compat.
5639 (restore_extension_diagnostics): Likewise.
5640 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5641 pedwarn_c90 instead of pedwarn.
5642 (c_parser_initelt): Likewise.
5643 (c_parser_postfix_expression): Likewise.
5644 (c_parser_postfix_expression_after_paren_type): Likewise.
5645 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5646 * c-tree.h: Fix formatting.
5647 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5648 pedwarn_c90 instead of pedwarn.
5650 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5652 * c-typeck.c: Remove include of pointer-set.h.
5654 2014-08-07 Marek Polacek <polacek@redhat.com>
5656 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5658 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5660 * c-typeck.c: Use hash_map instead of pointer_map.
5662 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5664 * c-decl.c: Use hash_set instead of pointer_set.
5666 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5669 * c-array-notation.c (expand_array_notations): Handling
5672 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5675 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5678 2014-07-30 Tom Tromey <tromey@redhat.com>
5680 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5682 (really_start_incremental_init, push_init_level): Initialize
5684 (pop_init_level): Set global designator_depth.
5685 (process_init_element): Check for designated_init attribute.
5687 2014-07-20 Marek Polacek <polacek@redhat.com>
5690 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5691 (implicitly_declare): Pass location to implicit_decl_warning.
5693 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5696 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5697 If non-NULL, call c_parser_check_literal_zero.
5698 (c_parser_check_literal_zero): New function.
5699 (c_parser_postfix_expression_after_primary): Adjust
5700 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5702 2014-07-06 Marek Polacek <polacek@redhat.com>
5705 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5706 * c-tree.h (C_ARRAY_PARAMETER): Define.
5707 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5710 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5711 Chen Gang <gang.chen.5i5j@gmail.com>
5713 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5716 2014-07-01 Marek Polacek <polacek@redhat.com>
5718 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5719 instead of 0 to WARN_FOR_ASSIGNMENT.
5721 2014-07-01 Marek Polacek <polacek@redhat.com>
5724 * c-typeck.c (convert_for_assignment): Pass
5725 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5727 2014-06-30 Marek Polacek <polacek@redhat.com>
5729 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5730 has no_sanitize_undefined attribute.
5732 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5735 * c-array-notation.c (fix_builtin_array_notation_fn):
5736 Check for 0 arguments in builtin call. Check that bultin argument is
5738 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5741 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5743 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5744 qualifiers in __auto_type for atomic types.
5745 (c_parser_typeof_specifier): Discard all type qualifiers in
5746 __typeof__ for atomic types.
5748 2014-06-25 Marek Polacek <polacek@redhat.com>
5751 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5752 the return expression to c_finish_return.
5754 2014-06-25 Jakub Jelinek <jakub@redhat.com>
5756 * c-typeck.c (c_finish_omp_clauses): Make sure
5757 OMP_CLAUSE_LINEAR_STEP has correct type.
5759 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5763 2014-06-24 Jakub Jelinek <jakub@redhat.com>
5765 * c-parser.c (c_parser_omp_for_loop): For
5766 #pragma omp parallel for simd move lastprivate clause from parallel
5767 to for rather than simd.
5769 2014-06-23 Marek Polacek <polacek@redhat.com>
5771 * c-typeck.c (parser_build_binary_op): Don't call
5772 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5774 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
5776 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5777 * c-decl.c (merge_decls): Likewise.
5779 2014-06-09 Marek Polacek <polacek@redhat.com>
5782 * c-typeck.c (error_init): Call inform instead of error_at.
5783 (pedwarn_init): Call inform instead of pedwarn.
5784 (warning_init): Call inform instead of warning_at.
5786 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
5788 * c-decl.c (merge_decls): Use set_decl_section_name.
5789 (duplicate_decls): Remove node if it exists.
5791 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5794 * c-typeck.c (push_init_level, process_init_element,
5795 pop_init_level): Correct check for zero initialization, move
5796 missing brace warning to respect zero initialization.
5798 2014-06-05 Marek Polacek <polacek@redhat.com>
5801 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5803 2014-06-05 Marek Polacek <polacek@redhat.com>
5806 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5807 on the left hand side operand of a comparison.
5809 2014-06-05 Marek Polacek <polacek@redhat.com>
5812 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5813 Print note only if the warning was printed.
5815 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5818 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5821 2014-06-03 Marek Polacek <polacek@redhat.com>
5824 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5826 * c-tree.h (c_start_case): Update.
5827 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5828 switch condition has boolean value.
5830 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
5832 * c-decl.c: Include builtins.h.
5833 * c-parser.c: Likewise.
5835 2014-05-27 Marek Polacek <polacek@redhat.com>
5838 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5839 error and warning calls to error_at and warning_at. Pass location of
5840 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5841 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5842 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5844 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5847 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5848 function parameters.
5850 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
5852 * c-decl.c (merge_decls): Preserve symtab node pointers.
5853 (duplicate_decls): Free new decl.
5855 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5857 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5860 * c-parser.c (c_parser_omp_target): Return bool values.
5862 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5864 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5865 num_teams_loc variable to num_thread_limit_loc.
5867 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5869 * c-array-notation.c (expand_array_notations): Use void_node
5870 instead of void_zero_node.
5872 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5874 * c-decl.c (finish_struct): Adjust.
5875 (finish_enum): Likewise.
5877 (record_inline_static): Likewise.
5878 (push_scope): Likewise.
5879 (make_label): Likewise.
5880 (lookup_label_for_goto): Likewise.
5881 (finish_struct): Likewise.
5882 (finish_enum): Likewise.
5883 (store_parm_decls): Likewise.
5884 (c_push_function_context): Likewise.
5885 * c-lang.h: Remove usage of variable_size gty attribute.
5886 * c-parser.c (c_parse_init): Adjust.
5887 (c_parse_file): Likewise.
5889 2014-05-13 Marek Polacek <polacek@redhat.com>
5892 * c-typeck.c (convert_for_assignment): Pass location to
5893 WARN_FOR_ASSIGNMENT instead of input_location.
5895 2014-05-10 Marek Polacek <polacek@redhat.com>
5897 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5898 maybe_warn_string_init.
5899 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5900 maybe_warn_string_init.
5901 * c-tree.h (maybe_warn_string_init): Update declaration.
5902 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5903 Call pedwarn_init with loc instead of with input_location.
5904 (digest_init): Pass init_loc to maybe_warn_string_init.
5905 (pop_init_level): Call pedwarn_init with loc instead of with
5907 (set_init_index): Likewise.
5908 (process_init_element): Likewise.
5910 2014-05-09 Marek Polacek <polacek@redhat.com>
5913 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5914 (c_parser_initelt): Pass location to set_init_label. Pass array index
5915 location to set_init_index.
5916 * c-tree.h (push_init_level): Update declaration.
5917 (pop_init_level): Likewise.
5918 (set_init_index): Likewise.
5919 (set_init_label): Likewise.
5920 * c-typeck.c (error_init): Add location parameter. Call error_at
5922 (digest_init): Pass init_loc to error_init.
5923 (really_start_incremental_init):
5924 (push_init_level): Add location parameter. Pass loc to pop_init_level
5926 (pop_init_level): Likewise.
5927 (set_designator): Add location parameter. Pass loc to pop_init_level,
5928 push_init_level, and error_init.
5929 (set_init_index): Add location parameter. Pass loc to error_init and
5931 (set_init_label): Likewise.
5932 (output_init_element): Pass loc to error_init.
5933 (process_init_element): Pass loc to error_init, pop_init_level,
5934 pedwarn_init, and push_init_level.
5936 2014-05-09 Marek Polacek <polacek@redhat.com>
5939 * c-parser.c (c_parser_attributes): Parse the arguments as an
5940 expression-list if the attribute takes identifier.
5942 2014-05-08 Marek Polacek <polacek@redhat.com>
5945 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5948 2014-05-08 Marek Polacek <polacek@redhat.com>
5951 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5954 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5955 Mike Stump <mikestump@comcast.net>
5956 Richard Sandiford <rdsandiford@googlemail.com>
5958 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5959 (finish_enum): Use wide-int interfaces.
5960 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5961 * c-typeck.c (build_c_cast): Likewise.
5962 (set_nonincremental_init_from_string): Likewise.
5963 (c_tree_equal): Likewise.
5965 2014-05-02 Marek Polacek <polacek@redhat.com>
5968 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5969 Return size_one_node when the type is not complete.
5970 (pointer_diff): Remove comment.
5971 (build_unary_op): Improve error messages.
5973 2014-05-02 Marek Polacek <polacek@redhat.com>
5975 * c-typeck.c (c_finish_return): Separate warning_at calls.
5977 2014-05-02 Marek Polacek <polacek@redhat.com>
5979 * c-tree.h (error_init): Remove declaration.
5980 (pedwarn_init): Likewise.
5981 * c-typeck.c (error_init): Make static and move above.
5982 (pedwarn_init): Likewise.
5983 (warning_init): Move above.
5984 (maybe_warn_string_init): Likewise.
5986 2014-05-01 Jeff Law <law@redhat.com>
5990 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5991 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5994 2014-05-02 Marek Polacek <polacek@redhat.com>
5997 * c-typeck.c (push_init_level): Set constructor_designated to
5998 p->designated for structures.
6000 2014-05-01 Marek Polacek <polacek@redhat.com>
6003 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6004 function-definition has an attribute after the declarator.
6006 2014-05-01 Marek Polacek <polacek@redhat.com>
6009 * c-typeck.c (warning_init): Add location_t parameter. Call
6010 warning_at instead of warning.
6011 (push_init_level): Pass input_location to warning_init.
6012 (add_pending_init): Add location_t parameter. Pass loc to
6014 (set_nonincremental_init): Pass input_location to add_pending_init.
6015 (set_nonincremental_init_from_string): Likewise.
6016 (output_init_element): Pass loc to warning_init and to
6019 2014-05-01 Marek Polacek <polacek@redhat.com>
6022 * c-typeck.c (c_finish_return): Distinguish between label and variable
6023 when warning about returning local address.
6025 2014-05-01 Marek Polacek <polacek@redhat.com>
6028 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6031 2014-05-01 Marek Polacek <polacek@redhat.com>
6034 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6035 instead of 0 to WARN_FOR_QUALIFIERS.
6037 2014-05-01 Marek Polacek <polacek@redhat.com>
6040 * c-typeck.c (default_conversion): Use better location for
6043 2014-04-30 Marek Polacek <polacek@redhat.com>
6045 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6046 also when SANITIZE_FLOAT_DIVIDE is on.
6048 2014-04-30 Marek Polacek <polacek@redhat.com>
6051 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6052 and pedwarn_init. Use loc insted of input_location.
6054 2014-04-30 Marek Polacek <polacek@redhat.com>
6057 * c-typeck.c (build_binary_op): Use location when warning about
6060 2014-04-25 Marek Polacek <polacek@redhat.com>
6063 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6064 always_inline/noinline and hot/cold attributes.
6066 2014-04-25 Marek Polacek <polacek@redhat.com>
6069 * c-parser.c (c_parser_initelt): Pass input_location to
6070 process_init_element.
6071 (c_parser_initval): Pass loc to process_init_element.
6072 * c-tree.h (process_init_element): Adjust declaration.
6073 * c-typeck.c (push_init_level): Pass input_location to
6074 process_init_element.
6075 (pop_init_level): Likewise.
6076 (set_designator): Likewise.
6077 (output_init_element): Add location_t parameter. Pass loc to
6079 (output_pending_init_elements): Pass input_location to
6080 output_init_element.
6081 (process_init_element): Add location_t parameter. Pass loc to
6082 output_init_element.
6084 2014-04-24 Jakub Jelinek <jakub@redhat.com>
6086 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6087 atomic-clause, allow comma in between atomic-clause and
6090 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6093 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6094 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6096 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6099 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6100 create_tmp_var instead build_decl for creating temps.
6101 (build_array_notation_expr): Likewise.
6102 (fix_conditional_array_notations_1): Likewise.
6103 (fix_array_notation_expr): Likewise.
6104 (fix_array_notation_call_expr): Likewise.
6106 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6109 * c-tree.h (c_build_function_call_vec): New prototype.
6110 * c-typeck.c (build_function_call_vec): Don't call
6111 resolve_overloaded_builtin here.
6112 (c_build_function_call_vec): New wrapper function around
6113 build_function_call_vec. Call resolve_overloaded_builtin here.
6114 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6115 Call c_build_function_call_vec instead of build_function_call_vec.
6116 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6117 * c-decl.c (finish_decl): Likewise.
6119 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6122 * c-typeck.c: Use correct format string in cast-qual warning
6124 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6126 * c-decl.c (c_decl_attributes): Use
6127 lang_hooks.types.omp_mappable_type.
6128 * c-typeck.c (c_finish_omp_clauses): Likewise.
6130 2014-03-06 Marek Polacek <polacek@redhat.com>
6133 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6134 of checking tree code.
6136 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6138 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6139 (c_parser_parameter_declaration): Likewise.
6141 2014-02-19 Marek Polacek <polacek@redhat.com>
6144 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6145 Call mark_exp_read on exp.value.
6146 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6147 TREE_ADDRESSABLE on old instead of val.
6148 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6150 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6152 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6153 C_EXPR_APPEND by vec_safe_push.
6154 * c-tree.h (C_EXPR_APPEND): Remove.
6156 2014-01-31 Marek Polacek <polacek@redhat.com>
6159 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6160 build_function_call_vec.
6161 (build_function_call): Likewise.
6162 (build_atomic_assign): Likewise.
6163 (build_function_call_vec): Add arg_loc parameter. Use it.
6164 (convert_arguments): Likewise.
6165 (convert_for_assignment): Rename rhs_loc to expr_loc.
6166 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6167 (c_parser_objc_keywordexpr): Likewise.
6168 (c_parser_postfix_expression_after_primary): Call
6169 build_function_call_vec with expr_loc rather than op_loc.
6170 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6171 build_function_call_vec.
6172 (c_parser_expr_list): Add locations parameter. Fill it with locations
6173 of function arguments.
6174 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6176 2014-01-30 Marek Polacek <polacek@redhat.com>
6179 * c-typeck.c (build_function_call_vec): Use loc parameter.
6180 (convert_arguments): Add location parameter. Use it.
6181 (ep_convert_and_check): Likewise.
6182 (build_atomic_assign): Adjust convert_for_assignment call.
6183 (build_modify_expr): Likewise.
6184 (digest_init): Likewise.
6185 (c_finish_return): Likewise.
6186 (build_conditional_expr): Adjust ep_convert_and_check calls.
6187 (convert_for_assignment): Add rhs_loc parameter. Use it.
6188 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6191 2014-01-30 Richard Biener <rguenther@suse.de>
6194 * c-typeck.c (build_function_call_vec): Do not replace calls
6195 to a function via an incompatible type with a runtime abort.
6197 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6199 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6200 flag_enable_cilkplus with flag_cilkplus.
6201 (c_parser_direct_declarator_inner): Likewise.
6202 (c_parser_attribute_any_word): Likewise.
6203 (c_parser_attributes): Likewise.
6204 (c_parser_compound_statement): Likewise.
6205 (c_parser_statement_after_labels): Likewise.
6206 (c_parser_if_statement): Likewise.
6207 (c_parser_switch_statement): Likewise.
6208 (c_parser_do_statement): Likewise.
6209 (c_parser_for_statement): Likewise.
6210 (c_parser_unary_expression): Likewise.
6211 (c_parser_postfix_expression): Likewise.
6212 (c_parser_postfix_expression_after_primary): Likewise.
6213 (c_parser_postfix_expression_after_primary): Likewise.
6214 (c_parser_omp_clause_name): Likewise.
6215 (c_finish_omp_declare_simd): Likewise.
6216 (c_parser_cilk_verify_simd): Likewise.
6217 * c-typeck.c (build_array_ref): Likewise.
6218 (build_function_call_vec): Likewise.
6219 (convert_arguments): Likewise.
6220 (build_compound_expr): Likewise.
6221 (c_finish_return): Likewise.
6222 (c_finish_if_stmt): Likewise.
6223 (c_finish_loop): Likewise.
6224 (build_binary_op): Likewise.
6226 2014-01-23 Marek Polacek <polacek@redhat.com>
6229 * c-typeck.c (parser_build_binary_op): Use location instead of
6231 (build_binary_op): Pass location to shorten_compare.
6233 2014-01-23 Marek Polacek <polacek@redhat.com>
6236 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6239 2014-01-23 Marek Polacek <polacek@redhat.com>
6242 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6243 of a comma expression.
6244 (emit_side_effect_warnings): Likewise.
6246 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6249 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6250 function to use walk_tree and moved a lot of its functionality to
6251 expand_array_notations.
6252 (expand_array_notations): New function.
6254 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6256 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6257 attribute an attribute without value.
6259 2014-01-23 Jakub Jelinek <jakub@redhat.com>
6262 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6263 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6265 2014-01-22 Marek Polacek <polacek@redhat.com>
6268 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6269 of remove_c_maybe_const_expr on op1 and op2.
6271 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6274 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6275 effects, preevaluate rhs using SAVE_EXPR first.
6277 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6280 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6281 statements with if-elseif statements.
6283 2014-01-06 Marek Polacek <polacek@redhat.com>
6286 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6287 defined bit-field types only in ISO C.
6289 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6291 Update copyright years
6293 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6295 * c-array-notation.c: Use the standard form for the copyright notice.
6297 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6299 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6300 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6301 field in parser is not empty. If not-empty, call the function
6302 c_parser_finish_omp_declare_simd.
6303 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6304 between SIMD-enabled functions and #pragma simd. Added new parameter.
6305 (c_parser_cilk_all_clauses): Modified the usage of the function
6306 c_parser_cilk_clause_vectorlength as mentioned above.
6307 (c_parser_cilk_simd_fn_vector_attrs): New function.
6308 (c_finish_cilk_simd_fn_tokens): Likewise.
6309 (is_cilkplus_vector_p): Likewise.
6310 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6311 "nomask," and "mask" strings in clause name.
6312 (c_parser_omp_all_clauses): Added 3 new case statements:
6313 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6314 PRAGMA_CILK_CLAUSE_NOMASK.
6315 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6316 check for vector attribute and if so call the function
6317 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6318 called the function c_finish_cilk_simd_fn_tokens.
6319 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6320 parser field is non-empty. If so, parse them as you would parse
6321 the omp declare simd pragma.
6322 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6323 Added a check when step is a parameter and flag it as error.
6324 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6325 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6328 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6330 * c-parser.c (c_parser_omp_parallel): Fix description.
6332 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6334 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6335 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6336 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6337 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6339 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6342 * c-parser.c (c_parser_alignas_specifier): Use
6343 c_sizeof_or_alignof_type instead of c_alignof.
6344 (c_parser_alignof_expression): Likewise, with min_alignof
6345 parameter depending on alignof spelling used.
6347 2013-12-04 Marek Polacek <polacek@redhat.com>
6350 * c-decl.c (start_function): Don't warn for missing prototype for
6353 2013-12-03 Marek Polacek <polacek@redhat.com>
6356 * c-decl.c (build_compound_literal): Allow compound literals with
6357 empty initial value.
6359 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6362 * c-typeck.c (build_modify_expr): Diagnose assignment to
6363 expression with array type.
6365 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6368 * c-typeck.c (process_init_element): Do not treat a string as
6369 initializing a whole array when used with a designator for an
6372 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6375 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6376 an inline function following a static declaration.
6378 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6381 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6382 to p_name before calling c_parser_omp_teams instead of after.
6383 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6384 argument. Remove unused p_name variable.
6386 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6387 Jakub Jelinek <jakub@redhat.com>
6389 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6390 external_scope is NULL.
6392 2013-11-27 Tom de Vries <tom@codesourcery.com>
6393 Marc Glisse <marc.glisse@inria.fr>
6396 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6398 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6400 * c-typeck.c: Add required include files from gimple.h.
6402 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6404 * c-decl.c (define_label, shadow_tag_warned)
6405 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6406 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6407 (declspecs_add_type): Remove use of in_system_header macro.
6408 * c-parser.c (c_parser_unary_expression): Likewise.
6409 * c-typeck.c (store_init_value, process_init_element)
6410 (c_start_case): Likewise.
6412 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6415 * c-parser.c (c_parser_set_source_position_from_token): Remove
6416 reference to in_system_header from comment.
6418 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6420 * c-decl.c (grokdeclarator): Update comment to refer to
6421 tree_to_[su]hwi rather than tree_low_cst.
6423 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6425 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6426 tree_to_uhwi throughout.
6428 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6430 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6433 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6435 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6438 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6440 * c-parser.c (c_parser_cilk_simd): New.
6441 (c_parser_cilk_verify_simd): New.
6442 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6443 (c_parser_omp_for_loop): Add case for NE_EXPR.
6444 Set c_break_label for CILK_SIMD.
6445 (c_parser_cilk_clause_vectorlength): New.
6446 (c_parser_cilk_clause_linear): New.
6447 (c_parser_cilk_clause_name): New.
6448 (c_parser_cilk_all_clauses): New.
6449 * c-typeck.c (build_unary_op): Pass location argument to
6451 (build_modify_expr): Same.
6452 (build_asm_expr): Same.
6453 (c_finish_bc_stmt): Error on break/continue in loops.
6455 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6457 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6459 2013-11-14 Diego Novillo <dnovillo@google.com>
6461 * c-decl.c: Include print-tree.h.
6462 Include stor-layout.h.
6465 Include stringpool.h.
6466 * c-lang.c: Include fold-const.h.
6467 * c-parser.c: Include stringpool.h.
6469 Include stor-layout.h.
6471 Include trans-mem.h.
6472 * c-typeck.c: Include stor-layout.h.
6473 Include trans-mem.h.
6477 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6479 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6480 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6482 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6483 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6485 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6486 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6487 (c_parser_declarator, c_parser_direct_declarator_inner)
6488 (c_parser_parameter_declaration, c_parser_type_name): All callers
6490 (c_parser_declaration_or_fndef): Handle declarations with type
6491 determined from the initializer.
6493 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6495 * c-typeck.c: Include gimplify.h.
6497 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6499 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6500 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6502 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6503 or _Thread_local as appropriate in diagnostics.
6504 (build_null_declspecs): Initialize ret->thread_gnu_p.
6505 (declspecs_add_scspec): Handle either __thread or _Thread_local
6506 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6507 pedantic. Do not disallow _Thread_local extern and _Thread_local
6510 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6511 Andrew MacLeod <amacleod@redhat.com>
6513 * c-aux-info.c (gen_type): Handle atomic qualifier.
6514 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6515 qualifiers when compating types.
6516 (shadow_tag_warned): Handle atomic_p in declspecs.
6517 (quals_from_declspecs): Likewise.
6518 (start_decl): Use c_type_promotes_to when promoting argument
6520 (grokdeclarator): Handle _Atomic.
6521 (get_parm_info): Diagnose any qualifier on "void" as only
6523 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6524 comparing types. Use c_type_promotes_to when promoting argument
6526 (finish_function): Use c_type_promotes_to when promoting argument
6528 (build_null_declspecs): Handle atomic_p in declspecs.
6529 (declspecs_add_qual): Handle RID_ATOMIC.
6530 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6531 (c_token_starts_declspecs): Handle RID_ATOMIC.
6532 (c_parser_declspecs): Handle atomic type specifiers and
6534 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6535 from types of expressions with atomic type.
6536 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6537 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6538 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6539 (c_parser_statement_after_labels, c_parser_switch_statement)
6540 (c_parser_for_statement, c_parser_expr_no_commas)
6541 (c_parser_conditional_expression, c_parser_binary_expression)
6542 (c_parser_cast_expression, c_parser_unary_expression)
6543 (c_parser_postfix_expression)
6544 (c_parser_postfix_expression_after_primary, c_parser_expression):
6545 Use convert_lvalue_to_rvalue.
6546 (c_parser_expression_conv, c_parser_expr_list): Document
6547 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6548 (c_parser_objc_synchronized_statement): Use
6549 convert_lvalue_to_rvalue.
6550 (c_parser_objc_selector): Handle RID_ATOMIC.
6551 (c_parser_objc_receiver, c_parser_array_notation): Use
6552 convert_lvalue_to_rvalue.
6553 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6554 _Atomic (type-name).
6555 (struct c_declspecs): Add atomic_p field.
6556 (convert_lvalue_to_rvalue): Declare.
6557 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6558 corresponding atomic types.
6559 (qualify_type): Don't add _Atomic qualifiers from second argument.
6560 (comp_target_types): Do not allow _Atomic mismatches.
6561 (type_lists_compatible_p): Do not remove atomic qualifiers when
6563 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6564 (build_atomic_assign): New functions.
6565 (build_unary_op): Use build_atomic_assign for atomic increment and
6567 (build_conditional_expr): Do not treat _Atomic void as a qualified
6569 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6570 (find_anonymous_field_with_type, convert_to_anonymous_field)
6571 (convert_for_assignment): Do not remove atomic qualifiers when
6573 (digest_init): Do not accept initialization of arrays of atomic
6574 elements by string constants.
6575 (build_asm_expr): Use convert_lvalue_to_rvalue.
6576 (build_binary_op): Do not treat _Atomic void as a qualified
6579 2013-11-06 DJ Delorie <dj@redhat.com>
6581 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6582 both explicit and builtin, print the location of the explicit one.
6584 2013-11-05 Tobias Burnus <burnus@net-b.de>
6586 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6587 c_parser_omp_distribute, c_parser_omp_teams,
6588 c_parser_omp_target, c_parser_omp_declare): Handle
6591 2013-11-03 Marek Polacek <polacek@redhat.com>
6593 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6595 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6597 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6598 check_dup_generic at the end, unless remove is true.
6599 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6601 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6603 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6605 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6606 with decl that is not pointer nor array.
6608 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6610 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6611 a spawning function is found.
6612 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6613 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6614 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6615 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6617 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6618 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6620 (c_finish_return): Added a check to reject _Cilk_spawn in return
6622 (build_cilk_spawn): New function.
6623 (build_cilk_sync): Likewise.
6624 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6626 2013-10-27 Tobias Burnus <burnus@net-b.de>
6629 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6630 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6631 (c_parser_statement_after_labels): Update calls.
6633 2013-10-24 Tobias Burnus <burnus@net-b.de>
6636 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6637 Handle PRAGMA_IVDEP.
6638 (c_parser_statement_after_labels): Update call.
6640 2013-10-24 Marek Polacek <polacek@redhat.com>
6642 * c-parser.c (c_parser_struct_declaration): Add a comment.
6643 (c_parser_declarator): Don't allow _Alignas here.
6645 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6647 * c-parser.c: Include omp-low.h.
6648 * c-typeck.c: Likewise.
6650 2013-10-17 Marek Polacek <polacek@redhat.com>
6653 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6654 Document syntax of the array-declarator.
6655 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6657 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6658 (c_parser_struct_declaration): Likewise.
6659 (c_parser_declarator): Likewise.
6660 (c_parser_direct_declarator_inner): Likewise.
6661 (c_parser_parameter_declaration): Likewise.
6662 (c_parser_type_name): Likewise.
6664 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6666 * c-lang.h (current_omp_declare_target_attribute): New extern
6668 * c-parser.c: Include c-lang.h.
6669 (struct c_parser): Change tokens to c_token *.
6670 Add tokens_buf field. Change tokens_avail type to unsigned int.
6671 (c_parser_consume_token): If parser->tokens isn't
6672 &parser->tokens_buf[0], increment parser->tokens.
6673 (c_parser_consume_pragma): Likewise.
6674 (enum pragma_context): Add pragma_struct and pragma_param.
6675 (c_parser_external_declaration): Adjust
6676 c_parser_declaration_or_fndef caller.
6677 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6678 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6679 Adjust recursive call.
6680 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6682 (c_parser_parameter_declaration): Use pragma_param instead of
6684 (c_parser_compound_statement_nostart, c_parser_label,
6685 c_parser_for_statement): Adjust
6686 c_parser_declaration_or_fndef callers.
6687 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6688 it through to c_parser_conditional_expression.
6689 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6690 pass it through to c_parser_binary_expression. Adjust recursive
6692 (c_parser_binary_expression): Remove prec argument, add
6693 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6694 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6695 binop matches it, use build2 instead of parser_build_binary_op.
6696 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6697 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6698 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6699 Handle pragma_struct and pragma_param the same as pragma_external.
6700 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6701 (c_parser_omp_variable_list): Parse array sections for
6702 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6703 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6704 (c_parser_omp_clause_reduction): Handle user defined reductions.
6705 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6706 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6707 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6708 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6709 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6710 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6711 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6712 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6713 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6714 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6715 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6716 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6717 (c_parser_omp_for_loop): Add CODE argument, pass it through
6718 to c_finish_omp_for. Change last argument to cclauses,
6719 and adjust uses to grab parallel clauses from the array of all
6720 the split clauses. Adjust c_parser_binary_expression,
6721 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6722 (omp_split_clauses): New function.
6723 (c_parser_omp_simd): New function.
6724 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6725 Allow the function to be called also when parsing combined constructs,
6726 and call c_parser_omp_simd when parsing for simd.
6727 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6728 #pragma omp section, require exactly one structured-block instead of
6729 sequence of statements.
6730 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6731 Allow the function to be called also when parsing combined constructs.
6732 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6733 Allow the function to be called also when parsing combined
6735 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6736 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6737 c_parser_omp_teams, c_parser_omp_target_data,
6738 c_parser_omp_target_update, c_parser_omp_target,
6739 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6740 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6741 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6742 (c_parser_omp_construct): Add p_name and mask vars. Handle
6743 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6744 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6745 and c_parser_omp_sections callers.
6746 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6747 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6748 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6749 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6750 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6752 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6753 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6754 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6755 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6756 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6757 * c-typeck.c: Include tree-inline.h.
6758 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6759 handle_omp_array_sections_1, handle_omp_array_sections,
6760 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6761 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6762 user defined reductions.
6763 (c_tree_equal): New function.
6764 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6765 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6766 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6767 c_check_omp_declare_reduction_r): New prototypes.
6768 * c-decl.c (current_omp_declare_target_attribute): New variable.
6769 (c_decl_attributes): New function.
6770 (start_decl, start_function): Use it instead of decl_attributes.
6771 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6772 c_omp_reduction_decl, c_omp_reduction_lookup,
6773 c_check_omp_declare_reduction_r): New functions.
6775 2013-09-25 Tom Tromey <tromey@redhat.com>
6777 * Make-lang.in (c/gccspec.o): Remove.
6778 (CFLAGS-c/gccspec.o): New variable.
6779 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6780 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6781 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6783 2013-09-25 Tom Tromey <tromey@redhat.com>
6785 * Make-lang.in (c/gccspec.o): Don't use subshell.
6787 2013-09-18 Marek Polacek <polacek@redhat.com>
6790 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6791 Remove unnecessary check.
6793 2013-09-18 Marek Polacek <polacek@redhat.com>
6796 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6797 no_sanitize_undefined attribute.
6799 2013-09-13 Kai Tietz <ktietz@redhat.com>
6802 * c-decl.c (c_builtin_function_ext_scope): Remove
6803 wrong assumption that it is never called on prexisting
6806 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6808 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6810 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6812 * c-objc-common.c (c_tree_printer): Tidy.
6814 2013-08-30 Marek Polacek <polacek@redhat.com>
6816 * c-typeck.c (build_binary_op): Add division by zero and shift
6819 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
6820 Joseph Myers <joseph@codesourcery.com>
6823 * c-typeck.c (c_common_type): Prefer double_type_node over
6824 other REAL_TYPE types with the same precision.
6825 (convert_arguments): Likewise.
6827 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6829 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6830 (c_initialize_diagnostics): Call a destructor for the early printer.
6832 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6834 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6835 printer initialization.
6837 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
6840 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6841 check for truth values.
6842 (expand_array_notation_exprs): Added truth values case. Removed an
6843 unwanted else. Added for-loop to walk through subtrees in default
6846 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6848 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6850 2013-07-23 Joseph Myers <joseph@codesourcery.com>
6852 * c-parser.c (struct c_generic_association): Fix typo.
6854 2013-07-23 Tom Tromey <tromey@redhat.com>
6855 Joseph Myers <joseph@codesourcery.com>
6857 * c-parser.c (struct c_generic_association): New.
6858 (c_generic_association_d): New typedef.
6859 (c_parser_generic_selection): New function.
6860 (c_parser_postfix_expression): Handle RID_GENERIC.
6862 2013-07-13 Jason Merrill <jason@redhat.com>
6865 * c-decl.c (finish_struct): Check for too-large class.
6867 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6870 * c-typeck.c (set_init_index): When folding, check for index overflow.
6872 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6874 * c-parser.c (c_parser_array_notation): Removed rejection of array
6875 notations in an array of function pointers.
6877 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6879 * c-array-notation.c (make_triplet_val_inv): New function.
6880 (create_cmp_incr): Likewise.
6881 (create_array_refs): Likewise.
6882 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6883 Also modularized common parts between functions and called the function.
6884 (build_array_notation_expr): Likewise.
6885 (fix_conditional_array_notations_1): Likewise.
6886 (fix_array_notation_expr): Likewise.
6887 (fix_array_notation_call_expr): Likewise.
6889 2013-06-18 Marek Polacek <polacek@redhat.com>
6892 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6894 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6896 * c-array-notation.c (build_array_notation_expr): Reject array notation
6897 mismatch between LHS and RHS even inside a call_expr. Also, removed
6898 a couple while statements that were dead code.
6900 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6902 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6903 excessive precision expressions in function parameters. Also removed
6904 couple unwanted while statements.
6906 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6908 * c-array-notation.c (expand_array_notation_exprs): Added
6909 ARRAY_NOTATION_REF case.
6911 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6913 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6914 function to c-family/array-notation-common.c.
6915 (is_cilkplus_reduce_builtin): Likewise.
6916 (find_rank): Likewise.
6917 (extract_array_notation_exprs): Likewise.
6918 (replace_array_notations): Likewise.
6919 (find_inv_trees): Likewise.
6920 (replace_inv_trees): Likewise.
6921 (contains_array_notation_expr): Likewise.
6922 (find_correct_array_notation_type): Likewise.
6923 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6924 (struct inv_list): Moved this to c-family/array-notation-common.c.
6925 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6927 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6929 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6930 reduction functions outside the for-loop. Added a check if the fundecl
6931 is non-NULL. Finally, removed an unwanted if-statement, and made the
6934 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6936 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6937 condition of the if-statement matches the rank of else-block and then-
6938 block when array notations are used.
6939 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6940 expression after the entire function body is parsed.
6941 (c_parser_expr_no_commas): Delayed creating array notation expressions
6942 to the end of function parsing.
6943 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6944 whole if-statement instead of just the condition.
6945 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6947 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6950 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6951 array to NULL_TREE if they are unused. Also added a check for the
6952 field to be NULL before its fields are used in future.
6954 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6957 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6958 (build_array_notation_expr): Likewise.
6960 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6962 * c-typeck.c (build_array_ref): Added a check to see if array's
6963 index is greater than one. If true, then emit an error.
6964 (build_function_call_vec): Exclude error reporting and checking
6965 for builtin array-notation functions.
6966 (convert_arguments): Likewise.
6967 (c_finish_return): Added a check for array notations as a return
6968 expression. If true, then emit an error.
6969 (c_finish_loop): Added a check for array notations in a loop
6970 condition. If true then emit an error.
6971 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6972 (build_binary_op): Added a check for array notation expr inside
6973 op1 and op0. If present, we call another function to find correct
6975 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6976 * c-parser.c (c_parser_compound_statement): Check if array
6977 notation code is used in tree, if so, then transform them into
6979 (c_parser_expr_no_commas): Check if array notation is used in LHS
6980 or RHS, if so, then build array notation expression instead of
6982 (c_parser_postfix_expression_after_primary): Added a check for
6983 colon(s) after square braces, if so then handle it like an array
6984 notation. Also, break up array notations in unary op if found.
6985 (c_parser_direct_declarator_inner): Added a check for array
6987 (c_parser_compound_statement): Added a check for array notation in
6988 a stmt. If one is present, then expand array notation expr.
6989 (c_parser_if_statement): Likewise.
6990 (c_parser_switch_statement): Added a check for array notations in
6991 a switch statement's condition. If true, then output an error.
6992 (c_parser_while_statement): Similarly, but for a while.
6993 (c_parser_do_statement): Similarly, but for a do-while.
6994 (c_parser_for_statement): Similarly, but for a for-loop.
6995 (c_parser_unary_expression): Check if array notation is used in a
6996 pre-increment or pre-decrement expression. If true, then expand
6998 (c_parser_array_notation): New function.
6999 * c-array-notation.c: New file.
7000 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7002 2013-05-23 Mike Stump <mikestump@comcast.net>
7004 * c-typeck.c (convert_for_assignment): Handle references to memory
7007 2013-05-16 Jason Merrill <jason@redhat.com>
7009 * Make-lang.in (cc1$(exeext)): Use link mutex.
7011 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7013 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7014 to simply use OPT_Wpointer_arith.
7015 (build_unary_op): Likewise.
7017 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7020 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7021 argument. If set, or it temporarily for parsing of the first
7022 argument into force_folding_builtin_constant_p.
7023 (c_parser_postfix_expression): Adjust callers.
7025 2013-03-21 Richard Biener <rguenther@suse.de>
7027 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7028 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7030 2013-02-12 Marek Polacek <polacek@redhat.com>
7033 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7036 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7039 * c-typeck.c (set_nonincremental_init_from_string): If
7040 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7042 (process_init_element): Likewise.
7044 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7047 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7048 argument, don't call default_function_array_conversion
7049 nor c_fully_fold here.
7050 (c_parser_asm_statement): Adjust callers.
7051 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7052 and outputs here, and call default_function_array_conversion
7053 on inputs that don't need to be addressable.
7055 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7058 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7059 warning require that both c_common_unsigned_type as well as
7060 c_common_signed_type is the same for both mvl and mvr types.
7062 2012-11-16 Diego Novillo <dnovillo@google.com>
7064 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7066 * c-common.c: Use new vec API in vec.h.
7067 * c-common.h: Likewise.
7068 * c-gimplify.c: Likewise.
7069 * c-pragma.c: Likewise.
7070 * c-pretty-print.c: Likewise.
7071 * c-pretty-print.h: Likewise.
7072 * c-semantics.c: Likewise.
7073 * c-decl.c: Likewise.
7074 * c-parser.c: Likewise.
7075 * c-tree.h: Likewise.
7076 * c-typeck.c: Likewise.
7078 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7081 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7083 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7086 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7087 shadows a function, unless the variable is a function or a
7088 pointer-to-function.
7090 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7093 * c-parser.c (struct c_tree_loc_pair): Removed.
7094 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7095 add location_t * and tree * arguments, fill in array of 3
7096 sizeof_arg trees and corresponding locs.
7097 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7098 c_parser_expr_list callers.
7099 (c_parser_postfix_expression_after_primary): Likewise. Pass
7100 array of 3 sizeof_arg trees and locs (corresponding to first
7101 3 arguments) to sizeof_pointer_memaccess_warning.
7103 2012-10-09 Lawrence Crowl <crowl@google.com>
7105 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7106 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7109 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7112 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7115 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7118 * c-typeck.c: Include c-common.h.
7119 (enum stv_conv): Moved to c-common.h.
7120 (scalar_to_vector): Moved to c-common.c.
7121 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7122 * Make-lang.in: c-typeck.c depends on c-common.h.
7124 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7126 * c-decl.c (c_write_global_declarations): Fix handling of
7129 2012-09-30 Sharad Singhai <singhai@google.com>
7131 * c-decl.c (c_write_global_declarations): Use a different method
7132 to determine if the dump has ben initialized.
7134 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7137 * c-typeck.c (c_cast_expr): When casting to a type requiring
7138 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7141 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7144 * c-typeck.c (build_unary_op): Pass original argument of
7145 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7146 any C_MAYBE_CONST_EXPR, if it has integer operands.
7147 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7148 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7149 to c_objc_common_truthvalue_conversion, then remove any
7150 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7151 c_objc_common_truthvalue_conversion not
7152 c_common_truthvalue_conversion.
7153 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7154 call note_integer_operands for arguments with integer operands
7155 that are not integer constants.
7157 2012-09-13 Jakub Jelinek <jakub@redhat.com>
7160 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7161 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7163 2012-08-31 Jakub Jelinek <jakub@redhat.com>
7166 * c-convert.c (convert): Don't call fold_convert_loc if
7167 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7168 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7169 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7171 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7174 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7175 for nested and empty_ok arguments in the call to
7176 c_parser_declaration_or_fndef.
7178 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7180 * c-tree.h (c_last_sizeof_arg): Declare.
7181 * c-parser.c (struct c_tree_loc_pair): New type.
7182 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7184 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7185 (c_parser_postfix_expression_after_primary): Likewise. Call
7186 sizeof_pointer_memaccess_warning if needed.
7187 (sizeof_ptr_memacc_comptypes): New function.
7188 * c-typeck.c (c_last_sizeof_arg): New global variable.
7189 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7191 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7193 * c-lang.h (lang_decl): Add variable_size GTY option.
7195 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7197 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7198 * Make-lang.in: Fix dependencies.
7200 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7202 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7203 and add language Makefile hooks.
7204 * config-lang.in: New file.
7205 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7206 add the required "normal" config-lang.in rules.
7207 * c-lang.h: Moved from gcc/ to here.
7208 * c-tree.h: Likewise.
7209 * c-objc-common.c: Likewise.
7210 * c-objc-common.h: Likewise.
7211 * c-typeck.c: Likewise.
7212 * c-convert.c: Likewise.
7213 * c-lang.c: Likewise.
7214 * c-aux-info.c: Likewise.
7215 * c-errors.c: Likewise.
7216 * gccspec.c: Likewise.
7217 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7218 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7220 Copyright (C) 2012-2020 Free Software Foundation, Inc.
7222 Copying and distribution of this file, with or without modification,
7223 are permitted in any medium without royalty provided the copyright
7224 notice and this notice are preserved.