1 2020-10-28 Joseph Myers <joseph@codesourcery.com>
3 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
4 error_at for omitted parameter name.
6 2020-10-28 Jakub Jelinek <jakub@redhat.com>
8 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
9 (c_parser_omp_clause_allocate): New function.
10 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
11 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
12 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
13 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
14 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
15 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
16 PRAGMA_OMP_CLAUSE_ALLOCATE.
17 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
19 2020-10-27 Joseph Myers <joseph@codesourcery.com>
21 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
24 2020-10-23 Marek Polacek <polacek@redhat.com>
27 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
28 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
29 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
30 * c-tree.h (char_type_p): Declare.
31 * c-typeck.c (char_type_p): No longer static.
33 2020-10-23 Martin Sebor <msebor@redhat.com>
36 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
38 2020-09-19 Martin Sebor <msebor@redhat.com>
41 * c-decl.c (lookup_last_decl): Define new function.
42 (c_decl_attributes): Call it.
43 (start_decl): Add argument and use it.
44 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
45 (get_parm_array_spec): Define new function.
46 (push_parm_decl): Call get_parm_array_spec.
47 (start_function): Call warn_parm_array_mismatch. Build attribute
48 access and add it to current function.
49 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
50 in forms of array parameters.
51 * c-tree.h (start_decl): Add argument.
53 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
55 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
58 (start_function): Adjust for above change.
59 (c_push_function_context, c_pop_function_context): Likewise.
60 * c-lang.h (struct language_function): Likewise.
61 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
62 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
64 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
65 (c_parser_switch_statement): Adjust break/switch context handling
66 and calls to renamed functions.
67 (c_parser_while_statement): Adjust break/switch context handling and
69 (c_parser_do_statement): Ditto, with DO_STMT respectively.
70 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
71 (c_parser_omp_for_loop): Adjust break/switch context handling.
72 * c-tree.h (c_break_label, c_cont_label): Delete.
73 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
74 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
75 (in_statement, switch_statement_break_seen_p): Declare.
76 (c_start_case, c_finish_case): Renamed to...
77 (c_start_switch, c_finish_switch).
78 (c_finish_bc_stmt): Adjust arguments.
79 * c-typeck.c (build_function_call_vec): Don't try to print
80 statements with %qE format.
81 (struct c_switch): Rename switch_expr field to switch_stmt.
82 Add break_stmt_seen_p field.
83 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
84 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
85 (do_case): Update for changes to struct c_switch.
86 (c_finish_case): Rename to c_finish_switch. Update for changes to
87 struct c_switch and change of representation from SWITCH_EXPR to
89 (c_finish_loop): Delete.
90 (c_finish_bc_stmt): Update to reflect changes to break/continue
91 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
92 of a GOTO_EXPR except for objc foreach loops.
94 2020-09-01 Jakub Jelinek <jakub@redhat.com>
97 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
100 2020-08-28 Martin Sebor <msebor@redhat.com>
103 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
106 2020-08-27 Martin Liska <mliska@suse.cz>
108 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
109 growth function to true.
111 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
114 * c-typeck.c (handle_omp_array_sections_1): Talk about
115 array function parameter in the error message.
117 2020-08-18 Jakub Jelinek <jakub@redhat.com>
120 * c-parser.c (c_parser_generic_selection): Change match_found from bool
121 to int, holding index of the match. Call mark_exp_read on the selector
122 expression and on expressions other than the selected one.
124 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
127 * c-typeck.c (process_init_element): Split test for whether to
128 recurse into a record, union or array into...
129 (initialize_elementwise_p): ...this new function. Don't recurse
130 into a vector type if the initialization value is also a vector.
132 2020-07-31 Richard Biener <rguenther@suse.de>
135 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
136 Define to c_common_finalize_early_debug.
138 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
140 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
141 (c_parser_omp_critical): Permit hint(0) clause without named critical.
142 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
144 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
147 * c-decl.c (finish_decl): Call target hook
148 lower_local_decl_alignment to lower local decl alignment.
150 2020-07-09 Julian Brown <julian@codesourcery.com>
151 Thomas Schwinge <thomas@codesourcery.com>
154 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
155 for standalone attach/detach clauses.
157 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
159 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
160 set, warn for conversion between pointers that point to incompatible
161 scalar storage orders.
163 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
165 * c-parser.c (c_parser_statement_after_labels): Pass correct
166 parameters to c_parser_do_statement.
168 2020-06-16 Jakub Jelinek <jakub@redhat.com>
170 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
172 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
173 premature c_fully_fold. Defer explicit c_fully_fold calls to after
175 * c-tree.h (c_in_omp_for): Declare.
176 * c-typeck.c (c_in_omp_for): Define.
177 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
178 (digest_init): Likewise.
179 (build_binary_op): Likewise.
181 2020-06-16 Jakub Jelinek <jakub@redhat.com>
183 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
184 from kind by comma rather than colon.
186 2020-06-05 Mark Wielaard <mark@klomp.org>
188 * c-decl.c (implicit_decl_warning): When warned and olddecl is
189 an undeclared builtin, then add a fixit header hint, if found.
190 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
191 warning_at about implicit builtin declaration type mismatch.
193 2020-06-03 Mark Wielaard <mark@klomp.org>
195 * c-parser.c (struct c_parser): Add seen_string_literal
197 (c_parser_consume_token): Reset seen_string_literal.
198 (c_parser_error_richloc): Add name_hint if seen_string_literal
199 and next token is a CPP_NAME and we have a missing header
200 suggestion for the name.
201 (c_parser_string_literal): Set seen_string_literal.
203 2020-06-03 Mark Wielaard <mark@klomp.org>
205 * c-parser.c (c_parser_postfix_expression_after_primary): Add
206 scope with matching_parens after CPP_OPEN_PAREN.
208 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
210 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
212 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
214 * Make-lang.in: Remove extra slash.
216 2020-05-19 Martin Liska <mliska@suse.cz>
218 * c-parser.c: Fix typo.
220 2020-05-14 Jakub Jelinek <jakub@redhat.com>
222 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
224 2020-05-07 Richard Biener <rguenther@suse.de>
227 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
230 2020-04-30 Jakub Jelinek <jakub@redhat.com>
233 * c-decl.c (set_labels_context_r): In addition to context-less
234 LABEL_DECLs adjust also LABEL_DECLs with context equal to
235 parent function if any.
236 (store_parm_decls): Adjust comment.
238 2020-04-19 Jakub Jelinek <jakub@redhat.com>
241 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
242 two CPP_COLON tokens.
244 2020-04-17 Jakub Jelinek <jakub@redhat.com>
247 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
250 2020-04-15 Jakub Jelinek <jakub@redhat.com>
253 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
254 requires directive when not at file scope.
256 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
259 * c-decl.c (c_check_in_current_scope): New function.
260 * c-tree.h (c_check_in_current_scope): Declare it.
261 * c-parser.c (c_parser_oacc_declare): Add check that variables
262 are declared in the same scope as the directive. Fix handling
265 2020-04-07 Jakub Jelinek <jakub@redhat.com>
268 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
269 if c_parser_omp_master succeeded.
271 2020-03-23 Jakub Jelinek <jakub@redhat.com>
273 PR gcov-profile/94029
275 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
276 the function_start_locus location. Don't do that afterwards for the
277 __GIMPLE body parsing.
279 2020-03-19 Jakub Jelinek <jakub@redhat.com>
281 PR gcov-profile/94029
282 * c-tree.h (finish_function): Add location_t argument defaulted to
284 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
285 set it to the locus of closing } if non-NULL.
286 (c_parser_compound_statement_nostart): Return locus of closing }.
287 (c_parser_parse_rtl_body): Likewise.
288 (c_parser_declaration_or_fndef): Propagate locus of closing } to
290 * c-decl.c (finish_function): Add end_loc argument, use it instead of
291 input_location to set function_end_locus.
293 2020-03-17 Jakub Jelinek <jakub@redhat.com>
296 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
297 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
298 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
299 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
301 (finish_incomplete_vars): New function, moved from finish_struct. Use
302 relayout_decl instead of layout_decl.
303 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
304 being TYPE_VFIELD. Use finish_incomplete_vars.
305 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
306 finish_incomplete_vars.
307 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
308 also on ENUMERAL_TYPEs.
310 2020-03-16 Jakub Jelinek <jakub@redhat.com>
313 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
315 2020-03-13 Martin Sebor <msebor@redhat.com>
318 * c-decl.c (builtin_structptr_type_count): New constant.
319 (match_builtin_function_types): Reject decls that are incompatible
320 in types pointed to by pointers.
321 (diagnose_mismatched_decls): Adjust comments.
323 2020-03-05 Joseph Myers <joseph@codesourcery.com>
326 * c-typeck.c (pop_init_level): Do not diagnose initializers as
327 empty when initialized type is error_mark_node.
328 (set_designator, process_init_element): Ignore initializers for
329 elements of a variable-size type or of error_mark_node.
331 2020-03-01 Martin Sebor <msebor@redhat.com>
334 * c-decl.c (types_close_enough_to_match): New function.
335 (match_builtin_function_types):
336 (diagnose_mismatched_decls): Add missing inform call to a warning.
338 2020-03-01 Martin Sebor <msebor@redhat.com>
341 * c-typeck.c (build_functype_attribute_variant): New function.
342 (composite_type): Call it.
344 2020-02-25 Jakub Jelinek <jakub@redhat.com>
347 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
348 Rename last argument from probablity to probability.
350 2020-02-13 Jakub Jelinek <jakub@redhat.com>
353 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
354 *expr if it has side effects.
356 2020-01-30 Jeff Law <law@redhat.com>
359 * c-parser.c (c_parser_switch_statement): Make sure to request
360 marking the switch expr as used.
362 2020-01-22 Joseph Myers <joseph@codesourcery.com>
365 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
366 argument with integer operands.
368 2020-01-16 Kerem Kat <keremkat@gmail.com>
371 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
372 to support 4 available tokens.
374 2020-01-15 Joseph Myers <joseph@codesourcery.com>
377 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
378 determine whether to set DECL_CONTEXT.
380 2020-01-13 Joseph Myers <joseph@codesourcery.com>
383 * c-typeck.c (build_c_cast): Check for expressions with integer
384 operands that can occur in an unevaluated part of an integer
385 constant expression and call note_integer_operands as needed.
387 2019-01-08 Richard Biener <rguenther@suse.de>
390 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
393 2020-01-01 Jakub Jelinek <jakub@redhat.com>
395 Update copyright years.
397 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
399 * c-decl.c (collect_source_ref_cb): Delete.
400 (for_each_global_decl): Rename into...
401 (collect_source_refs): ...this. Call collect_source_ref directly.
402 (c_parse_final_cleanups): Always call collect_source_ref on the main
405 2019-12-19 Julian Brown <julian@codesourcery.com>
406 Cesar Philippidis <cesar@codesourcery.com>
408 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
410 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
411 Allow deref (->) in variable lists if true.
412 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
413 Pass to c_parser_omp_variable_list.
414 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
415 call to c_parser_omp_variable_list.
416 (c_parser_oacc_all_clauses): Support attach and detach clauses.
417 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
418 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
419 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
420 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
421 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
422 and detach. Support deref.
423 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
424 GOMP_MAP_ALWAYS_POINTER for OpenACC.
425 (c_oacc_check_attachments): New function.
426 (c_finish_omp_clauses): Check attach/detach arguments for being
427 pointers using above. Support deref.
429 2019-12-19 Julian Brown <julian@codesourcery.com>
430 Maciej W. Rozycki <macro@codesourcery.com>
431 Tobias Burnus <tobias@codesourcery.com>
432 Thomas Schwinge <thomas@codesourcery.com>
434 * c-parser.c (c_parser_omp_clause_name): Support no_create.
435 (c_parser_oacc_data_clause): Likewise.
436 (c_parser_oacc_all_clauses): Likewise.
437 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
438 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
439 PRAGMA_OACC_CLAUSE_NO_CREATE.
440 * c-typeck.c (handle_omp_array_sections): Support
443 2019-12-09 David Malcolm <dmalcolm@redhat.com>
445 * c-objc-common.c (range_label_for_type_mismatch::get_text):
446 Replace label_text ctor calls.
448 2019-12-04 Joseph Myers <joseph@codesourcery.com>
452 * c-typeck.c (convert_lvalue_to_rvalue): Call
453 require_complete_type for arguments not of void types.
454 (build_indirect_ref): Do not diagnose dereferencing pointers to
456 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
458 2019-12-03 Joseph Myers <joseph@codesourcery.com>
461 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
462 old-style parameter definitions.
464 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
468 * c-decl.c (flexible_array_type_p): Move to common code.
470 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
472 * c-decl.c (start_decl): Allow initialization of variables whose
473 size is a POLY_INT_CST.
474 (finish_decl): Use verify_type_context to check whether the target
475 allows variables with a particular type to have static or thread-local
476 storage duration. Don't raise a second error if such variables do
477 not have a constant size.
478 (grokdeclarator): Use verify_type_context to check whether the
479 target allows fields or array elements to have a particular type.
480 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
481 the target allows pointer difference for the types involved.
482 (build_unary_op): Likewise for pointer increment and decrement.
484 2019-11-29 Joseph Myers <joseph@codesourcery.com>
486 * c-parser.c (struct c_parser): Add members raw_tokens and
488 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
489 using previously-lexed raw tokens.
490 (c_parser_peek_nth_token_raw)
491 (c_parser_check_balanced_raw_token_sequence): New functions.
492 (c_parser_nth_token_starts_std_attributes): Use
493 c_parser_check_balanced_raw_token_sequence for Objective-C.
495 2019-11-25 Joseph Myers <joseph@codesourcery.com>
498 * c-decl.c (finish_declspecs): Use int instead of decimal
499 floating-point types if decimal floating-point not supported.
501 2019-11-25 Joseph Myers <joseph@codesourcery.com>
503 * c-tree.h (struct c_declarator): Use a structure for id member.
504 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
505 declarators at the start, not when handling individual declarators
506 later. Use u.id.id instead of u.id.
507 (grokfield): Use u.id.id instead of u.id.
508 (build_id_declarator): Set u.id.id and u.id.attrs.
509 (finish_declspecs): Handle postfix attributes in case of typedef
511 * c-parser.c (c_parser_direct_declarator)
512 (c_parser_direct_declarator_inner): Place declarator for
513 attributes inside that for function or array, not outside. Set
514 u.id.attrs for identifiers.
515 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
516 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
519 2019-11-22 Jakub Jelinek <jakub@redhat.com>
522 * c-decl.c (identifier_global_tag): Define.
524 2019-11-20 Richard Biener <rguenther@suse.de>
527 * c-decl.c (grokdeclarator): Prevent inlining of nested
528 function with VLA arguments.
530 2019-11-20 Joseph Myers <joseph@codesourcery.com>
532 * c-decl.c (c_warn_type_attributes): New function.
533 (groktypename, grokdeclarator, finish_declspecs): Call
534 c_warn_type_attributes before applying attributes to types.
535 * c-tree.h (c_warn_type_attributes): Declare.
537 2019-11-19 Joseph Myers <joseph@codesourcery.com>
539 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
541 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
542 pedwarn for unknown standard attributes and return error_mark_node
545 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
547 * c-parser.c (c_parser_parse_rtl_body): Always call
548 run_rtl_passes, even if startwith pass is not provided.
550 2019-11-15 Joseph Myers <joseph@codesourcery.com>
552 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
553 duplicate standard attributes.
555 2019-11-15 Joseph Myers <joseph@codesourcery.com>
557 * c-decl.c (std_attribute_table): Add maybe_unused.
559 2019-11-15 Joseph Myers <joseph@codesourcery.com>
561 * c-decl.c (std_attribute_table): Add fallthrough.
562 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
563 attribute at top level.
565 2019-11-15 Joseph Myers <joseph@codesourcery.com>
567 * c-decl.c (std_attribute_table): New.
568 (c_init_decl_processing): Register attributes from
570 * c-parser.c (c_parser_attribute_arguments): Add arguments
571 require_string and allow_empty_args. All callers changed.
572 (c_parser_std_attribute): Set require_string argument for
573 "deprecated" attribute.
575 2019-11-14 Joseph Myers <joseph@codesourcery.com>
577 * c-parser.c (c_parser_postfix_expression)
578 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
579 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
581 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
583 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
584 of build_same_sized_truth_vector_type.
585 (build_vec_cmp): Likewise.
587 2019-11-14 Jakub Jelinek <jakub@redhat.com>
589 * c-parser.c (c_parser_omp_context_selector): Don't require score
590 argument to fit into shwi, just to be INTEGER_CST. Diagnose
593 * c-parser.c (c_parser_omp_context_selector): Rename
594 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
595 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
596 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
599 2019-11-14 Joseph Myers <joseph@codesourcery.com>
601 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
602 ctsk_tagfirstref_attrs.
603 (struct c_declspecs): Update description of attrs. Add
604 postfix_attrs and non_std_attrs_seen_p. Increase size of
605 typespec_kind bit-field.
606 (c_warn_unused_attributes): New declaration.
607 (parser_xref_tag): Update prototype.
608 * c-decl.c (c_warn_unused_attributes): New function.
609 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
610 ctsk_tagref_attrs. Handle attribute declarations.
611 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
612 (grokdeclarator): Handle standard attributes.
613 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
614 attributes to incomplete type reference.
615 (xref_tag): Update call to parser_xref_tag.
616 (declspecs_add_addrspace, declspecs_add_type)
617 (declspecs_add_scspec, declspecs_add_attrs): Set
618 non_std_attrs_seen_p.
619 (finish_declspecs): Apply postfix standard attributes to type.
620 * c-parser.c (c_token_starts_declspecs)
621 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
622 (c_parser_next_tokens_start_declaration): Update comments.
623 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
624 parser->tokens[2] to parser->tokens[1].
625 (c_parser_nth_token_starts_std_attributes)
626 (c_parser_std_attribute_specifier_sequence): New functions.
627 (c_parser_declaration_or_fndef): Add arguments have_attrs and
628 attrs. All callers changed. Handle standard attributes.
629 (c_parser_parms_declarator, c_parser_parms_list_declarator)
630 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
632 (c_parser_declspecs): Add arguments start_std_attr_ok and
633 end_std_attr_ok. All callers changed. Handle standard
635 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
636 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
637 (c_parser_compound_statement_nostart, c_parser_all_labels)
638 (c_parser_label, c_parser_statement, c_parser_for_statement):
639 Handle standard attributes.
640 * c-parser.h (c_parser_declspecs): Update prototype.
641 * gimple-parser.c (c_parser_gimple_declaration): Update call to
644 2019-11-12 Martin Liska <mliska@suse.cz>
646 * gimple-parser.c: Do not include params.h.
648 2019-11-12 Martin Liska <mliska@suse.cz>
650 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
651 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
654 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
655 Frederik Harwath <frederik@codesourcery.com>
658 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
659 (c_parser_oacc_kernels_parallel): Rename function to...
660 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
661 (c_parser_omp_construct): Update accordingly.
664 2019-11-11 Jakub Jelinek <jakub@redhat.com>
666 * c-parser.c (c_parser_translation_unit): Diagnose declare target
667 without corresponding end declare target.
669 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
671 * c-convert.c (convert): Only handle vector conversions if one of
672 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
674 * c-typeck.c (build_array_ref): Only allow vector indexing if the
675 vectors satisfy gnu_vector_type_p.
676 (build_unary_op): Only allow unary operators to be applied to
677 vectors if they satisfy gnu_vector_type_p.
678 (digest_init): Only allow by-element initialization of vectors
679 if they satisfy gnu_vector_type_p.
680 (really_start_incremental_init): Likewise.
681 (push_init_level): Likewise.
682 (pop_init_level): Likewise.
683 (process_init_element): Likewise.
684 (build_binary_op): Only allow binary operators to be applied to
685 vectors if they satisfy gnu_vector_type_p.
687 2019-11-08 Joseph Myers <joseph@codesourcery.com>
689 * c-decl.c (grokparms): Convert () in a function definition to
691 (store_parm_decls_oldstyle): Pedwarn for C2x.
692 (store_parm_decls): Update comment about () not generating a
695 2019-11-07 Joseph Myers <joseph@codesourcery.com>
697 * c-parser.c (c_parser_attribute_arguments): New function.
698 Factored out of c_parser_gnu_attribute.
699 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
700 (c_parser_balanced_token_sequence, c_parser_std_attribute)
701 (c_parser_std_attribute_specifier): New functions.
702 (c_parser_transaction_attributes): Use
703 c_parser_std_attribute_specifier.
705 2019-11-07 Joseph Myers <joseph@codesourcery.com>
707 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
708 lex_joined_string and translate_strings_p.
709 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
711 (c_parser_string_literal): New function.
712 (c_parser_static_assert_declaration_no_semi): Use
713 c_parser_string_literal. Do not set lex_untranslated_string.
714 (c_parser_asm_string_literal): Use c_parser_string_literal.
715 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
716 (c_parser_gnu_attributes): Set and restore translate_strings_p
717 instead of lex_untranslated_string.
718 (c_parser_asm_statement): Do not set lex_untranslated_string.
719 (c_parser_asm_operands): Likewise.
720 (c_parser_has_attribute_expression): Set and restore
721 translate_strings_p instead of lex_untranslated_string.
722 (c_parser_postfix_expression): Use c_parser_string_literal.
723 (pragma_lex): Likewise.
724 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
725 (c_parse_file): Set translate_strings_p.
726 * gimple-parser.c (c_parser_gimple_postfix_expression)
727 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
728 * c-parser.c (c_parser_string_literal): Declare function.
730 2019-11-02 Jakub Jelinek <jakub@redhat.com>
732 * c-parser.c (c_finish_omp_declare_variant): Use
733 omp_get_context_selector instead of c_omp_get_context_selector.
735 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
737 * c-tree.h (c_simulate_enum_decl): Declare.
738 * c-decl.c (c_simulate_enum_decl): New function.
739 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
741 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
743 * c-tree.h (c_simulate_builtin_function_decl): Declare.
744 * c-decl.c (c_simulate_builtin_function_decl): New function.
745 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
748 2019-10-28 Martin Sebor <msebor@redhat.com>
751 * c-decl.c (names_builtin_p): Define a new function.
753 2019-10-28 Richard Biener <rguenther@suse.de>
756 * gimple-parser.c (c_parser_parse_gimple_body): Make
757 current_bb the entry block initially to easier recover
759 (c_parser_gimple_compound_statement): Adjust.
761 2019-10-24 Jakub Jelinek <jakub@redhat.com>
763 * c-parser.c (c_finish_omp_declare_variant): Use
764 omp_context_selector_matches instead of
765 c_omp_context_selector_matches.
766 * c-decl.c (c_decl_attributes): Add "omp declare target block"
767 attribute in between declare target and end declare target
770 2019-10-15 Joseph Myers <joseph@codesourcery.com>
772 * c-parser.c (c_parser_attribute_any_word): Rename to
773 c_parser_gnu_attribute_any_word. All callers changed.
774 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
776 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
778 (c_parser_declaration_or_fndef, c_parser_declspecs)
779 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
780 (c_parser_struct_declaration, c_parser_declarator)
781 (c_parser_gnu_attribute, c_parser_compound_statement)
782 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
783 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
784 attribute-related syntax productions.
786 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
788 * c-objc-common.c (useful_aka_type_p): Replace with...
789 (get_aka_type): ...this new function. Given the original type,
790 decide which aka type to print (if any). Only look through typedefs
791 if user_facing_original_type_p.
792 (print_type): Update accordingly.
794 2019-10-14 Jakub Jelinek <jakub@redhat.com>
796 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
797 into int NESTED, if it is 2, diagnose missing commas in between
799 (c_parser_omp_context_selector): Pass 2 as last argument to
800 c_parser_omp_all_clauses.
802 2019-10-12 Jakub Jelinek <jakub@redhat.com>
804 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
805 For simd properties, put them directly into TREE_VALUE.
806 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
807 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
808 add "omp declare variant base" attribute rather than
809 "omp declare variant".
811 2019-10-11 Joseph Myers <joseph@codesourcery.com>
813 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
815 2019-10-10 Jakub Jelinek <jakub@redhat.com>
817 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
818 true, terminate processing on closing paren and don't skip to end of
820 (c_parser_omp_declare_simd): Handle also declare variant.
821 (omp_construct_selectors, omp_device_selectors,
822 omp_implementation_selectors, omp_user_selectors): New variables.
823 (c_parser_omp_context_selector,
824 c_parser_omp_context_selector_specification,
825 c_finish_omp_declare_variant): New functions.
826 (c_finish_omp_declare_simd): Handle both declare simd and
828 (c_parser_omp_declare): Handle declare variant.
830 2019-10-02 Joseph Myers <joseph@codesourcery.com>
832 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
835 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
837 * c-objc-common.c (useful_aka_type_p): New function.
838 (print_type): Use it to decide whether an aka type is worth printing.
840 2019-09-27 Jakub Jelinek <jakub@redhat.com>
843 * c-parser.c (c_parser_predefined_identifier): New function.
844 (c_parser_postfix_expression): Use it.
845 (c_parser_omp_variable_list): Parse predefined identifiers.
846 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
847 in shared and firstprivate clauses, even when they are predetermined
850 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
852 * c-typeck.c (build_function_call_vec): Take the original function
853 decl as an optional final parameter. Pass all built-in calls to
854 check_builtin_function_arguments.
856 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
859 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
860 of identifiers in the external scope only for variables and functions.
862 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
865 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
867 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
870 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
871 after determining that the first token is not
872 PRAGMA_GCC_PCH_PREPROCESS.
874 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
876 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
877 FUNCTION_DECL to the right value in the presence of nested declarators.
879 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
882 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
884 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
887 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
888 of a built_in_function.
889 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
891 2019-08-10 Jakub Jelinek <jakub@redhat.com>
893 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
894 (c_parser_omp_clause_device_type): New function.
895 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
896 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
897 (c_parser_omp_declare_target): Handle device_type clauses. Remove
898 diagnostics for declare target with clauses nested in clause-less
899 declare target declaration-definition-seq.
900 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
902 2019-08-09 Jakub Jelinek <jakub@redhat.com>
904 * c-parser.c (check_no_duplicate_clause): Simplify using
906 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
907 directive name modifiers.
908 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
911 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
912 check_no_duplicate_clause call. Comment it out, instead emit a
913 warning for duplicate dist_schedule clauses.
915 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
917 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
919 2019-08-08 Jakub Jelinek <jakub@redhat.com>
921 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
922 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
923 instead of generic_head to track duplicates.
925 2019-08-07 Jakub Jelinek <jakub@redhat.com>
927 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
928 (c_parser_omp_clause_use_device_addr): New function.
929 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
930 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
931 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
932 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
933 map or use_device_* clauses.
934 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
935 in OpenMP, require pointer type rather than pointer or array type.
936 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
938 2019-07-31 Jakub Jelinek <jakub@redhat.com>
941 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
942 even if finish is UNKNOWN_LOCATION, just use start as finish in that
945 2019-07-25 Martin Liska <mliska@suse.cz>
946 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
949 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
951 2019-07-25 Martin Liska <mliska@suse.cz>
953 * c-decl.c (merge_decls): Use new macros
954 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
956 2019-07-23 Richard Biener <rguenther@suse.de>
958 PR tree-optimization/83518
959 * gimple-parser.c (c_parser_parse_gimple_body): When we have
960 a CFG also rebuild cgraph edges.
962 2019-07-20 Jakub Jelinek <jakub@redhat.com>
964 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
965 (c_parser_omp_clause_bind): New function.
966 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
967 (OMP_LOOP_CLAUSE_MASK): Define.
968 (c_parser_omp_loop): New function.
969 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
970 loop combined with parallel or teams.
971 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
972 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
974 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
977 * c-decl.c (finish_function): Check targetm.warn_func_return
978 before issuing a -Wreturn-type warning.
980 2019-07-12 Alexandre Oliva <oliva@adacore.com>
982 * gimple-parser.c (c_parser_gimple_try_stmt): New.
983 (c_parser_compound_statement): Call it.
985 2019-07-12 Jakub Jelinek <jakub@redhat.com>
987 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
988 (c_parser_omp_clause_order): New function.
989 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
990 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
991 PRAGMA_OMP_CLAUSE_ORDER.
992 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
994 2019-07-10 Richard Biener <rguenther@suse.de>
996 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
997 _Literal (int *) &x for address literals.
999 2019-07-09 Martin Sebor <msebor@redhat.com>
1002 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1004 (field_decl_cmp): Same.
1005 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1007 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1009 2019-07-09 Martin Sebor <msebor@redhat.com>
1012 * c-decl.c: Change class-key from class to struct and vice versa
1013 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1014 * gimple-parser.c: Same.
1016 2019-07-01 Richard Biener <rguenther@suse.de>
1018 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1019 _Literal (char *) &"foo" for address literals pointing to
1022 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1024 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1025 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1026 C incompatibility if alternate "__intN__" form is used.
1028 2019-06-24 Martin Sebor <msebor@redhat.com>
1030 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1032 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1034 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1035 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1036 (c_parser_omp_scan_loop_body): New function.
1037 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1038 inscan reduction clauses.
1039 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1040 non-inscan reductions on the same construct, or inscan reductions with
1041 ordered or schedule clauses, or inscan array reductions.
1043 2019-06-05 Martin Sebor <msebor@redhat.com>
1046 * c-typeck.c (c_finish_return): Only consider functions returning
1047 pointers as candidates for -Wreturn-local-addr.
1049 2019-06-05 Martin Sebor <msebor@redhat.com>
1051 * c-decl.c (start_decl): Adjust quoting and hyphenation
1053 (finish_decl): Same.
1054 (finish_enum): Same.
1055 (start_function): Same.
1056 (declspecs_add_type): Same.
1057 * c-parser.c (warn_for_abs): Same.
1058 * c-typeck.c (build_binary_op): Same.
1060 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1063 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1064 marked with an OpenACC 'routine' directive.
1067 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1068 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1071 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1072 clauses from "omp declare target" attribute.
1074 2019-05-16 Martin Sebor <msebor@redhat.com>
1076 * c-decl.c (start_decl): Quote keywords, operators, and
1077 types in diagnostics.
1078 (finish_decl): Same.
1079 * c-parser.c (c_parser_asm_statement): Same.
1080 (c_parser_conditional_expression): Same.
1081 (c_parser_transaction_cancel): Same.
1082 * c-typeck.c (c_common_type): Same.
1083 (build_conditional_expr): Same.
1084 (digest_init): Same.
1085 (process_init_element): Same.
1086 (build_binary_op): Same.
1088 2019-05-17 Richard Biener <rguenther@suse.de>
1090 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1091 (c_parser_gimple_unary_expression): Likewise.
1092 (c_parser_gimple_parentized_ternary_expression): New function.
1094 2019-05-16 Richard Biener <rguenther@suse.de>
1096 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1097 (c_parser_gimple_unary_expression): Likewise.
1099 2019-05-15 Richard Biener <rguenther@suse.de>
1101 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1104 2019-05-14 Richard Biener <rguenther@suse.de>
1106 * gimple-parser.c (c_parser_gimple_statement): Remove
1107 questionable auto-promotion to VIEW_CONVERT_EXPR.
1108 (c_parser_gimple_typespec): Split out from __MEM parsing.
1109 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1110 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1111 as __VIEW_CONVERT with -gimple.
1113 2019-05-09 Martin Liska <mliska@suse.cz>
1115 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1117 (c_parser_gimple_unary_expression): Parse also binary expression
1119 (c_parser_gimple_parentized_binary_expression): New function.
1121 2019-05-09 Martin Liska <mliska@suse.cz>
1123 * gimple-parser.c (struct gimple_parser): Add probability.
1124 for gimple_parser_edge.
1125 (gimple_parser::push_edge): Add new argument probability.
1126 (c_parser_gimple_parse_bb_spec): Parse also probability
1128 (c_parser_parse_gimple_body): Set edge probability.
1129 (c_parser_gimple_compound_statement): Consume token
1130 before calling c_parser_gimple_goto_stmt.
1132 (c_parser_gimple_statement): Pass new argument.
1133 (c_parser_gimple_goto_stmt): Likewise.
1134 (c_parser_gimple_if_stmt): Likewise.
1135 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1136 * c-parser.c (c_parser_declaration_or_fndef): Pass
1137 hot_bb_threshold argument.
1138 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1140 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1142 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1145 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1146 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1147 (c_parser_do_statement): Likewise.
1148 (c_parser_for_statement): Likewise. Formatting fixes.
1149 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1150 emit DEBUG_BEGIN_STMTs if needed.
1152 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1155 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1156 (c_start_case): Don't clear it.
1157 (do_case): Adjust c_add_case_label caller.
1158 (c_finish_case): Adjust c_do_switch_warnings caller.
1161 * c-decl.c (merge_decls): If remove is main variant and
1162 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1163 variant that has newdecl as TYPE_NAME if any.
1165 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1168 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1169 don't try to remove it from the variant list, but instead assert
1172 2019-04-01 Richard Biener <rguenther@suse.de>
1175 * c-tree.h (c_get_alias_set): Declare.
1176 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1177 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1178 as the underlying integer type.
1180 2019-03-19 Martin Sebor <msebor@redhat.com>
1182 PR tree-optimization/89688
1183 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1184 kinds of initializers.
1186 2019-03-19 Jakub Jelinek <jakub@redhat.com>
1189 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1190 return type even if quals_used is 0. Formatting fixes.
1192 2019-03-14 Richard Biener <rguenther@suse.de>
1194 * c-tree.h (enum c_declspec_il): New.
1195 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1197 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1198 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1199 (c_parser_declspecs): Adjust.
1200 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1201 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1203 (struct gimple_parser): New.
1204 (gimple_parser::push_edge): New method.
1205 (c_parser_gimple_parse_bb_spec): New helper.
1206 (c_parser_parse_gimple_body): Get start pass and IL specification.
1207 Initialize SSA and CFG.
1208 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1209 Build a gimple_parser parsing state and pass it along.
1210 (c_parser_gimple_statement): Change intermittend __PHI internal
1211 function argument for the edge.
1212 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1213 (c_parser_gimple_goto_stmt): Record edges to build.
1214 (c_parser_gimple_if_stmt): Likewise.
1215 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1216 (c_parser_gimple_or_rtl_pass_list): Likewise.
1218 2019-03-11 Martin Liska <mliska@suse.cz>
1220 * c-decl.c (check_for_loop_decls): Wrap an option name
1221 in a string format message and fix GNU coding style.
1222 * c-parser.c (c_parser_declspecs): Likewise.
1224 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1226 PR tree-optimization/89550
1227 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1229 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1230 or warning returned true.
1232 2019-02-28 Jakub Jelinek <jakub@redhat.com>
1235 * c-typeck.c (convert_arguments): Call inform_declaration only if
1236 the previous warning_at call returned true.
1238 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1240 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1241 parameter. Adjust all users.
1242 (c_parser_oacc_simple_clause): Replace parser with loc formal
1243 parameter. Adjust all users.
1245 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1248 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1249 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1251 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1254 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1255 before c_decl_attributes rather than after it.
1257 2019-02-06 Jakub Jelinek <jakub@redhat.com>
1260 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1261 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1262 instead of 3 nested ifs.
1264 2019-02-06 Joseph Myers <joseph@codesourcery.com>
1267 * c-decl.c (finish_decl): Do not complete array types for arrays
1268 with external linkage not at file scope.
1270 2019-02-05 Richard Biener <rguenther@suse.de>
1273 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1274 all type variants when not supported.
1276 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1279 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1280 * c-decl.c (decl_jump_unsafe): Return false for
1281 C_DECL_COMPOUND_LITERAL_P decls.
1282 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1284 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1287 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1291 * c-decl.c (last_fileptr_type): Remove.
1292 (last_structptr_types): New variable.
1293 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1294 {old,new}rettype instead of the types themselves. Assert
1295 last_structptr_types array has the same number of elements
1296 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1297 argument oldtype and newtype. Instead of handling
1298 just fileptr_type_node specially, handle all builtin_structptr_types
1299 pointer nodes. Formatting fix.
1301 2019-01-24 Martin Sebor <msebor@redhat.com>
1306 * c-decl.c (match_builtin_function_types): Add arguments.
1307 (diagnose_mismatched_decls): Diagnose mismatched declarations
1308 of built-ins more strictly.
1310 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1313 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1314 on #pragma omp cancel with different modifiers.
1316 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1320 * c-typeck.c (convert_for_assignment): Upate the
1321 warn_for_address_or_pointer_of_packed_member call.
1323 2019-01-16 Tom Honermann <tom@honermann.net>
1324 Jason Merrill <jason@redhat.com>
1326 * c-typeck.c (digest_init): Revised the error message produced for
1327 ill-formed cases of array initialization with a string literal.
1328 (error_init): Make variadic.
1330 2019-01-12 Jakub Jelinek <jakub@redhat.com>
1332 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1334 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1337 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1338 if current_function_decl is non-NULL.
1340 2019-01-07 Joseph Myers <joseph@codesourcery.com>
1344 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1345 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1346 functions declared but never defined only for external scope, not
1349 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1352 * c-parser.c (c_parser_postfix_expression): Parse
1353 __builtin_convertvector.
1355 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1357 Update copyright years.
1359 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1362 * c-typeck.c (convert_for_assignment): Call
1363 warn_for_address_or_pointer_of_packed_member.
1365 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1367 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1368 a more specific error message (instead of just falling through).
1370 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1372 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1373 asm qualifier is first seen; use that to give nicer "duplicate asm
1374 qualifier" messages. Delete 'quals" variable, instead pass the
1375 "is_volatile_ flag to build_asm_stmt directly.
1376 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1377 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1379 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1381 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1382 "done" boolean variable.
1384 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1387 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1388 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1389 (build_binary_op): Use struct op_location_t and
1390 class binary_op_rich_location.
1392 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1395 * c-convert.c (convert): Call c_fully_fold before calling
1396 ubsan_instrument_float_cast.
1398 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1400 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1403 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1405 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1406 after asm. Pass a flag for it to build_asm_expr.
1407 * c-tree.h (build_asm_expr): Update declaration.
1408 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1411 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1414 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1415 combination of volatile and goto, in any order, without repetitions.
1417 2018-12-04 James Norris <jnorris@codesourcery.com>
1418 Cesar Philippidis <cesar@codesourcery.com>
1419 Julian Brown <julian@codesourcery.com>
1421 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1424 2018-11-30 Richard Biener <rguenther@suse.de>
1426 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1427 _Literal (type) { ... } as empty aggregate or vector constructor.
1429 2018-11-29 Martin Sebor <msebor@redhat.com>
1432 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1433 (convert_arguments): Add comments. Pass additional argument to
1436 2018-11-29 Martin Sebor <msebor@redhat.com>
1440 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1442 2018-11-23 Martin Sebor <msebor@redhat.com>
1445 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1446 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1448 2018-11-20 Martin Sebor <msebor@redhat.com>
1450 * c-parser.c (c_parser_has_attribute_expression): New function.
1451 (c_parser_attribute): New function.
1452 (c_parser_attributes): Move code into c_parser_attribute.
1453 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1455 2018-11-15 Martin Sebor <msebor@redhat.com>
1458 * c-decl.c (header_for_builtin_fn): Declare.
1459 (diagnose_mismatched_decls): Diagnose declarations of built-in
1460 functions without a prototype.
1461 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1462 (convert_argument): Same.
1463 (convert_arguments): Factor code out into convert_argument.
1464 Detect mismatches between built-in formal arguments in calls
1465 to built-in without prototype.
1466 (build_conditional_expr): Same.
1467 (type_or_builtin_type): New function.
1468 (convert_for_assignment): Add argument. Conditionally issue
1469 warnings instead of errors for mismatches.
1471 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1473 * c-decl.c: Replace "source_location" with "location_t".
1474 * c-tree.h: Likewise.
1475 * c-typeck.c: Likewise.
1476 * gimple-parser.c: Likewise.
1478 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1480 * c-parser.c (c_parser_omp_clause_final): Use
1481 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1482 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1483 parsing instead of c_parser_paren_condition.
1484 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1485 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1486 c_fully_fold instead of c_parser_condition.
1487 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1488 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1489 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1490 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1491 c_parser_expr_no_commas instead of c_parser_expression.
1493 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1494 reduction clause with inscan modifier.
1496 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1497 clauses other than atomic_default_mem_order.
1499 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1501 * c-parser.c: Include memmode.h.
1502 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1503 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1504 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1505 task_reduction clauses.
1506 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1507 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1508 section, or lvalue assignment expression.
1509 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1510 (c_parser_omp_clause_lastprivate): Parse optional
1511 conditional: modifier.
1512 (c_parser_omp_clause_hint): Require constant integer expression rather
1513 than just integer expression.
1514 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1516 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1517 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1518 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1520 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1521 iterators. Parse mutexinoutset and depobj kinds.
1522 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1524 (c_parser_omp_all_clauses): Likewise. Handle
1525 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1526 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1527 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1528 default memory order from requires directive if any. Adjust
1529 c_finish_omp_atomic caller.
1530 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1531 (c_parser_omp_flush): Parse flush with memory-order-clause.
1532 (c_parser_omp_for_loop): Allow NE_EXPR even in
1533 OpenMP loops, adjust c_finish_omp_for caller.
1534 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1535 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1536 Allow to be called while parsing combined parallel master.
1537 Parse combined master taskloop{, simd}.
1538 (c_parser_omp_parallel): Parse combined
1539 parallel master{, taskloop{, simd}} constructs.
1540 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1541 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1542 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1543 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1544 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1545 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1546 around teams body. Use SET_EXPR_LOCATION.
1547 (c_parser_omp_target_data): Allow target data
1548 with only use_device_ptr clauses.
1549 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1550 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1551 (c_parser_omp_requires): New function.
1552 (c_finish_taskloop_clauses): New function.
1553 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1554 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1555 declaration. Disallow in_reduction clause when combined with parallel
1557 (c_parser_omp_construct): Adjust c_parser_omp_master and
1558 c_parser_omp_taskgroup callers.
1559 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1561 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1562 like OMP_CLAUSE_REDUCTION.
1563 (handle_omp_array_sections): Likewise. Call save_expr on array
1564 reductions before calling build_index_type. Handle depend clauses
1566 (struct c_find_omp_var_s): New type.
1567 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1568 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1569 with static, runtime or auto schedule kinds. Call save_expr for whole
1570 array reduction sizes. Diagnose reductions with zero sized elements
1571 or variable length structures. Diagnose nogroup clause used with
1572 reduction clause(s). Handle depend clause with
1573 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1574 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1575 some different type for other kinds. Use build_unary_op with
1576 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1577 Handle depend clauses with iterators. Remove no longer needed special
1578 case that predetermined const qualified vars may be specified in
1579 firstprivate clause. Complain if const qualified vars are mentioned
1580 in data-sharing clauses other than firstprivate or shared. Use
1581 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1582 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1583 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1584 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1586 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1588 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1589 logic for change to name_hint::operator bool.
1590 (undeclared_variable): Likewise.
1591 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1592 (c_parser_parameter_declaration): Likewise.
1594 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1596 * c-errors.c (pedwarn_c11): New function.
1597 * c-parser.c (disable_extension_diagnostics): Save
1598 warn_c11_c2x_compat and set it to 0.
1599 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1600 (c_parser_static_assert_declaration_no_semi): Handle
1601 _Static_assert without string constant.
1602 * c-tree.h (pedwarn_c11): New prototype.
1604 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1606 * Make-lang.in (selftest-c): New.
1607 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1608 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1609 from gcc/Makefile.in.
1611 2018-10-02 Richard Biener <rguenther@suse.de>
1613 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1615 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1618 * c-typeck.c (build_binary_op): Use excess precision for
1619 comparisons of integers and floating-point for C11 and later.
1621 2018-09-26 Martin Jambor <mjambor@suse.cz>
1624 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1627 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1629 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1630 Update for new param.
1631 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1634 2018-09-17 Martin Jambor <mjambor@suse.cz>
1637 * c-parser.c: (warn_for_abs): New function.
1638 (c_parser_postfix_expression_after_primary): Call it.
1640 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1642 * c-typeck.c (digest_init): Shorten overlength strings.
1644 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1646 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1648 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1650 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1651 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1653 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1655 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1656 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1658 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1661 * c-decl.c (implicitly_declare): Update call to
1662 maybe_add_include_fixit to suggest overriding the location, as it
1664 * c-objc-common.c (c_tree_printer): Update for conversion of
1665 show_caret_p to a tri-state.
1667 2018-08-27 Martin Liska <mliska@suse.cz>
1669 * c-decl.c (locate_old_decl): Use new function
1670 fndecl_built_in_p and remove check for FUNCTION_DECL if
1672 (diagnose_mismatched_decls): Likewise.
1673 (merge_decls): Likewise.
1674 (warn_if_shadowing): Likewise.
1675 (pushdecl): Likewise.
1676 (implicitly_declare): Likewise.
1677 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1678 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1679 * c-typeck.c (build_function_call_vec): Likewise.
1680 (convert_arguments): Likewise.
1682 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1685 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1686 (diagnose_mismatched_decls): Likewise, in various places.
1687 (warn_if_shadowing): Likewise.
1688 (implicit_decl_warning): Likewise.
1689 (implicitly_declare): Likewise.
1690 (undeclared_variable): Likewise.
1691 (declare_label): Likewise.
1692 (grokdeclarator): Likewise.
1693 (start_function): Likewise.
1694 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1695 (c_parser_parameter_declaration): Likewise.
1696 (c_parser_binary_expression): Likewise.
1697 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1698 (parser_build_binary_op): Likewise.
1699 (build_unary_op): Likewise.
1700 (error_init): Likewise.
1701 (pedwarn_init): Likewise.
1702 (warning_init): Likewise.
1703 (convert_for_assignment): Likewise.
1705 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1707 * c-objc-common.c: Include "gcc-rich-location.h".
1708 (c_tree_printer): Move implemenation of '%T' to...
1709 (print_type): ...this new function.
1710 (range_label_for_type_mismatch::get_text): New function.
1711 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1712 range for the various ic_argpass cases.
1713 (class maybe_range_label_for_tree_type_mismatch): New class.
1714 (build_binary_op): Use it when calling binary_op_error.
1716 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1718 * c-decl.c (start_decl): Do not warn if variables is named as main
1719 and is a local variable.
1721 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1724 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1725 objects of unknown size.
1727 2018-08-13 Martin Sebor <msebor@redhat.com>
1729 PR tree-optimization/71625
1730 * c-parser.c (c_parser_declaration_or_fndef): Call
1731 braced_list_to_string.
1733 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1736 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1739 2018-08-01 Martin Sebor <msebor@redhat.com>
1741 PR tree-optimization/86650
1742 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1743 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1745 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1748 * c-typeck.c (init_field_decl_cmp): New function.
1749 (output_pending_init_elements): Use it for field comparisons
1750 instead of pure bit_position comparisons.
1752 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1754 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1755 type here, instead add "omp declare target implicit" attribute.
1756 (finish_decl): Diagnose vars without mappable type here.
1758 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1759 Thomas Schwinge <thomas@codesourcery.com>
1760 Cesar Philippidis <cesar@codesourcery.com>
1762 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1763 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1764 to their non-present_or_* counterparts. Make 'self' an alias to
1765 PRAGMA_OACC_CLAUSE_HOST.
1766 (c_parser_oacc_data_clause): Update GOMP mappings for
1767 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1768 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1769 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1770 Remove support for present_or_* clauses.
1771 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1772 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1773 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1774 (OACC_DATA_CLAUSE_MASK): Likewise.
1775 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1776 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1777 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1778 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1779 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1781 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1783 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1784 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1785 (c_parser_gimple_unary_expression): Likewise.
1787 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1790 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1791 before doing POINTER_DIFF_EXPR.
1793 2018-06-07 Marek Polacek <polacek@redhat.com>
1796 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1797 for loop initial declarations.
1799 2018-05-30 David Pagan <dave.pagan@oracle.com>
1802 * c-decl.c (grokdeclarator): Update check for return type warnings.
1803 (start_function): Likewise.
1804 (finish_function): Likewise.
1805 * c-typeck.c (c_finish_return): Update check for return type warnings.
1806 Pass OPT_Wreturn_type to pedwarn when appropriate.
1808 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1810 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1813 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1815 * gimple-parser.c: Include internal-fn.h.
1816 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1817 (c_parser_gimple_call_internal): New function.
1818 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1819 Fix typos in comment.
1821 2018-05-10 Jakub Jelinek <jakub@redhat.com>
1824 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1825 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1827 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1828 fold_offsetof_1, pass argtype as TYPE to it and drop the
1831 2018-05-02 David Pagan <dave.pagan@oracle.com>
1834 * c-decl.c (old_style_parameter_scope): New function.
1835 * c-parser.c (c_parser_postfix_expression): Check for statement
1836 expressions in old-style function parameter list declarations.
1837 * c-parser.h (old_style_parameter_scope): New extern declaration.
1839 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1842 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1843 it is not TREE_STATIC.
1844 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1845 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1846 its COMPOUND_LITERAL_EXPR_DECL.
1848 2018-03-21 Joseph Myers <joseph@codesourcery.com>
1850 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1851 where all functions return the same _FloatN or _FloatNx type,
1852 treat integer types as _Float64 instead of double.
1854 2018-03-21 Jakub Jelinek <jakub@redhat.com>
1857 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1858 building vector comparison, diagnose it and return error_mark_node.
1860 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1863 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1864 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1865 INTEGER_TYPE element type.
1867 2018-03-13 David Pagan <dave.pagan@oracle.com>
1870 * c-typeck.c (output_init_element): Ensure field initializer
1871 expression is always evaluated if there are side effects.
1873 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1876 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1877 !building_stmt_list_p ().
1879 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1882 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1883 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1884 and include the BIND_EXPR in the list of things that need to be
1887 2018-02-09 Nathan Sidwell <nathan@acm.org>
1890 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1891 to strict_aliasing_warning.
1893 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1895 * c-typeck.c (really_start_incremental_init, push_init_level,
1896 set_nonincremental_init, output_init_element, process_init_element):
1897 Use DECL_UNNAMED_BIT_FIELD.
1899 2018-01-31 Marek Polacek <polacek@redhat.com>
1902 * c-parser.c (c_parser_compound_statement_nostart): Call
1903 expansion_point_location_if_in_system_header.
1905 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1908 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1911 2018-01-13 Jakub Jelinek <jakub@redhat.com>
1914 * c-tree.h (decl_constant_value_1): Add a bool argument.
1915 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1916 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1917 (decl_constant_value): Adjust caller.
1918 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1919 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1920 decl_constant_value returns initializer that has BLKmode or
1922 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1924 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1925 Alan Hayward <alan.hayward@arm.com>
1926 David Sherwood <david.sherwood@arm.com>
1928 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1929 TYPE_VECTOR_SUBPARTS.
1931 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1933 Update copyright years.
1935 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1938 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1939 c_parser_conditional_expression, c_parser_cast_expression,
1940 c_parser_sizeof_expression, c_parser_alignof_expression,
1941 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1942 c_parser_transaction_expression): Use set_error () method instead
1943 of setting value member to error_mark_node.
1945 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1947 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1948 and _Float<N>X built-in functions.
1950 2017-12-22 Jakub Jelinek <jakub@redhat.com>
1953 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1954 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1955 incomplete vars rather than after it.
1958 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1959 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1960 and consider empty ones if there are no other stmts. For
1961 -Wunused-value walk all statements before the one only followed by
1964 2017-12-22 Mike Stump <mikestump@comcast.net>
1965 Eric Botcazou <ebotcazou@adacore.com>
1967 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1968 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1969 (c_parser_do_statement): Likewise.
1970 (c_parser_for_statement): Likewise.
1971 (c_parser_statement_after_labels): Adjust calls to above.
1972 (c_parse_pragma_ivdep): New static function.
1973 (c_parser_pragma_unroll): Likewise.
1974 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1975 <PRAGMA_UNROLL>: New case.
1977 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1979 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1980 perform_integral_promotions, digest_init): Replace Yoda conditions
1981 with typical order conditions.
1982 * c-decl.c (check_bitfield_type_and_width): Likewise.
1984 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1986 * c-typeck.c (c_safe_arg_type_equiv_p,
1987 c_safe_function_type_cast_p): New function.
1988 (build_c_cast): Implement -Wcast-function-type.
1990 2017-12-14 Richard Biener <rguenther@suse.de>
1993 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1994 like REALPART_EXPR for the behavior of whether its operand
1997 2017-12-12 Marek Polacek <polacek@redhat.com>
2000 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2002 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2004 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2005 * c-parser.c (add_debug_begin_stmt): New.
2006 (c_parser_declaration_or_fndef): Call it.
2007 (c_parser_compound_statement_nostart): Likewise.
2008 (c_parser_statement_after_labels): Likewise.
2009 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2011 2017-12-07 Joseph Myers <joseph@codesourcery.com>
2013 * c-decl.c (build_compound_literal): Add parameter alignas_align
2014 and set alignment of decl if nonzero.
2015 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2016 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2018 (c_parser_struct_declaration): Update syntax comment.
2019 (c_parser_type_name): Add alignas_ok argument and pass it to
2021 (c_parser_cast_expression): Pass true to c_parser_type_name and
2022 give error if a cast used an _Alignas specifier.
2023 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2024 give error if sizeof (type-name) used an _Alignas specifier.
2025 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2026 give error if _Alignof (type-name) used an _Alignas specifier.
2027 (c_parser_postfix_expression_after_paren_type): Check specified
2028 alignment for a compound literal and pass it to
2029 build_compound_literal.
2030 * c-parser.h (c_parser_type_name): Update prototype.
2031 * c-tree.h (build_compound_literal): Update prototype.
2033 2017-12-07 Martin Sebor <msebor@redhat.com>
2036 * c-decl.c (c_decl_attributes): Look up existing declaration and
2037 pass it to decl_attributes.
2039 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2042 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2043 reserved for use by the implementation.
2045 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2047 * c-decl.c: Include "c-family/c-spellcheck.h".
2049 2017-12-05 Martin Liska <mliska@suse.cz>
2050 Jakub Jelinek <jakub@redhat.com>
2052 * c-typeck.c (pointer_diff): Add new argument and instrument
2053 pointer subtraction.
2054 (build_binary_op): Similar for pointer comparison.
2056 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2059 * c-parser.c: Include tree-iterator.h.
2060 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2061 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2065 * c-tree.h (decl_constant_value_1): Declare.
2066 * c-typeck.c (decl_constant_value_1): New function.
2067 (decl_constant_value): Use it.
2068 * c-fold.c (c_fully_fold_internal): If in_init, use
2069 decl_constant_value_1 instead of decl_constant_value.
2071 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2073 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2075 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2078 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2079 c_switch_covers_all_cases_p returns true.
2081 2017-11-28 Julia Koval <julia.koval@intel.com>
2082 Sebastian Peryt <sebastian.peryt@intel.com>
2084 * Make-lang.in (c/c-array-notation.o): Remove.
2085 * c-array-notation.c: Delete.
2086 * c-decl.c: Remove cilkplus condition.
2087 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2088 c_parser_cilk_verify_simd, c_parser_array_notation,
2089 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2090 c_parser_cilk_simd_fn_vector_attrs,
2091 c_finish_cilk_simd_fn_tokens): Delete.
2092 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2093 (c_parser_direct_declarator_inner): Ditto.
2094 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2095 (c_parser_attributes, c_parser_compound_statement,
2096 c_parser_statement_after_labels, c_parser_if_statement,
2097 c_parser_switch_statement, c_parser_while_statement,
2098 c_parser_do_statement, c_parser_for_statement,
2099 c_parser_unary_expression, c_parser_postfix_expression,
2100 c_parser_postfix_expression_after_primary,
2101 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2102 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2104 * c-typeck.c (build_array_ref, build_function_call_vec,
2106 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2107 c_finish_loop, build_binary_op): Remove cilkplus support.
2109 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2111 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2114 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
2116 * Make-lang.in (c.install-plugin): Install backend import library.
2118 2017-11-23 Jakub Jelinek <jakub@redhat.com>
2120 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2121 pragma_stmt context.
2123 2017-11-23 Mike Stump <mikestump@comcast.net>
2124 Eric Botcazou <ebotcazou@adacore.com>
2126 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2128 (c_parser_do_statement): Likewise.
2129 (c_parser_for_statement): Likewise.
2131 2017-11-22 David Malcolm <dmalcolm@redhat.com>
2134 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2135 bool to bool *. Within '%T' handling, if showing an "aka", use
2136 "quoted" param to add appropriate quoting.
2138 2017-11-22 Marek Polacek <polacek@redhat.com>
2143 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2145 2017-11-21 David Malcolm <dmalcolm@redhat.com>
2148 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2149 earlier failed lookups.
2151 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2153 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2154 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2156 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2159 * c-decl.c: Include "c-family/known-headers.h".
2160 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2161 to known-headers.cc.
2162 (class suggest_missing_header): Move to known-header.h.
2163 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2164 than get_c_name_hint.
2166 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2168 * c-decl.c (get_c_name_hint): New function.
2169 (class suggest_missing_header): New class.
2170 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2171 suggest missing headers to the user.
2173 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2175 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2176 Include "c-family/name-hint.h"
2177 (implicit_decl_warning): Convert "hint" from
2178 const char * to name_hint. Pass location to
2179 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2180 warning was not printed.
2181 (undeclared_variable): Likewise for "guessed_id".
2182 (lookup_name_fuzzy): Convert return type from const char *
2183 to name_hint. Add location_t param.
2184 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2185 Include "c-family/name-hint.h"
2186 (c_parser_declaration_or_fndef): Convert "hint" from
2187 const char * to name_hint. Pass location to lookup_name_fuzzy.
2188 (c_parser_parameter_declaration): Likewise.
2190 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2194 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2196 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2197 handle_omp_array_sections): Likewise.
2198 (digest_init): Don't call decl_constant_value_for_optimization.
2199 * c-tree.h (decl_constant_value_for_optimization): Removed.
2200 * c-fold.c (c_fold_array_ref): New function.
2201 (c_fully_fold_internal): Add LVAL argument, propagate it through
2202 recursive calls. For VAR_P call decl_constant_value and
2203 unshare if not LVAL and either optimizing or IN_INIT. Remove
2204 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2205 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2206 (c_fully_fold): Add LVAL argument, pass it through to
2207 c_fully_fold_internal.
2208 (decl_constant_value_for_optimization): Removed.
2210 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2213 * c-parser.c (check_tgmath_function): New function.
2214 (enum tgmath_parm_kind): New enum.
2215 (c_parser_postfix_expression): Handle __builtin_tgmath.
2217 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2219 * c-decl.c (implicit_decl_warning): Update for renaming of
2220 pedwarn_at_rich_loc and warning_at_rich_loc.
2221 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2222 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2223 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2224 (c_parser_struct_or_union_specifier): Likewise for renaming of
2225 pedwarn_at_rich_loc.
2226 (c_parser_parameter_declaration): Likewise for renaming of
2228 * c-typeck.c (build_component_ref): Likewise.
2229 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2230 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2231 (set_init_label): Likewise for renaming of error_at_rich_loc.
2233 2017-10-30 Richard Biener <rguenther@suse.de>
2235 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2238 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2240 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2241 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2243 2017-10-25 David Malcolm <dmalcolm@redhat.com>
2246 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2249 2017-10-25 Jakub Jelinek <jakub@redhat.com>
2252 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2253 newdecl to corresponding __builtin_ if any.
2255 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2258 * c-decl.c (diagnose_mismatched_decls): Use
2259 OPT_Wbuiltin_declaration_mismatch.
2261 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2263 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2264 use it to guard calls to maybe_suggest_missing_token_insertion.
2265 (c_parser_parms_list_declarator): Override default value of new
2266 "type_is_unique" param to c_parser_require.
2267 (c_parser_asm_statement): Likewise.
2268 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2271 2017-10-11 Nathan Sidwell <nathan@acm.org>
2273 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2275 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2277 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2278 operating on trees as wide_ints.
2279 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2280 (c_tree_equal): Likewise.
2282 2017-10-04 David Malcolm <dmalcolm@redhat.com>
2284 * c-decl.c (push_parm_decl): Store c_parm's location into the
2286 (build_c_parm): Add "loc" param and store it within the c_parm.
2287 * c-parser.c (struct c_parser): Add "last_token_location" field.
2288 (c_parser_consume_token): Store location of the token into the
2290 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2291 when handling a FUNCTION_DECL, if it doesn't already have them.
2292 (c_parser_parameter_declaration): Generate a location for the
2293 parameter, and pass it to the call to build_c_parm.
2294 * c-tree.h (struct c_parm): Add field "loc".
2295 (build_c_parm): Add location_t param.
2296 * c-typeck.c (get_fndecl_argument_location): New function.
2297 (inform_for_arg): New function.
2298 (convert_for_assignment): Use inform_for_arg when dealing with
2301 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2303 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2305 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2306 don't SET_DECL_C_BIT_FIELD here.
2309 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2310 instead of trying to set just TREE_READONLY manually.
2312 2017-09-16 Tom de Vries <tom@codesourcery.com>
2315 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2318 2017-09-15 Joseph Myers <joseph@codesourcery.com>
2321 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2323 (build_conditional_expr): For C11, generate result with excess
2324 precision when one argument is an integer and the other is of a
2325 type using excess precision.
2327 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2329 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2331 2017-09-13 Marek Polacek <polacek@redhat.com>
2334 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2335 than expr.original_type.
2337 2017-09-12 Nathan Sidwell <nathan@acm.org>
2339 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2340 resort_sorted_fields): Moved from c-family/c-common.c.
2341 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2343 2017-09-01 Joseph Myers <joseph@codesourcery.com>
2346 * c-typeck.c (build_atomic_assign): Handle argument with excess
2347 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2348 argument passed to build_binary_op and convert_for_assignment but
2349 not for call to c_fully_fold.
2350 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2351 Ensure build_binary_op is called with argument with original
2352 semantic type. Avoid calling c_fully_fold with an
2353 EXCESS_PRECISION_EXPR from build_binary_op.
2355 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2358 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2360 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2361 Alan Hayward <alan.hayward@arm.com>
2362 David Sherwood <david.sherwood@arm.com>
2364 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2365 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2366 m1 and m2 to the signed equivalent of a fixed-point
2369 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2371 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2372 than CAN_HAVE_LOCATION_P when determining whether to use the
2373 location_t value within "value".
2375 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2377 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2378 rather than peeking the location of the first token.
2379 * c-tree.h (c_expr::get_location): New method.
2381 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2383 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2384 to check_function_arguments.
2386 2017-08-18 Marek Polacek <polacek@redhat.com>
2388 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2391 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2394 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2395 (check_bitfield_type_and_width): Don't allow bit-field with
2396 warn_if_not_aligned type.
2398 2017-08-14 Martin Sebor <msebor@redhat.com>
2401 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2403 2017-08-11 Marek Polacek <polacek@redhat.com>
2406 * c-decl.c (pushtag): Only print inform if the warning was printed.
2407 (grokdeclarator): Likewise.
2409 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2411 * c-parser.c (c_parser_error): Rename to...
2412 (c_parser_error_richloc): ...this, making static, and adding
2413 "richloc" parameter, passing it to the c_parse_error call,
2414 rather than calling c_parser_set_source_position_from_token.
2415 (c_parser_error): Reintroduce, reimplementing in terms of the
2416 above, converting return type from void to bool.
2417 (class token_pair): New class.
2418 (struct matching_paren_traits): New struct.
2419 (matching_parens): New typedef.
2420 (struct matching_brace_traits): New struct.
2421 (matching_braces): New typedef.
2422 (get_matching_symbol): New function.
2423 (c_parser_require): Add param MATCHING_LOCATION, using it to
2424 highlight matching "opening" tokens for missing "closing" tokens.
2425 (c_parser_skip_until_found): Likewise.
2426 (c_parser_static_assert_declaration_no_semi): Convert explicit
2427 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2428 class matching_parens, so that the pertinent open parenthesis is
2429 highlighted when there are problems locating the close
2431 (c_parser_struct_or_union_specifier): Likewise.
2432 (c_parser_typeof_specifier): Likewise.
2433 (c_parser_alignas_specifier): Likewise.
2434 (c_parser_simple_asm_expr): Likewise.
2435 (c_parser_braced_init): Likewise, for matching_braces.
2436 (c_parser_paren_condition): Likewise, for matching_parens.
2437 (c_parser_switch_statement): Likewise.
2438 (c_parser_for_statement): Likewise.
2439 (c_parser_asm_statement): Likewise.
2440 (c_parser_asm_operands): Likewise.
2441 (c_parser_cast_expression): Likewise.
2442 (c_parser_sizeof_expression): Likewise.
2443 (c_parser_alignof_expression): Likewise.
2444 (c_parser_generic_selection): Likewise.
2445 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2446 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2447 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2448 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2449 c_parser_skip_until_found call.
2450 (c_parser_objc_class_definition): Use class matching_parens as
2452 (c_parser_objc_method_decl): Likewise.
2453 (c_parser_objc_try_catch_finally_statement): Likewise.
2454 (c_parser_objc_synchronized_statement): Likewise.
2455 (c_parser_objc_at_property_declaration): Likewise.
2456 (c_parser_oacc_wait_list): Likewise.
2457 (c_parser_omp_var_list_parens): Likewise.
2458 (c_parser_omp_clause_collapse): Likewise.
2459 (c_parser_omp_clause_default): Likewise.
2460 (c_parser_omp_clause_if): Likewise.
2461 (c_parser_omp_clause_num_threads): Likewise.
2462 (c_parser_omp_clause_num_tasks): Likewise.
2463 (c_parser_omp_clause_grainsize): Likewise.
2464 (c_parser_omp_clause_priority): Likewise.
2465 (c_parser_omp_clause_hint): Likewise.
2466 (c_parser_omp_clause_defaultmap): Likewise.
2467 (c_parser_oacc_single_int_clause): Likewise.
2468 (c_parser_omp_clause_ordered): Likewise.
2469 (c_parser_omp_clause_reduction): Likewise.
2470 (c_parser_omp_clause_schedule): Likewise.
2471 (c_parser_omp_clause_num_teams): Likewise.
2472 (c_parser_omp_clause_thread_limit): Likewise.
2473 (c_parser_omp_clause_aligned): Likewise.
2474 (c_parser_omp_clause_linear): Likewise.
2475 (c_parser_omp_clause_safelen): Likewise.
2476 (c_parser_omp_clause_simdlen): Likewise.
2477 (c_parser_omp_clause_depend): Likewise.
2478 (c_parser_omp_clause_map): Likewise.
2479 (c_parser_omp_clause_device): Likewise.
2480 (c_parser_omp_clause_dist_schedule): Likewise.
2481 (c_parser_omp_clause_proc_bind): Likewise.
2482 (c_parser_omp_clause_uniform): Likewise.
2483 (c_parser_omp_for_loop): Likewise.
2484 (c_parser_cilk_clause_vectorlength): Likewise.
2485 (c_parser_cilk_clause_linear): Likewise.
2486 (c_parser_transaction_expression): Likewise.
2487 * c-parser.h (c_parser_require): Add param matching_location with
2488 default UNKNOWN_LOCATION.
2489 (c_parser_error): Convert return type from void to bool.
2490 (c_parser_skip_until_found): Add param matching_location with
2491 default UNKNOWN_LOCATION.
2493 2017-08-09 Marek Polacek <polacek@redhat.com>
2495 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2496 * c-tree.h (build_external_ref): Update declaration.
2497 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2498 (build_external_ref): Change the type of a parameter to bool.
2499 (parser_build_binary_op): Use true/false instead of 1/0.
2500 (pointer_diff): Likewise.
2501 (build_modify_expr): Likewise.
2502 (set_designator): Change the type of a parameter to bool.
2503 (set_init_index): Use true/false instead of 1/0.
2504 (set_init_label): Likewise.
2505 (output_init_element): Change the type of a parameter to bool.
2506 (output_pending_init_elements): Use true/false instead of 1/0.
2507 (process_init_element): Likewise.
2508 (build_binary_op): Change the type of a parameter to bool.
2510 2017-08-09 Marek Polacek <polacek@redhat.com>
2513 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2514 Call emit_diagnostic_valist instead of pedwarn.
2515 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2516 Print the relevant types in diagnostics.
2518 2017-08-09 Marek Polacek <polacek@redhat.com>
2521 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2522 build_conditional_expr.
2523 * c-parser.c (c_parser_conditional_expression): Create locations for
2524 EXP1 and EXP2 from their source ranges. Pass the locations down to
2525 build_conditional_expr.
2526 * c-tree.h (build_conditional_expr): Update declaration.
2527 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2528 For -Wsign-compare, also print the types.
2530 2017-08-08 Martin Liska <mliska@suse.cz>
2532 * c-convert.c: Include header files.
2533 * c-typeck.c: Likewise.
2535 2017-08-07 Martin Liska <mliska@suse.cz>
2537 * c-parser.c (c_parser_attributes): Canonicalize name of an
2540 2017-08-02 Marek Polacek <polacek@redhat.com>
2543 * c-parser.c (c_parser_unary_expression): Use set_error.
2547 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2548 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2550 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2551 Martin Liska <mliska@suse.cz>
2553 * c-typeck.c (c_finish_goto_label): Build gimple predict
2556 2017-07-31 Martin Liska <mliska@suse.cz>
2559 * c-convert.c (convert): Guard condition with flag_sanitize_p
2560 also with current_function_decl non-null equality.
2561 * c-decl.c (grokdeclarator): Likewise.
2562 * c-typeck.c (build_binary_op): Likewise.
2564 2017-07-25 Marek Polacek <polacek@redhat.com>
2566 * c-decl.c (grokfield): Remove local variable.
2568 2017-07-25 Marek Polacek <polacek@redhat.com>
2571 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2572 macro expansion if the body is in { }.
2573 (c_parser_while_statement): Likewise.
2574 (c_parser_for_statement): Likewise.
2576 2017-07-18 Nathan Sidwell <nathan@acm.org>
2578 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2580 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2582 * c-decl.c (implicitly_declare): When suggesting a missing
2583 #include, provide a fix-it hint.
2585 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2587 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2588 and call that instead.
2589 * c-tree.h (selftest::run_c_tests): New decl.
2591 2017-06-26 Marek Polacek <polacek@redhat.com>
2594 * c-parser.c (c_parser_if_body): Set the location of the
2595 body of the conditional after parsing all the labels. Call
2596 warn_for_multistatement_macros.
2597 (c_parser_else_body): Likewise.
2598 (c_parser_switch_statement): Likewise.
2599 (c_parser_while_statement): Likewise.
2600 (c_parser_for_statement): Likewise.
2601 (c_parser_statement): Add a default argument. Save the location
2602 after labels have been parsed.
2603 (c_parser_c99_block_statement): Likewise.
2605 2017-06-19 Richard Biener <rguenther@suse.de>
2607 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2608 negated _Literals to parse _Literal (int) -1.
2610 2017-06-13 Martin Liska <mliska@suse.cz>
2613 * c-convert.c (convert): Use sanitize_flags_p.
2614 * c-decl.c (grokdeclarator): Likewise.
2615 * c-typeck.c (convert_for_assignment): Likewise.
2616 (c_finish_return): Likewise.
2617 (build_binary_op): Likewise.
2619 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2622 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2623 to sizetype before size_binop.
2625 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2627 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2630 2017-06-06 Marek Polacek <polacek@redhat.com>
2633 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2635 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2637 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2639 * c-parser.c (c_parser_binary_expression): Implement the
2640 -Wsizeof_pointer_div warning.
2641 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2642 from a parenthesized expression.
2643 (c_parser_expr_list): Use c_last_sizeof_loc.
2644 * c-tree.h (c_last_sizeof_loc): New external.
2645 * c-typeck.c (c_last_sizeof_loc): New variable.
2646 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2648 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2651 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2653 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2655 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2658 2017-05-24 Martin Sebor <msebor@redhat.com>
2661 * c-fold.c (c_fully_fold_internal): Adjust.
2662 * c-typeck.c (parser_build_unary_op): Adjust.
2664 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2666 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2667 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2670 2017-05-23 Marek Polacek <polacek@redhat.com>
2672 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2675 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2677 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2678 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2679 it returned invariant. Call tree_invariant_p unconditionally
2680 afterwards to decide whether to return expr or op0.
2682 2017-05-22 Nathan Sidwell <nathan@acm.org>
2684 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2686 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2688 * c-parser.c (c_parser_omp_clause_default): Handle
2689 "OMP_CLAUSE_DEFAULT_PRESENT".
2691 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2693 * config-lang.in (gtfiles): Add c-family/c-format.c.
2695 2017-05-18 Nathan Sidwell <nathan@acm.org>
2697 * c-decl.c (pushdecl_top_level): Delete unused function.
2699 2017-05-18 Marek Polacek <polacek@redhat.com>
2701 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2702 (check_earlier_gotos): Likewise.
2703 (define_label): Likewise.
2704 (pending_xref_error): Likewise.
2705 (smallest_type_quals_location): Likewise.
2706 (grokdeclarator): Likewise.
2707 (grokparms): Likewise.
2708 (identifier_global_value): Likewise.
2709 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2710 (find_init_member): Likewise.
2712 2017-05-18 Marek Polacek <polacek@redhat.com>
2714 * c-decl.c (start_decl): Use false/true instead of 0/1.
2715 (grokdeclarator): Likewise.
2716 (finish_struct): Likewise.
2717 (start_function): Change the return type to bool. Use false/true
2719 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2720 * c-tree.h (start_function): Update.
2721 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2722 (set_designator): Change the return type to bool. Use false/true
2725 2017-05-17 Marek Polacek <polacek@redhat.com>
2727 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2728 * c-typeck.c: Likewise.
2730 2017-05-17 Marek Polacek <polacek@redhat.com>
2733 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2734 DECL_IGNORED_P even for non-static compound literals.
2736 2017-05-17 Martin Liska <mliska@suse.cz>
2738 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2739 use it instead of int type.
2741 2017-05-17 Marek Polacek <polacek@redhat.com>
2743 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2745 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2746 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2747 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2748 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2750 (c_parser_conditional_expression): Likewise.
2751 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2752 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2753 (process_init_element): Likewise.
2754 (build_binary_op): Likewise.
2755 (handle_omp_array_sections_1): Likewise.
2757 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2759 * c-parser.c (c_parser_omp_clause_num_gangs)
2760 (c_parser_omp_clause_num_workers)
2761 (c_parser_omp_clause_vector_length): Merge functions into...
2762 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2765 2017-05-11 Nathan Sidwell <nathan@acm.org>
2767 * gimple-parser.c: Don't #include tree-dump.h.
2769 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2772 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2774 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2777 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2778 incorrect __MEM syntax.
2780 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2783 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2786 2017-05-09 Nathan Sidwell <nathan@acm.org>
2788 * c-tree.h (pushdecl): Declare.
2790 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2792 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2793 with diagnostic_report_diagnostic.
2794 * c-errors.c (pedwarn_c99): Likewise.
2795 (pedwarn_c90): Likewise.
2797 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2800 * c-gimplify.c (c_gimplify_expr): Remove calls to
2801 cilk_gimplifY_call_params_in_spawned_fn.
2803 2017-04-25 David Malcolm <dmalcolm@redhat.com>
2805 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2806 hint for removing extra semicolon.
2808 2017-04-21 Jakub Jelinek <jakub@redhat.com>
2811 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2812 enabled, set specs->type to integer_type_node.
2814 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2816 * c-array-notation.c: Fix typo in comment.
2818 2017-03-29 Marek Polacek <polacek@redhat.com>
2821 * c-decl.c (finish_decl): Check VAR_P.
2823 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2826 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2827 * c-typeck.c (c_mark_addressable): Likewise. Look through
2828 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2830 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2832 2017-03-23 Marek Polacek <polacek@redhat.com>
2834 * c-tree.h: Remove a C_RID_YYCODE reference.
2836 2017-03-21 Jakub Jelinek <jakub@redhat.com>
2839 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2840 optional COMPOUND_EXPR with ubsan instrumentation.
2842 2017-03-17 Marek Polacek <polacek@redhat.com>
2844 * c-parser.c: Add C11 references.
2846 2017-03-15 Marek Polacek <polacek@redhat.com>
2848 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2850 2017-03-11 Marek Polacek <polacek@redhat.com>
2852 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2854 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2856 PR translation/79848
2857 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2859 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2861 2017-03-09 Marek Polacek <polacek@redhat.com>
2864 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2865 parameter declarations with initializers.
2867 2017-03-09 Jakub Jelinek <jakub@redhat.com>
2870 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2873 2017-03-07 Jakub Jelinek <jakub@redhat.com>
2876 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2877 for "may only be used in compound statements" diagnostics, change it
2878 such that the same translatable string is used for all pragmas. For
2879 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2881 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2882 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2883 "may only be used in compound statements" diagnostics, such that the
2884 same translatable string is used for all pragmas.
2886 2017-03-04 Marek Polacek <polacek@redhat.com>
2889 * c-decl.c (implicit_decl_warning): Add missing space.
2891 2017-03-03 Marek Polacek <polacek@redhat.com>
2894 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2895 current_function_prototype_arg_types is error_mark_node. Fix
2896 formatting. Use TREE_VALUE instead of TREE_TYPE.
2898 2017-03-03 Jakub Jelinek <jakub@redhat.com>
2901 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2902 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2903 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2907 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2908 instead of %<_Generic>.
2909 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2910 (c_parser_omp_target_exit_data): Use %<release%> instead of
2913 2017-02-28 Jakub Jelinek <jakub@redhat.com>
2915 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2916 instead of just cond ? "..." : "...".
2917 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2918 for "enter"/"exit" keyword.
2919 (c_finish_oacc_routine): Don't use %s to supply portions of the
2922 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2925 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2926 handle -Wrestrict here.
2927 * c-typeck.c (build_function_call_vec): Adjust
2928 check_function_arguments caller.
2930 2017-02-23 Richard Biener <rguenther@suse.de>
2933 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2934 to initialize c_exprs to return.
2935 (c_parser_gimple_binary_expression): Likewise.
2936 (c_parser_gimple_unary_expression): Likewise.
2937 (c_parser_gimple_postfix_expression): Likewise.
2939 2017-02-22 Marek Polacek <polacek@redhat.com>
2942 * c-typeck.c (convert_arguments): Handle error_mark_node.
2944 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2946 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2947 value of c_parser_parse_ssa_name against error_mark_node and emit
2948 error if ssa name is anonymous and written as default definition.
2950 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2952 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2955 2017-02-16 Jakub Jelinek <jakub@redhat.com>
2958 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2959 ignore #pragma omp target even when not followed by identifier.
2961 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2963 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2964 (c_parser_gimple_unary_expression): Likewise.
2966 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2968 * c-parser.c (c_parser_oacc_declare): Add missing space in
2971 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2974 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2975 set_c_expr_source_range when parsing ssa-name.
2977 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2978 Richard Biener <rguenther@suse.de>
2980 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2981 building IL when arguments are error_mark_node.
2982 (c_parser_gimple_unary_expression): Likewise.
2983 (c_parser_gimple_if_stmt): Likewise.
2984 (c_parser_gimple_switch_stmt): Likewise.
2985 (c_parser_gimple_return_stmt): Likewise.
2986 (c_parser_parse_ssa_name): When name lookup fails do not build
2987 an SSA name. Use undeclared rather than not declared in error
2990 2017-02-09 Marek Polacek <polacek@redhat.com>
2993 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2994 instead of c_parser_skip_until_found.
2996 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2999 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3000 symtab_node::get on automatic variables.
3002 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3003 Chung-Lin Tang <cltang@codesourcery.com>
3005 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3006 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3008 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3010 2017-02-07 Richard Biener <rguenther@suse.de>
3012 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3013 (c_parser_gimple_postfix_expression_after_primary):
3014 Do not use c_build_function_call_vec to avoid folding and promotion.
3017 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3020 * c-decl.c (pop_scope): Pass main_input_filename to
3021 build_translation_unit_decl.
3023 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3025 * c-parser.c: Include "read-rtl-function.h" and
3027 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3028 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3029 production. Update for renaming of field "gimple_pass" to
3030 "gimple_or_rtl_pass". If __RTL was seen, call
3031 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3032 to an auto_timevar, to cope with early exit.
3033 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3034 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3035 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3037 (c_parser_parse_rtl_body): New function.
3038 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3039 (struct c_declspecs): Rename field "gimple_pass" to
3040 "gimple_or_rtl_pass". Add field "rtl_p".
3041 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3042 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3043 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3044 (c_parser_gimple_or_rtl_pass_list): ...this.
3046 2017-01-20 Marek Polacek <polacek@redhat.com>
3049 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3051 2017-01-13 Richard Biener <rguenther@suse.de>
3053 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3056 2017-01-13 Richard Biener <rguenther@suse.de>
3058 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3059 _Literal ( type-name ) number.
3061 2017-01-12 Richard Biener <rguenther@suse.de>
3063 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3066 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3069 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3072 2017-01-11 Richard Biener <rguenther@suse.de>
3075 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3076 returns on parse errors.
3078 2017-01-04 Marek Polacek <polacek@redhat.com>
3081 * c-parser.c (c_parser_postfix_expression): Mark zero character
3082 constants by setting original_type in c_expr.
3083 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3084 with a zero character constant.
3085 (char_type_p): New function.
3087 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3089 * c-parser.c (c_parser_declaration_or_fndef): Create a
3090 rich_location at init_loc and parse it to start_init.
3091 (last_init_list_comma): New global.
3092 (c_parser_braced_init): Update last_init_list_comma when parsing
3093 commas. Pass it to pop_init_level. Pass location of closing
3094 brace to pop_init_level.
3095 (c_parser_postfix_expression_after_paren_type): Create a
3096 rich_location at type_loc and parse it to start_init.
3097 (c_parser_omp_declare_reduction): Likewise for loc.
3098 * c-tree.h (start_init): Add rich_location * param.
3099 (pop_init_level): Add location_t param.
3100 * c-typeck.c (struct initializer_stack): Add field
3101 "missing_brace_richloc".
3102 (start_init): Add richloc param, use it to initialize
3103 the stack node's missing_brace_richloc.
3104 (last_init_list_comma): New decl.
3105 (finish_implicit_inits): Pass last_init_list_comma to
3107 (push_init_level): When finding missing open braces, add fix-it
3108 hints to the richloc.
3109 (pop_init_level): Add "insert_before" param and pass it
3110 when calling pop_init_level. Add fixits about missing
3111 close braces to any richloc. Use the richloc for the
3112 -Wmissing-braces warning.
3113 (set_designator): Pass last_init_list_comma to pop_init_level.
3114 (process_init_element): Likewise.
3116 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3118 Update copyright years.
3120 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3123 * c-typeck.c (build_function_call_vec): If check_function_arguments
3124 returns true, set TREE_NO_WARNING on CALL_EXPR.
3127 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3128 to *expr instead of overwriting it.
3130 2016-12-20 Richard Biener <rguenther@suse.de>
3132 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3134 (c_parser_gimple_statement): Only build assigns for non-error
3136 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3138 2016-12-14 Martin Jambor <mjambor@suse.cz>
3140 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3142 (c_finish_oacc_routine): Adjusted call to
3143 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3144 to use their new names.
3145 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3147 (c_parser_oacc_update): Likewise.
3148 (c_parser_omp_simd): Likewise.
3149 (c_parser_omp_target_update): Likewise.
3150 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3151 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3153 (c_finish_omp_cancellation_point): Likewise.
3154 * gimple-parser.c: Do not include omp-low.h
3156 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3157 James Norris <jnorris@codesourcery.com>
3159 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3160 EXIT_DATA,WAIT} are not used in compound statements.
3161 (c_parser_oacc_enter_exit_data): Update diagnostics.
3163 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3166 * c-decl.c (diagnose_mismatched_decls): Use
3167 OPT_Wbuiltin_declaration_mismatch here too.
3169 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
3170 Alan Hayward <alan.hayward@arm.com>
3171 David Sherwood <david.sherwood@arm.com>
3173 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3174 (make_label, finish_struct): Likewise.
3176 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3177 Richard Biener <rguenther@suse.de>
3179 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3180 * config-lang.in (gtfiles): Add c/c-parser.h.
3181 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3182 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3183 * c-parser.c (enum c_id_kind, struct c_token,
3184 c_parser_next_token_is, c_parser_next_token_is_not,
3185 c_parser_next_token_is_keyword,
3186 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3188 * c-parser.h: ... new header.
3189 * c-parser.c: Include c-parser.h and gimple-parser.h.
3190 (c_parser_peek_token, c_parser_peek_2nd_token,
3191 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3192 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3193 c_parser_error, c_parser_require, c_parser_skip_until_found,
3194 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3195 c_parser_type_name): Export.
3196 (c_parser_tokens_buf): New function.
3197 (c_parser_error): Likewise.
3198 (c_parser_set_error): Likewise.
3199 (c_parser_declspecs): Handle RID_GIMPLE.
3200 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3201 via c_parser_parse_gimple_body.
3202 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3203 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3204 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3205 c_parser_error, c_parser_require, c_parser_skip_until_found,
3206 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3207 c_parser_type_name): Declare.
3208 (struct c_parser): Declare forward.
3209 (c_parser_tokens_buf): Declare.
3210 (c_parser_error): Likewise.
3211 (c_parser_set_error): Likewise.
3212 * gimple-parser.c: New file.
3213 * gimple-parser.h: Likewise.
3215 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3218 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3221 2016-09-11 Le-Chun Wu <lcwu@google.com>
3222 Mark Wielaard <mjw@redhat.com>
3224 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3225 to the given -Wshadow= variant.
3227 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3229 * c-typeck.c: Include memmodel.h.
3231 2016-10-13 Jakub Jelinek <jakub@redhat.com>
3234 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3235 instead of lhd_return_null_tree_v.
3237 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3240 * c-decl.c (smallest_type_quals_location): New static function.
3241 (grokdeclarator): Try to find the correct location for an ignored
3244 2016-09-26 Marek Polacek <polacek@redhat.com>
3247 * c-decl.c (pop_scope): Add gcc_fallthrough.
3249 2016-09-26 Marek Polacek <polacek@redhat.com>
3252 * c-parser.c (struct c_token): Add flags field.
3253 (c_lex_one_token): Pass it to c_lex_with_flags.
3254 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3255 into IFN_FALLTHROUGH.
3256 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3257 attribute fallthrough after a case label or default label.
3258 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3260 2016-09-24 Marek Polacek <polacek@redhat.com>
3263 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3264 have boolean value. Warn about ++/-- on booleans.
3266 2016-09-23 Jakub Jelinek <jakub@redhat.com>
3268 * c-parser.c (incomplete_record_decls): Remove unnecessary
3269 = vNULL initialization of file scope vec.
3271 2016-09-16 Marek Polacek <polacek@redhat.com>
3273 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3275 2016-09-14 Marek Polacek <polacek@redhat.com>
3277 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3278 (fix_array_notation_expr): Likewise.
3279 * c-decl.c (finish_decl): Likewise.
3280 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3281 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3282 (function_to_pointer_conversion): Use false instead of 0.
3283 (convert_lvalue_to_rvalue): Likewise.
3284 (parser_build_unary_op): Likewise.
3285 (build_atomic_assign): Likewise.
3286 (build_unary_op): Change nonconvert parameter type to bool, use
3287 true/false instead of 1/0.
3288 (build_binary_op): Use true instead of 1.
3290 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3292 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3293 of add_fixit_insert to add_fixit_insert_before.
3295 2016-09-13 Marek Polacek <polacek@redhat.com>
3297 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3300 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3303 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3304 COMPOUND_EXPR to warn_for_omitted_condop.
3306 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3308 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3309 c_get_substring_location for this new langhook.
3311 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3314 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3316 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3317 instead of mark_exp_read on low_bound/length expression.
3318 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3319 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3320 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3321 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3322 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3323 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3324 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3325 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3326 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3327 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3328 instead of mark_expr_read.
3329 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3330 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3331 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3332 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3333 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3334 array section bases outside of depend clause, for depend clause
3335 use convert_lvalue_to_rvalue on the base.
3336 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3337 linear, aligned, map, to and from clauses.
3338 (c_omp_clause_copy_ctor): New function.
3340 2016-09-01 Marek Polacek <polacek@redhat.com>
3343 * c-typeck.c (composite_type): Add FALLTHRU comment.
3345 2016-08-31 David Malcolm <dmalcolm@redhat.com>
3347 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3348 to the insertion fixits for "struct", "union", and "enum".
3350 2016-08-30 David Malcolm <dmalcolm@redhat.com>
3352 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3353 rather than add_fixit_misspelled_id.
3354 (undeclared_variable): Likewise.
3355 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3356 now-redundant "here" params from add_fixit_insert method calls.
3357 (c_parser_parameter_declaration): Likewise.
3358 * c-typeck.c (build_component_ref): Remove now-redundant range
3359 param from add_fixit_replace method calls.
3361 2016-08-25 Marek Polacek <polacek@redhat.com>
3363 * c-typeck.c (parser_build_binary_op): Pass LHS to
3364 warn_logical_not_parentheses.
3366 2016-08-25 Marek Polacek <polacek@redhat.com>
3369 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3370 or _FloatN or _FloatNx is not supported.
3371 (finish_declspecs): Set type to integer_type_node when _FloatN or
3372 _FloatNx is not supported.
3374 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3377 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3378 (struct c_declspecs): Add field floatn_nx_idx.
3379 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3380 and _FloatNx type specifiers.
3381 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3382 (c_parser_declspecs, c_parser_attribute_any_word)
3383 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3384 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3385 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3386 narrower than double.
3388 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3389 Martin Liska <mliska@suse.cz>
3392 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3393 % to determine val element to change. Assert that
3394 wchar_bytes * charwidth fits into val array.
3396 2016-08-12 Marek Polacek <polacek@redhat.com>
3399 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3400 (c_parser_postfix_expression): Likewise.
3401 * c-typeck.c (build_unary_op): Adjust fall through comment.
3402 (c_mark_addressable): Likewise.
3404 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3407 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3408 array member through typedef, for orig_qual_indirect == 0 clear
3411 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3414 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3415 this up to selftest::run_c_tests.
3416 (selftest::run_c_tests): New function.
3418 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3420 * c-parser.c (struct oacc_routine_data): Add error_seen and
3421 fndecl_seen members.
3422 (c_finish_oacc_routine): Use these.
3423 (c_parser_declaration_or_fndef): Adjust.
3424 (c_parser_oacc_routine): Likewise. Support more C language
3425 constructs, and improve diagnostics. Move pragma context
3427 (c_parser_pragma): ... here.
3429 * c-parser.c (struct oacc_routine_data): New.
3430 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3432 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3433 declare target" attribute.
3435 2016-08-01 Jan Beulich <jbeulich@suse.com>
3437 * c-fold.c (c_fully_fold_internal): Also emit shift count
3438 warnings for vector types.
3439 * c-typeck.c (build_binary_op): Likewise.
3441 2016-07-29 Marek Polacek <polacek@redhat.com>
3444 * c-decl.c (finish_struct): Rephrase an error message.
3447 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3448 to error node for invalid code.
3451 * c-decl.c (implicitly_declare): Return decl early not only for
3452 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3454 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3457 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3458 on GNU extern inline functions.
3460 2016-07-29 Marek Polacek <polacek@redhat.com>
3463 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3466 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3468 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3470 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3472 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3474 (best_macro_match): Likewise, converting from a typedef to a
3476 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3477 (lookup_name_fuzzy): Update for change of best_macro_match to a
3478 subclass with a ctor that calls cpp_forall_identifiers.
3480 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3482 * c-decl.c (implicit_decl_warning): Update for conversion of
3483 return type of lookup_name_fuzzy to const char *.
3484 (undeclared_variable): Likewise.
3485 (lookup_name_fuzzy): Convert return type from tree to
3487 * c-parser.c (c_parser_declaration_or_fndef): Update for
3488 conversion of return type of lookup_name_fuzzy to const char *.
3489 (c_parser_parameter_declaration): Likewise.
3491 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3493 * c-parser.c (c_parser_oacc_declare): Don't scan for
3495 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3496 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3497 zero-length subarrays.
3499 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3502 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3503 instead of FUZZY_LOOKUP_NAME.
3504 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3505 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3507 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3510 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3512 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3514 * c-parser.c (c_parser_generic_selection): Make type of variable
3516 (c_parser_omp_declare_simd): Likewise.
3518 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3520 * c-decl.c (struct c_struct_parse_info): Change member types
3521 from vec to auto_vec.
3522 (start_struct): Adjust.
3523 (finish_struct): Likewise.
3525 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3528 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3530 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3532 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3533 Move pragma context checking into...
3534 (c_parser_omp_cancellation_point): ... here, and improve
3535 diagnostic messages.
3536 * c-typeck.c (c_finish_omp_cancel)
3537 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3539 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3542 * c-typeck.c (c_build_qualified_type): Don't clear
3543 C_TYPE_INCOMPLETE_VARS for the main variant.
3545 2016-06-28 Martin Sebor <msebor@redhat.com>
3548 * c-typeck.c (output_init_element): Diagnose incompatible types
3549 before non-constant initializers.
3551 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3553 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3555 2016-06-23 Andi Kleen <ak@linux.intel.com>
3557 * Make-lang.in: Add support for autofdo.
3559 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3562 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3563 (implicit_decl_warning): When issuing warnings for implicit
3564 declarations, attempt to provide a suggestion via
3566 (undeclared_variable): Likewise when issuing errors.
3567 (lookup_name_in_scope): Likewise.
3568 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3569 (best_macro_match): New typedef.
3570 (find_closest_macro_cpp_cb): New function.
3571 (lookup_name_fuzzy): New function.
3572 * c-parser.c: Include gcc-rich-location.h.
3573 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3574 (c_keyword_starts_typename): ...this new function.
3575 (c_parser_declaration_or_fndef): When issuing errors about
3576 missing "struct" etc, add a fixit. For other kinds of errors,
3577 attempt to provide a suggestion via lookup_name_fuzzy.
3578 (c_parser_parms_declarator): When looking ahead to detect typos in
3579 type names, also reject CPP_KEYWORD.
3580 (c_parser_parameter_declaration): When issuing errors about
3581 unknown type names, attempt to provide a suggestion via
3583 * c-tree.h (c_keyword_starts_typename): New prototype.
3585 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3588 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3589 c_common_type returns error_mark_node.
3591 2016-06-19 Martin Sebor <msebor@redhat.com>
3594 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3595 __alignof__ (expression).
3597 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3599 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3601 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3603 * c-typeck.c (build_component_ref): Simplify fixit code by
3604 using gcc_rich_location::add_fixit_misspelled_id.
3605 (set_init_label): Likewise.
3607 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3609 * c-parser.c (c_parser_initelt): Provide location of name for new
3610 location_t param of set_init_label.
3611 * c-tree.h (set_init_label): Add location_t param.
3612 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3613 param and use it when issuing error messages about unrecognized
3614 field names. Attempt to provide a fixit hint if appropriate,
3615 otherwise update the error message to provide the type name.
3617 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3620 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3623 2016-06-08 Martin Sebor <msebor@redhat.com>
3624 Jakub Jelinek <jakub@redhat.com>
3628 * c-typeck.c (convert_arguments): Don't promote last argument
3629 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3631 2016-06-08 Marek Polacek <polacek@redhat.com>
3634 * c-decl.c (grokdeclarator): Check TYPE_P.
3637 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3640 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3642 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3643 and structure element reference, capture the location of the
3644 element name token and pass it to build_component_ref.
3645 (c_parser_postfix_expression_after_primary): Likewise for
3646 structure element dereference.
3647 (c_parser_omp_variable_list): Likewise for
3648 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3649 * c-tree.h (build_component_ref): Add location_t param.
3650 * c-typeck.c (build_component_ref): Add location_t param
3651 COMPONENT_LOC. Use it, if available, when issuing hints about
3652 mispelled member names to provide a fixit replacement hint.
3654 2016-06-06 Marek Polacek <polacek@redhat.com>
3657 * c-parser.c (c_parser_direct_declarator): Set location.
3659 2016-06-06 Marek Polacek <polacek@redhat.com>
3661 * c-typeck.c (comptypes_internal): Handle comparisons of
3662 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3663 TYPE_REF_CAN_ALIAS_ALL.
3665 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3667 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3668 arguments as addressable when async clause exists.
3670 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3673 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3674 when combined with target construct.
3676 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3678 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3679 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3681 2016-05-25 Marek Polacek <polacek@redhat.com>
3684 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3687 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3689 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3691 * c-parser.c (c_parser_oacc_declare): Add support for
3692 GOMP_MAP_FIRSTPRIVATE_POINTER.
3693 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3694 argument with enum c_omp_region_type ort.
3695 (handle_omp_array_sections): Likewise. Update call to
3696 handle_omp_array_sections_1.
3697 (c_finish_omp_clauses): Add specific errors and warning messages for
3698 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3699 call to handle_omp_array_sections.
3701 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3703 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3705 2016-05-24 Richard Biener <rguenther@suse.de>
3709 * c-typeck.c (build_array_ref): Do not complain about indexing
3710 non-lvalue vectors. Adjust for function name change.
3712 2016-05-20 Martin Sebor <msebor@redhat.com>
3715 * c-typeck.c (error_init): Use
3716 expansion_point_location_if_in_system_header.
3717 (warning_init): Same.
3719 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3722 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3724 (c_parser_postfix_expression): Likewise.
3725 * c-tree.h (c_expr::set_error): New method.
3726 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3727 that result's range is initialized.
3729 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3731 * c-typeck.c (parser_build_unary_op): Fix formatting.
3733 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3735 * c-decl.c (grokdeclarator): Remove errmsg and use of
3736 targetm.invalid_return_type.
3737 (grokparms): Remove errmsg and use of
3738 targetm.invalid_parameter_type.
3740 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3742 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3743 function return type.
3745 2016-05-12 Marek Polacek <polacek@redhat.com>
3748 * c-decl.c (build_compound_literal): Pass LOC down to
3749 c_incomplete_type_error.
3750 * c-tree.h (require_complete_type): Adjust declaration.
3751 (c_incomplete_type_error): Likewise.
3752 * c-typeck.c (require_complete_type): Add location parameter, pass it
3753 down to c_incomplete_type_error.
3754 (c_incomplete_type_error): Add location parameter, pass it down to
3756 (build_component_ref): Pass location down to c_incomplete_type_error.
3757 (default_conversion): Pass location down to require_complete_type.
3758 (build_array_ref): Likewise.
3759 (build_function_call_vec): Likewise.
3760 (convert_arguments): Likewise.
3761 (build_unary_op): Likewise.
3762 (build_c_cast): Likewise.
3763 (build_modify_expr): Likewise.
3764 (convert_for_assignment): Likewise.
3765 (c_finish_omp_clauses): Likewise.
3767 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3770 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3772 * c-errors.c (pedwarn_c90): Return true if warned.
3773 * c-tree.h (pedwarn_c90): Change return type to bool.
3774 (enum c_declspec_word): Add new enumerator cdw_atomic.
3776 2016-05-11 Marek Polacek <polacek@redhat.com>
3779 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3780 diagnose_mismatched_attributes and call it.
3782 2016-05-10 Marek Polacek <polacek@redhat.com>
3785 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3786 on a declaration following the definition.
3788 2016-05-05 Jakub Jelinek <jakub@redhat.com>
3790 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3791 parse it through to c_parser_c99_block_statement.
3792 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3795 2016-05-04 Marek Polacek <polacek@redhat.com>
3797 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3800 2016-05-04 Marek Polacek <polacek@redhat.com>
3803 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3804 for macro expansions.
3806 2016-05-03 Marek Polacek <polacek@redhat.com>
3809 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3810 check_builtin_function_arguments.
3812 2016-05-03 Richard Biener <rguenther@suse.de>
3814 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3815 the checksum from the previous stage.
3817 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3819 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3820 c_finish_omp_clauses.
3821 (c_parser_omp_all_clauses): Likewise.
3822 (c_parser_oacc_cache): Likewise.
3823 (c_parser_oacc_loop): Likewise.
3824 (omp_split_clauses): Likewise.
3825 (c_parser_omp_declare_target): Likewise.
3826 (c_parser_cilk_all_clauses): Likewise.
3827 (c_parser_cilk_for): Likewise.
3828 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3829 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3831 2016-05-02 Marek Polacek <polacek@redhat.com>
3834 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3837 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3840 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3841 OACC_LOOP_CLAUSE_MASK.
3842 (c_parser_oacc_kernels_parallel): Update call to
3843 c_oacc_split_loop_clauses.
3845 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
3847 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3848 argument to build_modify_expr in two cases.
3850 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3852 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3853 warn_for_memset instead of warning directly here.
3855 2016-04-26 Marek Polacek <polacek@redhat.com>
3858 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3860 (c_parser_for_statement): ... here.
3861 (c_parser_if_statement): Use it.
3862 (c_parser_switch_statement): Use it.
3863 (c_parser_while_statement): Use it.
3866 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3868 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3871 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3872 instead of c_finish_cilk_clauses.
3873 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3874 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3875 floating-point variables in the linear clause for Cilk Plus.
3877 2016-04-18 Michael Matz <matz@suse.de>
3879 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3880 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3882 2016-04-15 Marek Polacek <polacek@redhat.com>
3885 * c-typeck.c (build_unary_op): Pass location down to error and
3888 2016-04-15 Jakub Jelinek <jakub@redhat.com>
3891 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3893 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3894 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3895 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3896 Adjust c_parser_pragma callers.
3897 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3899 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3901 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3902 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3903 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3904 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3905 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3906 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3907 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3908 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3910 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3911 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3914 2016-04-13 Marek Polacek <polacek@redhat.com>
3917 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3919 (c_parser_statement): Likewise.
3920 (c_parser_c99_block_statement): Likewise.
3921 (c_parser_while_statement): Likewise.
3922 (c_parser_for_statement): Likewise.
3923 (c_parser_if_body): Don't set IF_P here.
3924 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3925 about dangling else here.
3926 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3927 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3928 warn about dangling else here.
3930 2016-04-04 Marek Polacek <polacek@redhat.com>
3933 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3935 2016-03-31 Marek Polacek <polacek@redhat.com>
3938 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3940 2016-03-18 David Malcolm <dmalcolm@redhat.com>
3943 * c-parser.c (c_parser_postfix_expression): Set the source range
3944 for uses of "__builtin_types_compatible_p".
3946 2016-03-17 Jakub Jelinek <jakub@redhat.com>
3949 * c-typeck.c (composite_type): Don't count void_list_node
3950 into len, if the list is terminated by void_list_node, start
3951 with void_list_node instead of NULL for newargs. Stop
3954 2016-03-16 Marek Polacek <polacek@redhat.com>
3957 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3958 nested functions returning VM types.
3960 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3962 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3963 when calling c_finish_omp_clauses.
3965 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3968 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3971 2016-03-04 Marek Polacek <polacek@redhat.com>
3974 * c-parser.c (c_parser_postfix_expression): Call
3975 c_parser_cast_expression rather than c_parser_postfix_expression.
3977 2016-03-01 Jakub Jelinek <jakub@redhat.com>
3981 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3982 of incomplete decls to error_mark_node.
3984 2016-02-24 Marek Polacek <polacek@redhat.com>
3987 * c-decl.c (finish_decl): Don't update the copy of the type of a
3988 different decl type.
3990 2016-02-23 Jakub Jelinek <jakub@redhat.com>
3993 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3994 in id_kind reclassification.
3996 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3999 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4001 2016-02-16 James Norris <jnorris@codesourcery.com>
4004 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4006 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4008 * c-decl.c (build_null_declspecs): Zero the entire struct.
4011 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4012 callers changed. If nested_p is true, use it to call
4013 finish_implicit_inits.
4014 * c-tree.h (finish_implicit_inits): Declare.
4015 * c-typeck.c (finish_implicit_inits): New function. Move code
4017 (push_init_level): ... here.
4018 (set_designator, process_init_element): Call finish_implicit_inits.
4020 2016-02-11 Jakub Jelinek <jakub@redhat.com>
4023 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4024 arguments for -Waddress warning.
4026 2016-02-04 Jakub Jelinek <jakub@redhat.com>
4029 * c-decl.c (finish_enum): When honoring mode attribute,
4030 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4032 2016-01-29 Jakub Jelinek <jakub@redhat.com>
4035 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4036 all type variants, not just TYPE_MAIN_VARIANT.
4038 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4041 * c-decl.c (c_write_global_declarations_1): Warn with
4042 warn_unused_function if static prototype without definition
4045 2016-01-27 Marek Polacek <polacek@redhat.com>
4048 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4049 to unsigned, if needed. Add -Wsign-compare warning.
4051 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4053 PR tree-optimization/69483
4054 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4056 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4059 * c-tree.h (incomplete_record_decls): Declare.
4060 * c-parser.c (incomplete_record_decls): Define.
4061 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4062 report error if any decl has zero size.
4063 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4064 or enum type to incomplete_record_decls.
4066 2016-01-14 Tom de Vries <tom@codesourcery.com>
4068 PR tree-optimization/68773
4069 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4072 2016-01-14 Marek Polacek <polacek@redhat.com>
4075 * c-decl.c (grokdeclarator): Provide more information for invalid
4078 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4080 * c-parser.c (c_parser_unary_expression): For dereferences, build
4081 a combined location before calling build_indirect_ref, so that
4082 error reports cover the full range, manually updating the c_expr
4085 2016-01-06 Marek Polacek <polacek@redhat.com>
4088 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4089 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4092 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4094 Update copyright years.
4096 2016-01-04 Marek Polacek <polacek@redhat.com>
4099 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4100 optimization to use __atomic_fetch_* built-in if possible.
4102 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4104 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4106 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4109 2015-12-22 Marek Polacek <polacek@redhat.com>
4112 * c-typeck.c (build_component_ref): Warn when acessing elements of
4113 atomic structures or unions.
4115 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4117 * c-typeck.c: Include "gcc-rich-location.h".
4118 (build_binary_op): In the two places that call binary_op_error,
4119 create a gcc_rich_location and populate it with the location of
4120 the binary op and its two operands.
4122 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4124 * c-parser.c (c_parser_statement_after_labels): When calling
4125 c_finish_return, Use the return expression's location if it has
4126 one, falling back to the location of the first token within it.
4127 * c-typeck.c (c_finish_return): When issuing warnings about
4128 the incorrect presence/absence of a return value, issue a note
4129 showing the declaration of the function.
4131 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4133 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4135 (c_parser_peek_nth_token): New function.
4136 (c_parser_peek_conflict_marker): New function.
4137 (c_parser_error): Detect conflict markers and report them as such.
4139 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4141 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4142 to preserve range information for the primary expression
4143 in the call to c_parser_postfix_expression_after_primary.
4145 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4147 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4148 expression location, falling back on the first token location,
4149 rather than always using the latter.
4151 2015-12-16 Marek Polacek <polacek@redhat.com>
4154 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4157 2015-12-15 Marek Polacek <polacek@redhat.com>
4160 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4163 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4165 * c-parser.c (c_parser_alignof_expression): Capture location of
4166 closing parenthesis (if any), or of end of unary expression, and
4167 use it to build a src_range for the expression.
4169 2015-12-08 David Malcolm <dmalcolm@redhat.com>
4172 * c-parser.c (c_parser_get_builtin_args): Add
4173 "out_close_paren_loc" param, and write back to it.
4174 (c_parser_postfix_expression): Capture the closing
4175 parenthesis location for RID_CHOOSE_EXPR,
4176 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4177 RID_BUILTIN_SHUFFLE and use it to set the source range
4178 for such expressions; within RID_BUILTIN_COMPLEX set
4179 the underlying location.
4181 2015-12-07 Marek Polacek <polacek@redhat.com>
4184 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4185 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4187 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4189 * c-tree.h (c_build_va_arg): Adjust prototype.
4190 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4191 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4192 parameter, adjust throughout and issue an error if EXPR is a component
4193 with reverse storage order.
4195 2015-12-02 Jason Merrill <jason@redhat.com>
4197 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4198 (c_fully_fold_internal, decl_constant_value_for_optimization):
4199 Move from c-common.c.
4200 * c-tree.h: Declare decl_constant_value_for_optimization.
4201 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4203 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4206 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4207 following link from declarator to next declarator. Track original
4208 qualified type and pass it to c_build_qualified_type.
4209 * c-typeck.c (c_build_qualified_type): Add arguments
4210 orig_qual_type and orig_qual_indirect.
4212 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4214 * c-parser.c (c_parser_omp_clause_name)
4215 (c_parser_oacc_all_clauses): Alphabetical sorting.
4217 2015-12-02 Jakub Jelinek <jakub@redhat.com>
4220 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4223 2015-12-01 Julian Brown <julian@codesourcery.com>
4224 Cesar Philippidis <cesar@codesourcery.com>
4225 James Norris <James_Norris@mentor.com>
4227 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4228 (c_parser_oacc_clause_use_device): New function.
4229 (c_parser_oacc_all_clauses): Add use_device support.
4230 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4231 (c_parser_oacc_host_data): New function.
4232 (c_parser_omp_construct): Add host_data support.
4233 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4234 * c-typeck.c (c_finish_oacc_host_data): New function.
4235 (c_finish_omp_clauses): Add use_device support.
4237 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4240 * c-decl.c: Set TYPE_PACKED in variants.
4242 2015-11-27 Martin Liska <mliska@suse.cz>
4245 * c-array-notation.c (fix_builtin_array_notation_fn):
4246 Use release_vec_vec instead of vec::release.
4247 (build_array_notation_expr): Likewise.
4248 (fix_conditional_array_notations_1): Likewise.
4249 (fix_array_notation_expr): Likewise.
4250 (fix_array_notation_call_expr): Likewise.
4252 2015-11-27 Jakub Jelinek <jakub@redhat.com>
4255 * c-parser.c (c_parser_compound_statement_nostart): If
4256 last_label is true, use pragma_stmt instead of pragma_compound
4257 as second c_parser_pragma argument.
4258 (c_parser_omp_ordered, c_parser_omp_target_update,
4259 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4260 false as second argument to c_parser_skip_to_pragma_eol after
4261 diagnosing standalone directives used in pragma_stmt context.
4263 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4265 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4266 with "if (ENABLE_OFFLOADING)".
4268 2015-11-23 David Malcolm <dmalcolm@redhat.com>
4271 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4272 for various Objective-C constructs: Class.name syntax,
4273 @selector(), @protocol(), @encode(), and [] message syntax.
4275 2015-11-20 David Malcolm <dmalcolm@redhat.com>
4278 * c-typeck.c (should_suggest_deref_p): New function.
4279 (build_component_ref): Special-case POINTER_TYPE when
4280 generating a "not a structure of union" error message, and
4281 suggest a "->" rather than a ".", providing a fix-it hint.
4283 2015-11-19 David Malcolm <dmalcolm@redhat.com>
4285 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4286 candidate into a new function, find_closest_identifier.
4288 2015-11-19 Marek Polacek <polacek@redhat.com>
4291 * c-typeck.c (parser_build_binary_op): Properly handle
4292 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4294 2015-11-17 David Malcolm <dmalcolm@redhat.com>
4296 * c-parser.c (set_c_expr_source_range): Bulletproof both
4297 overloaded implementations against NULL expr->value.
4298 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4300 (c_parser_unary_expression): Likewise when handling addresses of
4302 (c_parser_postfix_expression): Likewise for statement expressions,
4303 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4304 __builtin_va_arg, and for __builtin_offset_of.
4305 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4306 src_range using the range of the braced initializer.
4307 (c_parser_transaction_expression): Set src_range for "ret" to a
4308 sane pair of values.
4310 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4312 * c-parser.c (c_finish_omp_declare_simd): Look for
4313 "simd" attribute as well. Update error message.
4315 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4317 * c-parser.c (c_parser_omp_declare_target): Adjust.
4319 2015-11-14 Jakub Jelinek <jakub@redhat.com>
4321 * c-typeck.c (c_finish_omp_clauses): Don't mark
4322 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4324 2015-11-14 Marek Polacek <polacek@redhat.com>
4326 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4327 * c-typeck.c: Likewise.
4329 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4331 * c-decl.c (warn_defaults_to): Pass line_table to
4333 * c-errors.c (pedwarn_c99): Likewise.
4334 (pedwarn_c90): Likewise.
4335 * c-parser.c (set_c_expr_source_range): New functions.
4336 (c_token::get_range): New method.
4337 (c_token::get_finish): New method.
4338 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4339 based on the range from the start of the LHS to the end of the
4341 (c_parser_conditional_expression): Likewise, based on the range
4342 from the start of the cond.value to the end of exp2.value.
4343 (c_parser_binary_expression): Call set_c_expr_source_range on
4344 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4345 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4346 based on the cast_loc through to the end of the expr.
4347 (c_parser_unary_expression): Likewise, based on the
4348 op_loc through to the end of op.
4349 (c_parser_sizeof_expression) Likewise, based on the start of the
4350 sizeof token through to either the closing paren or the end of
4352 (c_parser_postfix_expression): Likewise, using the token range,
4353 or from the open paren through to the close paren for
4354 parenthesized expressions.
4355 (c_parser_postfix_expression_after_primary): Likewise, for
4356 various kinds of expression.
4357 * c-tree.h (struct c_expr): Add field "src_range".
4358 (c_expr::get_start): New method.
4359 (c_expr::get_finish): New method.
4360 (set_c_expr_source_range): New decls.
4361 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4362 on ret for prefix unary ops.
4363 (parser_build_binary_op): Likewise, running from the start of
4364 arg1.value through to the end of arg2.value.
4366 2015-11-13 Marek Polacek <polacek@redhat.com>
4369 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4371 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4373 * c-typeck.c: Include spellcheck.h.
4374 (lookup_field_fuzzy_find_candidates): New function.
4375 (lookup_field_fuzzy): New function.
4376 (build_component_ref): If the field was not found, try using
4377 lookup_field_fuzzy and potentially offer a suggestion.
4379 2015-11-12 James Norris <jnorris@codesourcery.com>
4380 Joseph Myers <joseph@codesourcery.com>
4382 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4383 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4384 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4385 and PRAGMA_OMP_CLAUSE_LINK.
4386 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4387 and PRAGMA_OACC_CLAUSE_LINK.
4388 (OACC_DECLARE_CLAUSE_MASK): New definition.
4389 (c_parser_oacc_declare): New function.
4391 2015-11-12 Marek Polacek <polacek@redhat.com>
4394 * c-parser.c (c_parser_for_statement): Reclassify the token in
4397 2015-11-11 Marek Polacek <polacek@redhat.com>
4401 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4402 checking the size of an array.
4404 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4406 * c-array-notation.c: Remove unused header files.
4407 * c-aux-info.c: Likewise.
4408 * c-convert.c: Likewise.
4409 * c-decl.c: Likewise.
4410 * c-errors.c: Likewise.
4411 * c-lang.c: Likewise.
4412 * c-objc-common.c: Likewise.
4413 * c-parser.c: Likewise.
4414 * c-typeck.c: Likewise.
4415 * gccspec.c: Likewise.
4417 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4418 Cesar Philippidis <cesar@codesourcery.com>
4419 James Norris <jnorris@codesourcery.com>
4420 Julian Brown <julian@codesourcery.com>
4421 Nathan Sidwell <nathan@codesourcery.com>
4423 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4425 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4426 (c_parser_pragma): Parse 'acc routine'.
4427 (OACC_ROUTINE_CLAUSE_MARK): Define.
4428 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4430 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4433 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4434 location of the backward-goto to the start of the loop body.
4436 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4439 * c-parser.c (c_parser_while_statement): Finish the loop before
4440 parsing ahead for misleading indentation.
4441 (c_parser_for_statement): Likewise.
4443 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4445 * c-decl.c (finish_struct): If the structure has reverse storage
4446 order, rewrite the type of array fields with scalar component. Call
4447 maybe_apply_pragma_scalar_storage_order on entry.
4448 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4449 errors on bit-fields and reverse SSO here and not...
4450 (c_mark_addressable): ...here.
4451 (output_init_element): Adjust call to initializer_constant_valid_p.
4452 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4454 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4456 * c-decl.c (warn_defaults_to): Update for change in signature
4457 of diagnostic_set_info.
4458 * c-errors.c (pedwarn_c99): Likewise.
4459 (pedwarn_c90): Likewise.
4460 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4461 for textinfo::set_location.
4463 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4464 Thomas Schwinge <thomas@codesourcery.com>
4465 James Norris <jnorris@codesourcery.com>
4467 * c-parser.c (c_parser_omp_clause_name): Add support for
4468 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4469 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4470 default(none) in OpenACC.
4471 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4473 (c_parser_oacc_clause_tile): New function.
4474 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4475 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4476 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4478 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4479 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4481 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4482 (c_parser_oacc_update): Update the error message for missing clauses.
4483 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4484 and OMP_CLAUSE_INDEPENDENT.
4486 2015-11-05 Marek Polacek <polacek@redhat.com>
4489 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4490 deal with pre-evaluation on invalid types.
4492 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4493 Ilya Verbin <ilya.verbin@intel.com>
4495 * c-parser.c: Include context.h and gimple-expr.h.
4496 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4497 monotonic together with nonmonotonic.
4498 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4499 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4500 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4501 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4502 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4503 expressions on combined target teams before the target.
4504 (c_parser_omp_declare_target): If decl has "omp declare target" or
4505 "omp declare target link" attribute, and cgraph or varpool node already
4506 exists, then set corresponding flags. Call c_finish_omp_clauses
4507 in the parenthesized extended-list syntax case.
4508 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4510 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4511 on OMP_CLAUSE_REDUCTION array sections.
4512 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4513 into the constant offset, or for variable low-bound using
4514 POINTER_PLUS_EXPR. For structure element based array sections use
4515 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4516 (c_finish_omp_clauses): Drop generic_field_head, structure
4517 elements are now always mapped even as array section bases,
4518 diagnose same var in data sharing and mapping clauses. Diagnose if
4519 linear step on declare simd is neither a constant nor a uniform
4520 parameter. Look through POINTER_PLUS_EXPR for array section
4521 reductions. Diagnose the same var or function appearing multiple
4522 times on the same directive. Fix up wording for the to clause if t
4523 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4524 modifier on kinds other than dynamic or guided or nonmonotonic
4525 modifier together with ordered clause.
4527 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4528 Chung-Lin Tang <cltang@codesourcery.com>
4530 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4532 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4534 * c-array-notation.c: Reorder #include's and remove duplicates.
4535 * c-aux-info.c: Likewise.
4536 * c-convert.c: Likewise.
4537 * c-decl.c: Likewise.
4538 * c-errors.c: Likewise.
4539 * c-lang.c: Likewise.
4540 * c-objc-common.c: Likewise.
4541 * c-parser.c: Likewise.
4542 * c-typeck.c: Likewise.
4544 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4547 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4548 after calling build_qualified_type.
4550 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4551 Thomas Schwinge <thomas@codesourcery.com>
4552 James Norris <jnorris@codesourcery.com>
4553 Joseph Myers <joseph@codesourcery.com>
4554 Julian Brown <julian@codesourcery.com>
4555 Bernd Schmidt <bschmidt@redhat.com>
4557 * c-parser.c (c_parser_oacc_shape_clause): New.
4558 (c_parser_oacc_simple_clause): New.
4559 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4560 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4562 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4563 James Norris <jnorris@codesourcery.com>
4564 Cesar Philippidis <cesar@codesourcery.com>
4568 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4569 parameters, and handle these. Adjust all users.
4570 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4572 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4574 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4576 (c_finish_omp_construct): Declare function.
4577 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4578 Merge functions into...
4579 (c_finish_omp_construct): ... this new function.
4581 2015-10-22 Richard Biener <rguenther@suse.de>
4583 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4584 before folding a MINUS_EXPR.
4586 2015-10-21 Marek Polacek <polacek@redhat.com>
4589 * c-decl.c (start_function): Warn about vararg functions without
4592 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4594 * c-typeck.c (build_conditional_expr): Use boolean vector
4595 type for vector comparison.
4596 (build_vec_cmp): New.
4597 (build_binary_op): Use build_vec_cmp for comparison.
4599 2015-10-20 Marek Polacek <polacek@redhat.com>
4601 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4603 2015-10-20 Marek Polacek <polacek@redhat.com>
4606 * c-parser.c (c_parser_attributes): Break out of the loop if the
4607 token after an attribute isn't a comma.
4609 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4610 Aldy Hernandez <aldyh@redhat.com>
4612 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4613 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4614 (c_parser_omp_variable_list): Handle structure elements for
4615 map, to and from clauses. Handle array sections in reduction
4616 clause. Formatting fixes.
4617 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4618 if clause modifiers.
4619 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4620 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4621 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4622 c_parser_omp_clause_is_device_ptr): New functions.
4623 (c_parser_omp_clause_ordered): Parse optional parameter.
4624 (c_parser_omp_clause_reduction): Handle array reductions.
4625 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4626 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4628 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4629 (c_parser_omp_clause_depend_sink): New function.
4630 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4631 (c_parser_omp_clause_map): Parse release/delete map kinds and
4632 optional always modifier.
4633 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4634 and c_finish_omp_clauses callers.
4635 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4636 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4637 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4638 (OMP_CRITICAL_CLAUSE_MASK): Define.
4639 (c_parser_omp_critical): Parse critical clauses.
4640 (c_parser_omp_for_loop): Handle doacross loops, adjust
4641 c_finish_omp_for and c_finish_omp_clauses callers.
4642 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4643 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4644 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4645 (c_parser_omp_for): Disallow ordered clause when combined with
4646 distribute. Disallow linear clause when combined with distribute
4647 and not combined with simd.
4648 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4649 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4650 parse clauses and if depend clause is found, don't parse a body.
4651 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4652 Allow target parallel without for after it.
4653 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4654 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4655 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4657 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4658 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4659 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4660 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4662 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4663 defaultmap and is_device_ptr clauses.
4664 (c_parser_omp_target): Parse target parallel and target simd. Set
4665 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4666 and target exit data. Diagnose invalid map kinds.
4667 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4668 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4670 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4672 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4673 (c_parser_omp_taskloop): New function.
4674 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4675 handle PRAGMA_OMP_TASKLOOP.
4676 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4677 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4678 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4679 Add IS_OMP argument, handle structure element bases, diagnose
4680 bitfields, pass IS_OMP recursively, diagnose known zero length
4681 array sections in depend clauses, handle array sections in reduction
4682 clause, diagnose negative length even for pointers.
4683 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4684 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4685 array sections in reduction clause, set
4686 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4687 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4688 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4689 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4691 2015-10-06 Marek Polacek <polacek@redhat.com>
4693 * c-parser.c (c_parser_statement_after_labels): Use
4694 protected_set_expr_location.
4695 (c_parser_omp_clause_num_gangs): Likewise.
4696 (c_parser_omp_clause_num_threads): Likewise.
4697 (c_parser_omp_clause_num_workers): Likewise.
4698 (c_parser_omp_clause_vector_length): Likewise.
4699 (c_parser_omp_clause_num_teams): Likewise.
4700 (c_parser_omp_clause_thread_limit): Likewise.
4701 * c-typeck.c (build_c_cast): Likewise.
4702 (c_cast_expr): Likewise.
4704 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4706 * c-typeck.c (c_tree_equal): Use real_equal instead of
4709 2015-10-04 Jason Merrill <jason@redhat.com>
4711 * c-parser.c (c_lex_one_token): Handle @synchronized.
4712 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4713 can change whether the function is transaction_safe.
4715 2015-10-02 Marek Polacek <polacek@redhat.com>
4718 * c-typeck.c (convert_for_assignment): Use the expansion point
4719 location throughout.
4721 2015-10-02 Marek Polacek <polacek@redhat.com>
4724 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4725 and pass it down to c_parser_if_statement.
4726 (c_parser_else_body): Add CHAIN parameter and pass it down to
4727 c_parser_statement_after_labels.
4728 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4729 duplicated if-else-if conditions.
4731 2015-10-01 Marek Polacek <polacek@redhat.com>
4733 * c-typeck.c (convert_for_assignment): Improve commentary.
4735 2015-09-30 Marek Polacek <polacek@redhat.com>
4738 * c-typeck.c (c_finish_return): Use the expansion point location for
4739 certain "return with value" warnings.
4741 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4743 * c-parser.c (pragma_lex): Add loc argument.
4745 2015-09-15 Marek Polacek <polacek@redhat.com>
4748 * c-decl.c (tag_exists_p): New function.
4749 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4750 struct/union/enum keywords are missing.
4751 * c-tree.h (tag_exists_p): Declare.
4753 2015-09-15 Marek Polacek <polacek@redhat.com>
4755 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4756 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4757 Return NULL_TREE instead of 0.
4758 (lookup_name): Return NULL_TREE instead of 0.
4759 (lookup_name_in_scope): Likewise.
4760 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4761 (parser_xref_tag): Use false instead of 0.
4762 (start_struct): Use true instead of 1.
4763 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4765 2015-09-14 Marek Polacek <polacek@redhat.com>
4767 * c-typeck.c (set_nonincremental_init_from_string): Use
4768 HOST_WIDE_INT_M1U when shifting a negative value.
4770 2015-09-09 Mark Wielaard <mjw@redhat.com>
4772 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4775 2015-09-10 Jakub Jelinek <jakub@redhat.com>
4778 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4779 into OMP_FOR_PRE_BODY rather than before the loop.
4781 2015-09-09 Jakub Jelinek <jakub@redhat.com>
4784 * c-parser.c (c_parser_oacc_all_clauses,
4785 c_parser_omp_all_clauses): Remove invalid clause from
4786 list of clauses even if parser->error is set.
4789 * c-parser.c (c_parser_omp_clause_aligned,
4790 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4792 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4796 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4797 instead of c_parser_unary_expression. If the result is !lvalue_p,
4798 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4800 2015-09-04 Marek Polacek <polacek@redhat.com>
4803 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4805 2015-09-03 Martin Sebor <msebor@redhat.com>
4808 * c-typeck.c (convert_arguments, parser_build_unary_op,
4809 build_conditional_expr, c_cast_expr, convert_for_assignment,
4810 build_binary_op, _objc_common_truthvalue_conversion): Call
4812 (c_decl_implicit): Define.
4814 2015-09-02 Marek Polacek <polacek@redhat.com>
4817 * c-parser.c (c_parser_enum_specifier): Give a better error for
4820 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4822 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4824 2015-08-12 Marek Polacek <polacek@redhat.com>
4826 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4829 2015-08-03 Marek Polacek <polacek@redhat.com>
4832 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4834 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4836 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4838 * c-parser.c (c_parser_if_body): Take token_indent_info
4839 argument. Call warn_for_misleading_indentation even when the
4840 body is a semicolon. Extract token_indent_infos corresponding
4841 to the guard, body and next tokens. Adjust call to
4842 warn_for_misleading_indentation accordingly.
4843 (c_parser_else_body): Likewise.
4844 (c_parser_if_statement): Likewise.
4845 (c_parser_while_statement): Likewise.
4846 (c_parser_for_statement): Likewise.
4848 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4849 Manuel López-Ibáñez <manu@gcc.gnu.org>
4851 * c-decl.c (get_parm_info): Remove static var. Update warning
4854 2015-07-27 Marek Polacek <polacek@redhat.com>
4858 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4860 2015-07-20 Marek Polacek <polacek@redhat.com>
4863 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4864 (build_binary_op): Warn about left shift overflows.
4866 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4868 * c-array-notation.c: Adjust includes for flags.h changes.
4869 * c-objc-common.c: Likewise.
4871 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4873 * c-array-notation.c: Adjust includes.
4874 * c-aux-info.c: Likewise.
4875 * c-convert.c: Likewise.
4876 * c-decl.c: Likewise.
4877 * c-errors.c: Likewise.
4878 * c-lang.c: Likewise.
4879 * c-objc-common.c: Likewise.
4880 * c-parser.c: Likewise.
4881 * c-typeck.c: Likewise.
4883 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4886 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4888 2015-06-29 Marek Polacek <polacek@redhat.com>
4891 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4892 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4893 about -Wswitch-bool here.
4894 (do_case): Update c_add_case_label call.
4895 (c_finish_case): Update c_do_switch_warnings call.
4897 2015-06-27 Marek Polacek <polacek@redhat.com>
4899 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4901 2015-06-26 Marek Polacek <polacek@redhat.com>
4903 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4905 * c-typeck.c (array_to_pointer_conversion): Likewise.
4906 (build_unary_op): Likewise.
4907 (c_finish_return): Likewise.
4909 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4911 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4912 * c-parser.c: Likewise.
4914 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4916 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4917 instead of pointer_hash.
4918 (detect_field_duplicates): Likewise.
4920 2015-06-25 Marek Polacek <polacek@redhat.com>
4922 * c-array-notation.c: Use VAR_P throughout.
4923 * c-decl.c: Likewise.
4924 * c-objc-common.c: Likewise.
4925 * c-parser.c: Likewise.
4926 * c-typeck.c: Likewise.
4928 2015-06-25 Marek Polacek <polacek@redhat.com>
4930 * c-decl.c: Use is_global_var throughout.
4931 * c-parser.c: Likewise.
4932 * c-typeck.c: Likewise.
4934 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4936 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4937 * c-aux-info.c: Likewise.
4938 * c-convert.c: Likewise.
4939 * c-decl.c: Likewise.
4940 * c-errors.c: Likewise.
4941 * c-lang.c: Likewise.
4942 * c-objc-common.c: Likewise.
4943 * c-parser.c: Likewise.
4944 * c-typeck.c: Likewise.
4946 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
4949 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4952 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4954 * c-decl.c (pop_scope): Register the main translation unit
4955 through the new debug hook.
4957 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4959 * c-array-notation.c : Adjust include files.
4960 * c-aux-info.c : Likewise.
4961 * c-convert.c : Likewise.
4962 * c-decl.c : Likewise.
4963 * c-errors.c : Likewise.
4964 * c-lang.c : Likewise.
4965 * c-lang.h : Likewise.
4966 * c-objc-common.c : Likewise.
4967 * c-parser.c : Likewise.
4968 * c-typeck.c : Likewise.
4970 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4972 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4973 immediately clobber it.
4974 (c_write_global_declarations_1): Remove call to
4975 check_global_declaration_1.
4976 (c_write_global_declarations_2): Remove.
4977 (c_write_final_cleanups): Rename from c_write_global_declarations.
4978 Remove call to finalize_compilation_unit.
4979 Remove calls to debugging hooks.
4980 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4981 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4982 * c-tree.h: Remove c_write_global_declarations.
4984 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4986 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4987 * c-aux-info.c: Likewise.
4988 * c-convert.c: Likewise.
4989 * c-decl.c: Likewise.
4990 * c-errors.c: Likewise.
4991 * c-lang.c: Likewise.
4992 * c-objc-common.c: Likewise.
4993 * c-parser.c: Likewise.
4994 * c-typeck.c: Likewise.
4996 2015-06-04 Marek Polacek <polacek@redhat.com>
4999 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5002 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5004 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5005 Warn for empty struct.
5006 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5008 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5010 * c-decl.c (start_function): Call plugin before parsing.
5011 (finish_function): Call plugin after parsing.
5013 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5016 * c-decl.c (merge_decls): Merge DECL_COMMON.
5018 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
5020 * Make-lang.in (check_gcc_pallelize): Define.
5022 2015-05-22 Marek Polacek <polacek@redhat.com>
5025 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5028 2015-05-21 Marek Polacek <polacek@redhat.com>
5030 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5033 2015-05-20 Marek Polacek <polacek@redhat.com>
5035 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5036 * c-typeck.c: Likewise.
5038 2015-05-19 Marek Polacek <polacek@redhat.com>
5040 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5042 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5045 * c-parser.c (c_parser_omp_for_loop): Don't add
5046 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5047 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5048 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5051 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5053 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5056 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5059 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5062 2015-05-14 Marek Polacek <polacek@redhat.com>
5066 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5069 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5071 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5072 to add a call to warn_for_misleading_indentation.
5073 (c_parser_else_body): Likewise, adding param "else_loc".
5074 (c_parser_if_statement): Check for misleading indentation.
5075 (c_parser_while_statement): Likewise.
5076 (c_parser_for_statement): Likewise.
5078 2015-05-08 Marek Polacek <polacek@redhat.com>
5081 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5082 (output_init_element): Likewise.
5084 2015-05-07 Marek Polacek <polacek@redhat.com>
5087 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5090 2015-04-30 Marek Polacek <polacek@redhat.com>
5092 * c-typeck.c (set_init_label): Call error_at instead of error and
5095 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5098 * c-typeck.c (c_build_va_arg): Clarify the error message.
5100 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5102 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5103 OMP_STANDALONE_CLAUSES.
5105 2015-04-28 Marek Polacek <polacek@redhat.com>
5107 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5109 2015-04-28 Marek Polacek <polacek@redhat.com>
5112 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5114 2015-04-25 Marek Polacek <polacek@redhat.com>
5117 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5120 2015-04-23 Marek Polacek <polacek@redhat.com>
5123 * c-decl.c (set_labels_context_r): New function.
5124 (store_parm_decls): Call it via walk_tree_without_duplicates.
5125 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5126 instead of create_tmp_var. Build TARGET_EXPR instead of
5128 (build_atomic_assign): Use create_tmp_var_raw instead of
5129 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5131 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5133 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5134 (c_parser_omp_target_update): Add missed %> to error_at ().
5136 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5139 * c-decl.c (c_default_pointer_mode): Remove definition.
5140 * c-tree.h (c_default_pointer_mode): Remove declaration.
5142 2015-03-27 Tobias Burnus <burnus@net-b.de>
5145 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5147 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5148 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5149 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5151 2015-03-19 Jakub Jelinek <jakub@redhat.com>
5153 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5154 attribute for DECL_EXTERNAL VAR_DECLs.
5156 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5158 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5161 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5164 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5165 before preparing arguments to warn_logical_not_parentheses.
5167 2015-03-09 Jakub Jelinek <jakub@redhat.com>
5170 * c-typeck.c (parser_build_binary_op): Don't warn for
5171 !!x == y or !b == y where b is _Bool.
5173 2015-03-09 Marek Polacek <polacek@redhat.com>
5175 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5176 * c-decl.c (grokdeclarator): Likewise.
5177 * c-typeck.c (build_binary_op): Likewise.
5179 2015-02-27 Marek Polacek <polacek@redhat.com>
5182 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5184 2015-02-14 Marek Polacek <polacek@redhat.com>
5187 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5188 declared through a typedef name.
5190 2015-02-13 Marek Polacek <polacek@redhat.com>
5193 * c-decl.c (grokdeclarator): Print also the type when giving
5194 the error message about array's incomplete element type.
5196 2015-02-11 Jakub Jelinek <jakub@redhat.com>
5199 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5200 check in the POP macro.
5202 2015-02-09 Marek Polacek <polacek@redhat.com>
5205 * c-typeck.c (process_init_element): Don't always wrap
5206 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5207 initializing a range of elements.
5209 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5213 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5215 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
5217 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5218 processing enum declaration.
5220 2015-01-29 Marek Polacek <polacek@redhat.com>
5223 * c-typeck.c (pop_init_level): If constructor_elements has
5224 exactly one element with integer_zerop value, set constructor_zeroinit
5225 to 1. Remove braces around warning_init call.
5227 2015-01-27 Jakub Jelinek <jakub@redhat.com>
5230 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5231 of FUNCTION_DECLs with error_mark_node.
5233 2015-01-26 Jakub Jelinek <jakub@redhat.com>
5236 * c-typeck.c (convert_arguments): Return -1 if there are
5237 error_args, even if we've diagnosed too many arguments.
5239 2015-01-21 Richard Biener <rguenther@suse.de>
5242 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5243 for builtins the user declared correctly.
5245 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5246 Bernd Schmidt <bernds@codesourcery.com>
5247 Cesar Philippidis <cesar@codesourcery.com>
5248 James Norris <jnorris@codesourcery.com>
5249 Jakub Jelinek <jakub@redhat.com>
5250 Ilmir Usmanov <i.usmanov@samsung.com>
5252 * c-parser.c: Include "gomp-constants.h".
5253 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5254 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5255 Use OMP_CLAUSE_SET_MAP_KIND.
5256 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5257 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5258 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5259 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5260 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5261 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5262 "copyout", "create", "delete", "deviceptr", "gang", "host",
5263 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5264 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5265 "present_or_create", "pcreate", "seq", "self", "vector",
5266 "vector_length", "wait", "worker".
5267 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5268 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5269 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5270 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5271 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5272 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5273 (c_parser_oacc_data_clause_deviceptr)
5274 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5275 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5276 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5277 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5278 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5279 (c_parser_oacc_parallel, c_parser_oacc_update)
5280 (c_parser_oacc_wait): New functions.
5281 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5282 (c_finish_oacc_data): New prototypes.
5283 * c-typeck.c: Include "gomp-constants.h".
5284 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5285 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5286 OMP_CLAUSE_SET_MAP_KIND.
5287 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5288 (c_finish_oacc_data): New functions.
5289 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5290 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5291 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5292 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5293 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5294 GOMP_MAP_FORCE_DEVICEPTR.
5296 2015-01-09 Michael Collison <michael.collison@linaro.org>
5298 * c-array-notation.c: Include hash-set.h, machmode.h,
5299 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5300 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5301 * c-aux-info.c: Ditto.
5302 * c-convert.c: Ditto.
5304 * c-errors.c: Ditto.
5305 * c-lang.c: Dittoxs.
5306 * c-objc-common.c: Ditto.
5307 * c-parser.c: Ditto.
5308 * c-typeck.c: Include hash-set.h, machmode.h,
5309 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5310 fold-const.h, wide-int.h, inchash.h, real.h and
5311 fixed-value.h due to flattening of tree.h.
5313 2015-01-07 Marek Polacek <polacek@redhat.com>
5316 * c-typeck.c (process_init_element): Disallow initialization of
5317 a flexible array member with a string constant if the structure
5320 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5323 * c-typeck.c (convert_for_assignment, c_finish_return): For
5324 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5325 types also set in_late_binary_op around convert call.
5326 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5327 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5328 result on expr as last argument to ubsan_instrument_float_cast,
5329 if in_late_binary_op, don't use c_save_expr but save_expr.
5331 Update copyright years.
5333 2015-01-05 Marek Polacek <polacek@redhat.com>
5336 * c-typeck.c (build_array_ref): Pass loc down to
5337 warn_array_subscript_with_type_char.
5339 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5341 * c-typeck.c: New behavious for pointers to arrays with qualifiers
5342 (common-pointer-type): For pointers to arrays take qualifiers from
5344 (build_conditional_expr): Add warnings for lost qualifiers.
5345 (comp-target-types): Allow pointers to arrays with different qualifiers.
5346 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
5347 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
5348 to PEDWARN_FOR_QUALIFIERS.
5350 2014-12-17 Jakub Jelinek <jakub@redhat.com>
5353 * c-convert.c: Include ubsan.h.
5354 (convert): For real -> integral casts and
5355 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5356 instead instrument the float cast directly.
5358 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5360 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5361 c_finish_stmt_expr): Remove NULL last argument from
5362 create_tmp_var_raw and create_tmp_var calls.
5363 * c-array-notation.c (fix_builtin_array_notation_fn,
5364 build_array_notation_expr, fix_conditional_array_notations_1,
5365 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5367 2014-11-28 Marek Polacek <polacek@redhat.com>
5370 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5371 convert the right operand to integer type.
5373 2014-11-25 Marek Polacek <polacek@redhat.com>
5376 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5377 for inline functions.
5379 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5382 * c-typeck.c (build_array_ref): Adjust
5383 convert_vector_to_pointer_for_subscript caller. If it returns true,
5384 call non_lvalue_loc on the result.
5386 2014-11-11 Richard Biener <rguenther@suse.de>
5388 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5391 2014-11-10 Andi Kleen <ak@linux.intel.com>
5394 * c-parser.c (c_parser_statement_after_labels): Call
5396 (c_parser_if_statement): Dito.
5397 (c_parser_switch_statement): Dito.
5398 (c_parser_while_statement): Dito.
5399 (c_parser_do_statement): Dito.
5400 (c_parser_for_statement): Dito.
5401 * c-typeck.c (c_finish_loop): Dito.
5403 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5405 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5406 OPT_Wshift_count_overflow in the warnings.
5408 2014-10-30 Marek Polacek <polacek@redhat.com>
5410 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5411 print the stripped version as well, if they're not the same.
5413 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5415 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5418 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5420 * c-decl.c: Adjust include files.
5421 * c-parser.c: Ditto.
5423 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5424 Tom Tromey <tromey@redhat.com>
5426 * c-tree.h (enum c_oracle_request): New.
5427 (c_binding_oracle_function): New typedef.
5428 (c_binding_oracle, c_pushtag, c_bind): Declare.
5429 * c-decl.c (c_binding_oracle): New global.
5430 (I_SYMBOL_CHECKED): New macro.
5431 (i_symbol_binding): New function.
5432 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5433 (I_TAG_CHECKED): New macro.
5434 (i_tag_binding): New function.
5435 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5436 (I_LABEL_CHECKED): New macro.
5437 (i_label_binding): New function.
5438 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5439 (c_print_identifier): Save and restore c_binding_oracle.
5440 (c_pushtag, c_bind): New functions.
5442 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5444 * c-typeck.c: Adjust include files.
5446 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5449 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5450 initialization here...
5451 (c_initialize_diagnostics): ... but here. Set defaults after
5452 building pretty-printer.
5454 2014-10-23 Marek Polacek <polacek@redhat.com>
5457 * c-decl.c (pop_scope): Don't print warning in external_scope.
5459 2014-10-19 Marek Polacek <polacek@redhat.com>
5462 * c-typeck.c (output_init_element): Allow initializing objects with
5463 static storage duration with compound literals even in C99 and add
5466 2014-10-17 Marek Polacek <polacek@redhat.com>
5469 * c-typeck.c (digest_init): Allow initializing objects with static
5470 storage duration with compound literals even in C99 and add pedwarn
5473 2014-10-17 Marek Polacek <polacek@redhat.com>
5476 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5477 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5478 error multiple times. Print the type.
5480 2014-10-17 Marek Polacek <polacek@redhat.com>
5483 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5486 2014-10-17 Marek Polacek <polacek@redhat.com>
5488 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5489 (start_function): Use OPT_Wimplicit_int instead of 0.
5490 (store_parm_decls_oldstyle): Likewise.
5492 2014-10-17 Alan Modra <amodra@gmail.com>
5495 * c-decl.c (merge_decls): Don't merge section name or tls model
5496 to newdecl symtab node, instead merge to olddecl. Override
5497 existing olddecl section name. Set tls_model for all thread-local
5498 vars, not just OMP thread-private ones. Remove incorrect comment.
5500 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5502 * c-decl.c: Adjust include files.
5504 2014-10-14 DJ Delorie <dj@redhat.com>
5506 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5507 (c_token_starts_typename): Check all __intN, not just __int128.
5508 (c_token_starts_declspecs): Likewise.
5509 (c_parser_declspecs): Likewise.
5510 (c_parser_attribute_any_word): Likewise.
5511 (c_parser_objc_selector): Likewise.
5512 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5513 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5515 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5517 (finish_declspecs): Likewise.
5519 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5521 * c-parser.c (c_parser_all_labels): New function to replace
5523 (c_parser_statement): Call the new function.
5525 2014-10-09 Marek Polacek <polacek@redhat.com>
5528 * c-typeck.c (pop_init_level): Don't warn about initializing
5531 2014-10-07 Marek Polacek <polacek@redhat.com>
5534 * c-decl.c (header_for_builtin_fn): New function.
5535 (implicitly_declare): Suggest which header to include.
5537 2014-10-07 Marek Polacek <polacek@redhat.com>
5539 * c-convert.c (convert): Use error_operand_p.
5540 * c-typeck.c (require_complete_type): Likewise.
5541 (really_atomic_lvalue): Likewise.
5542 (digest_init): Likewise.
5543 (handle_omp_array_sections_1): Likewise.
5545 2014-10-03 Marek Polacek <polacek@redhat.com>
5548 * c-decl.c (pop_scope): Don't warn about "inline function declared
5549 but never defined" for functions marked with gnu_inline attribute.
5551 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5554 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5555 on low_bound and length.
5557 2014-09-24 Marek Polacek <polacek@redhat.com>
5561 * c-parser.c: Don't define CPP_KEYWORD.
5562 (c_parser_switch_statement): Pass original type to c_finish_case.
5563 * c-tree.h (c_finish_case): Update declaration.
5564 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5565 conditionally to c_do_switch_warnings.
5567 2014-09-03 Marek Polacek <polacek@redhat.com>
5570 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5573 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5574 Balaji V. Iyer <balaji.v.iyer@intel.com>
5575 Igor Zamyatin <igor.zamyatin@intel.com>
5577 * c-parser.c (c_parser_cilk_for): New function.
5578 (c_parser_cilk_grainsize): Likewise.
5579 (c_get_temp_regvar): Likewise.
5580 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5581 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5582 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5583 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5586 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5588 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5589 with using HOST_WIDE_INT without truncation to 'int'
5591 2014-08-22 Marek Polacek <polacek@redhat.com>
5594 * c-typeck.c (parser_build_binary_op): Adjust call to
5595 warn_logical_not_parentheses.
5597 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5600 * c-parser.c (c_parser_array_notation): Check for correct
5601 type of an array added.
5603 2014-08-19 Marek Polacek <polacek@redhat.com>
5606 * c-typeck.c (build_binary_op): If either operand of a comparison
5607 is a boolean expression, call maybe_warn_bool_compare.
5609 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5612 * c-typeck.c (build_c_cast): Do a conversion even when the
5613 TYPE_MAIN_VARIANTs are the same.
5615 2014-08-19 Marek Polacek <polacek@redhat.com>
5617 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5618 pedwarn_c99 instead of pedwarn.
5619 (grokfield): Likewise.
5620 (warn_defaults_to): New function.
5621 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5622 Unconditionally call pedwarn_c99 instead of pedwarn.
5623 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5624 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5625 check flag_isoc11 before.
5626 * c-errors.c (pedwarn_c99): Change the return type to bool.
5627 Handle -Wc99-c11-compat.
5628 * c-parser.c (disable_extension_diagnostics): Handle
5629 warn_c99_c11_compat.
5630 (restore_extension_diagnostics): Likewise.
5631 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5632 instead of pedwarn, don't check flag_isoc11 before.
5633 (c_parser_declspecs): Likewise.
5634 (c_parser_alignas_specifier): Likewise.
5635 (c_parser_alignof_expression): Likewise.
5636 (c_parser_generic_selection): Likewise.
5637 * c-tree.h (pedwarn_c99): Update declaration.
5638 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5641 2014-08-19 Marek Polacek <polacek@redhat.com>
5643 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5645 * c-errors.c: Include "opts.h".
5646 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5647 * c-parser.c (disable_extension_diagnostics): Handle negative value
5648 of warn_c90_c99_compat, too.
5649 (restore_extension_diagnostics): Likewise.
5650 (c_parser_compound_statement_nostart): Pass
5651 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5653 2014-08-12 Marek Polacek <polacek@redhat.com>
5655 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5657 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5659 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5661 2014-08-10 Marek Polacek <polacek@redhat.com>
5664 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5665 Call pedwarn_c90 instead of pedwarn.
5666 (check_bitfield_type_and_width): Likewise.
5667 (declspecs_add_qual): Likewise.
5668 (declspecs_add_type): Likewise.
5669 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5670 Adjust to only call pedwarn_c90.
5671 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5672 pedwarn_c90 instead of pedwarn.
5673 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5674 * c-parser.c (disable_extension_diagnostics): Handle
5675 warn_c90_c99_compat.
5676 (restore_extension_diagnostics): Likewise.
5677 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5678 pedwarn_c90 instead of pedwarn.
5679 (c_parser_initelt): Likewise.
5680 (c_parser_postfix_expression): Likewise.
5681 (c_parser_postfix_expression_after_paren_type): Likewise.
5682 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5683 * c-tree.h: Fix formatting.
5684 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5685 pedwarn_c90 instead of pedwarn.
5687 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5689 * c-typeck.c: Remove include of pointer-set.h.
5691 2014-08-07 Marek Polacek <polacek@redhat.com>
5693 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5695 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5697 * c-typeck.c: Use hash_map instead of pointer_map.
5699 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5701 * c-decl.c: Use hash_set instead of pointer_set.
5703 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5706 * c-array-notation.c (expand_array_notations): Handling
5709 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5712 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5715 2014-07-30 Tom Tromey <tromey@redhat.com>
5717 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5719 (really_start_incremental_init, push_init_level): Initialize
5721 (pop_init_level): Set global designator_depth.
5722 (process_init_element): Check for designated_init attribute.
5724 2014-07-20 Marek Polacek <polacek@redhat.com>
5727 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5728 (implicitly_declare): Pass location to implicit_decl_warning.
5730 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5733 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5734 If non-NULL, call c_parser_check_literal_zero.
5735 (c_parser_check_literal_zero): New function.
5736 (c_parser_postfix_expression_after_primary): Adjust
5737 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5739 2014-07-06 Marek Polacek <polacek@redhat.com>
5742 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5743 * c-tree.h (C_ARRAY_PARAMETER): Define.
5744 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5747 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5748 Chen Gang <gang.chen.5i5j@gmail.com>
5750 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5753 2014-07-01 Marek Polacek <polacek@redhat.com>
5755 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5756 instead of 0 to WARN_FOR_ASSIGNMENT.
5758 2014-07-01 Marek Polacek <polacek@redhat.com>
5761 * c-typeck.c (convert_for_assignment): Pass
5762 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5764 2014-06-30 Marek Polacek <polacek@redhat.com>
5766 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5767 has no_sanitize_undefined attribute.
5769 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5772 * c-array-notation.c (fix_builtin_array_notation_fn):
5773 Check for 0 arguments in builtin call. Check that bultin argument is
5775 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5778 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5780 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5781 qualifiers in __auto_type for atomic types.
5782 (c_parser_typeof_specifier): Discard all type qualifiers in
5783 __typeof__ for atomic types.
5785 2014-06-25 Marek Polacek <polacek@redhat.com>
5788 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5789 the return expression to c_finish_return.
5791 2014-06-25 Jakub Jelinek <jakub@redhat.com>
5793 * c-typeck.c (c_finish_omp_clauses): Make sure
5794 OMP_CLAUSE_LINEAR_STEP has correct type.
5796 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5800 2014-06-24 Jakub Jelinek <jakub@redhat.com>
5802 * c-parser.c (c_parser_omp_for_loop): For
5803 #pragma omp parallel for simd move lastprivate clause from parallel
5804 to for rather than simd.
5806 2014-06-23 Marek Polacek <polacek@redhat.com>
5808 * c-typeck.c (parser_build_binary_op): Don't call
5809 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5811 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
5813 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5814 * c-decl.c (merge_decls): Likewise.
5816 2014-06-09 Marek Polacek <polacek@redhat.com>
5819 * c-typeck.c (error_init): Call inform instead of error_at.
5820 (pedwarn_init): Call inform instead of pedwarn.
5821 (warning_init): Call inform instead of warning_at.
5823 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
5825 * c-decl.c (merge_decls): Use set_decl_section_name.
5826 (duplicate_decls): Remove node if it exists.
5828 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5831 * c-typeck.c (push_init_level, process_init_element,
5832 pop_init_level): Correct check for zero initialization, move
5833 missing brace warning to respect zero initialization.
5835 2014-06-05 Marek Polacek <polacek@redhat.com>
5838 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5840 2014-06-05 Marek Polacek <polacek@redhat.com>
5843 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5844 on the left hand side operand of a comparison.
5846 2014-06-05 Marek Polacek <polacek@redhat.com>
5849 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5850 Print note only if the warning was printed.
5852 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5855 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5858 2014-06-03 Marek Polacek <polacek@redhat.com>
5861 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5863 * c-tree.h (c_start_case): Update.
5864 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5865 switch condition has boolean value.
5867 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
5869 * c-decl.c: Include builtins.h.
5870 * c-parser.c: Likewise.
5872 2014-05-27 Marek Polacek <polacek@redhat.com>
5875 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5876 error and warning calls to error_at and warning_at. Pass location of
5877 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5878 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5879 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5881 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5884 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5885 function parameters.
5887 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
5889 * c-decl.c (merge_decls): Preserve symtab node pointers.
5890 (duplicate_decls): Free new decl.
5892 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5894 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5897 * c-parser.c (c_parser_omp_target): Return bool values.
5899 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5901 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5902 num_teams_loc variable to num_thread_limit_loc.
5904 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5906 * c-array-notation.c (expand_array_notations): Use void_node
5907 instead of void_zero_node.
5909 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5911 * c-decl.c (finish_struct): Adjust.
5912 (finish_enum): Likewise.
5914 (record_inline_static): Likewise.
5915 (push_scope): Likewise.
5916 (make_label): Likewise.
5917 (lookup_label_for_goto): Likewise.
5918 (finish_struct): Likewise.
5919 (finish_enum): Likewise.
5920 (store_parm_decls): Likewise.
5921 (c_push_function_context): Likewise.
5922 * c-lang.h: Remove usage of variable_size gty attribute.
5923 * c-parser.c (c_parse_init): Adjust.
5924 (c_parse_file): Likewise.
5926 2014-05-13 Marek Polacek <polacek@redhat.com>
5929 * c-typeck.c (convert_for_assignment): Pass location to
5930 WARN_FOR_ASSIGNMENT instead of input_location.
5932 2014-05-10 Marek Polacek <polacek@redhat.com>
5934 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5935 maybe_warn_string_init.
5936 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5937 maybe_warn_string_init.
5938 * c-tree.h (maybe_warn_string_init): Update declaration.
5939 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5940 Call pedwarn_init with loc instead of with input_location.
5941 (digest_init): Pass init_loc to maybe_warn_string_init.
5942 (pop_init_level): Call pedwarn_init with loc instead of with
5944 (set_init_index): Likewise.
5945 (process_init_element): Likewise.
5947 2014-05-09 Marek Polacek <polacek@redhat.com>
5950 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5951 (c_parser_initelt): Pass location to set_init_label. Pass array index
5952 location to set_init_index.
5953 * c-tree.h (push_init_level): Update declaration.
5954 (pop_init_level): Likewise.
5955 (set_init_index): Likewise.
5956 (set_init_label): Likewise.
5957 * c-typeck.c (error_init): Add location parameter. Call error_at
5959 (digest_init): Pass init_loc to error_init.
5960 (really_start_incremental_init):
5961 (push_init_level): Add location parameter. Pass loc to pop_init_level
5963 (pop_init_level): Likewise.
5964 (set_designator): Add location parameter. Pass loc to pop_init_level,
5965 push_init_level, and error_init.
5966 (set_init_index): Add location parameter. Pass loc to error_init and
5968 (set_init_label): Likewise.
5969 (output_init_element): Pass loc to error_init.
5970 (process_init_element): Pass loc to error_init, pop_init_level,
5971 pedwarn_init, and push_init_level.
5973 2014-05-09 Marek Polacek <polacek@redhat.com>
5976 * c-parser.c (c_parser_attributes): Parse the arguments as an
5977 expression-list if the attribute takes identifier.
5979 2014-05-08 Marek Polacek <polacek@redhat.com>
5982 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5985 2014-05-08 Marek Polacek <polacek@redhat.com>
5988 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5991 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5992 Mike Stump <mikestump@comcast.net>
5993 Richard Sandiford <rdsandiford@googlemail.com>
5995 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5996 (finish_enum): Use wide-int interfaces.
5997 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5998 * c-typeck.c (build_c_cast): Likewise.
5999 (set_nonincremental_init_from_string): Likewise.
6000 (c_tree_equal): Likewise.
6002 2014-05-02 Marek Polacek <polacek@redhat.com>
6005 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6006 Return size_one_node when the type is not complete.
6007 (pointer_diff): Remove comment.
6008 (build_unary_op): Improve error messages.
6010 2014-05-02 Marek Polacek <polacek@redhat.com>
6012 * c-typeck.c (c_finish_return): Separate warning_at calls.
6014 2014-05-02 Marek Polacek <polacek@redhat.com>
6016 * c-tree.h (error_init): Remove declaration.
6017 (pedwarn_init): Likewise.
6018 * c-typeck.c (error_init): Make static and move above.
6019 (pedwarn_init): Likewise.
6020 (warning_init): Move above.
6021 (maybe_warn_string_init): Likewise.
6023 2014-05-01 Jeff Law <law@redhat.com>
6027 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6028 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6031 2014-05-02 Marek Polacek <polacek@redhat.com>
6034 * c-typeck.c (push_init_level): Set constructor_designated to
6035 p->designated for structures.
6037 2014-05-01 Marek Polacek <polacek@redhat.com>
6040 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6041 function-definition has an attribute after the declarator.
6043 2014-05-01 Marek Polacek <polacek@redhat.com>
6046 * c-typeck.c (warning_init): Add location_t parameter. Call
6047 warning_at instead of warning.
6048 (push_init_level): Pass input_location to warning_init.
6049 (add_pending_init): Add location_t parameter. Pass loc to
6051 (set_nonincremental_init): Pass input_location to add_pending_init.
6052 (set_nonincremental_init_from_string): Likewise.
6053 (output_init_element): Pass loc to warning_init and to
6056 2014-05-01 Marek Polacek <polacek@redhat.com>
6059 * c-typeck.c (c_finish_return): Distinguish between label and variable
6060 when warning about returning local address.
6062 2014-05-01 Marek Polacek <polacek@redhat.com>
6065 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6068 2014-05-01 Marek Polacek <polacek@redhat.com>
6071 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6072 instead of 0 to WARN_FOR_QUALIFIERS.
6074 2014-05-01 Marek Polacek <polacek@redhat.com>
6077 * c-typeck.c (default_conversion): Use better location for
6080 2014-04-30 Marek Polacek <polacek@redhat.com>
6082 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6083 also when SANITIZE_FLOAT_DIVIDE is on.
6085 2014-04-30 Marek Polacek <polacek@redhat.com>
6088 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6089 and pedwarn_init. Use loc insted of input_location.
6091 2014-04-30 Marek Polacek <polacek@redhat.com>
6094 * c-typeck.c (build_binary_op): Use location when warning about
6097 2014-04-25 Marek Polacek <polacek@redhat.com>
6100 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6101 always_inline/noinline and hot/cold attributes.
6103 2014-04-25 Marek Polacek <polacek@redhat.com>
6106 * c-parser.c (c_parser_initelt): Pass input_location to
6107 process_init_element.
6108 (c_parser_initval): Pass loc to process_init_element.
6109 * c-tree.h (process_init_element): Adjust declaration.
6110 * c-typeck.c (push_init_level): Pass input_location to
6111 process_init_element.
6112 (pop_init_level): Likewise.
6113 (set_designator): Likewise.
6114 (output_init_element): Add location_t parameter. Pass loc to
6116 (output_pending_init_elements): Pass input_location to
6117 output_init_element.
6118 (process_init_element): Add location_t parameter. Pass loc to
6119 output_init_element.
6121 2014-04-24 Jakub Jelinek <jakub@redhat.com>
6123 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6124 atomic-clause, allow comma in between atomic-clause and
6127 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6130 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6131 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6133 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6136 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6137 create_tmp_var instead build_decl for creating temps.
6138 (build_array_notation_expr): Likewise.
6139 (fix_conditional_array_notations_1): Likewise.
6140 (fix_array_notation_expr): Likewise.
6141 (fix_array_notation_call_expr): Likewise.
6143 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6146 * c-tree.h (c_build_function_call_vec): New prototype.
6147 * c-typeck.c (build_function_call_vec): Don't call
6148 resolve_overloaded_builtin here.
6149 (c_build_function_call_vec): New wrapper function around
6150 build_function_call_vec. Call resolve_overloaded_builtin here.
6151 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6152 Call c_build_function_call_vec instead of build_function_call_vec.
6153 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6154 * c-decl.c (finish_decl): Likewise.
6156 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6159 * c-typeck.c: Use correct format string in cast-qual warning
6161 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6163 * c-decl.c (c_decl_attributes): Use
6164 lang_hooks.types.omp_mappable_type.
6165 * c-typeck.c (c_finish_omp_clauses): Likewise.
6167 2014-03-06 Marek Polacek <polacek@redhat.com>
6170 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6171 of checking tree code.
6173 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6175 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6176 (c_parser_parameter_declaration): Likewise.
6178 2014-02-19 Marek Polacek <polacek@redhat.com>
6181 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6182 Call mark_exp_read on exp.value.
6183 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6184 TREE_ADDRESSABLE on old instead of val.
6185 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6187 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6189 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6190 C_EXPR_APPEND by vec_safe_push.
6191 * c-tree.h (C_EXPR_APPEND): Remove.
6193 2014-01-31 Marek Polacek <polacek@redhat.com>
6196 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6197 build_function_call_vec.
6198 (build_function_call): Likewise.
6199 (build_atomic_assign): Likewise.
6200 (build_function_call_vec): Add arg_loc parameter. Use it.
6201 (convert_arguments): Likewise.
6202 (convert_for_assignment): Rename rhs_loc to expr_loc.
6203 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6204 (c_parser_objc_keywordexpr): Likewise.
6205 (c_parser_postfix_expression_after_primary): Call
6206 build_function_call_vec with expr_loc rather than op_loc.
6207 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6208 build_function_call_vec.
6209 (c_parser_expr_list): Add locations parameter. Fill it with locations
6210 of function arguments.
6211 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6213 2014-01-30 Marek Polacek <polacek@redhat.com>
6216 * c-typeck.c (build_function_call_vec): Use loc parameter.
6217 (convert_arguments): Add location parameter. Use it.
6218 (ep_convert_and_check): Likewise.
6219 (build_atomic_assign): Adjust convert_for_assignment call.
6220 (build_modify_expr): Likewise.
6221 (digest_init): Likewise.
6222 (c_finish_return): Likewise.
6223 (build_conditional_expr): Adjust ep_convert_and_check calls.
6224 (convert_for_assignment): Add rhs_loc parameter. Use it.
6225 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6228 2014-01-30 Richard Biener <rguenther@suse.de>
6231 * c-typeck.c (build_function_call_vec): Do not replace calls
6232 to a function via an incompatible type with a runtime abort.
6234 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6236 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6237 flag_enable_cilkplus with flag_cilkplus.
6238 (c_parser_direct_declarator_inner): Likewise.
6239 (c_parser_attribute_any_word): Likewise.
6240 (c_parser_attributes): Likewise.
6241 (c_parser_compound_statement): Likewise.
6242 (c_parser_statement_after_labels): Likewise.
6243 (c_parser_if_statement): Likewise.
6244 (c_parser_switch_statement): Likewise.
6245 (c_parser_do_statement): Likewise.
6246 (c_parser_for_statement): Likewise.
6247 (c_parser_unary_expression): Likewise.
6248 (c_parser_postfix_expression): Likewise.
6249 (c_parser_postfix_expression_after_primary): Likewise.
6250 (c_parser_postfix_expression_after_primary): Likewise.
6251 (c_parser_omp_clause_name): Likewise.
6252 (c_finish_omp_declare_simd): Likewise.
6253 (c_parser_cilk_verify_simd): Likewise.
6254 * c-typeck.c (build_array_ref): Likewise.
6255 (build_function_call_vec): Likewise.
6256 (convert_arguments): Likewise.
6257 (build_compound_expr): Likewise.
6258 (c_finish_return): Likewise.
6259 (c_finish_if_stmt): Likewise.
6260 (c_finish_loop): Likewise.
6261 (build_binary_op): Likewise.
6263 2014-01-23 Marek Polacek <polacek@redhat.com>
6266 * c-typeck.c (parser_build_binary_op): Use location instead of
6268 (build_binary_op): Pass location to shorten_compare.
6270 2014-01-23 Marek Polacek <polacek@redhat.com>
6273 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6276 2014-01-23 Marek Polacek <polacek@redhat.com>
6279 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6280 of a comma expression.
6281 (emit_side_effect_warnings): Likewise.
6283 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6286 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6287 function to use walk_tree and moved a lot of its functionality to
6288 expand_array_notations.
6289 (expand_array_notations): New function.
6291 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6293 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6294 attribute an attribute without value.
6296 2014-01-23 Jakub Jelinek <jakub@redhat.com>
6299 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6300 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6302 2014-01-22 Marek Polacek <polacek@redhat.com>
6305 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6306 of remove_c_maybe_const_expr on op1 and op2.
6308 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6311 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6312 effects, preevaluate rhs using SAVE_EXPR first.
6314 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6317 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6318 statements with if-elseif statements.
6320 2014-01-06 Marek Polacek <polacek@redhat.com>
6323 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6324 defined bit-field types only in ISO C.
6326 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6328 Update copyright years
6330 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6332 * c-array-notation.c: Use the standard form for the copyright notice.
6334 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6336 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6337 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6338 field in parser is not empty. If not-empty, call the function
6339 c_parser_finish_omp_declare_simd.
6340 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6341 between SIMD-enabled functions and #pragma simd. Added new parameter.
6342 (c_parser_cilk_all_clauses): Modified the usage of the function
6343 c_parser_cilk_clause_vectorlength as mentioned above.
6344 (c_parser_cilk_simd_fn_vector_attrs): New function.
6345 (c_finish_cilk_simd_fn_tokens): Likewise.
6346 (is_cilkplus_vector_p): Likewise.
6347 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6348 "nomask," and "mask" strings in clause name.
6349 (c_parser_omp_all_clauses): Added 3 new case statements:
6350 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6351 PRAGMA_CILK_CLAUSE_NOMASK.
6352 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6353 check for vector attribute and if so call the function
6354 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6355 called the function c_finish_cilk_simd_fn_tokens.
6356 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6357 parser field is non-empty. If so, parse them as you would parse
6358 the omp declare simd pragma.
6359 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6360 Added a check when step is a parameter and flag it as error.
6361 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6362 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6365 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6367 * c-parser.c (c_parser_omp_parallel): Fix description.
6369 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6371 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6372 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6373 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6374 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6376 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6379 * c-parser.c (c_parser_alignas_specifier): Use
6380 c_sizeof_or_alignof_type instead of c_alignof.
6381 (c_parser_alignof_expression): Likewise, with min_alignof
6382 parameter depending on alignof spelling used.
6384 2013-12-04 Marek Polacek <polacek@redhat.com>
6387 * c-decl.c (start_function): Don't warn for missing prototype for
6390 2013-12-03 Marek Polacek <polacek@redhat.com>
6393 * c-decl.c (build_compound_literal): Allow compound literals with
6394 empty initial value.
6396 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6399 * c-typeck.c (build_modify_expr): Diagnose assignment to
6400 expression with array type.
6402 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6405 * c-typeck.c (process_init_element): Do not treat a string as
6406 initializing a whole array when used with a designator for an
6409 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6412 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6413 an inline function following a static declaration.
6415 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6418 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6419 to p_name before calling c_parser_omp_teams instead of after.
6420 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6421 argument. Remove unused p_name variable.
6423 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6424 Jakub Jelinek <jakub@redhat.com>
6426 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6427 external_scope is NULL.
6429 2013-11-27 Tom de Vries <tom@codesourcery.com>
6430 Marc Glisse <marc.glisse@inria.fr>
6433 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6435 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6437 * c-typeck.c: Add required include files from gimple.h.
6439 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6441 * c-decl.c (define_label, shadow_tag_warned)
6442 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6443 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6444 (declspecs_add_type): Remove use of in_system_header macro.
6445 * c-parser.c (c_parser_unary_expression): Likewise.
6446 * c-typeck.c (store_init_value, process_init_element)
6447 (c_start_case): Likewise.
6449 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6452 * c-parser.c (c_parser_set_source_position_from_token): Remove
6453 reference to in_system_header from comment.
6455 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6457 * c-decl.c (grokdeclarator): Update comment to refer to
6458 tree_to_[su]hwi rather than tree_low_cst.
6460 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6462 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6463 tree_to_uhwi throughout.
6465 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6467 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6470 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6472 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6475 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6477 * c-parser.c (c_parser_cilk_simd): New.
6478 (c_parser_cilk_verify_simd): New.
6479 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6480 (c_parser_omp_for_loop): Add case for NE_EXPR.
6481 Set c_break_label for CILK_SIMD.
6482 (c_parser_cilk_clause_vectorlength): New.
6483 (c_parser_cilk_clause_linear): New.
6484 (c_parser_cilk_clause_name): New.
6485 (c_parser_cilk_all_clauses): New.
6486 * c-typeck.c (build_unary_op): Pass location argument to
6488 (build_modify_expr): Same.
6489 (build_asm_expr): Same.
6490 (c_finish_bc_stmt): Error on break/continue in loops.
6492 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6494 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6496 2013-11-14 Diego Novillo <dnovillo@google.com>
6498 * c-decl.c: Include print-tree.h.
6499 Include stor-layout.h.
6502 Include stringpool.h.
6503 * c-lang.c: Include fold-const.h.
6504 * c-parser.c: Include stringpool.h.
6506 Include stor-layout.h.
6508 Include trans-mem.h.
6509 * c-typeck.c: Include stor-layout.h.
6510 Include trans-mem.h.
6514 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6516 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6517 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6519 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6520 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6522 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6523 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6524 (c_parser_declarator, c_parser_direct_declarator_inner)
6525 (c_parser_parameter_declaration, c_parser_type_name): All callers
6527 (c_parser_declaration_or_fndef): Handle declarations with type
6528 determined from the initializer.
6530 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6532 * c-typeck.c: Include gimplify.h.
6534 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6536 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6537 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6539 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6540 or _Thread_local as appropriate in diagnostics.
6541 (build_null_declspecs): Initialize ret->thread_gnu_p.
6542 (declspecs_add_scspec): Handle either __thread or _Thread_local
6543 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6544 pedantic. Do not disallow _Thread_local extern and _Thread_local
6547 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6548 Andrew MacLeod <amacleod@redhat.com>
6550 * c-aux-info.c (gen_type): Handle atomic qualifier.
6551 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6552 qualifiers when compating types.
6553 (shadow_tag_warned): Handle atomic_p in declspecs.
6554 (quals_from_declspecs): Likewise.
6555 (start_decl): Use c_type_promotes_to when promoting argument
6557 (grokdeclarator): Handle _Atomic.
6558 (get_parm_info): Diagnose any qualifier on "void" as only
6560 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6561 comparing types. Use c_type_promotes_to when promoting argument
6563 (finish_function): Use c_type_promotes_to when promoting argument
6565 (build_null_declspecs): Handle atomic_p in declspecs.
6566 (declspecs_add_qual): Handle RID_ATOMIC.
6567 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6568 (c_token_starts_declspecs): Handle RID_ATOMIC.
6569 (c_parser_declspecs): Handle atomic type specifiers and
6571 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6572 from types of expressions with atomic type.
6573 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6574 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6575 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6576 (c_parser_statement_after_labels, c_parser_switch_statement)
6577 (c_parser_for_statement, c_parser_expr_no_commas)
6578 (c_parser_conditional_expression, c_parser_binary_expression)
6579 (c_parser_cast_expression, c_parser_unary_expression)
6580 (c_parser_postfix_expression)
6581 (c_parser_postfix_expression_after_primary, c_parser_expression):
6582 Use convert_lvalue_to_rvalue.
6583 (c_parser_expression_conv, c_parser_expr_list): Document
6584 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6585 (c_parser_objc_synchronized_statement): Use
6586 convert_lvalue_to_rvalue.
6587 (c_parser_objc_selector): Handle RID_ATOMIC.
6588 (c_parser_objc_receiver, c_parser_array_notation): Use
6589 convert_lvalue_to_rvalue.
6590 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6591 _Atomic (type-name).
6592 (struct c_declspecs): Add atomic_p field.
6593 (convert_lvalue_to_rvalue): Declare.
6594 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6595 corresponding atomic types.
6596 (qualify_type): Don't add _Atomic qualifiers from second argument.
6597 (comp_target_types): Do not allow _Atomic mismatches.
6598 (type_lists_compatible_p): Do not remove atomic qualifiers when
6600 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6601 (build_atomic_assign): New functions.
6602 (build_unary_op): Use build_atomic_assign for atomic increment and
6604 (build_conditional_expr): Do not treat _Atomic void as a qualified
6606 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6607 (find_anonymous_field_with_type, convert_to_anonymous_field)
6608 (convert_for_assignment): Do not remove atomic qualifiers when
6610 (digest_init): Do not accept initialization of arrays of atomic
6611 elements by string constants.
6612 (build_asm_expr): Use convert_lvalue_to_rvalue.
6613 (build_binary_op): Do not treat _Atomic void as a qualified
6616 2013-11-06 DJ Delorie <dj@redhat.com>
6618 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6619 both explicit and builtin, print the location of the explicit one.
6621 2013-11-05 Tobias Burnus <burnus@net-b.de>
6623 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6624 c_parser_omp_distribute, c_parser_omp_teams,
6625 c_parser_omp_target, c_parser_omp_declare): Handle
6628 2013-11-03 Marek Polacek <polacek@redhat.com>
6630 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6632 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6634 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6635 check_dup_generic at the end, unless remove is true.
6636 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6638 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6640 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6642 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6643 with decl that is not pointer nor array.
6645 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6647 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6648 a spawning function is found.
6649 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6650 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6651 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6652 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6654 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6655 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6657 (c_finish_return): Added a check to reject _Cilk_spawn in return
6659 (build_cilk_spawn): New function.
6660 (build_cilk_sync): Likewise.
6661 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6663 2013-10-27 Tobias Burnus <burnus@net-b.de>
6666 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6667 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6668 (c_parser_statement_after_labels): Update calls.
6670 2013-10-24 Tobias Burnus <burnus@net-b.de>
6673 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6674 Handle PRAGMA_IVDEP.
6675 (c_parser_statement_after_labels): Update call.
6677 2013-10-24 Marek Polacek <polacek@redhat.com>
6679 * c-parser.c (c_parser_struct_declaration): Add a comment.
6680 (c_parser_declarator): Don't allow _Alignas here.
6682 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6684 * c-parser.c: Include omp-low.h.
6685 * c-typeck.c: Likewise.
6687 2013-10-17 Marek Polacek <polacek@redhat.com>
6690 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6691 Document syntax of the array-declarator.
6692 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6694 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6695 (c_parser_struct_declaration): Likewise.
6696 (c_parser_declarator): Likewise.
6697 (c_parser_direct_declarator_inner): Likewise.
6698 (c_parser_parameter_declaration): Likewise.
6699 (c_parser_type_name): Likewise.
6701 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6703 * c-lang.h (current_omp_declare_target_attribute): New extern
6705 * c-parser.c: Include c-lang.h.
6706 (struct c_parser): Change tokens to c_token *.
6707 Add tokens_buf field. Change tokens_avail type to unsigned int.
6708 (c_parser_consume_token): If parser->tokens isn't
6709 &parser->tokens_buf[0], increment parser->tokens.
6710 (c_parser_consume_pragma): Likewise.
6711 (enum pragma_context): Add pragma_struct and pragma_param.
6712 (c_parser_external_declaration): Adjust
6713 c_parser_declaration_or_fndef caller.
6714 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6715 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6716 Adjust recursive call.
6717 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6719 (c_parser_parameter_declaration): Use pragma_param instead of
6721 (c_parser_compound_statement_nostart, c_parser_label,
6722 c_parser_for_statement): Adjust
6723 c_parser_declaration_or_fndef callers.
6724 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6725 it through to c_parser_conditional_expression.
6726 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6727 pass it through to c_parser_binary_expression. Adjust recursive
6729 (c_parser_binary_expression): Remove prec argument, add
6730 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6731 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6732 binop matches it, use build2 instead of parser_build_binary_op.
6733 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6734 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6735 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6736 Handle pragma_struct and pragma_param the same as pragma_external.
6737 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6738 (c_parser_omp_variable_list): Parse array sections for
6739 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6740 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6741 (c_parser_omp_clause_reduction): Handle user defined reductions.
6742 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6743 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6744 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6745 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6746 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6747 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6748 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6749 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6750 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6751 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6752 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6753 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6754 (c_parser_omp_for_loop): Add CODE argument, pass it through
6755 to c_finish_omp_for. Change last argument to cclauses,
6756 and adjust uses to grab parallel clauses from the array of all
6757 the split clauses. Adjust c_parser_binary_expression,
6758 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6759 (omp_split_clauses): New function.
6760 (c_parser_omp_simd): New function.
6761 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6762 Allow the function to be called also when parsing combined constructs,
6763 and call c_parser_omp_simd when parsing for simd.
6764 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6765 #pragma omp section, require exactly one structured-block instead of
6766 sequence of statements.
6767 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6768 Allow the function to be called also when parsing combined constructs.
6769 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6770 Allow the function to be called also when parsing combined
6772 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6773 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6774 c_parser_omp_teams, c_parser_omp_target_data,
6775 c_parser_omp_target_update, c_parser_omp_target,
6776 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6777 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6778 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6779 (c_parser_omp_construct): Add p_name and mask vars. Handle
6780 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6781 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6782 and c_parser_omp_sections callers.
6783 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6784 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6785 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6786 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6787 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6789 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6790 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6791 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6792 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6793 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6794 * c-typeck.c: Include tree-inline.h.
6795 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6796 handle_omp_array_sections_1, handle_omp_array_sections,
6797 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6798 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6799 user defined reductions.
6800 (c_tree_equal): New function.
6801 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6802 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6803 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6804 c_check_omp_declare_reduction_r): New prototypes.
6805 * c-decl.c (current_omp_declare_target_attribute): New variable.
6806 (c_decl_attributes): New function.
6807 (start_decl, start_function): Use it instead of decl_attributes.
6808 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6809 c_omp_reduction_decl, c_omp_reduction_lookup,
6810 c_check_omp_declare_reduction_r): New functions.
6812 2013-09-25 Tom Tromey <tromey@redhat.com>
6814 * Make-lang.in (c/gccspec.o): Remove.
6815 (CFLAGS-c/gccspec.o): New variable.
6816 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6817 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6818 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6820 2013-09-25 Tom Tromey <tromey@redhat.com>
6822 * Make-lang.in (c/gccspec.o): Don't use subshell.
6824 2013-09-18 Marek Polacek <polacek@redhat.com>
6827 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6828 Remove unnecessary check.
6830 2013-09-18 Marek Polacek <polacek@redhat.com>
6833 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6834 no_sanitize_undefined attribute.
6836 2013-09-13 Kai Tietz <ktietz@redhat.com>
6839 * c-decl.c (c_builtin_function_ext_scope): Remove
6840 wrong assumption that it is never called on prexisting
6843 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6845 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6847 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6849 * c-objc-common.c (c_tree_printer): Tidy.
6851 2013-08-30 Marek Polacek <polacek@redhat.com>
6853 * c-typeck.c (build_binary_op): Add division by zero and shift
6856 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
6857 Joseph Myers <joseph@codesourcery.com>
6860 * c-typeck.c (c_common_type): Prefer double_type_node over
6861 other REAL_TYPE types with the same precision.
6862 (convert_arguments): Likewise.
6864 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6866 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6867 (c_initialize_diagnostics): Call a destructor for the early printer.
6869 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6871 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6872 printer initialization.
6874 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
6877 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6878 check for truth values.
6879 (expand_array_notation_exprs): Added truth values case. Removed an
6880 unwanted else. Added for-loop to walk through subtrees in default
6883 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6885 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6887 2013-07-23 Joseph Myers <joseph@codesourcery.com>
6889 * c-parser.c (struct c_generic_association): Fix typo.
6891 2013-07-23 Tom Tromey <tromey@redhat.com>
6892 Joseph Myers <joseph@codesourcery.com>
6894 * c-parser.c (struct c_generic_association): New.
6895 (c_generic_association_d): New typedef.
6896 (c_parser_generic_selection): New function.
6897 (c_parser_postfix_expression): Handle RID_GENERIC.
6899 2013-07-13 Jason Merrill <jason@redhat.com>
6902 * c-decl.c (finish_struct): Check for too-large class.
6904 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6907 * c-typeck.c (set_init_index): When folding, check for index overflow.
6909 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6911 * c-parser.c (c_parser_array_notation): Removed rejection of array
6912 notations in an array of function pointers.
6914 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6916 * c-array-notation.c (make_triplet_val_inv): New function.
6917 (create_cmp_incr): Likewise.
6918 (create_array_refs): Likewise.
6919 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6920 Also modularized common parts between functions and called the function.
6921 (build_array_notation_expr): Likewise.
6922 (fix_conditional_array_notations_1): Likewise.
6923 (fix_array_notation_expr): Likewise.
6924 (fix_array_notation_call_expr): Likewise.
6926 2013-06-18 Marek Polacek <polacek@redhat.com>
6929 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6931 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6933 * c-array-notation.c (build_array_notation_expr): Reject array notation
6934 mismatch between LHS and RHS even inside a call_expr. Also, removed
6935 a couple while statements that were dead code.
6937 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6939 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6940 excessive precision expressions in function parameters. Also removed
6941 couple unwanted while statements.
6943 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6945 * c-array-notation.c (expand_array_notation_exprs): Added
6946 ARRAY_NOTATION_REF case.
6948 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6950 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6951 function to c-family/array-notation-common.c.
6952 (is_cilkplus_reduce_builtin): Likewise.
6953 (find_rank): Likewise.
6954 (extract_array_notation_exprs): Likewise.
6955 (replace_array_notations): Likewise.
6956 (find_inv_trees): Likewise.
6957 (replace_inv_trees): Likewise.
6958 (contains_array_notation_expr): Likewise.
6959 (find_correct_array_notation_type): Likewise.
6960 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6961 (struct inv_list): Moved this to c-family/array-notation-common.c.
6962 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6964 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6966 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6967 reduction functions outside the for-loop. Added a check if the fundecl
6968 is non-NULL. Finally, removed an unwanted if-statement, and made the
6971 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6973 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6974 condition of the if-statement matches the rank of else-block and then-
6975 block when array notations are used.
6976 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6977 expression after the entire function body is parsed.
6978 (c_parser_expr_no_commas): Delayed creating array notation expressions
6979 to the end of function parsing.
6980 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6981 whole if-statement instead of just the condition.
6982 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6984 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6987 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6988 array to NULL_TREE if they are unused. Also added a check for the
6989 field to be NULL before its fields are used in future.
6991 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6994 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6995 (build_array_notation_expr): Likewise.
6997 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6999 * c-typeck.c (build_array_ref): Added a check to see if array's
7000 index is greater than one. If true, then emit an error.
7001 (build_function_call_vec): Exclude error reporting and checking
7002 for builtin array-notation functions.
7003 (convert_arguments): Likewise.
7004 (c_finish_return): Added a check for array notations as a return
7005 expression. If true, then emit an error.
7006 (c_finish_loop): Added a check for array notations in a loop
7007 condition. If true then emit an error.
7008 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7009 (build_binary_op): Added a check for array notation expr inside
7010 op1 and op0. If present, we call another function to find correct
7012 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7013 * c-parser.c (c_parser_compound_statement): Check if array
7014 notation code is used in tree, if so, then transform them into
7016 (c_parser_expr_no_commas): Check if array notation is used in LHS
7017 or RHS, if so, then build array notation expression instead of
7019 (c_parser_postfix_expression_after_primary): Added a check for
7020 colon(s) after square braces, if so then handle it like an array
7021 notation. Also, break up array notations in unary op if found.
7022 (c_parser_direct_declarator_inner): Added a check for array
7024 (c_parser_compound_statement): Added a check for array notation in
7025 a stmt. If one is present, then expand array notation expr.
7026 (c_parser_if_statement): Likewise.
7027 (c_parser_switch_statement): Added a check for array notations in
7028 a switch statement's condition. If true, then output an error.
7029 (c_parser_while_statement): Similarly, but for a while.
7030 (c_parser_do_statement): Similarly, but for a do-while.
7031 (c_parser_for_statement): Similarly, but for a for-loop.
7032 (c_parser_unary_expression): Check if array notation is used in a
7033 pre-increment or pre-decrement expression. If true, then expand
7035 (c_parser_array_notation): New function.
7036 * c-array-notation.c: New file.
7037 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7039 2013-05-23 Mike Stump <mikestump@comcast.net>
7041 * c-typeck.c (convert_for_assignment): Handle references to memory
7044 2013-05-16 Jason Merrill <jason@redhat.com>
7046 * Make-lang.in (cc1$(exeext)): Use link mutex.
7048 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7050 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7051 to simply use OPT_Wpointer_arith.
7052 (build_unary_op): Likewise.
7054 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7057 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7058 argument. If set, or it temporarily for parsing of the first
7059 argument into force_folding_builtin_constant_p.
7060 (c_parser_postfix_expression): Adjust callers.
7062 2013-03-21 Richard Biener <rguenther@suse.de>
7064 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7065 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7067 2013-02-12 Marek Polacek <polacek@redhat.com>
7070 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7073 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7076 * c-typeck.c (set_nonincremental_init_from_string): If
7077 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7079 (process_init_element): Likewise.
7081 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7084 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7085 argument, don't call default_function_array_conversion
7086 nor c_fully_fold here.
7087 (c_parser_asm_statement): Adjust callers.
7088 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7089 and outputs here, and call default_function_array_conversion
7090 on inputs that don't need to be addressable.
7092 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7095 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7096 warning require that both c_common_unsigned_type as well as
7097 c_common_signed_type is the same for both mvl and mvr types.
7099 2012-11-16 Diego Novillo <dnovillo@google.com>
7101 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7103 * c-common.c: Use new vec API in vec.h.
7104 * c-common.h: Likewise.
7105 * c-gimplify.c: Likewise.
7106 * c-pragma.c: Likewise.
7107 * c-pretty-print.c: Likewise.
7108 * c-pretty-print.h: Likewise.
7109 * c-semantics.c: Likewise.
7110 * c-decl.c: Likewise.
7111 * c-parser.c: Likewise.
7112 * c-tree.h: Likewise.
7113 * c-typeck.c: Likewise.
7115 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7118 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7120 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7123 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7124 shadows a function, unless the variable is a function or a
7125 pointer-to-function.
7127 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7130 * c-parser.c (struct c_tree_loc_pair): Removed.
7131 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7132 add location_t * and tree * arguments, fill in array of 3
7133 sizeof_arg trees and corresponding locs.
7134 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7135 c_parser_expr_list callers.
7136 (c_parser_postfix_expression_after_primary): Likewise. Pass
7137 array of 3 sizeof_arg trees and locs (corresponding to first
7138 3 arguments) to sizeof_pointer_memaccess_warning.
7140 2012-10-09 Lawrence Crowl <crowl@google.com>
7142 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7143 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7146 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7149 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7152 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7155 * c-typeck.c: Include c-common.h.
7156 (enum stv_conv): Moved to c-common.h.
7157 (scalar_to_vector): Moved to c-common.c.
7158 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7159 * Make-lang.in: c-typeck.c depends on c-common.h.
7161 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7163 * c-decl.c (c_write_global_declarations): Fix handling of
7166 2012-09-30 Sharad Singhai <singhai@google.com>
7168 * c-decl.c (c_write_global_declarations): Use a different method
7169 to determine if the dump has ben initialized.
7171 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7174 * c-typeck.c (c_cast_expr): When casting to a type requiring
7175 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7178 2012-09-14 Joseph Myers <joseph@codesourcery.com>
7181 * c-typeck.c (build_unary_op): Pass original argument of
7182 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7183 any C_MAYBE_CONST_EXPR, if it has integer operands.
7184 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7185 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7186 to c_objc_common_truthvalue_conversion, then remove any
7187 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7188 c_objc_common_truthvalue_conversion not
7189 c_common_truthvalue_conversion.
7190 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7191 call note_integer_operands for arguments with integer operands
7192 that are not integer constants.
7194 2012-09-13 Jakub Jelinek <jakub@redhat.com>
7197 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7198 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7200 2012-08-31 Jakub Jelinek <jakub@redhat.com>
7203 * c-convert.c (convert): Don't call fold_convert_loc if
7204 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7205 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7206 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7208 2012-08-24 Jakub Jelinek <jakub@redhat.com>
7211 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7212 for nested and empty_ok arguments in the call to
7213 c_parser_declaration_or_fndef.
7215 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7217 * c-tree.h (c_last_sizeof_arg): Declare.
7218 * c-parser.c (struct c_tree_loc_pair): New type.
7219 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7221 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7222 (c_parser_postfix_expression_after_primary): Likewise. Call
7223 sizeof_pointer_memaccess_warning if needed.
7224 (sizeof_ptr_memacc_comptypes): New function.
7225 * c-typeck.c (c_last_sizeof_arg): New global variable.
7226 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7228 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
7230 * c-lang.h (lang_decl): Add variable_size GTY option.
7232 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7234 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7235 * Make-lang.in: Fix dependencies.
7237 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7239 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7240 and add language Makefile hooks.
7241 * config-lang.in: New file.
7242 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7243 add the required "normal" config-lang.in rules.
7244 * c-lang.h: Moved from gcc/ to here.
7245 * c-tree.h: Likewise.
7246 * c-objc-common.c: Likewise.
7247 * c-objc-common.h: Likewise.
7248 * c-typeck.c: Likewise.
7249 * c-convert.c: Likewise.
7250 * c-lang.c: Likewise.
7251 * c-aux-info.c: Likewise.
7252 * c-errors.c: Likewise.
7253 * gccspec.c: Likewise.
7254 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7255 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7257 Copyright (C) 2012-2020 Free Software Foundation, Inc.
7259 Copying and distribution of this file, with or without modification,
7260 are permitted in any medium without royalty provided the copyright
7261 notice and this notice are preserved.