1 2025-07-01 Qing Zhao <qing.zhao@oracle.com>
3 * c-decl.cc (verify_counted_by_attribute): Change the 2nd argument
4 to a vector of fields with counted_by attribute. Verify all fields
6 (finish_struct): Collect all the fields with counted_by attribute
7 to a vector and pass this vector to verify_counted_by_attribute.
8 * c-typeck.cc (build_counted_by_ref): Handle pointers with counted_by.
9 Add one more argument, issue error when the pointee type is a structure
10 or union including a flexible array member.
11 (build_access_with_size_for_counted_by): Handle pointers with counted_by.
12 (handle_counted_by_for_component_ref): Call build_counted_by_ref
13 with the new prototype.
15 2025-06-23 Tobias Burnus <tburnus@baylibre.com>
17 * c-parser.cc (OACC_WAIT_CLAUSE_MASK): Add if clause.
19 2025-06-12 Jakub Jelinek <jakub@redhat.com>
21 * c-lang.h (union lang_type::maybe_objc_info): New type.
22 (struct lang_type): Use union maybe_objc_info info member
23 instead of tree objc_info.
24 * c-decl.cc (finish_struct): Allocate struct lang_type using
25 ggc_internal_cleared_alloc instead of ggc_cleared_alloc,
26 and use sizeof (struct lang_type) for ObjC and otherwise
27 offsetof (struct lang_type, info) as size.
28 (finish_enum): Likewise.
30 2025-06-11 Martin Uecker <uecker@tugraz.at>
33 * c-typeck.cc (composite_type_internal): Activate checking
34 assertions for all types and also inputs.
35 (comptypes_for_composite_check): New helper function.
36 (function_types_compatible_p): Add exception.
38 2025-06-11 Martin Uecker <uecker@tugraz.at>
40 * c-typeck.cc (function_types_compatible_p): Remove unused
41 variables and return true/false instead of 1/0.
42 (type_lists_compatible_p): Return false instead of 0.
44 2025-06-11 Martin Uecker <uecker@tugraz.at>
47 * c-parser.cc (c_parser_generic_selection): Handle error
50 2025-06-09 Martin Uecker <uecker@tugraz.at>
53 * c-typeck.cc (remove_qualifiers): New function.
54 (composite_type_internal): Use it.
55 (comp_target_types): Use it.
56 (type_lists_compatible_p): Use it.
57 (find_anonymous_field_with_type): Use it.
58 (convert_to_anonymous_field): Use it.
59 (convert_for_assignment): Use it.
61 2025-06-09 Martin Uecker <uecker@tugraz.at>
64 * c-typeck.cc (composite_type_internal): Activate checking
66 (common_pointer_type): Remove qualifiers also from arrays.
68 2025-06-09 Martin Uecker <uecker@tugraz.at>
71 * c-typeck.cc (composite_types_internal): Handle arrays
72 declared with atomic for function arguments.
74 2025-06-03 Martin Uecker <uecker@tugraz.at>
76 * c-typeck.cc (composite_type_internal,composite_type): Move
79 2025-06-03 Martin Uecker <uecker@tugraz.at>
82 * c-decl.cc (finish_enum): Propagate TYPE_PACKED.
84 2025-06-02 Sandra Loosemore <sloosemore@baylibre.com>
86 * c-parser.cc (c_parser_omp_context_selector): Call
87 convert_lvalue_to_rvalue and c_objc_common_truthvalue_conversion
88 on the expression for OMP_TRAIT_PROPERTY_BOOL_EXPR.
90 2025-06-01 Martin Uecker <uecker@tugraz.at>
93 * c-objc-common.cc (get_aka_type): Ignore attributes for tagged types.
95 2025-05-30 Qing Zhao <qing.zhao@oracle.com>
98 * c-decl.cc (finish_struct): Or the results for TYPE_INCLUDES_FLEXARRAY.
100 2025-05-30 Qing Zhao <qing.zhao@oracle.com>
103 * c-decl.cc (finish_struct): Copy TYPE_INCLUDES_FLEXARRAY marking
104 to all the variant types of the current structure type.
106 2025-05-30 Julian Brown <julian@codesourcery.com>
108 * c-decl.cc (c_omp_mapper_id, c_omp_mapper_decl, c_omp_mapper_lookup,
109 c_omp_extract_mapper_directive, c_omp_map_array_section,
110 c_omp_scan_mapper_bindings_r, c_omp_scan_mapper_bindings): New
112 * c-objc-common.h (LANG_HOOKS_OMP_FINISH_MAPPER_CLAUSES,
113 LANG_HOOKS_OMP_MAPPER_LOOKUP, LANG_HOOKS_OMP_EXTRACT_MAPPER_DIRECTIVE,
114 LANG_HOOKS_OMP_MAP_ARRAY_SECTION): Define langhooks for C.
115 * c-parser.cc (c_parser_omp_clause_map): Add declare_mapper_p
116 parameter; handle mapper modifier.
117 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_map.
118 (c_parser_omp_target): Instantiate explicit mappers and record bindings
119 for implicit mappers.
120 (c_parser_omp_declare_mapper): Parse "declare mapper" directives.
121 (c_parser_omp_declare): Support "declare mapper".
122 (c_parser_omp_declare_reduction): Use inform not error_at.
123 * c-tree.h (c_omp_finish_mapper_clauses, c_omp_mapper_lookup,
124 c_omp_extract_mapper_directive, c_omp_map_array_section,
125 c_omp_mapper_id, c_omp_mapper_decl, c_omp_scan_mapper_bindings,
126 c_omp_instantiate_mappers): Add prototypes.
127 * c-typeck.cc (c_finish_omp_clauses): Handle GOMP_MAP_PUSH_MAPPER_NAME
128 and GOMP_MAP_POP_MAPPER_NAME.
129 (c_omp_finish_mapper_clauses): New function (langhook).
131 2025-05-30 Martin Uecker <uecker@tugraz.at>
134 * c-typeck.cc (composite_type_internal): Stop recursion for
137 2025-05-29 Sandra Loosemore <sloosemore@baylibre.com>
139 * c-parser.cc (c_parser_skip_to_closing_brace): New, copied from
140 the equivalent function in the C++ front end.
141 (c_parser_skip_to_end_of_block_or_statement): Pass false to
143 (c_parser_omp_context_selector): Immediately return error_mark_node
144 after giving an error that the integer trait property is invalid,
145 similarly to C++ front end.
146 (c_parser_omp_context_selector_specification): Likewise handle
147 error return from c_parser_omp_context_selector similarly to C++.
148 (c_parser_omp_metadirective): Do not call
149 c_parser_skip_to_end_of_block_or_statement after an error.
151 2025-05-29 Sandra Loosemore <sloosemore@baylibre.com>
154 * c-parser.cc (c_parser_omp_metadirective): Only consume the
155 token if it is the expected close paren.
157 2025-05-27 Jakub Jelinek <jakub@redhat.com>
160 * c-parser.cc (c_parser_sizeof_or_countof_expression): Use
161 C2Y rather than C23 in pedwarn_c23.
163 2025-05-27 Alejandro Colomar <alx@kernel.org>
166 * c-parser.cc (c_parser_sizeof_or_countof_expression):
167 Add -Wpedantic diagnostic for _Countof in <= C23 mode.
169 2025-05-27 Alejandro Colomar <alx@kernel.org>
170 Martin Uecker <uecker@tugraz.at>
173 * c-tree.h (in_countof): Add global variable declaration.
174 (c_expr_countof_expr): Add function prototype.
175 (c_expr_countof_type): Add function prototype.
176 * c-decl.cc (start_struct, finish_struct): Add support for
178 (start_enum, finish_enum): Add support for _Countof.
179 * c-parser.cc (c_parser_sizeof_expression): New macro.
180 (c_parser_countof_expression): New macro.
181 (c_parser_sizeof_or_countof_expression): Rename function and add
182 support for _Countof.
183 (c_parser_unary_expression): Add RID_COUNTOF entry.
184 * c-typeck.cc (in_countof): Add global variable.
185 (build_external_ref): Add support for _Countof.
186 (record_maybe_used_decl): Add support for _Countof.
187 (pop_maybe_used): Add support for _Countof.
188 (is_top_array_vla): New function.
189 (c_expr_countof_expr, c_expr_countof_type): New functions.
191 2025-05-02 Jakub Jelinek <jakub@redhat.com>
194 * c-typeck.cc (check_constexpr_init): Handle RAW_DATA_CST.
196 2025-05-02 Florian Weimer <fweimer@redhat.com>
199 * c-typeck.cc (convert_arguments): Check if fundecl is null
200 before checking for builtin function declaration.
202 2025-05-01 Christopher Bazley <chris.bazley@arm.com>
205 * c-decl.cc (c_get_loop_names): Do not prematurely
206 end the search for a label that names a loop or
207 switch statement upon encountering a DEBUG_BEGIN_STMT.
208 Instead, ignore any instances of DEBUG_BEGIN_STMT.
210 2025-05-01 Florian Weimer <fweimer@redhat.com>
213 * c-typeck.cc (convert_arguments): Check for built-in
214 function declaration before warning.
216 2025-04-28 David Malcolm <dmalcolm@redhat.com>
218 * c-decl.cc: Drop include of "make-unique.h".
219 Replace uses of ::make_unique with std::make_unique.
220 * c-objc-common.cc: Likewise.
221 * c-parser.cc: Likewise.
223 2025-04-28 David Malcolm <dmalcolm@redhat.com>
225 * c-decl.cc: Include "make-unique.h".
226 (lookup_name_fuzzy): Use ::make_unique rather than "new" when
227 making suggest_missing_header and suggest_missing_option.
228 * c-parser.cc: Include "make-unique.h"
229 (c_parser_error_richloc): Use ::make_unique rather than "new" when
230 making suggest_missing_header.
232 2025-04-28 Andrew Pinski <quic_apinski@quicinc.com>
235 * gimple-parser.cc (gimple_binary_identifier_code): Add
236 __ROTATE_LEFT and __ROTATE_RIGHT.
238 2025-04-28 Andrew Pinski <quic_apinski@quicinc.com>
240 * gimple-parser.cc (gimple_binary_identifier_code): New variable.
241 (c_parser_gimple_binary_expression): Use gimple_binary_identifier_code
242 instead of doing if statements on the strings.
244 2025-04-27 H.J. Lu <hjl.tools@gmail.com>
249 * c-decl.cc (start_decl): Remove the
250 targetm.calls.promote_prototypes call.
251 (store_parm_decls_oldstyle): Likewise.
252 (finish_function): Likewise.
253 * c-typeck.cc (convert_argument): Likewise.
254 (c_safe_arg_type_equiv_p): Likewise.
256 2025-04-15 Qing Zhao <qing.zhao@oracle.com>
259 * c-typeck.cc (build_access_with_size_for_counted_by): Fully fold the
260 parameters for call to .ACCESS_WITH_SIZE.
262 2025-04-08 Martin Uecker <uecker@tugraz.at>
265 * c-tree.h (c_type_tag): Add prototype.
266 * c-typeck.cc (c_type_tag): New function.
267 (tagged_types_tu_compatible_p, composite_type_internal): Use
269 * c-decl.cc (c_struct_hasher::hash, previous_tag): Use c_type_tag.
271 2025-04-02 Jakub Jelinek <jakub@redhat.com>
274 * c-typeck.cc (pointer_diff, build_binary_op): Call c_fully_fold on
275 __sanitizer_ptr_sub or __sanitizer_ptr_cmp arguments.
277 2025-04-02 Sandra Loosemore <sloosemore@baylibre.com>
280 * c-parser.cc (c_parser_omp_clause_init_modifiers): Adjust
282 (c_parser_omp_clause_init): Remove code for recognizing clauses
283 without modifiers. Diagnose missing target/targetsync modifier.
284 (c_finish_omp_declare_variant): Diagnose missing target/targetsync
287 2025-03-28 Jakub Jelinek <jakub@redhat.com>
289 * Make-lang.in (c.srcextra): Don't depend on anything and don't copy
292 2025-03-27 Martin Uecker <uecker@tugraz.at>
295 * c-decl.cc (merge_decls): For TYPE_DECLS copy
296 DECL_ORIGINAL_TYPE from the old declaration.
297 * c-typeck.cc (tagged_types_tu_compatible_p): Add
300 2025-03-21 Paul-Antoine Arras <parras@baylibre.com>
301 Tobias Burnus <tburnus@baylibre.com>
303 * c-parser.cc (c_parser_omp_clause_destroy): Make addressable.
304 (c_parser_omp_clause_init): Make addressable.
306 2025-03-19 Jakub Jelinek <jakub@redhat.com>
309 * c-typeck.cc (pop_init_level): Don't ignore empty brackets for
310 flag_isoc23, still set constructor_type to NULL in that case but
311 emit a pedwarn_init in that case.
313 2025-03-19 Martin Uecker <uecker@tugraz.at>
316 * c-decl.cc (finish_struct,finish_enum): Swap direction when
317 copying TYPE_STRUB_DECL in redefinitions.
319 2025-03-19 Martin Uecker <uecker@tugraz.at>
322 * c-typeck.cc (tagged_types_tu_compatible_p): Handle
323 errors in types of struct members.
325 2025-03-18 Jakub Jelinek <jakub@redhat.com>
328 * c-parser.cc (c_parser_if_body): Pass result of c_parser_all_labels
329 as last argument to c_parser_statement_after_labels.
330 (c_parser_else_body): Likewise.
332 2025-03-18 Jakub Jelinek <jakub@redhat.com>
335 * c-parser.cc (c_parser_declaration_or_fndef): Parse
336 __attribute__((musttail)) return.
337 (c_parser_handle_musttail): Diagnose attribute arguments.
338 (c_parser_statement_after_labels): Parse
339 __attribute__((musttail)) return.
341 2025-03-11 Jakub Jelinek <jakub@redhat.com>
344 * c-typeck.cc (output_init_element): Pass field to digest_init
345 only for record/union types, otherwise pass constructor_fields
346 if non-NULL and constructor_decl if constructor_fields is NULL.
348 2025-03-11 Sandra Loosemore <sloosemore@baylibre.com>
351 * c-parser.cc (c_parser_omp_variable_list): Capture location
352 information when KIND is OMP_CLAUSE_ERROR.
353 (c_parser_oacc_data_clause_deviceptr): Use the improved location
354 for diagnostics, and remove the FIXME.
355 (c_finish_omp_declare_variant): Likewise.
356 (c_parser_omp_threadprivate): Likewise.
358 2025-03-07 Kees Cook <kees@kernel.org>
359 Jakub Jelinek <jakub@redhat.com>
362 * c-typeck.cc (digest_init): Add DECL argument. Adjust wording of
363 pedwarn_init for too long strings and provide details on the lengths,
364 for string literals where just the trailing NULL doesn't fit warn for
365 warn_cxx_compat with OPT_Wc___compat, wording which mentions "for C++"
366 and provides details on lengths, otherwise for
367 warn_unterminated_string_initialization adjust the warning, provide
368 details on lengths and don't warn if get_attr_nonstring_decl (decl).
369 (build_c_cast, store_init_value, output_init_element): Adjust
372 2025-03-07 Andrew Pinski <quic_apinski@quicinc.com>
375 * c-typeck.cc (c_finish_return): Mark the current function
376 for supression of the -Wreturn-type if there was an error
377 on the return statement.
379 2025-02-26 Jakub Jelinek <jakub@redhat.com>
382 * c-typeck.cc (pop_init_level): Don't clear constructor_type
383 if DECL_CHAIN of constructor_fields is NULL but p->type is UNION_TYPE.
385 (process_init_element): Diagnose non-static initialization of flexible
386 array member in union or FAM in union initialization in nested context.
388 2025-02-25 Jakub Jelinek <jakub@redhat.com>
391 * c-parser.cc (c_parser_omp_atomic): For omp write call
392 default_function_array_read_conversion on the rhs expression.
393 Merge the two adjacent if (code == NOP_EXPR) blocks.
395 2025-02-11 Sandra Loosemore <sloosemore@baylibre.com>
397 * c-parser.cc (c_finish_omp_declare_variant): Update call to
398 omp_check_context_selector.
399 (c_parser_omp_metadirective): Likewise.
401 2025-02-07 Jakub Jelinek <jakub@redhat.com>
402 Jason Merrill <jason@redhat.com>
405 * c-parser.cc (c_parser_while_statement): Add 2 further NULL_TREE
406 operands to build_stmt.
407 (c_parser_for_statement): Likewise.
409 2025-02-04 Richard Biener <rguenther@suse.de>
412 * gimple-parser.cc (gimple_parser_build_unary_op): New
413 wrapper around build_unary_op.
414 (c_parser_gimple_unary_expression): Use it.
416 2025-01-30 Tobias Burnus <tburnus@baylibre.com>
418 * c-parser.cc (c_finish_omp_declare_variant): Modify how
419 append_args is saved internally.
421 2025-01-28 Jakub Jelinek <jakub@redhat.com>
424 * c-decl.cc (grokdeclarator): Use c_build_qualified_type with
425 TYPE_UNQUALIFIED instead of TYPE_MAIN_VARIANT.
427 2025-01-25 Jakub Jelinek <jakub@redhat.com>
430 * c-parser.cc (c_parser_omp_variable_list): Remove first variable
431 and emit "expected identifier" error regardless of it.
433 2025-01-23 Jakub Jelinek <jakub@redhat.com>
436 * c-parser.cc (c_parser_omp_metadirective): Rewrite
437 condition for clauses other than when, default and otherwise.
439 2025-01-21 Jakub Jelinek <jakub@redhat.com>
441 * c-decl.cc (names_builtin_p): Return 1 for RID_C23_VA_START and
444 2025-01-16 Sandra Loosemore <sloosemore@baylibre.com>
446 * c-parser.cc (c_parser_omp_assumption_clauses): Give a more specific
447 error message for invalid directives vs unknown names.
449 2025-01-16 Sandra Loosemore <sloosemore@baylibre.com>
451 * c-decl.cc (c_decl_attributes): Don't add "omp declare target
454 2025-01-16 Sandra Loosemore <sloosemore@baylibre.com>
455 Kwok Cheung Yeung <kcy@codesourcery.com>
456 Sandra Loosemore <sandra@codesourcery.com>
460 * c-parser.cc (struct c_parser): Add omp_metadirective_state field.
461 (c_parser_skip_to_end_of_block_or_statement): Add metadirective_p
462 parameter and handle skipping over the parentheses in a "for"
464 (struct omp_metadirective_parse_data): New.
465 (mangle_metadirective_region_label): New.
466 (c_parser_label): Mangle label names in a metadirective body.
467 (c_parser_statement_after_labels): Likewise.
468 (c_parser_pragma): Handle PRAGMA_OMP_METADIRECTIVE.
469 (c_parser_omp_context_selector): Allow arbitrary expressions in
470 device_num and condition properties.
471 (c_parser_omp_assumption_clauses): Handle C_OMP_DIR_META.
472 (analyze_metadirective_body): New.
473 (c_parser_omp_metadirective): New.
475 2025-01-14 Sandra Loosemore <sloosemore@baylibre.com>
476 Kwok Cheung Yeung <kcy@codesourcery.com>
477 Sandra Loosemore <sandra@codesourcery.com>
478 Marcel Vollweiler <marcel@codesourcery.com>
483 * c-parser.cc (c_finish_omp_declare_variant): Update for changes
484 to omp-general.h interfaces.
486 2025-01-14 David Malcolm <dmalcolm@redhat.com>
489 * c-typeck.cc (pedwarn_permerror_init): Return bool for whether a
490 warning was emitted. Only call print_spelling if we warned.
491 (pedwarn_init): Return bool for whether a warning was emitted.
492 (permerror_init): Likewise.
493 (warning_init): Return bool for whether a
494 warning was emitted. Only call print_spelling if we warned.
495 (class pp_element_quoted_decl): New.
496 (maybe_inform_typedef_location): New.
497 (convert_for_assignment): For OPT_Wincompatible_pointer_types,
498 move auto_diagnostic_group to cover all cases. Use %e and
499 pp_element rather than %qT and tree to colorize the types.
500 Capture whether a warning was emitted, and, if it was,
501 show various notes: for a pointer to a function, show the
502 function decl, for typedef types, and show the decls.
504 2025-01-12 David Malcolm <dmalcolm@redhat.com>
507 * c-typeck.cc (inform_declaration): Add "function_expr" param and
508 use it for cases where we couldn't show the function decl to show
509 field decls for callbacks.
510 (build_function_call_vec): Add missing auto_diagnostic_group.
511 Update for new param of inform_declaration.
512 (convert_arguments): Likewise. For the "too many arguments" case
513 add the expected vs actual counts to the message, and if we have
514 it, add the location_t of the first surplus param as a secondary
515 location within the diagnostic. For the "too few arguments" case,
516 determine the minimum number of arguments required and add the
517 expected vs actual counts to the message, tweaking it to "at least"
518 for variadic functions.
520 2025-01-10 Jakub Jelinek <jakub@redhat.com>
523 * c-parser.cc (c_parser_postfix_expression): Call
524 set_c_expr_source_range before break in the __builtin_stdc_rotate_*
527 2025-01-09 Martin Uecker <uecker@tugraz.at>
530 * c-decl.cc (get_parm_info): Change condition for warning.
532 2025-01-09 Jason Merrill <jason@redhat.com>
533 Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
536 * c-typeck.cc (convert_for_assignment): Make sure left hand side and
537 right hand side has identical named types to aid diagnostic output.
539 2025-01-03 Sandra Loosemore <sloosemore@baylibre.com>
541 * c-parser.cc (struct c_parser): Change in_omp_attribute_pragma
542 field to be of type struct omp_attribute_pragma_state.
543 (struct omp_attribute_pragma_state): New.
544 (c_parser_skip_until_found): Use the new way to restore state
546 (c_parser_skip_to_pragma_eol): Likewise.
547 (c_parser_handle_statement_omp_attributes): Create an
548 omp_attribute_pragma_state to hold the restore state. Do not
549 store state in tok.flags.
550 (omp_maybe_parse_omp_decl): Likewise.
552 2025-01-02 David Malcolm <dmalcolm@redhat.com>
555 * c-decl.cc (declspecs_add_type): Special-case attempts to use
556 bool as a typedef name or declaration name.
557 * c-errors.cc (get_std_for_keyword): New.
558 (add_note_about_new_keyword): New.
559 * c-parser.cc (report_bad_enum_name): New, split out from...
560 (c_parser_enum_specifier): ...here, adding handling for RID_FALSE
562 * c-tree.h (add_note_about_new_keyword): New decl.
564 2024-12-18 Tobias Burnus <tburnus@baylibre.com>
566 * c-parser.cc (c_parser_omp_clause_init_modifiers): New;
568 (c_parser_omp_clause_init): ... here; call it.
569 (c_finish_omp_declare_variant): Parse 'append_args' clause.
570 (c_parser_omp_clause_interop): Set tree used/read.
572 2024-12-18 Jakub Jelinek <jakub@redhat.com>
575 * c-typeck.cc (build_asm_expr): Reject - constraint modifier inside
578 2024-12-18 Jakub Jelinek <jakub@redhat.com>
580 * c-typeck.cc (build_asm_expr): Diagnose invalid ":" constraint
583 2024-12-12 Tobias Burnus <tburnus@baylibre.com>
585 * c-parser.cc (OMP_DISPATCH_CLAUSE_MASK): Add has_device_addr clause.
586 (c_finish_omp_declare_variant): Add an 'inform' telling the user that
587 'need_device_addr' is invalid for C.
589 2024-12-09 Heiko Eißfeldt <heiko@hexco.de>
592 * gimple-parser.cc (c_parser_gimple_parse_bb_spec):
593 Use strtoul with ERANGE check instead of atoi to avoid UB
594 and detect invalid __BB#.
596 2024-12-06 David Malcolm <dmalcolm@redhat.com>
598 * c-decl.cc: Include "gcc-urlifier.h".
599 (start_decl): Use auto_urlify_attributes with OPT_Wattributes.
600 (start_function): Likewise.
601 * c-parser.cc: Include "gcc-urlifier.h".
602 (c_parser_statement_after_labels): Use auto_urlify_attributes with
604 * c-typeck.cc: Include "gcc-urlifier.h".
605 (maybe_warn_nodiscard): Use auto_urlify_attributes with
608 2024-12-06 Jakub Jelinek <jakub@redhat.com>
610 * c-parser.cc (c_parser_get_builtin_args, c_parser_expression,
611 c_parser_expr_list): Use RAW_DATA_UCHAR_ELT macro.
612 * c-typeck.cc (digest_init): Use RAW_DATA_UCHAR_ELT and
613 RAW_DATA_SCHAR_ELT macros.
614 (add_pending_init, maybe_split_raw_data): Use RAW_DATA_UCHAR_ELT
617 2024-12-05 Jakub Jelinek <jakub@redhat.com>
620 * c-parser.cc (c_parser_postfix_expression): Handle RID_C23_VA_START.
622 2024-12-05 Jakub Jelinek <jakub@redhat.com>
625 * c-parser.cc (c_parser_asm_string_literal): Add forward declaration.
626 (c_parser_asm_definition): Parse also extended asm without
628 * c-typeck.cc (build_asm_expr): Allow extended asm outside of
629 functions and check extra restrictions.
631 2024-12-03 Tobias Burnus <tburnus@baylibre.com>
633 * c-parser.cc (c_parser_omp_allocate): Only check scope if
634 not in_omp_decl_attribute. Remove setting the alignment.
636 2024-11-30 Martin Uecker <uecker@tugraz.at>
639 * c-typeck.cc (composite_type_internal): Call decl_attributes.
641 2024-11-30 Andrew Pinski <quic_apinski@quicinc.com>
644 * gimple-parser.cc (c_parser_gimple_declaration): Check
645 declarator to be non-null.
647 2024-11-29 Martin Uecker <uecker@tugraz.at>
650 * c-typeck.cc (tagged_types_tu_compatible_p): Add check.
652 2024-11-29 Tejas Belagod <tejas.belagod@arm.com>
654 * c-typeck.cc (process_init_element): Add check to restrict
655 constructor length to the minimum vector length allowed.
657 2024-11-28 Jakub Jelinek <jakub@redhat.com>
660 * c-parser.cc (c_parser_braced_init): Set CONSTRUCTOR_ZERO_PADDING_BITS
661 for flag_isoc23 empty initializers.
662 * c-typeck.cc (constructor_zero_padding_bits): New variable.
663 (struct constructor_stack): Add zero_padding_bits member.
664 (really_start_incremental_init): Save and clear
665 constructor_zero_padding_bits.
666 (push_init_level): Save constructor_zero_padding_bits. Or into it
667 CONSTRUCTOR_ZERO_PADDING_BITS from previous value if implicit.
668 (pop_init_level): Set CONSTRUCTOR_ZERO_PADDING_BITS if
669 constructor_zero_padding_bits and restore
670 constructor_zero_padding_bits.
672 2024-11-28 David Malcolm <dmalcolm@redhat.com>
675 * c-decl.cc (lookup_name_fuzzy): Provide hints for missing
676 command-line options.
678 2024-11-28 David Malcolm <dmalcolm@redhat.com>
681 * c-typeck.cc (compatible_types_for_indirection_note_p): New
683 (convert_for_assignment): Call maybe_emit_indirection_note for
684 pointer vs non-pointer diagnostics.
686 2024-11-27 Joseph Myers <josmyers@redhat.com>
689 * c-parser.cc (c_parser_maybe_reclassify_token): Define earlier.
690 (c_parser_declaration_or_fndef): Call
691 c_parser_maybe_reclassify_token before parsing old-style parameter
694 2024-11-27 Jakub Jelinek <jakub@redhat.com>
697 * c-parser.cc (c_parser_sizeof_expression): If type_name is NULL,
698 just expr.set_error () and goto sizeof_expr instead of doing error
701 2024-11-27 Joseph Myers <josmyers@redhat.com>
704 * c-parser.cc (c_parser_typeof_specifier): Do not remove _Atomic
705 from array element type for typeof_unqual.
707 2024-11-27 Florian Weimer <fweimer@redhat.com>
709 * c-parser.cc (c_parser_compound_statement_nostart): Use
710 OPT_Wfree_labels for warning about labels on declarations.
711 (c_parser_compound_statement_nostart): Use OPT_Wfree_labels
712 for warning about labels at end of compound statements.
714 2024-11-26 David Malcolm <dmalcolm@redhat.com>
717 * c-typeck.cc (c_build_functype_attribute_variant): Reword
718 warning message to avoid double-negative.
720 2024-11-26 Joseph Myers <josmyers@redhat.com>
724 * c-typeck.cc (build_atomic_assign): Always create a TARGET_EXPR
725 for newval even in case of error from binary operation.
726 (build_modify_expr): Check early for incomplete type of rhs.
728 2024-11-24 Andrew Pinski <quic_apinski@quicinc.com>
731 * gimple-parser.cc (c_parser_gimple_compound_statement): Handle
732 CPP_CLOSE_PAREN/CPP_CLOSE_SQUARE with an error and skipping the token.
734 2024-11-22 Andrew Pinski <quic_apinski@quicinc.com>
737 * c-aux-info.cc (INCLUDE_MEMORY): Remove.
738 * c-convert.cc (INCLUDE_MEMORY): Remove.
739 * c-decl.cc (INCLUDE_MEMORY): Remove.
740 * c-errors.cc (INCLUDE_MEMORY): Remove.
741 * c-fold.cc (INCLUDE_MEMORY): Remove.
742 * c-lang.cc (INCLUDE_MEMORY): Remove.
743 * c-objc-common.cc (INCLUDE_MEMORY): Remove.
744 * c-parser.cc (INCLUDE_MEMORY): Remove.
745 * c-typeck.cc (INCLUDE_MEMORY): Remove.
746 * gimple-parser.cc (INCLUDE_MEMORY): Remove.
748 2024-11-22 Joseph Myers <josmyers@redhat.com>
751 * c-parser.cc (c_parser_typeof_specifier): Call strip_array_types
752 when checking for type qualifiers for typeof_unqual.
754 2024-11-22 Tobias Burnus <tburnus@baylibre.com>
756 * c-parser.cc (c_parser_omp_clause_interop): New.
757 (c_parser_omp_clause_name, c_parser_omp_all_clauses,
758 c_parser_omp_dispatch_body): Handle 'interop' clause.
759 * c-typeck.cc (c_finish_omp_clauses): Likewise.
761 2024-11-22 Tobias Burnus <tburnus@baylibre.com>
763 * c-parser.cc (INCLUDE_STRING): Define.
764 (c_parser_pragma): Handle 'interop' directive.
765 (c_parser_omp_clause_name): Handle init, use, and destroy clauses.
766 (c_parser_omp_all_clauses): Likewise; use C_ORT_OMP_INTEROP, if
767 'use' is permitted, for c_finish_omp_clauses.
768 (c_parser_omp_clause_destroy, c_parser_omp_modifier_prefer_type,
769 c_parser_omp_clause_init, c_parser_omp_clause_use,
770 OMP_INTEROP_CLAUSE_MASK, c_parser_omp_interop): New.
771 * c-typeck.cc (c_finish_omp_clauses): Add missing OPT_Wopenmp to
772 a warning; handle new clauses.
774 2024-11-21 Joseph Myers <josmyers@redhat.com>
777 * c-decl.cc (grokparms): Do not warn for void parameter type here.
778 (get_parm_info): Give errors for void parameters even when named.
780 2024-11-20 Joseph Myers <josmyers@redhat.com>
783 * c-decl.cc (build_compound_literal): Diagnose array of unknown
784 size with empty initializer for C23.
786 2024-11-20 Paul-Antoine Arras <parras@baylibre.com>
788 * c-parser.cc (c_parser_omp_dispatch): New function.
789 (c_parser_omp_clause_name): Handle nocontext and novariants clauses.
790 (c_parser_omp_clause_novariants): New function.
791 (c_parser_omp_clause_nocontext): Likewise.
792 (c_parser_omp_all_clauses): Handle nocontext and novariants clauses.
793 (c_parser_omp_dispatch_body): New function adapted from
794 c_parser_expr_no_commas.
795 (OMP_DISPATCH_CLAUSE_MASK): Define.
796 (c_parser_omp_dispatch): New function.
797 (c_finish_omp_declare_variant): Parse adjust_args.
798 (c_parser_omp_construct): Handle PRAGMA_OMP_DISPATCH.
799 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_NOVARIANTS and
800 OMP_CLAUSE_NOCONTEXT.
802 2024-11-20 Joseph Myers <josmyers@redhat.com>
805 * c-typeck.cc (check_constexpr_init): Do not call int_fits_type_p
806 for arguments that are not integer constant expressions.
808 2024-11-19 Joseph Myers <josmyers@redhat.com>
811 * c-decl.cc (c_init_decl_processing): Register nullptr_type_node
812 as typeof (nullptr) not nullptr_t.
814 2024-11-19 Jakub Jelinek <jakub@redhat.com>
817 * c-parser.cc (c_parser_postfix_expression): Use LROTATE_EXPR
818 or RROTATE_EXPR only if type_has_mode_precision_p or if arg1
819 has BITINT_TYPE with precision larger than MAX_FIXED_MODE_SIZE.
820 Otherwise build BIT_IOR_EXPR of LSHIFT_EXPR and RSHIFT_EXPR
821 and wrap it into a COND_EXPR depending on if arg2 is 0 or not.
822 * c-fold.cc (c_fully_fold_internal): Check for suppression of
823 -Wshift-count-overflow warning.
825 2024-11-19 Martin Uecker <uecker@tugraz.at>
828 * c-typeck.cc (tagged_types_tu_compatible): Form equivalence
829 classed for tagless types in C23.
831 2024-11-18 Joseph Myers <josmyers@redhat.com>
834 * c-typeck.cc (convert_for_assignment): Allow conversion of
835 ENUMERAL_TYPE and BOOLEAN_TYPE null pointer constants to pointers.
837 2024-11-17 Florian Weimer <fweimer@redhat.com>
840 * c-decl.cc (start_function): Warn about parameters
841 after parameter-less declaration.
842 * c-typeck.cc (build_function_call_vec): Pass fntype
843 to convert_arguments.
844 (convert_arguments): Change argument to fntype and
845 compute typelist. Warn about parameter list mismatches
848 2024-11-16 Martin Uecker <uecker@tugraz.at>
851 * c-decl.cc (finish_struct): Add checking assertion.
852 * c-typeck.cc (c_type_original): New function.
853 (composite_types_internal): Get tag from original type.
855 2024-11-15 Florian Weimer <fweimer@redhat.com>
857 * c-decl.cc (store_parm_decls_newstyle): Use
858 OPT_Wmissing_parameter_name for missing parameter name
860 * c-errors.cc (pedwarn_c11): Enable fine-grained warning
861 control via the option_id argument.
863 2024-11-15 Jakub Jelinek <jakub@redhat.com>
865 * c-tree.h (enum c_typespec_keyword): Add cts_dfloat64x and adjust
867 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
868 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
870 (c_parser_postfix_expression): Handle _Decimal64x arguments in
872 (warn_for_abs): Handle BUILT_IN_FABSD64X.
873 * c-decl.cc (declspecs_add_type): Handle cts_dfloat64x and
875 (finish_declspecs): Handle cts_dfloat64x.
876 * c-typeck.cc (c_common_type): Handle dfloat64x_type_node.
878 2024-11-13 Martin Uecker <uecker@tugraz.at>
881 * c-typeck.cc (parse_build_binary_op): Add warning.
882 (build_conditional_expr): Add warning.
883 (convert_for_assignment): Add warning.
885 2024-11-11 Jakub Jelinek <jakub@redhat.com>
887 * c-decl.cc (names_builtin_p): Change return type from
888 bool to int, adjust return statments.
890 2024-11-09 Martin Uecker <uecker@tugraz.at>
894 * c-tree.h (c_type_unspecified_p): New inline function.
895 * c-typeck.cc (c_build_array_type_unspecified): New function.
896 (comptypes_interal): Remove useless code.
897 (composite_type_internal): Update.
898 * c-decl.cc (grokdeclarator): Revise.
900 2024-11-08 Marek Polacek <polacek@redhat.com>
903 * c-parser.cc (c_parser_declaration_or_fndef): Adjust declaration.
904 (c_parser_external_declaration): Adjust a call to
905 c_parser_declaration_or_fndef.
906 (c_parser_declaration_or_fndef): New bool parameter. Return a tree
907 instead of void. Adjust for N3356. Adjust a call to
908 c_parser_declaration_or_fndef.
909 (c_parser_compound_statement_nostart): Adjust calls to
910 c_parser_declaration_or_fndef.
911 (c_parser_selection_header): New.
912 (c_parser_paren_selection_header): New.
913 (c_parser_if_statement): Call c_parser_paren_selection_header
914 instead of c_parser_paren_condition.
915 (c_parser_switch_statement): Call c_parser_selection_header instead of
917 (c_parser_for_statement): Adjust calls to c_parser_declaration_or_fndef.
918 (c_parser_objc_methodprotolist): Likewise.
919 (c_parser_oacc_routine): Likewise.
920 (c_parser_omp_loop_nest): Likewise.
921 (c_parser_omp_declare_simd): Likewise.
923 2024-11-05 Andrew Pinski <quic_apinski@quicinc.com>
926 * gimple-parser.cc (c_parser_gimple_statement): Remove
927 support for comparisons before the querry (`?`) token.
929 2024-11-01 David Malcolm <dmalcolm@redhat.com>
932 * Make-lang.in (s-selftest-c): Use GCC_FOR_SELFTESTS.
933 (selftest-c-gdb): Likewise.
934 (selftest-c-valgrind): Likewise.
936 2024-10-31 Martin Uecker <uecker@tugraz.at>
941 * c-decl.cc (c_build_pointer_type): Move to c-typeck.cc
942 (grokdeclarator): Simplify logic.
943 (match_builtin_function_types): Adapt.
945 (implicitly_declare): Adapt.
946 (c_update_type_canonical): Adapt.
947 (c_make_fname_decl): Adapt.
948 (start_function): Adapt.
949 * c-objc-common.h: Add LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE.
950 * c-tree.h: Add prototypes.
951 * c-typeck.cc (c_verify_type): New function.
952 (c_set_type_bits). New function.
953 (c_build_pointer_type): Moved from c-decl.cc.
954 (c_build_pointer_type_for_mode): New function.
955 (c_build_function_type): New function.
956 (c_build_array_type): New function.
957 (c_build_type_attribute_variant): New function.
958 (c_reconstruct_complex_type): New function.
959 (c_build_functype_attribute_variant): Renamed.
960 (array_to_pointer_conversion): Simplify logic.
961 (composite_type_internal): Simplify logic..
962 (build_unary_op): Simplify logic..
963 (comptypes_verify): Add checking assertions.
964 (c_build_qualified_type): Add checking assertions.
965 (c_build_function_call_vec): Adapt.
966 (qualify_type): Adapt.
967 (build_functype_attribute_variant): Adapt.
968 (common_pointer_type): Adapt.
969 (c_common_type): Adapt.
970 (convert_for_assignment): Adapt.
971 (type_or_builtin_type): Adapt.
972 (build_access_with_size_for_counted_by): Adapt.
973 (build_conditional_expr): Adapt.
974 (build_modify_expr): Adapt.
975 (build_binary_op): Adapt.
976 (build_omp_array_section): Adapt.
977 (handle_omp_array_sections): Adapt.
978 (c_finish_omp_clauses): Adapt.
979 * c-parser.cc (c_parser_typeof_specifier): Adapt.
980 (c_parser_generic_selection): Adapt.
982 2024-10-30 Jakub Jelinek <jakub@redhat.com>
984 * c-parser.cc (c_parser_postfix_expression): Diagnose if
985 first __builtin_stdc_* argument has char type even when
988 2024-10-29 David Malcolm <dmalcolm@redhat.com>
991 * c-objc-common.cc: Include "make-unique.h".
992 (c_initialize_diagnostics): Use unique_ptr for pretty_printer.
993 Use context->set_format_decoder.
995 2024-10-29 Jakub Jelinek <jakub@redhat.com>
998 * c-parser.cc: Include asan.h and c-family/c-ubsan.h.
999 (c_parser_postfix_expression): Handle __builtin_stdc_rotate_left
1000 and __builtin_stdc_rotate_right.
1001 * c-fold.cc (c_fully_fold_internal): Handle LROTATE_EXPR and
1004 2024-10-25 Jakub Jelinek <jakub@redhat.com>
1006 * c-typeck.cc: Remove trailing whitespace.
1007 * gimple-parser.cc: Likewise.
1008 * c-parser.cc: Likewise.
1009 * c-decl.cc: Likewise.
1011 2024-10-24 David Malcolm <dmalcolm@redhat.com>
1012 Gaius Mulley <gaiusmod2@gmail.com>
1015 * c-aux-info.cc: Add #define INCLUDE_MEMORY.
1016 * c-convert.cc: Likewise.
1017 * c-errors.cc: Likewise.
1018 * c-fold.cc: Likewise.
1019 * c-lang.cc: Likewise.
1020 * c-objc-common.cc: Likewise.
1021 (pp_markup::element_quoted_type::print_type): Use unique_ptr.
1022 * c-typeck.cc: Add #define INCLUDE_MEMORY.
1023 * gimple-parser.cc: Likewise.
1025 2024-10-23 Joseph Myers <josmyers@redhat.com>
1027 * c-decl.cc (c_struct_parse_info): Add member refloc.
1028 (start_struct): Store refloc in struct_parse_info.
1029 (finish_struct): Give "originally defined" message for C23 struct
1030 redefinition errors.
1032 2024-10-22 Jakub Jelinek <jakub@redhat.com>
1035 * c-parser.cc (c_parser_initval): Revert 2024-10-17 changes.
1036 Instead peek the 4th token and if it is not CPP_NUMBER,
1037 handle it like 3rd token CPP_CLOSE_BRACE for orig_len == INT_MAX.
1038 Also, check (2 + 2 * i)th raw token for the orig_len == INT_MAX
1039 case and punt if it is not CPP_NUMBER.
1041 2024-10-19 Joseph Myers <josmyers@redhat.com>
1043 * c-tree.h (c_arg_info): Add c23_empty_parens.
1044 * c-decl.cc (grokparms): Set c23_empty_parens.
1045 (build_arg_info): Clear c23_empty_parens.
1046 (store_parm_decls_newstyle): Do not give -Wtraditional warning for
1047 ISO C function definition if c23_empty_parens.
1049 2024-10-18 Alejandro Colomar <alx@kernel.org>
1051 * c-decl.cc (one_element_array_type_p, get_parm_array_spec)
1052 * c-fold.cc (c_fold_array_ref):
1053 Rename array_type_nelts => array_type_nelts_minus_one
1055 2024-10-17 Jakub Jelinek <jakub@redhat.com>
1058 * c-parser.cc (c_parser_initval): Instead of doing
1059 orig_len == INT_MAX checks before consuming tokens to set
1060 last = 1, check it after consuming it and if not followed
1061 by CPP_COMMA CPP_NUMBER, call process_init_element once
1062 more with the last CPP_NUMBER.
1064 2024-10-16 Jakub Jelinek <jakub@redhat.com>
1066 * c-decl.cc (c_get_loop_names): Add checking assert that
1067 c is non-NULL in the loop.
1068 (c_finish_bc_name): Likewise.
1070 2024-10-16 Jakub Jelinek <jakub@redhat.com>
1072 * c-parser.cc (c_parser_expression): Initialize next.original_type
1073 to integer_type_node for the CPP_EMBED case.
1075 2024-10-16 Jakub Jelinek <jakub@redhat.com>
1077 * c-tree.h (c_maybe_optimize_large_byte_initializer): Declare.
1078 * c-parser.cc (c_parser_initval): Attempt to optimize large char array
1079 initializers into RAW_DATA_CST.
1080 * c-typeck.cc (c_maybe_optimize_large_byte_initializer): New function.
1082 2024-10-16 Jakub Jelinek <jakub@redhat.com>
1084 * c-parser.cc (c_parser_braced_init): Handle CPP_EMBED.
1085 (c_parser_get_builtin_args): Likewise.
1086 (c_parser_expression): Likewise.
1087 (c_parser_expr_list): Likewise.
1088 * c-typeck.cc (digest_init): Handle RAW_DATA_CST. Formatting fix.
1089 (init_node_successor): New function.
1090 (add_pending_init): Handle RAW_DATA_CST.
1091 (set_nonincremental_init): Formatting fix.
1092 (output_init_element): Handle RAW_DATA_CST. Formatting fixes.
1093 (maybe_split_raw_data): New function.
1094 (process_init_element): Use maybe_split_raw_data. Handle
1097 2024-10-15 Qing Zhao <qing.zhao@oracle.com>
1100 * c-decl.cc (names_builtin_p): Add RID_BUILTIN_COUNTED_BY_REF.
1101 * c-parser.cc (has_counted_by_object): New routine.
1102 (get_counted_by_ref): New routine.
1103 (c_parser_postfix_expression): Handle New RID_BUILTIN_COUNTED_BY_REF.
1104 * c-tree.h: New routine handle_counted_by_for_component_ref.
1105 * c-typeck.cc (handle_counted_by_for_component_ref): New routine.
1106 (build_component_ref): Call the new routine.
1108 2024-10-15 Jakub Jelinek <jakub@redhat.com>
1111 * c-tree.h: Implement C2Y N3355 - Named loops.
1112 (C_DECL_LOOP_NAME, C_DECL_SWITCH_NAME, C_DECL_LOOP_SWITCH_NAME_VALID,
1113 C_DECL_LOOP_SWITCH_NAME_USED, IN_NAMED_STMT): Define.
1114 (c_get_loop_names, c_release_loop_names, c_finish_bc_name): Declare.
1115 (c_start_switch): Add NAME argument.
1116 (c_finish_bc_stmt): Likewise.
1117 * c-lang.h (struct language_function): Add loop_names and
1118 loop_names_hash members.
1119 * c-parser.cc (c_parser_external_declaration,
1120 c_parser_declaration_or_fndef, c_parser_struct_or_union_specifier,
1121 c_parser_parameter_declaration): Adjust c_parser_pragma caller.
1122 (get_before_labels): New function.
1123 (c_parser_compound_statement_nostart): Call get_before_labels when
1124 needed, adjust c_parser_pragma and c_parser_statement_after_labels
1126 (c_parser_statement): Call get_before_labels first and pass it to
1127 c_parser_statement_after_labels.
1128 (c_parser_bc_name): New function.
1129 (c_parser_statement_after_labels): Add BEFORE_LABELS argument. Pass
1130 it down to c_parser_switch_statement, c_parser_while_statement,
1131 c_parser_do_statement, c_parser_for_statement and c_parser_pragma.
1132 Call c_parser_bc_name for RID_BREAK and RID_CONTINUE and pass it as
1133 another argument to c_finish_bc_stmt.
1134 (c_parser_if_body, c_parser_else_body): Call get_before_labels
1135 early and pass it to c_parser_statement_after_labels.
1136 (c_parser_switch_statement): Add BEFORE_LABELS argument. Call
1137 c_get_loop_names, if named, pass switch_name to c_start_switch,
1138 mark it valid and set IN_NAMED_STMT bit in in_statement before
1139 parsing body, otherwise clear IN_NAMED_STMT bit before that parsing.
1140 Run c_release_loop_names at the end.
1141 (c_parser_while_statement, c_parser_do_statement,
1142 c_parser_for_statement): Add BEFORE_LABELS argument. Call
1143 c_get_loop_names, if named, mark it valid and set IN_NAMED_STMT bit
1144 in in_statement before parsing body, otherwise clear IN_NAMED_STMT
1145 before that parsing, arrange for the loop name if used to be
1146 another *_STMT argument.
1147 (c_parser_objc_class_instance_variables,
1148 c_parser_objc_methodprotolist): Adjust c_parser_pragma callers.
1149 (c_parser_pragma): Add BEFORE_LABELS argument. Pass it down to
1150 c_parser_for_statement, c_parser_while_statement or
1151 c_parser_do_statement.
1152 (c_parser_omp_loop_nest, c_maybe_parse_omp_decl): Adjust
1153 c_parser_pragma callers.
1154 * c-decl.cc (loop_names, loop_names_hash): New static variables.
1155 (add_stmt): Set STATEMENT_LIST_HAS_LABEL after push_stmt_list rather
1157 (c_push_function_context): Save and clear loop_names and
1159 (c_pop_function_context): Release or delete, restore and clear
1160 loop_names and loop_names_hash.
1161 (c_get_loop_names, c_release_loop_names, c_finish_bc_name): New
1163 * c-typeck.cc (c_start_switch): Add SWITCH_NAME argument, pass it down
1165 (c_finish_bc_stmt): Add NAME argument. Mark of IN_NAMED_STMT bit
1166 of in_statement in swtiches. Use label for IN_OBJC_FOREACH only if
1167 name is NULL. If name is non-NULL and C_DECL_LOOP_NAME and
1168 C_DECL_SWITCH_NAME are both set, assume outer ObjC foreach and
1169 dig labels from DECL_CHAIN of name. Pass NAME to build_stmt
1172 2024-10-07 qing zhao <qing.zhao@oracle.com>
1175 * c-decl.cc (verify_counted_by_attribute): Remove the attribute
1178 2024-10-07 Tobias Burnus <tburnus@baylibre.com>
1180 * c-parser.cc (c_parser_omp_allocate): Set alignment for alignof;
1181 accept static variables and fix predef allocator check.
1183 2024-09-25 Tobias Burnus <tburnus@baylibre.com>
1185 * c-parser.cc (c_parser_omp_declare_target): Set target-used bit
1186 in omp_requires_mask.
1188 2024-09-24 Tobias Burnus <tburnus@baylibre.com>
1190 * c-parser.cc (c_parser_omp_requires): Handle self_maps clause.
1192 2024-09-20 Martin Uecker <uecker@tugraz.at>
1195 * c-typeck.cc (tagged_types_tu_compatible_p): Restore value
1196 of the cache after recursing into comptypes_internal.
1198 2024-09-09 David Malcolm <dmalcolm@redhat.com>
1200 * c-errors.cc (pedwarn_c23): Use "diagnostic_option_id option_id"
1201 rather than "int opt". Update for renaming of diagnostic_info
1203 (pedwarn_c11): Likewise.
1204 (pedwarn_c99): Likewise.
1205 (pedwarn_c90): Likewise.
1206 * c-tree.h (pedwarn_c90): Likewise for decl.
1207 (pedwarn_c99): Likewise.
1208 (pedwarn_c11): Likewise.
1209 (pedwarn_c23): Likewise.
1211 2024-09-09 David Malcolm <dmalcolm@redhat.com>
1214 * c-objc-common.cc (c_initialize_diagnostics): Rename
1215 diagnostic_context's "printer" field to "m_printer".
1217 2024-09-06 Jason Merrill <jason@redhat.com>
1221 * c-objc-common.h (c_objc_attribute_table): Add
1222 c_common_clang_attribute_table.
1224 2024-09-03 David Malcolm <dmalcolm@redhat.com>
1226 * c-objc-common.cc (print_type): Prefix all output_buffer fields
1229 2024-09-02 Richard Sandiford <richard.sandiford@arm.com>
1231 * c-typeck.cc (build_asm_expr): Rename ASM_INPUT_P to ASM_BASIC_P.
1233 2024-08-31 Jakub Jelinek <jakub@redhat.com>
1236 * c-decl.cc (handle_std_unsequenced_attribute): New function.
1237 (handle_std_reproducible_attribute): Likewise.
1238 (std_attributes): Add entries for "unsequenced" and "reproducible"
1240 (c_warn_type_attributes): Add TYPE argument. Allow unsequenced
1241 or reproducible attributes if it is FUNCTION_TYPE.
1242 (groktypename): Adjust c_warn_type_attributes caller.
1243 (grokdeclarator): Likewise.
1244 (finish_declspecs): Likewise.
1245 * c-parser.cc (c_parser_declaration_or_fndef): Likewise.
1246 * c-tree.h (c_warn_type_attributes): Add TYPE argument.
1248 2024-08-29 David Malcolm <dmalcolm@redhat.com>
1250 * c-objc-common.cc (c_tree_printer): Convert final param from
1251 const char ** to pp_token_list &.
1253 2024-08-02 Martin Uecker <uecker@tugraz.at>
1255 * c-decl.cc (grokdeclarator, finish_struct): Set and
1256 propagate TYPE_TYPELESS_STORAGE.
1258 2024-07-23 Andi Kleen <ak@linux.intel.com>
1261 * c-parser.cc (struct attr_state): Define with musttail_p.
1262 (c_parser_statement_after_labels): Handle [[musttail]].
1263 (c_parser_std_attribute): Dito.
1264 (c_parser_handle_musttail): Dito.
1265 (c_parser_compound_statement_nostart): Dito.
1266 (c_parser_all_labels): Dito.
1267 (c_parser_statement): Dito.
1268 * c-tree.h (c_finish_return): Add musttail_p flag.
1269 * c-typeck.cc (c_finish_return): Handle musttail_p flag.
1271 2024-07-20 Andi Kleen <ak@gcc.gnu.org>
1274 2024-07-20 Andi Kleen <ak@linux.intel.com>
1277 * c-parser.cc (struct attr_state): Define with musttail_p.
1278 (c_parser_statement_after_labels): Handle [[musttail]].
1279 (c_parser_std_attribute): Dito.
1280 (c_parser_handle_musttail): Dito.
1281 (c_parser_compound_statement_nostart): Dito.
1282 (c_parser_all_labels): Dito.
1283 (c_parser_statement): Dito.
1284 * c-tree.h (c_finish_return): Add musttail_p flag.
1285 * c-typeck.cc (c_finish_return): Handle musttail_p flag.
1287 2024-07-20 Andi Kleen <ak@linux.intel.com>
1290 * c-parser.cc (struct attr_state): Define with musttail_p.
1291 (c_parser_statement_after_labels): Handle [[musttail]].
1292 (c_parser_std_attribute): Dito.
1293 (c_parser_handle_musttail): Dito.
1294 (c_parser_compound_statement_nostart): Dito.
1295 (c_parser_all_labels): Dito.
1296 (c_parser_statement): Dito.
1297 * c-tree.h (c_finish_return): Add musttail_p flag.
1298 * c-typeck.cc (c_finish_return): Handle musttail_p flag.
1300 2024-07-14 Alejandro Colomar <alx@kernel.org>
1303 * c-typeck.cc (digest_init): Separate warnings about character
1304 arrays being initialized as unterminated character sequences
1305 with string literals, from -Wc++-compat, into a new warning,
1306 -Wunterminated-string-initialization.
1308 2024-07-13 David Malcolm <dmalcolm@redhat.com>
1310 * c-objc-common.cc: Include "tree-pretty-print-markup.h".
1311 (print_type): Add optional "highlight_color" param and use it
1312 to show highlight colors in "aka" text.
1313 (pp_markup::element_quoted_type::print_type): New.
1314 * c-typeck.cc: Include "tree-pretty-print-markup.h".
1315 (comp_parm_types): New.
1316 (build_function_call_vec): Pass it to check_function_arguments.
1317 (inform_for_arg): Use %e and highlight colors to contrast actual
1319 (convert_for_assignment): Use highlight_colors::actual for the
1321 (build_binary_op): Use highlight_colors::lhs and highlight_colors::rhs
1324 2024-07-10 Marek Polacek <polacek@redhat.com>
1327 * c-typeck.cc (c_cast_expr): Return error_mark_node if build_c_cast
1330 2024-07-10 Marek Polacek <polacek@redhat.com>
1333 * c-decl.cc (c_decl_attributes): If lookup_last_decl returns
1334 error_mark_node, use NULL_TREE as last_decl.
1336 2024-07-09 Martin Uecker <uecker@tugraz.at>
1339 * c-typeck.cc (tagged_types_tu_compatible): Add test.
1341 2024-07-09 Martin Uecker <uecker@tugraz.at>
1344 * c-typeck.cc (comptypes_verify): Bail out for
1345 identical, empty, and erroneous input types.
1347 2024-07-09 Jakub Jelinek <jakub@redhat.com>
1349 * c-parser.cc (c_parser_omp_tile_sizes): Use c_parser_expr_list.
1351 2024-06-27 Martin Uecker <uecker@tugraz.at>
1353 * c-parser.cc (c_parser_direct_declarator_inner): Add
1356 2024-06-26 David Malcolm <dmalcolm@redhat.com>
1358 * c-parser.cc (c_parser_require): Pass *global_dc to
1359 gcc_rich_location::add_location_if_nearby.
1361 2024-06-25 Sandra Loosemore <sloosemore@baylibre.com>
1364 * c-parser.cc (c_parser_omp_loop_nest): Move initializations to
1365 point of declaration.
1367 2024-06-25 Jakub Jelinek <jakub@redhat.com>
1368 Martin Uecker <uecker@tugraz.at>
1372 * c-decl.cc (c_update_type_canonical): Assert t is main variant
1373 with 0 TYPE_QUALS. Simplify and don't use check_qualified_type.
1374 Deal with the case where build_qualified_type returns
1375 TYPE_STRUCTURAL_EQUALITY_P type.
1377 2024-06-18 Martin Uecker <uecker@tugraz.at>
1380 * c-decl.cc (build_enumerator): When redeclaring an
1381 enumerator convert value to previous type. For redeclared
1382 enumerators use underlying type for computing the next value.
1384 2024-06-13 Joseph Myers <josmyers@redhat.com>
1386 * c-typeck.cc (build_unary_op): Use pedwarn_c23 for complex
1387 increment and decrement.
1389 2024-06-12 David Malcolm <dmalcolm@redhat.com>
1391 * c-objc-common.cc (print_type): Update for fields of
1392 pretty_printer becoming private.
1393 (c_tree_printer): Likewise.
1395 2024-06-11 Joseph Myers <josmyers@redhat.com>
1397 * c-errors.cc (pedwarn_c23): New.
1398 * c-parser.cc (disable_extension_diagnostics)
1399 (restore_extension_diagnostics): Save and restore
1400 warn_c23_c2y_compat.
1401 (c_parser_generic_selection): Handle type name as controlling
1402 operand. Allow incomplete and function types subject to
1404 * c-tree.h (pedwarn_c23): New.
1406 2024-06-06 Jakub Jelinek <jakub@redhat.com>
1409 * c-decl.cc (c_fixup_may_alias): New function.
1410 (finish_struct): Call it if "may_alias" attribute is
1413 2024-06-05 Jakub Jelinek <jakub@redhat.com>
1414 Frederik Harwath <frederik@codesourcery.com>
1415 Sandra Loosemore <sandra@codesourcery.com>
1417 * c-parser.cc (c_parser_skip_std_attribute_spec_seq): New function.
1418 (check_omp_intervening_code): Reject imperfectly nested tile.
1419 (c_parser_compound_statement_nostart): If want_nested_loop, use
1420 c_parser_omp_next_tokens_can_be_canon_loop instead of just checking
1421 for RID_FOR keyword.
1422 (c_parser_omp_clause_name): Handle full and partial clause names.
1423 (c_parser_omp_clause_allocate): Remove spurious semicolon.
1424 (c_parser_omp_clause_full, c_parser_omp_clause_partial): New
1426 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FULL and
1427 PRAGMA_OMP_CLAUSE_PARTIAL.
1428 (c_parser_omp_next_tokens_can_be_canon_loop): New function.
1429 (c_parser_omp_loop_nest): Parse C23 attributes. Handle tile/unroll
1430 constructs. Use c_parser_omp_next_tokens_can_be_canon_loop instead
1431 of just checking for RID_FOR keyword. Only add_stmt (body) if it is
1433 (c_parser_omp_for_loop): Rename tiling variable to oacc_tiling. For
1434 OMP_CLAUSE_SIZES set collapse to list length of OMP_CLAUSE_SIZES_LIST.
1435 Use c_parser_omp_next_tokens_can_be_canon_loop instead of just
1436 checking for RID_FOR keyword. Remove spurious semicolon. Don't call
1437 c_omp_check_loop_binding_exprs if stmt is NULL. Skip generated loops.
1438 (c_parser_omp_tile_sizes, c_parser_omp_tile): New functions.
1439 (OMP_UNROLL_CLAUSE_MASK): Define.
1440 (c_parser_omp_unroll): New function.
1441 (c_parser_omp_construct): Handle PRAGMA_OMP_TILE and
1443 * c-typeck.cc (c_finish_omp_clauses): Adjust wording of some of the
1444 conflicting clause diagnostic messages to include word clause.
1445 Handle OMP_CLAUSE_{FULL,PARTIAL,SIZES} and diagnose full vs. partial
1448 2024-05-31 Qing Zhao <qing.zhao@oracle.com>
1450 * c-typeck.cc (build_access_with_size_for_counted_by): Add the 6th
1451 argument to .ACCESS_WITH_SIZE.
1453 2024-05-31 Qing Zhao <qing.zhao@oracle.com>
1455 * c-parser.cc (c_parser_postfix_expression): Ignore the counted-by
1456 attribute when build_component_ref inside offsetof operator.
1457 * c-tree.h (build_component_ref): Add one more parameter.
1458 * c-typeck.cc (build_counted_by_ref): New function.
1459 (build_access_with_size_for_counted_by): New function.
1460 (build_component_ref): Check the counted-by attribute and build
1461 call to .ACCESS_WITH_SIZE.
1462 (build_unary_op): When building ADDR_EXPR for
1463 .ACCESS_WITH_SIZE, use its first argument.
1464 (lvalue_p): Accept call to .ACCESS_WITH_SIZE.
1465 (digest_init): Fold call to .ACCESS_WITH_SIZE to its first
1466 argument when require_constant is TRUE.
1468 2024-05-31 Qing Zhao <qing.zhao@oracle.com>
1470 * c-decl.cc (flexible_array_member_type_p): Renamed and moved to...
1471 (add_flexible_array_elts_to_size): Use renamed function.
1472 (is_flexible_array_member_p): Use renamed function.
1473 (verify_counted_by_attribute): New function.
1474 (finish_struct): Use renamed function and verify counted_by
1476 * c-tree.h (lookup_field): New prototype.
1477 * c-typeck.cc (lookup_field): Expose as extern function.
1478 (tagged_types_tu_compatible_p): Check counted_by attribute for
1481 2024-05-31 Martin Uecker <uecker@tugraz.at>
1483 * c-decl.cc (finish_struct): Do not set TYPE_CANONICAL for
1484 structure or unions with variable size.
1485 * c-objc-common.cc (c_get_alias_set): Do not set alias set to zero.
1486 * c-typeck.cc (comptypes_verify): New function.
1487 (comptypes,comptypes_same_p,comptypes_check_enum_int): Add assertion.
1488 (comptypes_equiv_p): Add assertion that ensures that compatible
1489 types have the same equivalence class.
1490 (tagged_types_tu_compatible_p): Remove now unneeded special case.
1492 2024-05-31 Martin Uecker <uecker@tugraz.at>
1494 PR tree-optimization/115157
1495 PR tree-optimization/115177
1496 * c-decl.cc (shadow_tag-warned,parse_xref_tag,start_enum,
1497 finish_enum): Set SET_TYPE_STRUCTURAL_EQUALITY / TYPE_CANONICAL.
1498 * c-objc-common.cc (get_alias_set): Remove special case.
1499 (get_aka_type): Add special case.
1501 2024-05-29 Martin Uecker <uecker@tugraz.at>
1503 * c-typeck.cc (comptypes_internal): Add flag to track
1504 whether a struct is the target of a pointer.
1505 (tagged_types_tu_compatible): When forming equivalence
1506 classes, treat nested pointed-to structs as equivalent.
1508 2024-05-28 David Malcolm <dmalcolm@redhat.com>
1511 * c-objc-common.cc: Replace include of "gcc-rich-location.h" with
1512 "c-family/c-type-mismatch.h".
1513 * c-typeck.cc: Likewise.
1515 2024-05-24 Martin Uecker <uecker@tugraz.at>
1518 * c-typeck.cc (array_to_pointer_conversion, build_unary_op):
1519 Propagate flag to pointer target.
1521 2024-05-15 Jakub Jelinek <jakub@redhat.com>
1524 * c-typeck.cc (c_finish_omp_clauses): Diagnose grainsize
1525 used together with num_tasks.
1527 2024-05-06 Qing Zhao <qing.zhao@oracle.com>
1530 * c-decl.cc (add_flexible_array_elts_to_size): Handle the cases
1531 when the DECL is union.
1533 2024-05-06 Qing Zhao <qing.zhao@oracle.com>
1536 * c-decl.cc (finish_struct): Change errors to pedwarns for the cases
1537 flexible array members in union or alone in structures.
1539 2024-04-30 Richard Biener <rguenther@suse.de>
1541 * gimple-parser.cc (c_parser_gimple_binary_expression):
1542 Parse __{CEIL,FLOOR,ROUND}_{DIV,MOD} and __EXACT_DIV.
1544 2024-04-19 Martin Uecker <uecker@tugraz.at>
1545 Jakub Jelinek <jakub@redhat.com>
1549 * c-decl.cc (shadow_tag_warned): For flag_isoc23 and code not
1550 ENUMERAL_TYPE use SET_TYPE_STRUCTURAL_EQUALITY.
1551 (parser_xref_tag): Likewise.
1552 (start_struct): For flag_isoc23 use SET_TYPE_STRUCTURAL_EQUALITY.
1553 (c_update_type_canonical): New function.
1554 (finish_struct): Put NULL as second == operand rather than first.
1555 Assert TYPE_STRUCTURAL_EQUALITY_P. Call c_update_type_canonical.
1556 * c-typeck.cc (composite_type_internal): Use
1557 SET_TYPE_STRUCTURAL_EQUALITY. Formatting fix.
1559 2024-04-09 Jakub Jelinek <jakub@redhat.com>
1561 * c-decl.cc (previous_tag): Fix duplicated words in comment; the the
1563 (diagnose_mismatched_decls): Fix duplicated words in comment;
1564 about about -> about.
1566 2024-04-05 Martin Uecker <uecker@tugraz.at>
1569 2024-04-02 Martin Uecker <uecker@tugraz.at>
1572 * c-decl.cc (finish_struct): Set TYPE_CANONICAL when completing
1575 2024-04-02 Martin Uecker <uecker@tugraz.at>
1578 * c-decl.cc (finish_struct): Set TYPE_CANONICAL when completing
1581 2024-03-14 Chung-Lin Tang <cltang@baylibre.com>
1583 * c-parser.cc (c_parser_oacc_data_clause): Add parsing support for
1584 'readonly' modifier, set OMP_CLAUSE_MAP_READONLY if readonly modifier
1585 found, update comments.
1586 (c_parser_oacc_cache): Add parsing support for 'readonly' modifier,
1587 set OMP_CLAUSE__CACHE__READONLY if readonly modifier found, update
1590 2024-03-08 Jakub Jelinek <jakub@redhat.com>
1593 * c-tree.h (c_type_dwarf_attribute): Declare.
1594 * c-objc-common.h (LANG_HOOKS_TYPE_DWARF_ATTRIBUTE): Redefine.
1595 * c-objc-common.cc: Include dwarf2.h.
1596 (c_type_dwarf_attribute): New function.
1598 2024-02-26 Jakub Jelinek <jakub@redhat.com>
1601 * c-parser.cc (c_parser_postfix_expression): Diagnose
1602 __builtin_stdc_bit_* argument with ENUMERAL_TYPE or BOOLEAN_TYPE
1603 type or if signed here rather than on the replacement builtins
1604 in check_builtin_function_arguments.
1606 2024-02-22 Jakub Jelinek <jakub@redhat.com>
1609 * c-parser.cc (c_parser_std_attribute): Remove loose_scope_p argument.
1610 Instead of checking it, parse 2 CPP_COLONs with the first one with
1611 COLON_SCOPE flag the same as CPP_SCOPE.
1612 (c_parser_std_attribute_list): Remove loose_scope_p argument, don't
1613 pass it to c_parser_std_attribute.
1614 (c_parser_std_attribute_specifier): Adjust c_parser_std_attribute_list
1617 2024-02-13 Tobias Burnus <tburnus@baylibre.com>
1619 PR middle-end/113904
1620 * c-parser.cc (c_parser_omp_context_selector): Handle splitting of
1621 OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR.
1623 2024-02-10 Jakub Jelinek <jakub@redhat.com>
1625 * c-decl.cc (get_parm_array_spec): Use HOST_WIDE_INT_PRINT_UNSIGNED
1626 instead of "%lu" and casts to unsigned long or unsigned long long.
1628 2024-02-08 Joseph Myers <josmyers@redhat.com>
1631 * c-typeck.cc (c_objc_common_truthvalue_conversion): Return an
1632 integer constant expression for boolean conversion of floating
1635 2024-02-05 Jakub Jelinek <jakub@redhat.com>
1638 * c-decl.cc (finish_struct): Only use build_bitint_type if
1639 bit-field has width larger or equal to minimum _BitInt
1642 2024-01-31 Joseph Myers <josmyers@redhat.com>
1645 * c-decl.cc (start_enum): Clear ENUM_FIXED_UNDERLYING_TYPE_P when
1646 defining without a fixed underlying type an enumeration previously
1647 declared with a fixed underlying type.
1649 2024-01-31 Martin Uecker <uecker@tugraz.at>
1652 * c-typeck.cc (composite_type_internal): Set TYPE_STUB_DECL.
1654 2024-01-31 Joseph Myers <josmyers@redhat.com>
1658 * c-tree.h (c_objc_common_truthvalue_conversion): Add third
1660 * c-convert.cc (c_convert): For conversions to boolean, pass third
1661 argument to c_objc_common_truthvalue_conversion rather than
1663 * c-typeck.cc (build_c_cast): Ensure arguments with integer
1664 operands are marked as such for conversion to boolean.
1665 (c_objc_common_truthvalue_conversion): Add third argument TYPE.
1667 2024-01-21 Martin Uecker <uecker@tugraz.at>
1670 * c-decl.cc (grokdeclarator): Use c_common_unsigned_type instead of
1671 unsigned_type_for to create the unsigned type for bitfields declared
1672 with int when using -funsigned-bitfields.
1674 2024-01-12 Jakub Jelinek <jakub@redhat.com>
1677 * c-typeck.cc (build_array_ref): If index has BITINT_TYPE type with
1678 precision larger than sizetype precision, convert it to sizetype.
1680 2024-01-11 Julian Brown <julian@codesourcery.com>
1682 * c-parser.cc (c_parser_braced_init, c_parser_conditional_expression):
1683 Don't allow OpenMP array section.
1684 (c_parser_postfix_expression): Don't allow array section in statement
1686 (c_parser_postfix_expression_after_primary): Add support for OpenMP
1687 array section parsing.
1688 (c_parser_expr_list): Don't allow OpenMP array section here.
1689 (c_parser_omp_variable_list): Change ALLOW_DEREF parameter to
1690 MAP_LVALUE. Support parsing of general lvalues in "map", "to" and
1692 (c_parser_omp_var_list_parens): Change ALLOW_DEREF parameter to
1693 MAP_LVALUE. Update call to c_parser_omp_variable_list.
1694 (c_parser_oacc_data_clause): Update calls to
1695 c_parser_omp_var_list_parens.
1696 (c_parser_omp_clause_reduction): Use OMP_ARRAY_SECTION tree node
1697 instead of TREE_LIST for array sections.
1698 (c_parser_omp_target): Allow GOMP_MAP_ATTACH.
1699 * c-tree.h (c_omp_array_section_p): Add extern declaration.
1700 (build_omp_array_section): Add prototype.
1701 * c-typeck.cc (c_omp_array_section_p): Add flag.
1702 (mark_exp_read): Support OMP_ARRAY_SECTION.
1703 (build_omp_array_section): Add function.
1704 (build_external_ref): Tweak error path for OpenMP array sections.
1705 (handle_omp_array_sections_1): Use OMP_ARRAY_SECTION tree code instead
1706 of TREE_LIST. Handle more kinds of expressions.
1707 (c_oacc_check_attachments): Use OMP_ARRAY_SECTION instead of TREE_LIST
1709 (c_finish_omp_clauses): Use OMP_ARRAY_SECTION instead of TREE_LIST.
1710 Check for supported expression types.
1712 2024-01-09 Tamar Christina <tamar.christina@arm.com>
1715 * c-parser.cc (c_parser_for_statement): Skip the pragma is no cond.
1717 2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
1719 * c-parser.cc (c_parser_omp_clause_name): Move handling of indirect
1720 clause to correspond to alphabetical order.
1722 2023-12-30 Martin Uecker <uecker@tugraz.at>
1724 * c-typeck.cc (tagged_types_tu_compatible_p): Revise.
1726 2023-12-22 Martin Uecker <uecker@tugraz.at>
1728 * c-typeck.cc (composite_type_internal): Adapted from
1729 composite_type to support structs and unions.
1730 (composite_type): New wrapper function.
1731 (build_conditional_operator): Return composite type.
1732 * c-decl.cc (finish_struct): Allow NULL for
1733 enclosing_struct_parse_info.
1735 2023-12-21 Martin Uecker <uecker@tugraz.at>
1737 * c-decl.cc (c_struct_hasher): Hash stable for struct
1739 (c_struct_hasher::hash, c_struct_hasher::equal): New
1741 (finish_struct): Set TYPE_CANONICAL to first struct in
1743 * c-objc-common.cc (c_get_alias_set): Let structs or
1744 unions with variable size alias anything.
1745 * c-tree.h (comptypes_equiv): New prototype.
1746 * c-typeck.cc (comptypes_equiv): New function.
1747 (comptypes_internal): Implement equivalence mode.
1748 (tagged_types_tu_compatible): Implement equivalence mode.
1750 2023-12-21 Martin Uecker <uecker@tugraz.at>
1752 * c-tree.h (c_parser_enum_specifier): Add parameter.
1753 * c-decl.cc (start_enum): Allow redefinition.
1754 (finish_enum): Diagnose conflicts.
1755 (build_enumerator): Set context.
1756 (diagnose_mismatched_decls): Diagnose conflicting enumerators.
1757 (push_decl): Preserve context for enumerators.
1758 * c-typeck.cc (tagged_types_tu_compatible_p): Adapt.
1759 * c-parser.cc (c_parser_enum_specifier): Remember when
1760 seen is from an enum type which is not yet defined.
1762 2023-12-21 Martin Uecker <uecker@tugraz.at>
1764 * c-decl.cc (previous_tag): New function.
1765 (parser_xref_tag): Find earlier definition.
1766 (get_parm_info): Turn off warning for C23.
1767 (start_struct): Allow redefinitons.
1768 (finish_struct): Diagnose conflicts.
1769 * c-tree.h (comptypes_same_p): Add prototype.
1770 * c-typeck.cc (comptypes_same_p): New function.
1771 (comptypes_internal): Activate comparison of tagged types.
1772 (convert_for_assignment): Ignore qualifiers.
1773 (digest_init): Add error.
1774 (initialized_elementwise_p): Allow compatible types.
1776 2023-12-20 Jakub Jelinek <jakub@redhat.com>
1778 * c-parser.cc (c_parser_postfix_expression_after_primary): Grow
1779 sizeof_arg and sizeof_arg_loc arrays to 6 elements. Call
1780 warn_for_calloc if warn_calloc_transposed_args for functions with
1781 alloc_size type attribute with 2 arguments.
1782 (c_parser_expr_list): Use 6 instead of 3.
1783 * c-typeck.cc (build_c_cast): Call warn_for_alloc_size for casts
1784 of calls to functions with alloc_size type attribute.
1785 (convert_for_assignment): Likewise.
1787 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
1789 * c-parser.cc (omp_construct_selectors): Delete.
1790 (omp_device_selectors): Delete.
1791 (omp_implementation_selectors): Delete.
1792 (omp_user_selectors): Delete.
1793 (c_parser_omp_context_selector): Adjust for new representations
1794 and simplify dispatch logic. Uniformly warn instead of sometimes
1795 error when an unknown selector is found. Adjust error messages
1796 for extraneous/incorrect score.
1797 (c_parser_omp_context_selector_specification): Likewise.
1798 (c_finish_omp_declare_variant): Adjust for new representations.
1800 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
1802 * c-parser.cc (c_parser_omp_context_selector): Adjust for new
1803 namelist property representation.
1805 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
1807 * c-parser.cc (c_parser_omp_context_selector): Use new constructors.
1809 2023-12-18 Richard Biener <rguenther@suse.de>
1812 * gimple-parser.cc (c_parser_gimple_postfix_expression):
1813 Parse TARGET_MEM_REF extended operands for __MEM.
1815 2023-12-13 Jason Merrill <jason@redhat.com>
1817 * c-typeck.cc (convert_for_assignment): Adjust call to
1818 warn_for_address_of_packed_member.
1820 2023-12-13 Julian Brown <julian@codesourcery.com>
1822 * c-parser.cc (c_parser_oacc_all_clauses): Add TARGET_P parameter. Use
1823 to select region type for c_finish_omp_clauses call.
1824 (c_parser_oacc_loop): Update calls to c_parser_oacc_all_clauses.
1825 (c_parser_oacc_compute): Likewise.
1826 (c_parser_omp_target_data, c_parser_omp_target_enter_data): Support
1828 (c_parser_omp_target_exit_data): Support DETACH kind.
1829 (check_clauses): Handle GOMP_MAP_POINTER and GOMP_MAP_ATTACH here.
1830 * c-typeck.cc (handle_omp_array_sections_1,
1831 handle_omp_array_sections, c_finish_omp_clauses): Use
1832 c_omp_address_inspector class and OMP address tokenizer to analyze and
1833 expand map clause expressions. Fix some diagnostics. Fix "is OpenACC"
1834 condition for C_ORT_ACC_TARGET addition.
1836 2023-12-13 Julian Brown <julian@codesourcery.com>
1838 * c-typeck.cc (c_finish_omp_clauses): Add braces and reindent
1839 OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza.
1841 2023-12-11 Martin Uecker <uecker@tugraz.at>
1844 * c-decl.cc (add_decl_expr): Revise.
1845 (finish_struct): Create DECL_EXPR.
1846 * c-parser.cc (c_parser_struct_or_union_specifier): Call
1847 finish_struct with expression for VLA sizes.
1848 * c-tree.h (finish_struct): Add argument.
1850 2023-12-11 Tobias Burnus <tobias@codesourcery.com>
1852 * c-parser.cc (c_parser_omp_requires): Handle acquires/release
1853 in atomic_default_mem_order clause.
1854 (c_parser_omp_atomic): Update.
1856 2023-12-05 Richard Sandiford <richard.sandiford@arm.com>
1858 * c-decl.cc (std_attribute_table): Add extra braces to work
1859 around PR 16333 in older compilers.
1861 2023-12-05 Richard Biener <rguenther@suse.de>
1864 * c-typeck.cc (c_build_qualified_type): Preserve address-space
1865 info for ARRAY_TYPE.
1867 2023-12-02 Richard Sandiford <richard.sandiford@arm.com>
1869 * c-tree.h (std_attribute_table): Declare.
1870 * c-decl.cc (std_attribute_table): Change type to
1871 scoped_attribute_specs, using...
1872 (std_attributes): ...this as the underlying array.
1873 (c_init_decl_processing): Remove call to register_scoped_attributes.
1874 * c-objc-common.h (c_objc_attribute_table): New global.
1875 (LANG_HOOKS_ATTRIBUTE_TABLE): Use it.
1876 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
1877 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
1879 2023-12-01 Florian Weimer <fweimer@redhat.com>
1882 * c-decl.cc (grokparms): Issue permerror for
1883 OPT_Wdeclaration_missing_parameter_type instead of a pedwarn.
1885 2023-12-01 Florian Weimer <fweimer@redhat.com>
1888 * c-typeck.cc (build_conditional_expr): Upgrade most pointer
1889 type mismatches to a permerror.
1890 (convert_for_assignment): Use permerror_opt and
1891 permerror_init for OPT_Wincompatible_pointer_types warnings.
1893 2023-12-01 Florian Weimer <fweimer@redhat.com>
1896 * c-typeck.cc (c_finish_return): Use permerrors
1897 for OPT_Wreturn_mismatch diagnostics.
1899 2023-12-01 Florian Weimer <fweimer@redhat.com>
1901 * c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int
1902 warnings or errors in system headers.
1904 2023-12-01 Florian Weimer <fweimer@redhat.com>
1906 * c-decl.cc (warn_defaults_to): Remove.
1907 (grok_declarator, start_function): Call permerror_opt
1908 instead of warn_defaults_to.
1909 (store_parm_decls_oldstyle): Call permerror_opt for
1912 2023-12-01 Florian Weimer <fweimer@redhat.com>
1916 * c-decl.cc (implicit_decl_permerror): Rename from
1917 implicit_decl_warning. Call permerror_opt instead of
1918 pedwarn and warning_at.
1919 (implicitly_declare): Adjust callers.
1921 2023-12-01 Florian Weimer <fweimer@redhat.com>
1925 * c-typeck.cc (build_conditional_expr): Use permerror_opt for
1926 pointer/integer type mismatches, based on -Wint-conversion.
1927 (pedwarn_permerror_init, permerror_init): New function.
1928 (pedwarn_init): Call pedwarn_permerror_init.
1929 (convert_for_assignment): Use permerror_opt and
1930 permerror_init for -Wint-conversion warnings.
1932 2023-11-29 Alexandre Oliva <oliva@adacore.com>
1934 * c-typeck.cc (convert_lvalue_to_rvalue): Decay hardbools.
1935 * c-convert.cc (convert): Convert to hardbool through
1937 * c-decl.cc (check_bitfield_type_and_width): Skip enumeral
1938 truncation warnings for hardbool.
1939 (finish_struct): Propagate hardbool attribute to bitfield
1941 (digest_init): Convert to hardbool.
1943 2023-11-28 Jason Merrill <jason@redhat.com>
1947 * c-typeck.cc (array_to_pointer_conversion): Adjust -Wc++-compat
1950 2023-11-28 Richard Biener <rguenther@suse.de>
1952 PR middle-end/112741
1953 * gimple-parser.cc (c_parser_parse_gimple_body): Also
1954 set DECL_SEEN_IN_BIND_EXPR_Pfor locals.
1956 2023-11-27 Alex Coplan <alex.coplan@arm.com>
1957 Iain Sandoe <iain@sandoe.co.uk>
1960 * c-lang.cc (c_family_register_lang_features): New.
1961 * c-objc-common.cc (struct c_feature_info): New.
1962 (c_register_features): New.
1963 * c-objc-common.h (c_register_features): New.
1965 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
1967 * c-parser.cc (c_parser_omp_clause_num_threads,
1968 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1969 c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
1970 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1971 c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
1972 c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
1973 Add OPT_Wopenmp to warning_at.
1975 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
1977 * c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
1978 to the destroy clause.
1980 2023-11-23 Jakub Jelinek <jakub@redhat.com>
1982 * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
1983 * c-decl.cc (names_builtin_p): Likewise.
1985 2023-11-14 Jakub Jelinek <jakub@redhat.com>
1988 * c-typeck.cc (convert_arguments): Don't promote first argument
1989 of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
1991 2023-11-10 Martin Uecker <uecker@tugraz.at>
1993 * c-typeck.cc (struct comptypes_data): Add anon_field flag.
1994 (comptypes, comptypes_check_unum_int,
1995 comptypes_check_different_types): Remove old cache.
1996 (tagged_tu_types_compatible_p): Rewrite.
1998 2023-11-09 Florian Weimer <fweimer@redhat.com>
2000 * c-typeck.cc (c_finish_return): Use pedwarn with
2001 OPT_Wreturn_mismatch for missing/extra return expressions.
2003 2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
2005 * c-decl.cc (c_decl_attributes): Add attribute for indirect
2007 * c-lang.h (c_omp_declare_target_attr): Add indirect field.
2008 * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
2009 (c_parser_omp_clause_indirect): New.
2010 (c_parser_omp_all_clauses): Handle indirect clause.
2011 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
2012 (c_parser_omp_declare_target): Handle indirect clause. Emit error
2013 message if device_type or indirect clauses used alone. Emit error
2014 if indirect clause used with device_type that is not 'any'.
2015 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
2016 (c_parser_omp_begin): Handle indirect clause.
2017 * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
2019 2023-11-07 Joseph Myers <joseph@codesourcery.com>
2021 * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
2022 instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics
2024 * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
2025 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
2026 instead of C2X in comments.
2027 * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
2028 warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
2029 instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23
2030 instead of C2X in diagnostics and comments.
2031 * c-tree.h: Refer to C23 instead of C2X in comments.
2032 (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
2033 * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
2034 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
2035 instead of C2X in diagnostics and comments.
2037 2023-11-06 Joseph Myers <joseph@codesourcery.com>
2040 * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
2041 OPT_Wc11_c2x_compat.
2042 * c-typeck.cc (build_conditional_expr, convert_for_assignment):
2043 Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
2045 2023-11-04 Jakub Jelinek <jakub@redhat.com>
2047 * c-parser.h (c_maybe_parse_omp_decl): Declare.
2048 * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
2049 (c_parser_std_attribute): Uncoment omp::decl handling.
2050 (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
2051 don't expect any arguments, instead create clause or TREE_LIST for
2053 (c_maybe_parse_omp_decl): New function.
2054 (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
2055 first token isn't name or comma invoke c_parser_omp_var_list_parens.
2056 * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
2057 use *node rather than non-existing *decl.
2059 2023-11-04 Jakub Jelinek <jakub@redhat.com>
2061 * c-tree.def: New file.
2062 * c-tree.h (struct c_tree_token_vec): Forward declare.
2063 (c_tree_size): Declare.
2064 * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
2065 (struct c_omp_begin_assumes_data): New type.
2066 (current_omp_begin_assumes): Change type from int to
2067 vec<c_omp_begin_assumes_data, va_gc> *.
2068 * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
2069 * c-parser.h (struct c_tree_token_vec_struct): New type.
2070 (C_TOKEN_VEC_TOKENS): New macro.
2071 * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
2072 in_omp_attribute_pragma members.
2073 (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
2074 parser->in_omp_attribute_pragma.
2075 (c_parser_skip_to_pragma_eol): Likewise.
2076 (c_parser_translation_unit): Adjust for current_omp_begin_assumes
2077 being a vector rather than counter.
2078 (c_parser_declaration_or_fndef): Handle omp::directive and
2079 omp::sequence attributes on attribute declaration and declare simd
2080 or declare variant directives in those on function declarations.
2081 (c_parser_check_balanced_raw_token_sequence): Forward declare.
2082 (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
2084 (c_parser_std_attribute): Handle omp::directive and omp::sequence
2086 (struct c_omp_attribute_data): New type.
2087 (c_parser_handle_statement_omp_attributes,
2088 c_parser_handle_directive_omp_attributes): New functions.
2089 (c_parser_compound_statement_nostart): Handle omp::directive and
2090 omp::sequence attributes on statements. Formatting fix.
2091 (c_parser_all_labels): Handle omp::directive and omp::sequence
2092 attributes on statements.
2093 (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
2094 (c_parser_omp_variable_list): Handle parser->tokens
2095 != &parser->tokens_buf[0] by saving/restoring it.
2096 (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
2097 (c_parser_omp_section_scan): New function.
2098 (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
2100 (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
2101 (c_parser_omp_task): Likewise.
2102 (c_parser_omp_declare_simd): Handle function declaration after
2104 (c_finish_omp_declare_simd): Don't assert all kinds are the same.
2105 (c_parser_omp_declare_target): Also push attr_syntax flag.
2106 (c_parser_omp_begin): Likewise. Adjust for current_omp_begin_assumes
2108 (c_parser_omp_end): Adjust for current_omp_begin_assumes type
2109 change. Diagnose mixing of attribute vs. pragma syntax on end assumes
2110 or end declare target.
2111 (c_parser_omp_declare_reduction): Handle parser->tokens
2112 != &parser->tokens_buf[0] by saving/restoring it.
2113 * c-decl.cc: Include c-parser.h.
2114 (current_omp_begin_assumes): Change type from int to
2115 vec<c_omp_begin_assumes_data, va_gc> *.
2116 (struct c_tree_token_vec): New type. Add static assertions
2117 for sizeof and offsetof.
2118 (union lang_tree_node): Add c_token_vec member and adjust GTY
2120 (c_tree_size): New function.
2121 (c_decl_attributes): Diagnose invalid omp::directive attribute
2123 * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
2125 2023-11-02 Martin Uecker <uecker@tugraz.at>
2128 * c-typeck.cc (convert_for_assignment): Add missing check.
2130 2023-11-01 Martin Uecker <uecker@tugraz.at>
2133 * c-typeck.cc (convert_for_assignment): Add warning.
2135 2023-10-26 liuhongt <hongtao.liu@intel.com>
2137 * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
2140 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
2142 * c-parser.cc (c_parser_omp_clause_name): Return
2143 'PRAGMA_OACC_CLAUSE_SELF' for "self".
2144 (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
2145 (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
2146 parameter, and instead locally determine whether we're called for
2147 an OpenACC compute construct or OpenACC 'update' directive.
2148 (c_parser_oacc_compute): Adjust.
2150 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
2152 * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
2153 (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
2154 parameter, add parsing of self clause when compute_p is true.
2155 (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
2156 (OACC_PARALLEL_CLAUSE_MASK): Likewise,
2157 (OACC_SERIAL_CLAUSE_MASK): Likewise.
2158 (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
2159 set compute_p argument to true.
2160 * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
2162 2023-10-20 Florian Weimer <fweimer@redhat.com>
2166 * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
2167 for pointer/integer mismatch warnings.
2169 2023-10-20 Florian Weimer <fweimer@redhat.com>
2173 * c-typeck.cc (build_conditional_expr): Use
2174 OPT_Wincompatible_pointer_types for pointer mismatches.
2175 Emit location information for the operand.
2177 2023-10-19 Andrew Pinski <pinskia@gmail.com>
2180 * c-typeck.cc (convert_argument): After erroring out
2181 about an incomplete type return error_mark_node.
2183 2023-10-19 Andrew Pinski <pinskia@gmail.com>
2186 * c-typeck.cc (convert_for_assignment): Check for null pointer
2187 before warning about an incompatible scalar storage order.
2189 2023-10-18 Andrew Pinski <pinskia@gmail.com>
2192 * c-decl.cc (diagnose_arglist_conflict): Test for
2193 error mark before calling of c_type_promotes_to.
2195 2023-10-18 Andrew Pinski <pinskia@gmail.com>
2198 * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
2201 2023-10-17 Martin Uecker <uecker@tugraz.at>
2204 * c-decl.cc (grokdeclarator): Add error.
2206 2023-10-03 David Malcolm <dmalcolm@redhat.com>
2208 * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
2211 2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
2213 * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
2215 2023-09-20 Jakub Jelinek <jakub@redhat.com>
2217 * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
2218 __builtin_classify_type call with typename as argument.
2220 2023-09-19 Richard Biener <rguenther@suse.de>
2223 * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
2225 2023-09-19 Richard Biener <rguenther@suse.de>
2228 * gimple-parser.cc (c_parser_gimple_binary_expression): Add
2229 return type argument.
2230 (c_parser_gimple_statement): Adjust.
2231 (c_parser_gimple_paren_condition): Likewise.
2232 (c_parser_gimple_binary_expression): Use passed in return type,
2233 add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
2234 __UNORDERED and __ORDERED.
2236 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
2238 * c-parser.cc (struct c_omp_loc_tree): New.
2239 (c_check_omp_allocate_allocator_r): New; checking moved from ...
2240 (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
2241 ICE with tree_to_shwi for invalid too-large value.
2243 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
2245 * c-parser.cc (c_parser_omp_construct): Move call to
2246 c_parser_omp_allocate to ...
2247 (c_parser_pragma): ... here.
2248 (c_parser_omp_allocate): Avoid ICE is allocator could not be
2249 parsed; set 'omp allocate' attribute for stack/automatic variables
2250 and only reject static variables; add several additional
2252 * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
2253 * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
2254 (c_mark_decl_jump_unsafe_in_current_scope): New.
2255 (warn_about_goto, c_check_switch_jump_warnings): Add error for
2256 omp-allocated decls.
2258 2023-09-12 Martin Uecker <uecker@tugraz.at>
2260 * c-typeck.cc (struct comptypes_data): Add structure.
2261 (tagged_types_tu_compatible_p,
2262 function_types_compatible_p, type_lists_compatible_p,
2263 comptypes_internal): Add structure to interface, change
2264 return type to bool, and adapt calls.
2265 (comptarget_types): Change return type too bool.
2266 (comptypes, comptypes_check_enum_int,
2267 comptypes_check_different_types): Adapt calls.
2269 2023-09-06 Jakub Jelinek <jakub@redhat.com>
2272 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
2273 * c-typeck.cc (c_common_type): Emit sorry for common type between
2274 _Complex integer and larger _BitInt and return the _Complex integer.
2276 2023-09-06 Jakub Jelinek <jakub@redhat.com>
2279 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
2280 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
2282 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
2284 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
2285 for added union in *specs. Handle RID_BITINT.
2286 (finish_declspecs): Handle cts_bitint. Adjust for added union
2288 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
2289 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
2291 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
2292 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
2293 Add cts_bitint enumerator.
2294 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
2295 and add bitint_prec there as well.
2296 * c-typeck.cc (c_common_type, comptypes_internal):
2298 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
2299 their declared type.
2300 (build_array_ref, build_unary_op, build_conditional_expr,
2301 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
2303 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
2305 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
2307 2023-09-06 Jakub Jelinek <jakub@redhat.com>
2309 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
2310 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
2313 2023-09-05 Tobias Burnus <tobias@codesourcery.com>
2315 * c-parser.cc (c_parser_omp_clause_allocate): Handle
2318 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
2320 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
2321 (struct omp_for_parse_data): New.
2322 (check_omp_intervening_code): New.
2323 (add_structured_block_stmt): New.
2324 (c_parser_compound_statement_nostart): Recognize intervening code,
2325 nested loops, and other things that need special handling in
2326 OpenMP loop constructs.
2327 (c_parser_while_statement): Error on loop in intervening code.
2328 (c_parser_do_statement): Likewise.
2329 (c_parser_for_statement): Likewise.
2330 (c_parser_postfix_expression_after_primary): Error on calls to
2331 the OpenMP runtime in intervening code.
2332 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
2333 (c_parser_omp_loop_nest): New.
2334 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
2335 c_parser_omp_loop_nest to do the heavy lifting.
2337 2023-08-24 Richard Sandiford <richard.sandiford@arm.com>
2339 * c-parser.cc (c_parser_std_attribute): Conditionally allow
2340 two colons to be used in place of ::.
2341 (c_parser_std_attribute_list): New function, split out from...
2342 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
2343 to start with __extension__. When it does, also allow two colons
2344 to be used in place of ::.
2346 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
2348 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
2351 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
2354 * c-typeck.cc (build_binary_op): Warning on comparing distinct
2355 pointer types only when -Wcompare-distinct-pointer-types.
2357 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
2358 Thomas Schwinge <thomas@codesourcery.com>
2360 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2362 2023-08-11 Jakub Jelinek <jakub@redhat.com>
2364 * c-parser.cc (c_parser_typeof_specifier): Handle
2365 __typeof_unqual and __typeof_unqual__ as !is_std.
2367 2023-08-11 Martin Uecker <uecker@tugraz.at>
2370 * c-typeck.cc (build_c_cast): Add warning.
2372 2023-08-05 Martin Uecker <uecker@tugraz.at>
2374 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
2375 warnings branches that are known not be taken during parsing.
2377 2023-08-04 Tamar Christina <tamar.christina@arm.com>
2379 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
2380 c_parser_for_statement, c_parser_statement_after_labels,
2381 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
2384 2023-08-02 Eric Feng <ef2648@columbia.edu>
2387 * c-parser.cc: New functions on stashing values for the
2390 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
2392 * c-parser.cc (pragma_lex_discard_to_eol): New function.
2393 (c_init_preprocess): New function.
2395 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
2398 * c-decl.cc (start_decl): Handle
2399 -Wmissing-variable-declarations.
2401 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
2403 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
2404 host_data construct to have an use_device clause.
2406 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
2409 * c-decl.cc (finish_struct): Issue warnings for new option.
2411 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
2413 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
2416 2023-06-29 Richard Biener <rguenther@suse.de>
2419 * c-typeck.cc (convert_argument): Sink formal_prec compute
2420 to where TYPE_PRECISION is valid to use.
2422 2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
2424 * Make-lang.in: Pass correct stage cc1 when processing
2425 profile data collected while building target libraries
2427 2023-06-16 David Malcolm <dmalcolm@redhat.com>
2430 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
2433 2023-06-12 Tobias Burnus <tobias@codesourcery.com>
2435 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
2436 clearness especially with 'omp target (enter/exit) data.'
2438 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
2439 Tobias Burnus <tobias@codesourcery.com>
2441 * c-parser.cc (c_parser_omp_clause_defaultmap,
2442 c_parser_omp_clause_map): Parse 'present'.
2443 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
2444 (c_parser_omp_clause_from_to): New; parse to/from clauses with
2445 optional present modifer.
2446 (c_parser_omp_all_clauses): Update call.
2447 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2448 c_parser_omp_target_exit_data): Handle new map enum values
2449 for 'present' mapping.
2451 2023-05-30 Tobias Burnus <tobias@codesourcery.com>
2454 * c-parser.cc (c_parser_oacc_all_clauses,
2455 c_parser_omp_all_clauses): Improve error wording.
2457 2023-05-23 Martin Uecker <uecker@tugraz.at>
2460 * c-decl.cc (add_decl_expr): New function.
2461 (grokdeclarator): Add decl expr for size expression in
2462 types pointed to by parameters declared as arrays.
2464 2023-05-23 Martin Uecker <uecker@tugraz.at>
2470 * c-decl.cc (start_decl): Make sure size expression are
2471 evaluated only in correct context.
2472 (grokdeclarator): Size expression in fields may need a bind
2473 expression, make sure DECL_EXPR is always created.
2474 (grokfield, declspecs_add_type): Pass along size expressions.
2475 (finish_struct): Remove unneeded DECL_EXPR.
2476 (start_function): Evaluate size expressions for nested functions.
2477 * c-parser.cc (c_parser_struct_declarations,
2478 c_parser_struct_or_union_specifier): Pass along size expressions.
2479 (c_parser_declaration_or_fndef): Evaluate size expression.
2480 (c_parser_objc_at_property_declaration,
2481 c_parser_objc_class_instance_variables): Adapt.
2482 * c-tree.h (grokfield): Adapt declaration.
2484 2023-05-19 Martin Uecker <uecker@tugraz.at>
2486 * c-decl.cc (set_type_context): Remove.
2487 (pop_scope, diagnose_mismatched_decls, pushdecl):
2489 * c-typeck.cc (comptypes_internal): Remove dead code.
2490 (same_translation_unit_p): Remove.
2491 (tagged_types_tu_compatible_p): Some fixes.
2493 2023-05-19 Joseph Myers <joseph@codesourcery.com>
2495 * c-decl.cc (diagnose_mismatched_decls): Do not handle
2496 thread-local declarations as tentative definitions for C2x.
2497 (finish_decl): Do not allow thread-local definition with
2498 incomplete type for C2x.
2500 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2502 * c-convert.cc (c_convert): Ditto.
2503 * c-decl.cc (merge_decls): Ditto.
2504 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
2505 (c_parser_omp_declare_reduction): Ditto.
2506 * c-typeck.cc (build_component_ref): Ditto.
2507 (convert_argument): Ditto.
2508 (pointer_diff): Ditto.
2509 (build_unary_op): Ditto.
2510 (build_c_cast): Ditto.
2511 (build_modify_expr): Ditto.
2512 (store_init_value): Ditto.
2513 (constexpr_init_fits_real_type): Ditto.
2514 (check_constexpr_init): Ditto.
2515 (c_finish_return): Ditto.
2516 (handle_omp_array_sections_1): Ditto.
2517 (c_finish_omp_clauses): Ditto.
2518 * gimple-parser.cc (c_finish_gimple_return): Ditto.
2520 2023-05-16 Joseph Myers <joseph@codesourcery.com>
2522 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
2525 2023-05-15 Joseph Myers <joseph@codesourcery.com>
2527 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
2530 2023-04-30 Andrew Pinski <apinski@marvell.com>
2532 * c-typeck.cc (process_init_element): Print out array type
2533 for excessive elements.
2535 2023-04-30 Andrew Pinski <apinski@marvell.com>
2538 * c-typeck.cc (process_init_element): Move the check
2539 for string cst until after the error message.
2541 2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
2543 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
2545 2023-04-27 Jakub Jelinek <jakub@redhat.com>
2548 * c-parser.cc (c_parser_initializer): Move diagnostics about
2549 initialization of variable sized object with non-empty initializer
2550 after c_parser_expr_no_commas call and ret.set_error (); after it.
2552 2023-04-27 Jakub Jelinek <jakub@redhat.com>
2556 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
2557 reject empty initializer as invalid.
2559 2023-04-26 Richard Biener <rguenther@suse.de>
2561 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
2564 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
2566 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
2567 zero exec statements before/after 'omp scan'.
2569 2023-04-20 Jakub Jelinek <jakub@redhat.com>
2572 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
2573 warning on acc_on_device declaration.
2575 2023-03-28 David Malcolm <dmalcolm@redhat.com>
2578 * c-typeck.cc (parser_build_binary_op): Update for new param of
2579 check_for_xor_used_as_pow.
2581 2023-03-10 Jakub Jelinek <jakub@redhat.com>
2584 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
2585 after diagnosing it.
2587 2023-02-28 Jakub Jelinek <jakub@redhat.com>
2590 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
2591 and rename to c_strict_flex_array_level_of.
2592 (is_flexible_array_member_p): Adjust caller.
2594 2023-02-18 Martin Uecker <uecker@tugraz.at>
2597 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
2598 (diagnose_mismatched_decl): Dito.
2599 (warn_about_goto): Dito:
2600 (c_check_switch_jump_warnings): Dito.
2601 (finish_decl): Dito.
2602 (finish_struct): Dito.
2603 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
2604 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
2605 * c-objc-common.cc (c_var_mod_p): New function.
2606 (c_var_unspec_p): Remove.
2607 * c-objc-common.h: Set lang hook.
2608 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
2609 (c_parser_typeof_specifier): Dito.
2610 (c_parser_has_attribute_expression): Dito.
2611 (c_parser_generic_selection): Dito.
2612 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
2613 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
2615 2023-02-16 Patrick Palka <ppalka@redhat.com>
2617 * c-parser.h: Mechanically drop static from static inline
2618 functions via s/^static inline/inline/g.
2620 2023-02-10 Joseph Myers <joseph@codesourcery.com>
2622 * c-convert.cc (c_convert): Allow conversion of a null pointer
2623 constant to nullptr_t.
2624 * c-typeck.cc (null_pointer_constant_p): Remove static.
2625 (convert_for_assignment): Allow conversion of a null pointer
2626 constant to nullptr_t.
2627 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
2628 * c-tree.h (null_pointer_constant_p): Declare.
2630 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
2632 * c-parser.cc (c_parser_omp_allocate): Parse align
2633 clause and check for restrictions.
2635 2023-02-08 Joseph Myers <joseph@codesourcery.com>
2637 * c-typeck.cc (check_constexpr_init): Remove argument
2638 null_pointer_constant. Only check pointer initializers for being
2640 (digest_init): Update calls to check_constexpr_init.
2642 2023-02-02 Joseph Myers <joseph@codesourcery.com>
2644 * c-typeck.cc (build_binary_op): Allow comparisons between
2645 pointers and nullptr_t values that are not null pointer constants.
2647 2023-02-02 Joseph Myers <joseph@codesourcery.com>
2649 * c-typeck.cc: Include "realmpfr.h".
2650 (constexpr_init_fits_real_type): Do not allow signaling NaN
2651 conversions to different types with the same mode. Handle
2652 conversions from binary to decimal types.
2653 (check_constexpr_init): Do not disallow real initializers for
2654 complex types. Do not disallow binary initializers for decimal
2657 2023-01-31 Marek Polacek <polacek@redhat.com>
2661 * c-objc-common.cc (instantiation_dependent_expression_p): New.
2663 2023-01-27 Joseph Myers <joseph@codesourcery.com>
2665 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
2666 around auto initializer.
2668 2023-01-16 Jakub Jelinek <jakub@redhat.com>
2671 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
2672 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
2675 2023-01-14 Jakub Jelinek <jakub@redhat.com>
2678 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
2681 2023-01-13 Qing Zhao <qing.zhao@oracle.com>
2683 * c-decl.cc (strict_flex_array_level_of): ... here.
2685 2023-01-11 Jakub Jelinek <jakub@redhat.com>
2688 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
2689 markers for K&R function parameter declarations of nested functions.
2691 2023-01-09 Joseph Myers <joseph@codesourcery.com>
2693 * c-decl.cc (build_compound_literal): Call record_inline_static.
2695 2023-01-06 Joseph Myers <joseph@codesourcery.com>
2697 * c-parser.cc (c_parser_postfix_expression): Handle integer
2698 generic arguments to functions passed to __builtin_tgmath as
2699 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
2700 Do not handle integer arguments to some narrowing functions as
2703 2022-12-19 Jakub Jelinek <jakub@redhat.com>
2706 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
2707 compound literals with function type.
2709 2022-12-07 Joseph Myers <joseph@codesourcery.com>
2711 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
2712 auto, constexpr and a type used together.
2714 2022-12-06 Qing Zhao <qing.zhao@oracle.com>
2716 * c-decl.cc (is_flexible_array_member_p): Call new function
2717 strict_flex_array_level_of.
2719 2022-11-24 Florian Weimer <fweimer@redhat.com>
2722 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
2725 2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2727 * c-decl.cc (start_function): Set the result decl source
2728 location to the location of the typespec.
2730 2022-11-17 David Malcolm <dmalcolm@redhat.com>
2733 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
2734 to cpp_create_reader, rather than ident_hash, so that the new
2735 reader gets its own hash table.
2737 2022-11-15 David Malcolm <dmalcolm@redhat.com>
2740 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
2741 (class ana::c_translation_unit): New.
2742 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
2744 2022-11-12 Joseph Myers <joseph@codesourcery.com>
2746 * c-decl.cc (start_underspecified_init)
2747 (finish_underspecified_init): Handle name == NULL_TREE for
2749 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
2750 (shadow_tag_warned): Check for constexpr.
2751 (start_decl): Add parameter do_push.
2752 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
2753 (grokdeclarator): Handle constexpr.
2754 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
2755 (declspecs_add_scspec): Handle constexpr.
2756 * c-parser.cc (c_token_starts_compound_literal)
2757 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
2758 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
2759 (c_parser_compound_literal_scspecs)
2760 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
2761 Update calls to start_init.
2762 (c_parser_declaration_or_fndef, c_parser_initializer)
2763 (c_parser_initval): Pass true for new argument of
2764 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
2765 constexpr compound literals.
2766 (c_parser_static_assert_declaration_no_semi)
2767 (c_parser_enum_specifier, c_parser_struct_declaration)
2768 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
2769 Call convert_lvalue_to_rvalue on expressions required to be
2770 integer constant expressions.
2771 (c_parser_omp_declare_reduction): Update call to start_init.
2772 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
2773 (C_DECL_DECLARED_CONSTEXPR): New macros.
2774 (struct c_declspecs): Add constexpr_p.
2775 (start_decl, convert_lvalue_to_rvalue, start_init): Update
2777 * c-typeck.cc (require_constant_value, require_constant_elements):
2779 (require_constexpr_value, maybe_get_constexpr_init)
2780 (constexpr_init_fits_real_type, check_constexpr_init): New.
2781 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
2782 maybe_get_constexpr_init.
2783 (store_init_value): Update call to digest_init.
2784 (digest_init): Add parameters int_const_expr, arith_const_expr and
2785 require_constexpr. Check constexpr initializers.
2786 (constructor_top_level): Remove.
2787 (struct initializer_stack): Remove top_level. Add
2788 require_constexpr_value.
2789 (start_init): Remove parameter top_level. Add parameters
2790 init_require_constant and init_require_constexpr. Save
2791 require_constexpr_value on stack.
2792 (pop_init_level): Use a null pointer constant for zero initializer
2793 of pointer initialized with {}.
2794 (output_init_element): Update call to digest_init. Avoid passing
2795 null pointer constants of pointer type through digest_init a
2796 second time when initializing a constexpr object.
2798 2022-11-03 Joseph Myers <joseph@codesourcery.com>
2800 * c-decl.cc (in_underspecified_init, start_underspecified_init)
2801 (finish_underspecified_init): New.
2802 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
2803 Give errors inside initializers of underspecified declarations.
2804 (grokdeclarator): Handle (erroneous) case of C2X auto on a
2806 (declspecs_add_type): Handle c2x_auto_p case.
2807 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
2809 (finish_declspecs): Handle c2x_auto_p.
2810 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
2811 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
2812 (struct c_declspecs): Add c2x_auto_p.
2813 (start_underspecified_init, finish_underspecified_init): New
2815 * c-typeck.cc (build_external_ref): Give error for underspecified
2816 declaration referenced in its initializer.
2818 2022-10-28 Joseph Myers <joseph@codesourcery.com>
2820 * c-decl.cc (grokdeclarator): Pass
2821 arg_info->no_named_args_stdarg_p to build_function_type.
2822 (grokparms): Check arg_info->no_named_args_stdarg_p before
2823 converting () to (void).
2824 (build_arg_info): Initialize no_named_args_stdarg_p.
2825 (get_parm_info): Set no_named_args_stdarg_p.
2826 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
2827 build_function_type.
2828 (store_parm_decls): Count (...) functions as prototyped.
2829 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
2830 parenthesis to start parameter list.
2831 (c_parser_parms_list_declarator): Always allow '...' with no
2832 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
2833 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
2834 * c-typeck.cc (composite_type): Handle
2835 TYPE_NO_NAMED_ARGS_STDARG_P.
2836 (function_types_compatible_p): Compare
2837 TYPE_NO_NAMED_ARGS_STDARG_P.
2839 2022-10-28 Jakub Jelinek <jakub@redhat.com>
2841 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
2842 comma before the first clause.
2843 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
2844 c_parser_omp_flush, c_parser_omp_scan_loop_body,
2845 c_parser_omp_ordered, c_finish_omp_declare_variant,
2846 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
2847 c_parser_omp_requires, c_parser_omp_error,
2848 c_parser_omp_assumption_clauses): Likewise.
2850 2022-10-28 Joseph Myers <joseph@codesourcery.com>
2853 * c-convert.cc (c_convert): Handle enums with underlying boolean
2855 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
2856 enums with enum type specifier, but give errors for storage class
2857 specifiers, qualifiers or alignment specifiers in non-definition
2858 declarations of such enums.
2859 (grokdeclarator): Give error for non-definition use of type
2860 specifier with an enum type specifier.
2861 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
2862 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
2863 (xref_tag): Update call to parser_xref_tag.
2864 (start_enum): Add argument fixed_underlying_type. Complete enum
2865 type with a fixed underlying type given in the definition. Give
2866 error for defining without a fixed underlying type in the
2867 definition if one was given in a prior declaration. Do not mark
2868 enums with fixed underlying type as packed for -fshort-enums.
2869 Store the enum type in the_enum.
2870 (finish_enum): Do not adjust types of values or check their range
2871 for an enum with a fixed underlying type. Set underlying type of
2873 (build_enumerator): Check enumeration constants for enum with
2874 fixed underlying type against that type and convert to that type.
2875 Increment in the underlying integer type, with handling for bool.
2876 (c_simulate_enum_decl): Update call to start_enum.
2877 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
2878 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
2879 rather than recomputing an underlying type based on size.
2880 * c-parser.cc (c_parser_declspecs)
2881 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
2882 Set has_enum_type_specifier for type specifiers.
2883 (c_parser_enum_specifier): Handle enum type specifiers.
2884 (c_parser_struct_or_union_specifier): Update call to
2886 (c_parser_omp_atomic): Check for boolean increment or decrement
2887 using C_BOOLEAN_TYPE_P.
2888 * c-tree.h (C_BOOLEAN_TYPE_P): New.
2889 (struct c_typespec): Add has_enum_type_specifier.
2890 (struct c_declspecs): Add enum_type_specifier_ref_p.
2891 (struct c_enum_contents): Add enum_type.
2892 (start_enum, parser_xref_tag): Update prototypes.
2893 * c-typeck.cc (composite_type): Allow for enumerated types
2894 compatible with bool.
2895 (common_type, comptypes_internal, perform_integral_promotions):
2896 Use ENUM_UNDERLYING_TYPE.
2897 (parser_build_binary_op, build_unary_op, convert_for_assignment)
2898 (c_finish_return, c_start_switch, build_binary_op): Check for
2899 boolean types using C_BOOLEAN_TYPE_P.
2901 2022-10-24 Jakub Jelinek <jakub@redhat.com>
2904 * c-typeck.cc (build_binary_op): Pass operands before excess precision
2905 promotions to scalar_to_vector call.
2907 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
2909 * c-decl.cc (finish_function): Ignore hosted when deciding
2910 whether to implicitly return zero, but check noreturn.
2911 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
2912 requirements to just MAIN_NAME_P when hosted, or `int main'
2915 2022-10-20 Richard Biener <rguenther@suse.de>
2919 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
2920 the parsed IL and zap the body on error.
2922 2022-10-18 Joseph Myers <joseph@codesourcery.com>
2925 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
2926 with previous declaration visible.
2928 2022-10-18 Joseph Myers <joseph@codesourcery.com>
2931 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
2932 convert all to the type of the enumeration. pedwarn if no integer
2933 type fits all enumerators and default to
2934 widest_integer_literal_type_node in that case. Otherwise pedwarn
2935 for type wider than intmax_t.
2936 (build_enumerator): pedwarn for enumerators outside the range of
2937 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
2938 enumerators outside the range of int. On overflow, attempt to
2939 find a wider type that can hold the value of the next enumerator.
2940 Do not convert value to type determined with
2941 c_common_type_for_size.
2943 2022-10-14 Jakub Jelinek <jakub@redhat.com>
2945 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
2948 2022-10-14 Joseph Myers <joseph@codesourcery.com>
2950 * c-decl.cc (build_compound_literal): Add parameter scspecs.
2951 Handle storage class specifiers.
2952 * c-parser.cc (c_token_starts_compound_literal)
2953 (c_parser_compound_literal_scspecs): New.
2954 (c_parser_postfix_expression_after_paren_type): Add parameter
2955 scspecs. Call pedwarn_c11 for use of storage class specifiers.
2956 Update call to build_compound_literal.
2957 (c_parser_cast_expression, c_parser_sizeof_expression)
2958 (c_parser_alignof_expression): Handle storage class specifiers for
2959 compound literals. Update calls to
2960 c_parser_postfix_expression_after_paren_type.
2961 (c_parser_postfix_expression): Update syntax comment.
2962 * c-tree.h (build_compound_literal): Update prototype.
2963 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
2964 register compound literal.
2966 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
2968 * c-decl.cc (flexible_array_member_type_p): New function.
2969 (one_element_array_type_p): Likewise.
2970 (zero_length_array_type_p): Likewise.
2971 (add_flexible_array_elts_to_size): Call new utility
2972 routine flexible_array_member_type_p.
2973 (is_flexible_array_member_p): New function.
2974 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
2976 2022-10-06 Joseph Myers <joseph@codesourcery.com>
2978 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
2980 (c_keyword_starts_typename, c_token_starts_declspecs)
2981 (c_parser_declspecs, c_parser_objc_selector): Handle
2983 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
2984 Distinguish typeof for C2x from __typeof__ for all standard
2985 versions and typeof before C2x.
2986 * c-typeck.cc (build_function_call_vec): Use unqualified version
2987 of non-void return type.
2988 (build_unary_op): Use unqualified type for increment and
2991 2022-10-06 Jakub Jelinek <jakub@redhat.com>
2993 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
2994 call for holds clause on assume construct.
2996 2022-10-06 Jakub Jelinek <jakub@redhat.com>
2999 * c-parser.cc (handle_assume_attribute): New function.
3000 (c_parser_declaration_or_fndef): Handle assume attribute.
3001 (c_parser_attribute_arguments): Add assume_attr argument,
3002 if true, parse first argument as conditional expression.
3003 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
3004 c_parser_attribute_arguments callers.
3005 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
3008 2022-10-04 Jakub Jelinek <jakub@redhat.com>
3010 * c-lang.h (struct c_omp_declare_target_attr): New type.
3011 (current_omp_declare_target_attribute): Change type from
3012 int to vec<c_omp_declare_target_attr, va_gc> *.
3013 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
3014 If last pushed directive was begin declare target, use different
3015 wording and simplify format strings for easier translations.
3016 (c_parser_omp_clause_device_type): Uncomment
3017 check_no_duplicate_clause call.
3018 (c_parser_omp_declare_target): Adjust for the
3019 current_omp_declare_target_attribute type change, push { -1 }.
3020 Use error_at rather than warning_at for declare target with
3021 only device_type clauses.
3022 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
3023 (c_parser_omp_begin): Add begin declare target support.
3024 (c_parser_omp_end): Adjust for the
3025 current_omp_declare_target_attribute type change, adjust
3026 diagnostics wording and simplify format strings for easier
3028 * c-decl.cc (current_omp_declare_target_attribute): Change type from
3029 int to vec<c_omp_declare_target_attr, va_gc> *.
3030 (c_decl_attributes): Adjust for the
3031 current_omp_declare_target_attribute type change. If device_type
3032 was present on begin declare target, add "omp declare target host"
3033 and/or "omp declare target nohost" attributes.
3035 2022-09-29 Joseph Myers <joseph@codesourcery.com>
3037 * c-decl.cc (handle_std_noreturn_attribute): New function.
3038 (std_attribute_table): Add _Noreturn and noreturn.
3040 2022-09-27 Jakub Jelinek <jakub@redhat.com>
3042 * c-lang.h (current_omp_begin_assumes): Declare.
3043 * c-parser.cc: Include bitmap.h.
3044 (c_parser_omp_end_declare_target): Rename to ...
3045 (c_parser_omp_end): ... this. Handle also end assumes.
3046 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
3047 c_parser_omp_assumes, c_parser_omp_assume): New functions.
3048 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
3049 without corresponding #pragma omp end assumes.
3050 (c_parser_pragma): Use %s in may only be used at file scope
3051 diagnostics to decrease number of translatable messages. Handle
3052 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
3053 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
3054 for it rather than c_parser_omp_end_declare_target.
3055 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
3056 * c-decl.cc (current_omp_begin_assumes): Define.
3058 2022-09-24 Jakub Jelinek <jakub@redhat.com>
3061 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
3062 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
3063 t2 have different types.
3065 2022-09-22 David Malcolm <dmalcolm@redhat.com>
3068 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
3069 (c_parser_cast_expression): Likewise.
3070 (c_parser_alignof_expression): Likewise.
3071 (c_parser_postfix_expression_after_paren_type): Likewise.
3072 (c_parser_postfix_expression_after_primary): Likewise.
3073 (c_parser_expression): Likewise.
3074 (c_parser_omp_variable_list): Likewise.
3075 (c_parser_transaction_expression): Likewise.
3076 * c-tree.h (c_expr::set_error): Likewise.
3077 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
3078 (parser_build_unary_op): Likewise.
3079 (parser_build_binary_op): Likewise.
3080 (digest_init): Likewise.
3081 (pop_init_level): Likewise.
3082 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
3084 2022-09-19 Marek Polacek <polacek@redhat.com>
3087 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
3090 2022-09-15 Richard Biener <rguenther@suse.de>
3092 * c-decl.cc (build_void_list_node): Remove.
3094 2022-09-14 Julian Brown <julian@codesourcery.com>
3096 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
3099 2022-09-07 Joseph Myers <joseph@codesourcery.com>
3101 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
3102 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
3103 for C2x spellings of keywords.
3104 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
3106 2022-09-06 Jakub Jelinek <jakub@redhat.com>
3108 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
3109 in omp_cur_iteration - 1 has integer_type_node type.
3111 2022-09-03 Jakub Jelinek <jakub@redhat.com>
3113 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
3114 (c_parser_omp_clause_depend_sink): Renamed to ...
3115 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
3116 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
3117 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
3118 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
3119 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
3120 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
3121 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
3122 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
3123 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
3124 (c_parser_omp_clause_doacross): New function.
3125 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
3126 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
3127 OMP_CLAUSE_DEPEND_SOURCE.
3128 (c_parser_omp_for_loop): Don't diagnose here linear clause together
3129 with ordered with argument.
3130 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
3132 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
3133 (c_parser_omp_ordered): Handle also doacross and adjust for it
3135 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
3136 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
3138 2022-09-02 David Malcolm <dmalcolm@redhat.com>
3141 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
3142 (c_parser_expr_no_commas): Likewise.
3143 (c_parser_conditional_expression): Likewise.
3144 (c_parser_binary_expression): Clear m_decimal when popping the
3146 (c_parser_unary_expression): Clear ret.m_decimal.
3147 (c_parser_has_attribute_expression): Likewise for result.
3148 (c_parser_predefined_identifier): Likewise for expr.
3149 (c_parser_postfix_expression): Likewise for expr.
3150 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
3152 * c-tree.h (c_expr::m_decimal): New bitfield.
3153 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
3154 (parser_build_binary_op): Call check_for_xor_used_as_pow.
3156 2022-09-01 Joseph Myers <joseph@codesourcery.com>
3158 * c-decl.cc (grokparms): Handle () in a function declaration the
3159 same as (void) for C2X.
3161 2022-08-31 Joseph Myers <joseph@codesourcery.com>
3163 * c-parser.cc (c_parser_label): Pass attributes to do_case.
3164 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
3167 2022-08-26 Jakub Jelinek <jakub@redhat.com>
3169 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
3171 2022-08-25 Marek Polacek <polacek@redhat.com>
3173 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
3174 Give a better diagnostic when converting to nullptr_t.
3175 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
3177 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
3178 (c_parser_postfix_expression): Handle RID_NULLPTR.
3179 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
3181 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
3182 (build_conditional_expr): Handle the case when the second/third operand
3183 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
3184 (convert_for_assignment): Handle converting an expression of type
3185 nullptr_t to pointer/bool.
3186 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
3187 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
3189 2022-08-25 Joseph Myers <joseph@codesourcery.com>
3191 * c-decl.cc (start_decl): Do not diagnose initialization of
3192 variable-sized objects here.
3193 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
3195 (c_parser_initializer): Diagnose initialization of variable-sized
3196 objects other than with braced initializer.
3197 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
3198 braces and update diagnostic text. Diagnose initialization of
3199 variable-sized objects with nonempty braces.
3200 * c-typeck.cc (digest_init): Update diagnostic for initialization
3201 of variable-sized objects.
3202 (really_start_incremental_init, set_designator)
3203 (process_init_element): Update comments.
3204 (pop_init_level): Allow scalar empty initializers.
3206 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
3207 Chung-Lin Tang <cltang@codesourcery.com>
3210 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
3211 instead of removed langhook.
3212 * c-typeck.cc (c_finish_omp_clauses): Likewise.
3214 2022-08-11 Marek Polacek <polacek@redhat.com>
3216 PR middle-end/102633
3217 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
3218 Call suppress_warning.
3219 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
3220 (c_parser_omp_declare_reduction): Pass omp_priv down to
3221 c_parser_initializer.
3223 2022-08-08 Tom Honermann <tom@honermann.net>
3225 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
3226 of CPP_UTF8STRING when char8_t support is enabled.
3227 * c-typeck.cc (digest_init): Allow initialization of an array
3228 of character type by a string literal with type array of
3231 2022-08-01 David Malcolm <dmalcolm@redhat.com>
3233 * c-typeck.cc (build_c_cast): Quote names of address spaces in
3235 (convert_for_assignment): Add a note to address space mismatch
3236 diagnostics, specifying the expected and actual types.
3238 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
3240 PR preprocessor/97498
3241 * c-parser.cc (c_parser_pragma): Set input_location to the
3242 location of the pragma, rather than the start of the line.
3244 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
3245 Chung-Lin Tang <cltang@codesourcery.com>
3246 Thomas Schwinge <thomas@codesourcery.com>
3248 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
3249 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
3250 OMP_REQUIRES_TARGET_USED.
3251 (c_parser_omp_requires): Remove sorry.
3253 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
3255 * c-parser.cc (c_parser_omp_target_enter_data,
3256 c_parser_omp_target_exit_data): Accept tofrom
3257 map-type modifier but use 'to' / 'from' internally.
3259 2022-06-16 David Malcolm <dmalcolm@redhat.com>
3261 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
3262 group the warning with any note.
3263 (warn_about_goto): Likewise to group error or warning with note.
3264 Bail out if the warning wasn't emitted, to avoid emitting orphan
3266 (lookup_label_for_goto): Add auto_diagnostic_group to
3267 group the error with the note.
3268 (check_earlier_gotos): Likewise.
3269 (c_check_switch_jump_warnings): Likewise for any error/warning.
3270 Conditionalize emission of the notes.
3271 (diagnose_uninitialized_cst_member): Likewise for warning,
3272 conditionalizing emission of the note.
3273 (grokdeclarator): Add auto_diagnostic_group to group the "array
3274 type has incomplete element type" error with any note.
3275 (parser_xref_tag): Add auto_diagnostic_group to group warnings
3276 with their notes. Conditionalize emission of notes.
3277 (start_struct): Add auto_diagnostic_group to group the
3278 "redefinition of" errors with any note.
3279 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
3280 (check_for_loop_decls): Likewise for pre-C99 error.
3282 2022-06-07 Jakub Jelinek <jakub@redhat.com>
3284 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
3285 style linear clause modifiers. Set
3286 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
3287 old style modifiers are used.
3288 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
3289 with val modifier on simd or for if the old style modifiers are
3292 2022-06-02 David Malcolm <dmalcolm@redhat.com>
3294 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
3295 (c_get_sarif_source_language): New.
3296 * c-tree.h (c_get_sarif_source_language): New decl.
3298 2022-05-31 Jason Merrill <jason@redhat.com>
3300 * Make-lang.in (c.tags): Look at *.cc.
3302 2022-05-31 Jakub Jelinek <jakub@redhat.com>
3304 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
3307 2022-05-28 Jakub Jelinek <jakub@redhat.com>
3309 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
3310 seen first, use "%<to%>" or "%<enter%>" depending on
3311 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
3312 "%<to%> or %<enter%>" wording.
3314 2022-05-27 Jakub Jelinek <jakub@redhat.com>
3316 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
3317 (c_parser_omp_all_clauses): For to clause on declare target, use
3318 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
3319 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
3320 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
3321 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
3322 OMP_CLAUSE_TO_DECLARE.
3323 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
3324 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
3325 name in diagnostics instead of
3326 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
3328 2022-05-25 Jakub Jelinek <jakub@redhat.com>
3331 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
3332 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
3333 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
3334 diagnostic and fixit hint if DATUM has pointer type.
3335 * c-parser.cc (c_parser_postfix_expression,
3336 c_parser_omp_variable_list): Adjust build_component_ref callers.
3337 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
3340 2022-05-24 Jakub Jelinek <jakub@redhat.com>
3343 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
3345 2022-05-18 Marek Polacek <polacek@redhat.com>
3348 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
3350 * c-tree.h (comptypes_check_enum_int): Declare.
3351 * c-typeck.cc (comptypes): No longer static.
3353 2022-05-17 Marek Polacek <polacek@redhat.com>
3355 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
3358 2022-05-17 Jakub Jelinek <jakub@redhat.com>
3360 * c-parser.cc (c_parser_omp_clause_depend): Parse
3361 inoutset depend-kind.
3362 (c_parser_omp_depobj): Likewise.
3364 2022-05-16 Martin Liska <mliska@suse.cz>
3366 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
3368 2022-05-12 Jakub Jelinek <jakub@redhat.com>
3370 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
3372 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
3373 in postfix expressions.
3374 (c_parser_omp_variable_list): Handle omp_all_memory in depend
3376 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
3377 keyword in depend clause as null_pointer_node, diagnose invalid
3380 2022-05-09 Martin Liska <mliska@suse.cz>
3382 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
3384 (c_parser_binary_expression): Likewise.
3386 2022-05-07 Marek Polacek <polacek@redhat.com>
3390 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
3392 2022-04-08 Jakub Jelinek <jakub@redhat.com>
3395 * c-typeck.cc (c_build_va_arg): Reject function types.
3397 2022-03-22 Marek Polacek <polacek@redhat.com>
3401 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
3402 (start_init): Set it.
3403 (finish_init): Restore constructor_designated.
3404 (push_init_level): Set constructor_designated to the value of
3405 constructor_designated in the upper constructor_stack.
3407 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
3410 * c-typeck.cc (handle_omp_array_sections_1)
3411 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
3412 instead of 'c_omp_map_clause_name'.
3414 2022-03-09 Joseph Myers <joseph@codesourcery.com>
3416 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
3417 differently from earlier standards for unprototyped function type
3420 2022-03-09 Jakub Jelinek <jakub@redhat.com>
3423 * c-fold.cc (c_fully_fold_internal): Don't emit
3424 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
3425 * c-typeck.cc (build_binary_op): Likewise.
3427 2022-03-07 Jakub Jelinek <jakub@redhat.com>
3429 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
3432 2022-02-23 Richard Biener <rguenther@suse.de>
3434 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
3435 SSA names without definition.
3436 (c_parser_gimple_declaration): Handle pointer typed SSA names.
3438 2022-02-17 Jakub Jelinek <jakub@redhat.com>
3441 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
3442 convert_lvalue_to_rvalue and build_indirect_ref instead of
3443 build_simple_mem_ref.
3445 2022-02-11 Richard Biener <rguenther@suse.de>
3447 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
3450 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
3452 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
3454 (c_parser_omp_variable_list): Handle array sections.
3455 (c_parser_omp_clause_has_device_addr): Added.
3456 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
3458 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
3460 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
3461 (c_finish_omp_clauses): Handle array sections.
3463 2022-02-09 Jakub Jelinek <jakub@redhat.com>
3466 * c-parser.cc (c_parser_postfix_expression)
3467 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
3468 instead of build1_loc to build PAREN_EXPR.
3469 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
3470 * c-fold.cc (c_fully_fold_internal): Likewise.
3472 2022-01-17 Martin Liska <mliska@suse.cz>
3474 * Make-lang.in: Rename .c names to .cc.
3475 * c-convert.cc: Likewise.
3476 * c-decl.cc (struct lang_identifier): Likewise.
3477 (pop_scope): Likewise.
3478 (finish_decl): Likewise.
3479 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
3480 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
3481 * c-parser.h (GCC_C_PARSER_H): Likewise.
3482 * c-tree.h (c_keyword_starts_typename): Likewise.
3483 (finish_declspecs): Likewise.
3484 (c_get_alias_set): Likewise.
3485 (enum c_oracle_request): Likewise.
3486 (tag_exists_p): Likewise.
3487 (set_c_expr_source_range): Likewise.
3488 * c-typeck.cc (c_common_type): Likewise.
3489 (c_finish_omp_clauses): Likewise.
3490 * config-lang.in: Likewise.
3492 2022-01-17 Martin Liska <mliska@suse.cz>
3494 * c-aux-info.c: Moved to...
3495 * c-aux-info.cc: ...here.
3496 * c-convert.c: Moved to...
3497 * c-convert.cc: ...here.
3498 * c-decl.c: Moved to...
3499 * c-decl.cc: ...here.
3500 * c-errors.c: Moved to...
3501 * c-errors.cc: ...here.
3502 * c-fold.c: Moved to...
3503 * c-fold.cc: ...here.
3504 * c-lang.c: Moved to...
3505 * c-lang.cc: ...here.
3506 * c-objc-common.c: Moved to...
3507 * c-objc-common.cc: ...here.
3508 * c-parser.c: Moved to...
3509 * c-parser.cc: ...here.
3510 * c-typeck.c: Moved to...
3511 * c-typeck.cc: ...here.
3512 * gccspec.c: Moved to...
3513 * gccspec.cc: ...here.
3514 * gimple-parser.c: Moved to...
3515 * gimple-parser.cc: ...here.
3517 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
3519 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
3521 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
3524 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
3525 outer node for ARRAY_REFs.
3527 2022-01-01 Jakub Jelinek <jakub@redhat.com>
3530 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
3531 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
3533 2021-12-17 Marek Polacek <polacek@redhat.com>
3536 * c-decl.c (c_warn_unused_attributes): Don't warn for
3537 attribute_ignored_p.
3538 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
3539 arguments when the attribute is ignored.
3541 2021-12-14 Jakub Jelinek <jakub@redhat.com>
3544 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
3545 consume the pragma and silently skip to the pragma eol.
3547 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
3549 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
3550 * c-parser.c: Likewise.
3552 2021-12-09 Jakub Jelinek <jakub@redhat.com>
3555 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
3556 to resort_data.new_value.
3558 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
3560 * c-parser.c (struct omp_dim): New struct type for use inside
3561 c_parser_omp_variable_list.
3562 (c_parser_omp_variable_list): Allow multiple levels of array and
3563 component accesses in array section base-pointer expression.
3564 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
3565 c_parser_omp_var_list_parens.
3566 (c_parser_omp_clause_from): Likewise.
3567 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
3568 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
3570 (c_finish_omp_clauses): Extend allowed ranged of expressions
3571 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
3573 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
3576 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
3577 call to c_parser_omp_variable_list to 'true'.
3578 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
3579 array base handling.
3580 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
3582 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
3584 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
3585 orphan loop" checking.
3587 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
3588 Thomas Schwinge <thomas@codesourcery.com>
3590 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
3591 OpenACC gang reductions.
3593 2021-11-30 Richard Biener <rguenther@suse.de>
3595 * gimple-parser.c (c_parser_gimple_postfix_expression):
3596 avoid unreachable code after break.
3598 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
3601 * Make-lang.in: Use ETAGS variable in TAGS target.
3603 2021-11-29 Richard Biener <rguenther@suse.de>
3605 * c-typeck.c (c_tree_equal): Remove unreachable return.
3606 * c-parser.c (get_matching_symbol): Likewise.
3608 2021-11-23 Jakub Jelinek <jakub@redhat.com>
3610 * c-typeck.c (c_clone_omp_udr): Don't initialize
3611 id.transform_lang_insert_block.
3613 2021-11-19 Martin Sebor <msebor@redhat.com>
3617 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
3618 code resulting from macro expansion.
3620 2021-11-19 Martin Liska <mliska@suse.cz>
3623 2021-11-19 Martin Liska <mliska@suse.cz>
3625 * c-parser.c (add_debug_begin_stmt): Use option directly.
3627 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
3629 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
3630 * c-parser.c (c_parser_postfix_expression): Likewise.
3632 2021-11-18 Martin Liska <mliska@suse.cz>
3634 * c-parser.c (add_debug_begin_stmt): Use option directly.
3636 2021-11-17 Martin Sebor <msebor@redhat.com>
3639 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
3640 bounds before deciding if they're constant.
3642 2021-11-15 Jakub Jelinek <jakub@redhat.com>
3644 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
3645 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
3647 2021-11-11 Jakub Jelinek <jakub@redhat.com>
3649 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
3650 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
3651 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
3652 OMP_CLAUSE_NUM_TEAMS_EXPR.
3653 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
3654 combined target teams even lower-bound expression.
3656 2021-11-11 Richard Biener <rguenther@suse.de>
3658 * gimple-parser.c: Shuffle bitmap.h include.
3660 2021-11-03 Joseph Myers <joseph@codesourcery.com>
3663 * c-convert.c (c_convert): New function, based on convert.
3664 (convert): Make into wrapper of c_convert.
3665 (convert_init): New function.
3666 * c-typeck.c (enum impl_conv): Add ic_init_const.
3667 (convert_for_assignment): Handle ic_init_const like ic_init. Add
3668 new argument to convert_and_check call.
3669 (digest_init): Pass ic_init_const to convert_for_assignment for
3670 initializers required to be constant.
3672 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
3674 * c-tree.h (c_simulate_record_decl): Declare.
3675 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
3676 * c-decl.c (c_simulate_record_decl): New function.
3678 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
3681 * Make-lang.in: Add dummy c.install-dvi target.
3683 2021-10-15 Richard Biener <rguenther@suse.de>
3687 (c_parser_gimple_postfix_expression_after_primary): Check
3688 for a pointer do be dereferenced by ->.
3690 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
3692 * c-parser.c (c_finish_omp_declare_variant): Change call from
3693 c_omp_check_context_selector to omp_check_context_selector. Change
3694 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
3696 2021-10-09 Jakub Jelinek <jakub@redhat.com>
3698 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
3699 (c_parser_omp_scan_loop_body): Use it.
3700 (c_parser_omp_sections_scope): Likewise.
3702 2021-10-07 Richard Biener <rguenther@suse.de>
3704 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
3706 2021-10-05 Richard Biener <rguenther@suse.de>
3709 * gimple-parser.c (c_parser_gimple_postfix_expression):
3710 Accept more address _Literals.
3712 2021-10-04 Marek Polacek <polacek@redhat.com>
3715 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
3717 2021-10-01 Martin Sebor <msebor@redhat.com>
3720 * c-typeck.c (maybe_warn_for_null_address): New function.
3721 (build_binary_op): Call it.
3723 2021-10-01 Jakub Jelinek <jakub@redhat.com>
3724 Richard Biener <rguenther@suse.de>
3727 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3728 for division even for SANITIZE_SI_OVERFLOW.
3730 2021-10-01 Jakub Jelinek <jakub@redhat.com>
3732 * c-parser.c (c_parser_omp_clause_order): Set
3733 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
3735 2021-09-28 Andrew Pinski <apinski@marvell.com>
3738 * c-parser.c (c_parser_statement_after_labels): Pass
3739 the c_expr instead of the tree to c_finish_goto_ptr.
3740 * c-typeck.c (c_finish_goto_ptr): Change the second
3741 argument type to c_expr.
3742 * c-tree.h (c_finish_goto_ptr): Likewise.
3743 Error out if the expression was not of a pointer type.
3745 2021-09-22 Jakub Jelinek <jakub@redhat.com>
3747 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
3750 2021-09-18 Jakub Jelinek <jakub@redhat.com>
3752 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
3753 and reproducible modifiers.
3754 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
3756 2021-09-18 Jakub Jelinek <jakub@redhat.com>
3758 * c-parser.c (c_parser_omp_clause_default): Handle private and
3759 firstprivate arguments, adjust diagnostics on unknown argument.
3761 2021-09-17 Jakub Jelinek <jakub@redhat.com>
3763 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
3766 2021-09-10 Jakub Jelinek <jakub@redhat.com>
3768 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
3769 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
3770 don't call build_conditional_expr, instead build a COND_EXPR directly.
3771 (c_parser_binary_expression): Avoid calling parser_build_binary_op
3772 if omp_atomic_lhs even in more cases for >, < or ==.
3773 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
3774 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
3775 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
3776 * c-typeck.c (build_binary_op): For flag_openmp only handle
3779 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
3781 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
3784 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
3786 * c-decl.c (enum deprecated_states): Add unavailable state.
3787 (merge_decls): Copy unavailability.
3788 (quals_from_declspecs): Handle unavailable case.
3789 (start_decl): Amend the logic handling suppression of nested
3790 deprecation states to include unavailability.
3791 (smallest_type_quals_location): Amend comment.
3792 (grokdeclarator): Handle the unavailable deprecation state.
3793 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
3794 * c-tree.h (struct c_declspecs): Add unavailable_p.
3795 * c-typeck.c (build_component_ref): Handle unavailability.
3796 (build_external_ref): Likewise.
3798 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
3799 Joseph Myers <joseph@codesourcery.com>
3802 * c-decl.c (duplicate_decls): On significant mismatches, mark the
3803 types of both (non-function) decls as error_mark_node, so that the
3804 middle-end can see the code is malformed.
3805 (free_attr_access_data): Don't process if the type has been set to
3808 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
3810 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
3811 and 'ancestor' in 'target device' clauses.
3813 2021-08-23 Jakub Jelinek <jakub@redhat.com>
3815 * c-parser.c (c_parser_omp_clause_num_tasks,
3816 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
3818 2021-08-22 Martin Uecker <muecker@gwdg.de>
3821 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
3822 for pointers to arrays with qualifiers.
3823 (build_conditional_expr): For C23 don't lose qualifiers for pointers
3824 to arrays when the other pointer is a void pointer. Update warnings.
3825 (convert_for_assignment): Update warnings for C2X when converting from
3826 void* with qualifiers to a pointer to array with the same qualifiers.
3828 2021-08-20 Jakub Jelinek <jakub@redhat.com>
3830 * c-parser.c (c_parser_omp_error): New function.
3831 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
3833 2021-08-20 Jakub Jelinek <jakub@redhat.com>
3835 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
3836 comma at the end of list.
3837 (c_parser_omp_requires): Likewise.
3839 2021-08-19 Jakub Jelinek <jakub@redhat.com>
3841 * c-parser.c (c_parser_omp_requires): Don't call
3842 c_parser_peek_2nd_token and optionally consume token if current
3843 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
3845 2021-08-18 Jakub Jelinek <jakub@redhat.com>
3847 * c-parser.c (c_parser_omp_nothing): New function.
3848 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
3850 2021-08-18 Jakub Jelinek <jakub@redhat.com>
3852 * c-parser.c (c_parser_statement_after_labels): Add restart label
3853 near the start of the function. If c_parser_pragma returns false,
3855 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
3856 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
3857 return what c_parser_omp_declare returned. Return true instead of
3858 false after emitting errors that the directive is not allowed in
3859 pragma_stmt context.
3860 (c_parser_omp_ordered): Return true instead of
3861 false after emitting errors that the directive is not allowed in
3862 pragma_stmt context.
3863 (c_parser_omp_target_update): Likewise.
3864 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
3865 Change return type from tree to bool, return false if the
3866 directive should be ignored in pragma_stmt contexts.
3867 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
3868 return their result directly.
3869 (c_parser_omp_cancellation_point): Change return type from void to
3870 bool, return false if the directive should be ignored in pragma_stmt
3872 (c_parser_omp_declare): Likewise.
3874 2021-08-17 Jakub Jelinek <jakub@redhat.com>
3876 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
3877 (c_parser_omp_scope): New function.
3878 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
3880 2021-08-12 Jakub Jelinek <jakub@redhat.com>
3882 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
3883 (c_parser_omp_clause_filter): New function.
3884 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
3885 (OMP_MASKED_CLAUSE_MASK): Define.
3886 (c_parser_omp_masked): New function.
3887 (c_parser_omp_parallel): Handle parallel masked.
3888 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
3889 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
3891 2021-08-12 Martin Uecker <muecker@gwdg.de>
3895 * c-typeck.c (c_expr_sizeof_type): Evaluate
3896 size expressions for structs of variable size.
3898 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
3900 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
3901 'primary' as alias for 'master'.
3903 2021-08-10 Martin Uecker <muecker@gwdg.de>
3906 * c-typeck.c (c_expr_sizeof_expr): Evaluate
3907 size expressions for structs of variable size.
3909 2021-08-06 Tamar Christina <tamar.christina@arm.com>
3911 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
3912 * c-tree.h (c_simulate_enum_decl): Likewise.
3914 2021-08-06 Martin Sebor <msebor@redhat.com>
3916 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
3917 vec arguments to by-reference.
3918 (c_finish_omp_declare_simd): Same.
3919 (c_parser_compound_statement_nostart): Same.
3920 (c_parser_for_statement): Same.
3921 (c_parser_objc_methodprotolist): Same.
3922 (c_parser_oacc_routine): Same.
3923 (c_parser_omp_for_loop): Same.
3924 (c_parser_omp_declare_simd): Same.
3926 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
3927 Joseph Myers <joseph@codesourcery.com>
3928 Cesar Philippidis <cesar@codesourcery.com>
3930 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
3931 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
3932 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
3933 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
3935 2021-07-20 Martin Sebor <msebor@redhat.com>
3937 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
3939 * c-typeck.c (c_build_function_call_vec): Same.
3941 2021-07-15 Martin Sebor <msebor@redhat.com>
3945 * c-decl.c (get_parm_array_spec): Strip nops.
3947 2021-07-06 Martin Sebor <msebor@redhat.com>
3949 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
3951 2021-07-02 Jakub Jelinek <jakub@redhat.com>
3954 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
3955 appears before a CPP_NAME.
3957 2021-06-25 Martin Sebor <msebor@redhat.com>
3959 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
3960 warning_suppressed_p, suppress_warning, and copy_no_warning.
3961 (diagnose_mismatched_decls): Same.
3962 (duplicate_decls): Same.
3963 (grokdeclarator): Same.
3964 (finish_function): Same.
3965 (c_write_global_declarations_1): Same.
3966 * c-fold.c (c_fully_fold_internal): Same.
3967 * c-parser.c (c_parser_expr_no_commas): Same.
3968 (c_parser_postfix_expression): Same.
3969 * c-typeck.c (array_to_pointer_conversion): Same.
3970 (function_to_pointer_conversion): Same.
3971 (default_function_array_conversion): Same.
3972 (convert_lvalue_to_rvalue): Same.
3973 (default_conversion): Same.
3974 (build_indirect_ref): Same.
3975 (build_function_call_vec): Same.
3976 (build_atomic_assign): Same.
3977 (build_unary_op): Same.
3978 (c_finish_return): Same.
3979 (emit_side_effect_warnings): Same.
3980 (c_finish_stmt_expr): Same.
3981 (c_omp_clause_copy_ctor): Same.
3983 2021-06-24 Jakub Jelinek <jakub@redhat.com>
3986 * c-parser.c (c_parser_has_attribute_expression): Set source range for
3989 2021-06-24 Jakub Jelinek <jakub@redhat.com>
3992 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
3995 2021-06-24 Jakub Jelinek <jakub@redhat.com>
3997 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
3998 C_ORT_OMP for clauses on target construct.
3999 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
4000 (c_parser_omp_target): For non-combined target add
4001 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
4002 C_ORT_OMP_TARGET to c_finish_omp_clauses.
4003 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
4004 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
4005 never present on C_ORT_*DECLARE_SIMD.
4006 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
4007 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
4008 corresponding map clauses.
4010 2021-06-21 Jakub Jelinek <jakub@redhat.com>
4012 PR inline-asm/100785
4013 * c-typeck.c (c_mark_addressable): Diagnose trying to make
4014 bit-fields addressable.
4016 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
4018 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
4021 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
4024 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
4025 var in the error case.
4027 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
4030 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
4031 spot built-in functions.
4033 2021-06-06 Jakub Jelinek <jakub@redhat.com>
4036 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
4037 even when target is combined with other constructs.
4039 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
4042 * c-decl.c (finish_struct): Fix thinko in previous change.
4043 * c-typeck.c (convert_for_assignment): Do not warn on pointer
4044 assignment and initialization for storage order purposes if the
4045 RHS is a call to a DECL_IS_MALLOC function.
4047 2021-06-04 Martin Sebor <msebor@redhat.com>
4050 * c-objc-common.c (print_type): Handle erroneous types.
4052 2021-06-03 Jakub Jelinek <jakub@redhat.com>
4055 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
4056 after depend only cases.
4058 2021-05-31 Richard Biener <rguenther@suse.de>
4061 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
4062 * c-parser.c (c_parser_postfix_expression): Likewise.
4064 2021-05-28 Richard Biener <rguenther@suse.de>
4067 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
4068 invalid if conditions.
4070 2021-05-28 Jakub Jelinek <jakub@redhat.com>
4073 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
4074 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
4075 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
4076 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
4077 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
4078 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
4079 if present in map_head, map_field_head or map_firstprivate_head
4082 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
4084 * c-parser.c (c_parser_omp_clause_affinity): New.
4085 (c_parser_omp_clause_name, c_parser_omp_variable_list,
4086 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
4087 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
4088 c_finish_omp_clauses): Likewise.
4090 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
4093 * c-decl.c (finish_struct): Warn for a union containing an aggregate
4094 field with a differing scalar storage order.
4096 2021-05-21 Jakub Jelinek <jakub@redhat.com>
4099 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
4100 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
4101 if a decl is mentioned both in map clause and in such firstprivate
4102 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
4104 2021-05-19 Jakub Jelinek <jakub@redhat.com>
4107 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
4108 master when combined with taskloop.
4109 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
4110 parallel master when not combined with taskloop.
4112 2021-05-18 Richard Biener <rguenther@suse.de>
4115 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
4116 Diagnose calls to non-functions.
4117 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
4119 2021-05-17 Richard Biener <rguenther@suse.de>
4122 * gimple-parser.c (c_parser_gimple_label): Avoid building
4123 a GIMPLE label with NULL label decl.
4125 2021-05-13 Martin Sebor <msebor@redhat.com>
4128 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
4130 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
4132 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
4135 2021-05-10 Martin Liska <mliska@suse.cz>
4137 * c-aux-info.c (affix_data_type): Use startswith
4138 function instead of strncmp.
4139 * c-typeck.c (build_function_call_vec): Likewise.
4140 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
4142 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
4144 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
4145 on the address of a pointer field in a record with reverse SSO.
4147 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
4149 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
4150 for || and && reductions.
4152 2021-04-29 Joseph Myers <joseph@codesourcery.com>
4154 * c-typeck.c (function_types_compatible_p): For C2X, treat
4155 unprototyped function as compatible with non-variadic prototyped
4156 function even if some argument types are changed by the default
4157 argument promotions.
4159 2021-04-15 Martin Sebor <msebor@redhat.com>
4163 * c-decl.c (pushdecl): Always propagate type attribute.
4165 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
4168 * c-typeck.c (c_common_type): Do not drop attributes that
4169 affect type identity.
4171 2021-04-10 Jakub Jelinek <jakub@redhat.com>
4174 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
4177 2021-03-25 Jakub Jelinek <jakub@redhat.com>
4180 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
4183 2021-03-19 Jakub Jelinek <jakub@redhat.com>
4186 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
4187 with modifycode NOP_EXPR produces and mark the _Atomic var as read
4189 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
4190 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
4191 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
4193 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
4196 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
4197 ensure that the varpool node is marked as offloadable.
4199 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
4202 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
4204 2021-02-24 Martin Sebor <msebor@redhat.com>
4207 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
4209 2021-02-18 Jakub Jelinek <jakub@redhat.com>
4212 * c-typeck.c (c_finish_return): Don't wrap retval into
4213 EXCESS_PRECISION_EXPR in functions that return void.
4215 2021-02-11 Marek Polacek <polacek@redhat.com>
4217 * c-parser.c (c_parser_if_statement): Use vec_free.
4219 2021-02-04 Martin Sebor <msebor@redhat.com>
4222 * c-decl.c (locate_old_decl): Add type to diagnostic output.
4223 (diagnose_mismatched_decls): Same.
4224 (start_function): Introduce temporaries for better readability.
4225 * c-typeck.c (comptypes_internal): Only consider complete enum
4226 types in comparisons with integers.
4228 2021-02-01 Martin Sebor <msebor@redhat.com>
4231 * c-decl.c (free_attr_access_data): New function.
4232 (c_parse_final_cleanups): Call free_attr_access_data.
4234 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
4236 * c-parser.c (c_parser_omp_clause_detach): New.
4237 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
4238 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
4239 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
4240 clause. Prevent use of detach with mergeable and overriding the
4241 data sharing mode of the event handle.
4243 2021-01-15 Jakub Jelinek <jakub@redhat.com>
4245 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
4246 unqualified element type and then call c_build_qualified_type on the
4249 2021-01-07 Richard Biener <rguenther@suse.de>
4251 * gimple-parser.c (c_parser_gimple_compound_statement): Only
4252 reallocate loop array if it is too small.
4254 2020-12-16 Martin Uecker <muecker@gwdg.de>
4257 * c-typeck.c (build_modify_expr): Drop qualifiers.
4259 2020-12-16 Martin Uecker <muecker@gwdg.de>
4262 * c-parser.c (c_parser_expression): Look into
4263 nop expression when marking expressions as read.
4265 2020-12-14 Martin Liska <mliska@suse.cz>
4268 * c-typeck.c (pointer_diff): Do not emit a top-level
4270 (build_binary_op): Likewise.
4272 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
4274 * c-parser.c (c_parser_omp_allocate): New.
4275 (c_parser_omp_construct): Call it.
4277 2020-12-09 Richard Biener <rguenther@suse.de>
4280 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
4283 2020-12-07 Martin Uecker <muecker@gwdg.de>
4286 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
4287 that drops qualifiers to the end of the function.
4289 2020-11-26 Martin Uecker <muecker@gwdg.de>
4293 * c-parser.c (c_parser_declaration_or_fndef): Remove
4294 redundant code to drop qualifiers of _Atomic types for __auto_type.
4295 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
4296 types for __typeof__.
4298 2020-11-24 Jakub Jelinek <jakub@redhat.com>
4301 * c-parser.c (c_parser_binary_expression): For omp atomic binary
4302 expressions, use make_node instead of build2 to avoid checking build2
4305 2020-11-23 Joseph Myers <joseph@codesourcery.com>
4308 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
4309 for comparisons of complete and incomplete pointers.
4311 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
4313 * c-aux-info.c (gen_type): Support opaque types.
4315 2020-11-20 Martin Sebor <msebor@redhat.com>
4318 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
4320 2020-11-20 Jakub Jelinek <jakub@redhat.com>
4323 * Make-lang.in (c.serial): Change from goal to a variable.
4324 (.PHONY): Drop c.serial.
4326 2020-11-20 Martin Uecker <muecker@gwdg.de>
4328 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
4330 2020-11-19 Jakub Jelinek <jakub@redhat.com>
4333 * c-decl.c (get_parm_array_spec): Bail out of nelts is
4336 2020-11-18 Jakub Jelinek <jakub@redhat.com>
4338 * Make-lang.in (c.serial): New goal.
4339 (.PHONY): Add c.serial c.prev.
4340 (cc1$(exeext)): Call LINK_PROGRESS.
4342 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
4344 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
4346 * c-typeck.c (build_asm_expr): Remove an assert checking output
4347 absence for asm goto.
4349 2020-11-13 Jakub Jelinek <jakub@redhat.com>
4351 * c-typeck.c (c_finish_omp_clauses): Don't clear
4352 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
4354 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
4357 * c-parser.c (c_parser_objc_class_definition): Pass the
4358 location of the class name to the interface declaration.
4360 2020-11-10 Strager Neds <strager.nds@gmail.com>
4362 * c-decl.c (merge_decls): Use new overload of
4363 set_decl_section_name.
4365 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
4367 * c-parser.c (c_parser_omp_target_data): Add use of
4368 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
4369 handled map clause kind.
4370 (c_parser_omp_target_enter_data): Likewise.
4371 (c_parser_omp_target_exit_data): Likewise.
4372 (c_parser_omp_target): Likewise.
4373 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
4374 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
4375 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
4376 same struct field access to co-exist on OpenMP construct.
4378 2020-11-07 Martin Uecker <muecker@gwdg.de>
4380 * c-parser.c (c_parser_label): Implement mixing of labels and code.
4381 (c_parser_all_labels): Likewise.
4383 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
4385 * c-parser.c (c_parser_objc_at_property_declaration):
4386 Improve parsing fidelity. Associate better location info
4387 with @property attributes. Clean up the interface to
4388 objc_add_property_declaration ().
4390 2020-11-06 Nathan Sidwell <nathan@acm.org>
4392 * c-decl.c (diagnose_mismatched_decls): Rename
4393 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
4394 (warn_if_shadowing, implicitly_declare, names_builtin_p)
4395 (collect_source_refs): Likewise.
4396 * c-typeck.c (inform_declaration, inform_for_arg)
4397 (convert_for_assignment): Likewise.
4399 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
4401 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
4403 (c_parser_omp_construct): Update call.
4405 2020-11-04 Jakub Jelinek <jakub@redhat.com>
4408 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
4409 find underlying decl to clear in the aligned_head bitmap.
4411 2020-11-04 Joseph Myers <joseph@codesourcery.com>
4413 * c-decl.c (handle_nodiscard_attribute): New.
4414 (std_attribute_table): Add nodiscard.
4415 * c-parser.c (c_parser_std_attribute): Expect argument to
4416 nodiscard attribute to be a string. Do not special-case ignoring
4418 * c-typeck.c (maybe_warn_nodiscard): New.
4419 (build_compound_expr, emit_side_effect_warnings): Call
4420 maybe_warn_nodiscard.
4421 (c_process_expr_stmt, c_finish_stmt_expr): Also call
4422 emit_side_effect_warnings if warn_unused_result.
4424 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
4426 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
4428 (finish_init): Likewise.
4429 (pop_init_level): Likewise.
4431 2020-10-28 Joseph Myers <joseph@codesourcery.com>
4433 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
4434 error_at for omitted parameter name.
4436 2020-10-28 Jakub Jelinek <jakub@redhat.com>
4438 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
4439 (c_parser_omp_clause_allocate): New function.
4440 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
4441 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4442 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
4443 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
4444 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
4445 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
4446 PRAGMA_OMP_CLAUSE_ALLOCATE.
4447 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
4449 2020-10-27 Joseph Myers <joseph@codesourcery.com>
4451 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
4452 standard attributes.
4454 2020-10-23 Marek Polacek <polacek@redhat.com>
4457 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
4458 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
4459 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
4460 * c-tree.h (char_type_p): Declare.
4461 * c-typeck.c (char_type_p): No longer static.
4463 2020-10-23 Martin Sebor <msebor@redhat.com>
4466 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
4468 2020-09-19 Martin Sebor <msebor@redhat.com>
4471 * c-decl.c (lookup_last_decl): Define new function.
4472 (c_decl_attributes): Call it.
4473 (start_decl): Add argument and use it.
4474 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
4475 (get_parm_array_spec): Define new function.
4476 (push_parm_decl): Call get_parm_array_spec.
4477 (start_function): Call warn_parm_array_mismatch. Build attribute
4478 access and add it to current function.
4479 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
4480 in forms of array parameters.
4481 * c-tree.h (start_decl): Add argument.
4483 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
4485 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
4487 (in_statement): New.
4488 (start_function): Adjust for above change.
4489 (c_push_function_context, c_pop_function_context): Likewise.
4490 * c-lang.h (struct language_function): Likewise.
4491 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
4492 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
4494 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
4495 (c_parser_switch_statement): Adjust break/switch context handling
4496 and calls to renamed functions.
4497 (c_parser_while_statement): Adjust break/switch context handling and
4499 (c_parser_do_statement): Ditto, with DO_STMT respectively.
4500 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
4501 (c_parser_omp_for_loop): Adjust break/switch context handling.
4502 * c-tree.h (c_break_label, c_cont_label): Delete.
4503 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
4504 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
4505 (in_statement, switch_statement_break_seen_p): Declare.
4506 (c_start_case, c_finish_case): Renamed to...
4507 (c_start_switch, c_finish_switch).
4508 (c_finish_bc_stmt): Adjust arguments.
4509 * c-typeck.c (build_function_call_vec): Don't try to print
4510 statements with %qE format.
4511 (struct c_switch): Rename switch_expr field to switch_stmt.
4512 Add break_stmt_seen_p field.
4513 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
4514 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
4515 (do_case): Update for changes to struct c_switch.
4516 (c_finish_case): Rename to c_finish_switch. Update for changes to
4517 struct c_switch and change of representation from SWITCH_EXPR to
4519 (c_finish_loop): Delete.
4520 (c_finish_bc_stmt): Update to reflect changes to break/continue
4521 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
4522 of a GOTO_EXPR except for objc foreach loops.
4524 2020-09-01 Jakub Jelinek <jakub@redhat.com>
4527 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
4530 2020-08-28 Martin Sebor <msebor@redhat.com>
4533 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
4536 2020-08-27 Martin Liska <mliska@suse.cz>
4538 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
4539 growth function to true.
4541 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
4544 * c-typeck.c (handle_omp_array_sections_1): Talk about
4545 array function parameter in the error message.
4547 2020-08-18 Jakub Jelinek <jakub@redhat.com>
4550 * c-parser.c (c_parser_generic_selection): Change match_found from bool
4551 to int, holding index of the match. Call mark_exp_read on the selector
4552 expression and on expressions other than the selected one.
4554 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
4557 * c-typeck.c (process_init_element): Split test for whether to
4558 recurse into a record, union or array into...
4559 (initialize_elementwise_p): ...this new function. Don't recurse
4560 into a vector type if the initialization value is also a vector.
4562 2020-07-31 Richard Biener <rguenther@suse.de>
4565 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
4566 Define to c_common_finalize_early_debug.
4568 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
4570 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
4571 (c_parser_omp_critical): Permit hint(0) clause without named critical.
4572 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
4574 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
4577 * c-decl.c (finish_decl): Call target hook
4578 lower_local_decl_alignment to lower local decl alignment.
4580 2020-07-09 Julian Brown <julian@codesourcery.com>
4581 Thomas Schwinge <thomas@codesourcery.com>
4584 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
4585 for standalone attach/detach clauses.
4587 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
4589 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
4590 set, warn for conversion between pointers that point to incompatible
4591 scalar storage orders.
4593 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
4595 * c-parser.c (c_parser_statement_after_labels): Pass correct
4596 parameters to c_parser_do_statement.
4598 2020-06-16 Jakub Jelinek <jakub@redhat.com>
4600 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
4602 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
4603 premature c_fully_fold. Defer explicit c_fully_fold calls to after
4605 * c-tree.h (c_in_omp_for): Declare.
4606 * c-typeck.c (c_in_omp_for): Define.
4607 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
4608 (digest_init): Likewise.
4609 (build_binary_op): Likewise.
4611 2020-06-16 Jakub Jelinek <jakub@redhat.com>
4613 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
4614 from kind by comma rather than colon.
4616 2020-06-05 Mark Wielaard <mark@klomp.org>
4618 * c-decl.c (implicit_decl_warning): When warned and olddecl is
4619 an undeclared builtin, then add a fixit header hint, if found.
4620 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
4621 warning_at about implicit builtin declaration type mismatch.
4623 2020-06-03 Mark Wielaard <mark@klomp.org>
4625 * c-parser.c (struct c_parser): Add seen_string_literal
4627 (c_parser_consume_token): Reset seen_string_literal.
4628 (c_parser_error_richloc): Add name_hint if seen_string_literal
4629 and next token is a CPP_NAME and we have a missing header
4630 suggestion for the name.
4631 (c_parser_string_literal): Set seen_string_literal.
4633 2020-06-03 Mark Wielaard <mark@klomp.org>
4635 * c-parser.c (c_parser_postfix_expression_after_primary): Add
4636 scope with matching_parens after CPP_OPEN_PAREN.
4638 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
4640 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
4642 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
4644 * Make-lang.in: Remove extra slash.
4646 2020-05-19 Martin Liska <mliska@suse.cz>
4648 * c-parser.c: Fix typo.
4650 2020-05-14 Jakub Jelinek <jakub@redhat.com>
4652 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
4654 2020-05-07 Richard Biener <rguenther@suse.de>
4657 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
4660 2020-04-30 Jakub Jelinek <jakub@redhat.com>
4663 * c-decl.c (set_labels_context_r): In addition to context-less
4664 LABEL_DECLs adjust also LABEL_DECLs with context equal to
4665 parent function if any.
4666 (store_parm_decls): Adjust comment.
4668 2020-04-19 Jakub Jelinek <jakub@redhat.com>
4671 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
4672 two CPP_COLON tokens.
4674 2020-04-17 Jakub Jelinek <jakub@redhat.com>
4677 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
4680 2020-04-15 Jakub Jelinek <jakub@redhat.com>
4683 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
4684 requires directive when not at file scope.
4686 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
4689 * c-decl.c (c_check_in_current_scope): New function.
4690 * c-tree.h (c_check_in_current_scope): Declare it.
4691 * c-parser.c (c_parser_oacc_declare): Add check that variables
4692 are declared in the same scope as the directive. Fix handling
4695 2020-04-07 Jakub Jelinek <jakub@redhat.com>
4698 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
4699 if c_parser_omp_master succeeded.
4701 2020-03-23 Jakub Jelinek <jakub@redhat.com>
4703 PR gcov-profile/94029
4705 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
4706 the function_start_locus location. Don't do that afterwards for the
4707 __GIMPLE body parsing.
4709 2020-03-19 Jakub Jelinek <jakub@redhat.com>
4711 PR gcov-profile/94029
4712 * c-tree.h (finish_function): Add location_t argument defaulted to
4714 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
4715 set it to the locus of closing } if non-NULL.
4716 (c_parser_compound_statement_nostart): Return locus of closing }.
4717 (c_parser_parse_rtl_body): Likewise.
4718 (c_parser_declaration_or_fndef): Propagate locus of closing } to
4720 * c-decl.c (finish_function): Add end_loc argument, use it instead of
4721 input_location to set function_end_locus.
4723 2020-03-17 Jakub Jelinek <jakub@redhat.com>
4726 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
4727 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
4728 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
4729 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
4731 (finish_incomplete_vars): New function, moved from finish_struct. Use
4732 relayout_decl instead of layout_decl.
4733 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
4734 being TYPE_VFIELD. Use finish_incomplete_vars.
4735 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
4736 finish_incomplete_vars.
4737 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4738 also on ENUMERAL_TYPEs.
4740 2020-03-16 Jakub Jelinek <jakub@redhat.com>
4743 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
4745 2020-03-13 Martin Sebor <msebor@redhat.com>
4748 * c-decl.c (builtin_structptr_type_count): New constant.
4749 (match_builtin_function_types): Reject decls that are incompatible
4750 in types pointed to by pointers.
4751 (diagnose_mismatched_decls): Adjust comments.
4753 2020-03-05 Joseph Myers <joseph@codesourcery.com>
4756 * c-typeck.c (pop_init_level): Do not diagnose initializers as
4757 empty when initialized type is error_mark_node.
4758 (set_designator, process_init_element): Ignore initializers for
4759 elements of a variable-size type or of error_mark_node.
4761 2020-03-01 Martin Sebor <msebor@redhat.com>
4764 * c-decl.c (types_close_enough_to_match): New function.
4765 (match_builtin_function_types):
4766 (diagnose_mismatched_decls): Add missing inform call to a warning.
4768 2020-03-01 Martin Sebor <msebor@redhat.com>
4771 * c-typeck.c (build_functype_attribute_variant): New function.
4772 (composite_type): Call it.
4774 2020-02-25 Jakub Jelinek <jakub@redhat.com>
4777 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
4778 Rename last argument from probablity to probability.
4780 2020-02-13 Jakub Jelinek <jakub@redhat.com>
4783 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
4784 *expr if it has side effects.
4786 2020-01-30 Jeff Law <law@redhat.com>
4789 * c-parser.c (c_parser_switch_statement): Make sure to request
4790 marking the switch expr as used.
4792 2020-01-22 Joseph Myers <joseph@codesourcery.com>
4795 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
4796 argument with integer operands.
4798 2020-01-16 Kerem Kat <keremkat@gmail.com>
4801 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
4802 to support 4 available tokens.
4804 2020-01-15 Joseph Myers <joseph@codesourcery.com>
4807 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
4808 determine whether to set DECL_CONTEXT.
4810 2020-01-13 Joseph Myers <joseph@codesourcery.com>
4813 * c-typeck.c (build_c_cast): Check for expressions with integer
4814 operands that can occur in an unevaluated part of an integer
4815 constant expression and call note_integer_operands as needed.
4817 2019-01-08 Richard Biener <rguenther@suse.de>
4820 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
4823 2020-01-01 Jakub Jelinek <jakub@redhat.com>
4825 Update copyright years.
4827 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
4829 * c-decl.c (collect_source_ref_cb): Delete.
4830 (for_each_global_decl): Rename into...
4831 (collect_source_refs): ...this. Call collect_source_ref directly.
4832 (c_parse_final_cleanups): Always call collect_source_ref on the main
4835 2019-12-19 Julian Brown <julian@codesourcery.com>
4836 Cesar Philippidis <cesar@codesourcery.com>
4838 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
4840 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
4841 Allow deref (->) in variable lists if true.
4842 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
4843 Pass to c_parser_omp_variable_list.
4844 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
4845 call to c_parser_omp_variable_list.
4846 (c_parser_oacc_all_clauses): Support attach and detach clauses.
4847 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
4848 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
4849 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
4850 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
4851 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
4852 and detach. Support deref.
4853 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
4854 GOMP_MAP_ALWAYS_POINTER for OpenACC.
4855 (c_oacc_check_attachments): New function.
4856 (c_finish_omp_clauses): Check attach/detach arguments for being
4857 pointers using above. Support deref.
4859 2019-12-19 Julian Brown <julian@codesourcery.com>
4860 Maciej W. Rozycki <macro@codesourcery.com>
4861 Tobias Burnus <tobias@codesourcery.com>
4862 Thomas Schwinge <thomas@codesourcery.com>
4864 * c-parser.c (c_parser_omp_clause_name): Support no_create.
4865 (c_parser_oacc_data_clause): Likewise.
4866 (c_parser_oacc_all_clauses): Likewise.
4867 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4868 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
4869 PRAGMA_OACC_CLAUSE_NO_CREATE.
4870 * c-typeck.c (handle_omp_array_sections): Support
4873 2019-12-09 David Malcolm <dmalcolm@redhat.com>
4875 * c-objc-common.c (range_label_for_type_mismatch::get_text):
4876 Replace label_text ctor calls.
4878 2019-12-04 Joseph Myers <joseph@codesourcery.com>
4882 * c-typeck.c (convert_lvalue_to_rvalue): Call
4883 require_complete_type for arguments not of void types.
4884 (build_indirect_ref): Do not diagnose dereferencing pointers to
4886 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
4888 2019-12-03 Joseph Myers <joseph@codesourcery.com>
4891 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
4892 old-style parameter definitions.
4894 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
4898 * c-decl.c (flexible_array_type_p): Move to common code.
4900 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
4902 * c-decl.c (start_decl): Allow initialization of variables whose
4903 size is a POLY_INT_CST.
4904 (finish_decl): Use verify_type_context to check whether the target
4905 allows variables with a particular type to have static or thread-local
4906 storage duration. Don't raise a second error if such variables do
4907 not have a constant size.
4908 (grokdeclarator): Use verify_type_context to check whether the
4909 target allows fields or array elements to have a particular type.
4910 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
4911 the target allows pointer difference for the types involved.
4912 (build_unary_op): Likewise for pointer increment and decrement.
4914 2019-11-29 Joseph Myers <joseph@codesourcery.com>
4916 * c-parser.c (struct c_parser): Add members raw_tokens and
4918 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
4919 using previously-lexed raw tokens.
4920 (c_parser_peek_nth_token_raw)
4921 (c_parser_check_balanced_raw_token_sequence): New functions.
4922 (c_parser_nth_token_starts_std_attributes): Use
4923 c_parser_check_balanced_raw_token_sequence for Objective-C.
4925 2019-11-25 Joseph Myers <joseph@codesourcery.com>
4928 * c-decl.c (finish_declspecs): Use int instead of decimal
4929 floating-point types if decimal floating-point not supported.
4931 2019-11-25 Joseph Myers <joseph@codesourcery.com>
4933 * c-tree.h (struct c_declarator): Use a structure for id member.
4934 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
4935 declarators at the start, not when handling individual declarators
4936 later. Use u.id.id instead of u.id.
4937 (grokfield): Use u.id.id instead of u.id.
4938 (build_id_declarator): Set u.id.id and u.id.attrs.
4939 (finish_declspecs): Handle postfix attributes in case of typedef
4940 name or typeof used.
4941 * c-parser.c (c_parser_direct_declarator)
4942 (c_parser_direct_declarator_inner): Place declarator for
4943 attributes inside that for function or array, not outside. Set
4944 u.id.attrs for identifiers.
4945 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
4946 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
4949 2019-11-22 Jakub Jelinek <jakub@redhat.com>
4952 * c-decl.c (identifier_global_tag): Define.
4954 2019-11-20 Richard Biener <rguenther@suse.de>
4957 * c-decl.c (grokdeclarator): Prevent inlining of nested
4958 function with VLA arguments.
4960 2019-11-20 Joseph Myers <joseph@codesourcery.com>
4962 * c-decl.c (c_warn_type_attributes): New function.
4963 (groktypename, grokdeclarator, finish_declspecs): Call
4964 c_warn_type_attributes before applying attributes to types.
4965 * c-tree.h (c_warn_type_attributes): Declare.
4967 2019-11-19 Joseph Myers <joseph@codesourcery.com>
4969 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
4970 standard attributes.
4971 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
4972 pedwarn for unknown standard attributes and return error_mark_node
4975 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
4977 * c-parser.c (c_parser_parse_rtl_body): Always call
4978 run_rtl_passes, even if startwith pass is not provided.
4980 2019-11-15 Joseph Myers <joseph@codesourcery.com>
4982 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
4983 duplicate standard attributes.
4985 2019-11-15 Joseph Myers <joseph@codesourcery.com>
4987 * c-decl.c (std_attribute_table): Add maybe_unused.
4989 2019-11-15 Joseph Myers <joseph@codesourcery.com>
4991 * c-decl.c (std_attribute_table): Add fallthrough.
4992 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
4993 attribute at top level.
4995 2019-11-15 Joseph Myers <joseph@codesourcery.com>
4997 * c-decl.c (std_attribute_table): New.
4998 (c_init_decl_processing): Register attributes from
4999 std_attribute_table.
5000 * c-parser.c (c_parser_attribute_arguments): Add arguments
5001 require_string and allow_empty_args. All callers changed.
5002 (c_parser_std_attribute): Set require_string argument for
5003 "deprecated" attribute.
5005 2019-11-14 Joseph Myers <joseph@codesourcery.com>
5007 * c-parser.c (c_parser_postfix_expression)
5008 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
5009 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
5011 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
5013 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
5014 of build_same_sized_truth_vector_type.
5015 (build_vec_cmp): Likewise.
5017 2019-11-14 Jakub Jelinek <jakub@redhat.com>
5019 * c-parser.c (c_parser_omp_context_selector): Don't require score
5020 argument to fit into shwi, just to be INTEGER_CST. Diagnose
5023 * c-parser.c (c_parser_omp_context_selector): Rename
5024 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
5025 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
5026 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
5027 and string literals.
5029 2019-11-14 Joseph Myers <joseph@codesourcery.com>
5031 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
5032 ctsk_tagfirstref_attrs.
5033 (struct c_declspecs): Update description of attrs. Add
5034 postfix_attrs and non_std_attrs_seen_p. Increase size of
5035 typespec_kind bit-field.
5036 (c_warn_unused_attributes): New declaration.
5037 (parser_xref_tag): Update prototype.
5038 * c-decl.c (c_warn_unused_attributes): New function.
5039 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
5040 ctsk_tagref_attrs. Handle attribute declarations.
5041 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
5042 (grokdeclarator): Handle standard attributes.
5043 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
5044 attributes to incomplete type reference.
5045 (xref_tag): Update call to parser_xref_tag.
5046 (declspecs_add_addrspace, declspecs_add_type)
5047 (declspecs_add_scspec, declspecs_add_attrs): Set
5048 non_std_attrs_seen_p.
5049 (finish_declspecs): Apply postfix standard attributes to type.
5050 * c-parser.c (c_token_starts_declspecs)
5051 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
5052 (c_parser_next_tokens_start_declaration): Update comments.
5053 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
5054 parser->tokens[2] to parser->tokens[1].
5055 (c_parser_nth_token_starts_std_attributes)
5056 (c_parser_std_attribute_specifier_sequence): New functions.
5057 (c_parser_declaration_or_fndef): Add arguments have_attrs and
5058 attrs. All callers changed. Handle standard attributes.
5059 (c_parser_parms_declarator, c_parser_parms_list_declarator)
5060 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
5061 All callers changed.
5062 (c_parser_declspecs): Add arguments start_std_attr_ok and
5063 end_std_attr_ok. All callers changed. Handle standard
5065 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
5066 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
5067 (c_parser_compound_statement_nostart, c_parser_all_labels)
5068 (c_parser_label, c_parser_statement, c_parser_for_statement):
5069 Handle standard attributes.
5070 * c-parser.h (c_parser_declspecs): Update prototype.
5071 * gimple-parser.c (c_parser_gimple_declaration): Update call to
5074 2019-11-12 Martin Liska <mliska@suse.cz>
5076 * gimple-parser.c: Do not include params.h.
5078 2019-11-12 Martin Liska <mliska@suse.cz>
5080 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
5081 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
5084 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
5085 Frederik Harwath <frederik@codesourcery.com>
5088 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
5089 (c_parser_oacc_kernels_parallel): Rename function to...
5090 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
5091 (c_parser_omp_construct): Update accordingly.
5094 2019-11-11 Jakub Jelinek <jakub@redhat.com>
5096 * c-parser.c (c_parser_translation_unit): Diagnose declare target
5097 without corresponding end declare target.
5099 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
5101 * c-convert.c (convert): Only handle vector conversions if one of
5102 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
5104 * c-typeck.c (build_array_ref): Only allow vector indexing if the
5105 vectors satisfy gnu_vector_type_p.
5106 (build_unary_op): Only allow unary operators to be applied to
5107 vectors if they satisfy gnu_vector_type_p.
5108 (digest_init): Only allow by-element initialization of vectors
5109 if they satisfy gnu_vector_type_p.
5110 (really_start_incremental_init): Likewise.
5111 (push_init_level): Likewise.
5112 (pop_init_level): Likewise.
5113 (process_init_element): Likewise.
5114 (build_binary_op): Only allow binary operators to be applied to
5115 vectors if they satisfy gnu_vector_type_p.
5117 2019-11-08 Joseph Myers <joseph@codesourcery.com>
5119 * c-decl.c (grokparms): Convert () in a function definition to
5121 (store_parm_decls_oldstyle): Pedwarn for C2x.
5122 (store_parm_decls): Update comment about () not generating a
5125 2019-11-07 Joseph Myers <joseph@codesourcery.com>
5127 * c-parser.c (c_parser_attribute_arguments): New function.
5128 Factored out of c_parser_gnu_attribute.
5129 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
5130 (c_parser_balanced_token_sequence, c_parser_std_attribute)
5131 (c_parser_std_attribute_specifier): New functions.
5132 (c_parser_transaction_attributes): Use
5133 c_parser_std_attribute_specifier.
5135 2019-11-07 Joseph Myers <joseph@codesourcery.com>
5137 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
5138 lex_joined_string and translate_strings_p.
5139 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
5141 (c_parser_string_literal): New function.
5142 (c_parser_static_assert_declaration_no_semi): Use
5143 c_parser_string_literal. Do not set lex_untranslated_string.
5144 (c_parser_asm_string_literal): Use c_parser_string_literal.
5145 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
5146 (c_parser_gnu_attributes): Set and restore translate_strings_p
5147 instead of lex_untranslated_string.
5148 (c_parser_asm_statement): Do not set lex_untranslated_string.
5149 (c_parser_asm_operands): Likewise.
5150 (c_parser_has_attribute_expression): Set and restore
5151 translate_strings_p instead of lex_untranslated_string.
5152 (c_parser_postfix_expression): Use c_parser_string_literal.
5153 (pragma_lex): Likewise.
5154 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
5155 (c_parse_file): Set translate_strings_p.
5156 * gimple-parser.c (c_parser_gimple_postfix_expression)
5157 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
5158 * c-parser.c (c_parser_string_literal): Declare function.
5160 2019-11-02 Jakub Jelinek <jakub@redhat.com>
5162 * c-parser.c (c_finish_omp_declare_variant): Use
5163 omp_get_context_selector instead of c_omp_get_context_selector.
5165 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
5167 * c-tree.h (c_simulate_enum_decl): Declare.
5168 * c-decl.c (c_simulate_enum_decl): New function.
5169 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
5171 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
5173 * c-tree.h (c_simulate_builtin_function_decl): Declare.
5174 * c-decl.c (c_simulate_builtin_function_decl): New function.
5175 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
5178 2019-10-28 Martin Sebor <msebor@redhat.com>
5181 * c-decl.c (names_builtin_p): Define a new function.
5183 2019-10-28 Richard Biener <rguenther@suse.de>
5186 * gimple-parser.c (c_parser_parse_gimple_body): Make
5187 current_bb the entry block initially to easier recover
5189 (c_parser_gimple_compound_statement): Adjust.
5191 2019-10-24 Jakub Jelinek <jakub@redhat.com>
5193 * c-parser.c (c_finish_omp_declare_variant): Use
5194 omp_context_selector_matches instead of
5195 c_omp_context_selector_matches.
5196 * c-decl.c (c_decl_attributes): Add "omp declare target block"
5197 attribute in between declare target and end declare target
5200 2019-10-15 Joseph Myers <joseph@codesourcery.com>
5202 * c-parser.c (c_parser_attribute_any_word): Rename to
5203 c_parser_gnu_attribute_any_word. All callers changed.
5204 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
5206 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
5208 (c_parser_declaration_or_fndef, c_parser_declspecs)
5209 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
5210 (c_parser_struct_declaration, c_parser_declarator)
5211 (c_parser_gnu_attribute, c_parser_compound_statement)
5212 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
5213 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
5214 attribute-related syntax productions.
5216 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
5218 * c-objc-common.c (useful_aka_type_p): Replace with...
5219 (get_aka_type): ...this new function. Given the original type,
5220 decide which aka type to print (if any). Only look through typedefs
5221 if user_facing_original_type_p.
5222 (print_type): Update accordingly.
5224 2019-10-14 Jakub Jelinek <jakub@redhat.com>
5226 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
5227 into int NESTED, if it is 2, diagnose missing commas in between
5229 (c_parser_omp_context_selector): Pass 2 as last argument to
5230 c_parser_omp_all_clauses.
5232 2019-10-12 Jakub Jelinek <jakub@redhat.com>
5234 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
5235 For simd properties, put them directly into TREE_VALUE.
5236 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
5237 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
5238 add "omp declare variant base" attribute rather than
5239 "omp declare variant".
5241 2019-10-11 Joseph Myers <joseph@codesourcery.com>
5243 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
5245 2019-10-10 Jakub Jelinek <jakub@redhat.com>
5247 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
5248 true, terminate processing on closing paren and don't skip to end of
5250 (c_parser_omp_declare_simd): Handle also declare variant.
5251 (omp_construct_selectors, omp_device_selectors,
5252 omp_implementation_selectors, omp_user_selectors): New variables.
5253 (c_parser_omp_context_selector,
5254 c_parser_omp_context_selector_specification,
5255 c_finish_omp_declare_variant): New functions.
5256 (c_finish_omp_declare_simd): Handle both declare simd and
5258 (c_parser_omp_declare): Handle declare variant.
5260 2019-10-02 Joseph Myers <joseph@codesourcery.com>
5262 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
5265 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
5267 * c-objc-common.c (useful_aka_type_p): New function.
5268 (print_type): Use it to decide whether an aka type is worth printing.
5270 2019-09-27 Jakub Jelinek <jakub@redhat.com>
5273 * c-parser.c (c_parser_predefined_identifier): New function.
5274 (c_parser_postfix_expression): Use it.
5275 (c_parser_omp_variable_list): Parse predefined identifiers.
5276 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
5277 in shared and firstprivate clauses, even when they are predetermined
5280 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
5282 * c-typeck.c (build_function_call_vec): Take the original function
5283 decl as an optional final parameter. Pass all built-in calls to
5284 check_builtin_function_arguments.
5286 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
5289 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
5290 of identifiers in the external scope only for variables and functions.
5292 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5295 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
5297 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
5300 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
5301 after determining that the first token is not
5302 PRAGMA_GCC_PCH_PREPROCESS.
5304 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
5306 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
5307 FUNCTION_DECL to the right value in the presence of nested declarators.
5309 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
5312 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
5314 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
5317 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
5318 of a built_in_function.
5319 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
5321 2019-08-10 Jakub Jelinek <jakub@redhat.com>
5323 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
5324 (c_parser_omp_clause_device_type): New function.
5325 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
5326 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
5327 (c_parser_omp_declare_target): Handle device_type clauses. Remove
5328 diagnostics for declare target with clauses nested in clause-less
5329 declare target declaration-definition-seq.
5330 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
5332 2019-08-09 Jakub Jelinek <jakub@redhat.com>
5334 * c-parser.c (check_no_duplicate_clause): Simplify using
5336 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
5337 directive name modifiers.
5338 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
5341 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
5342 check_no_duplicate_clause call. Comment it out, instead emit a
5343 warning for duplicate dist_schedule clauses.
5345 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
5347 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
5349 2019-08-08 Jakub Jelinek <jakub@redhat.com>
5351 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
5352 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
5353 instead of generic_head to track duplicates.
5355 2019-08-07 Jakub Jelinek <jakub@redhat.com>
5357 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
5358 (c_parser_omp_clause_use_device_addr): New function.
5359 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
5360 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
5361 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
5362 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
5363 map or use_device_* clauses.
5364 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
5365 in OpenMP, require pointer type rather than pointer or array type.
5366 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
5368 2019-07-31 Jakub Jelinek <jakub@redhat.com>
5371 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
5372 even if finish is UNKNOWN_LOCATION, just use start as finish in that
5375 2019-07-25 Martin Liska <mliska@suse.cz>
5376 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
5379 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
5381 2019-07-25 Martin Liska <mliska@suse.cz>
5383 * c-decl.c (merge_decls): Use new macros
5384 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
5386 2019-07-23 Richard Biener <rguenther@suse.de>
5388 PR tree-optimization/83518
5389 * gimple-parser.c (c_parser_parse_gimple_body): When we have
5390 a CFG also rebuild cgraph edges.
5392 2019-07-20 Jakub Jelinek <jakub@redhat.com>
5394 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
5395 (c_parser_omp_clause_bind): New function.
5396 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
5397 (OMP_LOOP_CLAUSE_MASK): Define.
5398 (c_parser_omp_loop): New function.
5399 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
5400 loop combined with parallel or teams.
5401 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
5402 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
5404 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
5407 * c-decl.c (finish_function): Check targetm.warn_func_return
5408 before issuing a -Wreturn-type warning.
5410 2019-07-12 Alexandre Oliva <oliva@adacore.com>
5412 * gimple-parser.c (c_parser_gimple_try_stmt): New.
5413 (c_parser_compound_statement): Call it.
5415 2019-07-12 Jakub Jelinek <jakub@redhat.com>
5417 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
5418 (c_parser_omp_clause_order): New function.
5419 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
5420 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
5421 PRAGMA_OMP_CLAUSE_ORDER.
5422 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
5424 2019-07-10 Richard Biener <rguenther@suse.de>
5426 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
5427 _Literal (int *) &x for address literals.
5429 2019-07-09 Martin Sebor <msebor@redhat.com>
5432 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
5434 (field_decl_cmp): Same.
5435 * c-parser.c (c_parser_struct_or_union_specifier): Same.
5437 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
5439 2019-07-09 Martin Sebor <msebor@redhat.com>
5442 * c-decl.c: Change class-key from class to struct and vice versa
5443 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
5444 * gimple-parser.c: Same.
5446 2019-07-01 Richard Biener <rguenther@suse.de>
5448 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5449 _Literal (char *) &"foo" for address literals pointing to
5452 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5454 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
5455 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
5456 C incompatibility if alternate "__intN__" form is used.
5458 2019-06-24 Martin Sebor <msebor@redhat.com>
5460 * c-typeck.c (build_binary_op): Hyphenate floating-point.
5462 2019-06-10 Jakub Jelinek <jakub@redhat.com>
5464 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
5465 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
5466 (c_parser_omp_scan_loop_body): New function.
5467 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
5468 inscan reduction clauses.
5469 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
5470 non-inscan reductions on the same construct, or inscan reductions with
5471 ordered or schedule clauses, or inscan array reductions.
5473 2019-06-05 Martin Sebor <msebor@redhat.com>
5476 * c-typeck.c (c_finish_return): Only consider functions returning
5477 pointers as candidates for -Wreturn-local-addr.
5479 2019-06-05 Martin Sebor <msebor@redhat.com>
5481 * c-decl.c (start_decl): Adjust quoting and hyphenation
5483 (finish_decl): Same.
5484 (finish_enum): Same.
5485 (start_function): Same.
5486 (declspecs_add_type): Same.
5487 * c-parser.c (warn_for_abs): Same.
5488 * c-typeck.c (build_binary_op): Same.
5490 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
5493 * c-parser.c (c_finish_oacc_routine): Rework checking if already
5494 marked with an OpenACC 'routine' directive.
5497 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
5498 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
5501 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
5502 clauses from "omp declare target" attribute.
5504 2019-05-16 Martin Sebor <msebor@redhat.com>
5506 * c-decl.c (start_decl): Quote keywords, operators, and
5507 types in diagnostics.
5508 (finish_decl): Same.
5509 * c-parser.c (c_parser_asm_statement): Same.
5510 (c_parser_conditional_expression): Same.
5511 (c_parser_transaction_cancel): Same.
5512 * c-typeck.c (c_common_type): Same.
5513 (build_conditional_expr): Same.
5514 (digest_init): Same.
5515 (process_init_element): Same.
5516 (build_binary_op): Same.
5518 2019-05-17 Richard Biener <rguenther@suse.de>
5520 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
5521 (c_parser_gimple_unary_expression): Likewise.
5522 (c_parser_gimple_parentized_ternary_expression): New function.
5524 2019-05-16 Richard Biener <rguenther@suse.de>
5526 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
5527 (c_parser_gimple_unary_expression): Likewise.
5529 2019-05-15 Richard Biener <rguenther@suse.de>
5531 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5534 2019-05-14 Richard Biener <rguenther@suse.de>
5536 * gimple-parser.c (c_parser_gimple_statement): Remove
5537 questionable auto-promotion to VIEW_CONVERT_EXPR.
5538 (c_parser_gimple_typespec): Split out from __MEM parsing.
5539 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
5540 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
5541 as __VIEW_CONVERT with -gimple.
5543 2019-05-09 Martin Liska <mliska@suse.cz>
5545 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
5547 (c_parser_gimple_unary_expression): Parse also binary expression
5549 (c_parser_gimple_parentized_binary_expression): New function.
5551 2019-05-09 Martin Liska <mliska@suse.cz>
5553 * gimple-parser.c (struct gimple_parser): Add probability.
5554 for gimple_parser_edge.
5555 (gimple_parser::push_edge): Add new argument probability.
5556 (c_parser_gimple_parse_bb_spec): Parse also probability
5558 (c_parser_parse_gimple_body): Set edge probability.
5559 (c_parser_gimple_compound_statement): Consume token
5560 before calling c_parser_gimple_goto_stmt.
5562 (c_parser_gimple_statement): Pass new argument.
5563 (c_parser_gimple_goto_stmt): Likewise.
5564 (c_parser_gimple_if_stmt): Likewise.
5565 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
5566 * c-parser.c (c_parser_declaration_or_fndef): Pass
5567 hot_bb_threshold argument.
5568 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
5570 (c_parser_gimple_parse_bb_spec_edge_probability): New.
5572 2019-04-26 Jakub Jelinek <jakub@redhat.com>
5575 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
5576 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
5577 (c_parser_do_statement): Likewise.
5578 (c_parser_for_statement): Likewise. Formatting fixes.
5579 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
5580 emit DEBUG_BEGIN_STMTs if needed.
5582 2019-04-19 Jakub Jelinek <jakub@redhat.com>
5585 * c-typeck.c (struct c_switch): Remove outside_range_p member.
5586 (c_start_case): Don't clear it.
5587 (do_case): Adjust c_add_case_label caller.
5588 (c_finish_case): Adjust c_do_switch_warnings caller.
5591 * c-decl.c (merge_decls): If remove is main variant and
5592 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
5593 variant that has newdecl as TYPE_NAME if any.
5595 2019-04-12 Jakub Jelinek <jakub@redhat.com>
5598 * c-decl.c (merge_decls): When newdecl's type is its main variant,
5599 don't try to remove it from the variant list, but instead assert
5602 2019-04-01 Richard Biener <rguenther@suse.de>
5605 * c-tree.h (c_get_alias_set): Declare.
5606 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
5607 * c-objc-common.c (c_get_alias_set): Treat enumeral types
5608 as the underlying integer type.
5610 2019-03-19 Martin Sebor <msebor@redhat.com>
5612 PR tree-optimization/89688
5613 * c-decl.c (finish_decl): Call braced_lists_to_string for more
5614 kinds of initializers.
5616 2019-03-19 Jakub Jelinek <jakub@redhat.com>
5619 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
5620 return type even if quals_used is 0. Formatting fixes.
5622 2019-03-14 Richard Biener <rguenther@suse.de>
5624 * c-tree.h (enum c_declspec_il): New.
5625 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
5627 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
5628 Pass start pass and declspec_il to c_parser_parse_gimple_body.
5629 (c_parser_declspecs): Adjust.
5630 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
5631 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
5633 (struct gimple_parser): New.
5634 (gimple_parser::push_edge): New method.
5635 (c_parser_gimple_parse_bb_spec): New helper.
5636 (c_parser_parse_gimple_body): Get start pass and IL specification.
5637 Initialize SSA and CFG.
5638 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
5639 Build a gimple_parser parsing state and pass it along.
5640 (c_parser_gimple_statement): Change intermittend __PHI internal
5641 function argument for the edge.
5642 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
5643 (c_parser_gimple_goto_stmt): Record edges to build.
5644 (c_parser_gimple_if_stmt): Likewise.
5645 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
5646 (c_parser_gimple_or_rtl_pass_list): Likewise.
5648 2019-03-11 Martin Liska <mliska@suse.cz>
5650 * c-decl.c (check_for_loop_decls): Wrap an option name
5651 in a string format message and fix GNU coding style.
5652 * c-parser.c (c_parser_declspecs): Likewise.
5654 2019-03-08 Jakub Jelinek <jakub@redhat.com>
5656 PR tree-optimization/89550
5657 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
5659 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
5660 or warning returned true.
5662 2019-02-28 Jakub Jelinek <jakub@redhat.com>
5665 * c-typeck.c (convert_arguments): Call inform_declaration only if
5666 the previous warning_at call returned true.
5668 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
5670 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
5671 parameter. Adjust all users.
5672 (c_parser_oacc_simple_clause): Replace parser with loc formal
5673 parameter. Adjust all users.
5675 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
5678 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
5679 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
5681 2019-02-15 Jakub Jelinek <jakub@redhat.com>
5684 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
5685 before c_decl_attributes rather than after it.
5687 2019-02-06 Jakub Jelinek <jakub@redhat.com>
5690 * c-parser.c (c_parser_declaration_or_fndef): Don't update
5691 DECL_ARGUMENTS of d if it has been defined already. Use a single if
5692 instead of 3 nested ifs.
5694 2019-02-06 Joseph Myers <joseph@codesourcery.com>
5697 * c-decl.c (finish_decl): Do not complete array types for arrays
5698 with external linkage not at file scope.
5700 2019-02-05 Richard Biener <rguenther@suse.de>
5703 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
5704 all type variants when not supported.
5706 2019-01-30 Jakub Jelinek <jakub@redhat.com>
5709 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
5710 * c-decl.c (decl_jump_unsafe): Return false for
5711 C_DECL_COMPOUND_LITERAL_P decls.
5712 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
5714 2019-01-29 Jakub Jelinek <jakub@redhat.com>
5717 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
5721 * c-decl.c (last_fileptr_type): Remove.
5722 (last_structptr_types): New variable.
5723 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
5724 {old,new}rettype instead of the types themselves. Assert
5725 last_structptr_types array has the same number of elements
5726 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
5727 argument oldtype and newtype. Instead of handling
5728 just fileptr_type_node specially, handle all builtin_structptr_types
5729 pointer nodes. Formatting fix.
5731 2019-01-24 Martin Sebor <msebor@redhat.com>
5736 * c-decl.c (match_builtin_function_types): Add arguments.
5737 (diagnose_mismatched_decls): Diagnose mismatched declarations
5738 of built-ins more strictly.
5740 2019-01-24 Jakub Jelinek <jakub@redhat.com>
5743 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
5744 on #pragma omp cancel with different modifiers.
5746 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
5750 * c-typeck.c (convert_for_assignment): Upate the
5751 warn_for_address_or_pointer_of_packed_member call.
5753 2019-01-16 Tom Honermann <tom@honermann.net>
5754 Jason Merrill <jason@redhat.com>
5756 * c-typeck.c (digest_init): Revised the error message produced for
5757 ill-formed cases of array initialization with a string literal.
5758 (error_init): Make variadic.
5760 2019-01-12 Jakub Jelinek <jakub@redhat.com>
5762 * c-typeck.c (convert_for_assignment): Fix a comment typo.
5764 2019-01-07 Jakub Jelinek <jakub@redhat.com>
5767 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
5768 if current_function_decl is non-NULL.
5770 2019-01-07 Joseph Myers <joseph@codesourcery.com>
5774 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
5775 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
5776 functions declared but never defined only for external scope, not
5779 2019-01-07 Jakub Jelinek <jakub@redhat.com>
5782 * c-parser.c (c_parser_postfix_expression): Parse
5783 __builtin_convertvector.
5785 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5787 Update copyright years.
5789 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
5792 * c-typeck.c (convert_for_assignment): Call
5793 warn_for_address_or_pointer_of_packed_member.
5795 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
5797 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
5798 a more specific error message (instead of just falling through).
5800 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
5802 * c-parser.c (c_parser_asm_statement): Keep track of the location each
5803 asm qualifier is first seen; use that to give nicer "duplicate asm
5804 qualifier" messages. Delete 'quals" variable, instead pass the
5805 "is_volatile_ flag to build_asm_stmt directly.
5806 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
5807 * c-typeck.c (build_asm_stmt): Ditto; adjust.
5809 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
5811 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
5812 "done" boolean variable.
5814 2018-12-19 David Malcolm <dmalcolm@redhat.com>
5817 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
5818 Move from here to gcc-rich-location.h and gcc-rich-location.c.
5819 (build_binary_op): Use struct op_location_t and
5820 class binary_op_rich_location.
5822 2018-12-11 Jakub Jelinek <jakub@redhat.com>
5825 * c-convert.c (convert): Call c_fully_fold before calling
5826 ubsan_instrument_float_cast.
5828 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
5830 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
5833 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
5835 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
5836 after asm. Pass a flag for it to build_asm_expr.
5837 * c-tree.h (build_asm_expr): Update declaration.
5838 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
5841 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
5844 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
5845 combination of volatile and goto, in any order, without repetitions.
5847 2018-12-04 James Norris <jnorris@codesourcery.com>
5848 Cesar Philippidis <cesar@codesourcery.com>
5849 Julian Brown <julian@codesourcery.com>
5851 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
5854 2018-11-30 Richard Biener <rguenther@suse.de>
5856 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5857 _Literal (type) { ... } as empty aggregate or vector constructor.
5859 2018-11-29 Martin Sebor <msebor@redhat.com>
5862 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
5863 (convert_arguments): Add comments. Pass additional argument to
5866 2018-11-29 Martin Sebor <msebor@redhat.com>
5870 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
5872 2018-11-23 Martin Sebor <msebor@redhat.com>
5875 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
5876 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
5878 2018-11-20 Martin Sebor <msebor@redhat.com>
5880 * c-parser.c (c_parser_has_attribute_expression): New function.
5881 (c_parser_attribute): New function.
5882 (c_parser_attributes): Move code into c_parser_attribute.
5883 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
5885 2018-11-15 Martin Sebor <msebor@redhat.com>
5888 * c-decl.c (header_for_builtin_fn): Declare.
5889 (diagnose_mismatched_decls): Diagnose declarations of built-in
5890 functions without a prototype.
5891 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
5892 (convert_argument): Same.
5893 (convert_arguments): Factor code out into convert_argument.
5894 Detect mismatches between built-in formal arguments in calls
5895 to built-in without prototype.
5896 (build_conditional_expr): Same.
5897 (type_or_builtin_type): New function.
5898 (convert_for_assignment): Add argument. Conditionally issue
5899 warnings instead of errors for mismatches.
5901 2018-11-13 David Malcolm <dmalcolm@redhat.com>
5903 * c-decl.c: Replace "source_location" with "location_t".
5904 * c-tree.h: Likewise.
5905 * c-typeck.c: Likewise.
5906 * gimple-parser.c: Likewise.
5908 2018-11-09 Jakub Jelinek <jakub@redhat.com>
5910 * c-parser.c (c_parser_omp_clause_final): Use
5911 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
5912 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
5913 parsing instead of c_parser_paren_condition.
5914 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
5915 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
5916 c_fully_fold instead of c_parser_condition.
5917 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
5918 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
5919 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
5920 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
5921 c_parser_expr_no_commas instead of c_parser_expression.
5923 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
5924 reduction clause with inscan modifier.
5926 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
5927 clauses other than atomic_default_mem_order.
5929 2018-11-08 Jakub Jelinek <jakub@redhat.com>
5931 * c-parser.c: Include memmode.h.
5932 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
5933 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
5934 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
5935 task_reduction clauses.
5936 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
5937 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
5938 section, or lvalue assignment expression.
5939 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
5940 (c_parser_omp_clause_lastprivate): Parse optional
5941 conditional: modifier.
5942 (c_parser_omp_clause_hint): Require constant integer expression rather
5943 than just integer expression.
5944 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
5946 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
5947 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
5948 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
5950 (c_parser_omp_clause_depend): Parse iterator modifier and handle
5951 iterators. Parse mutexinoutset and depobj kinds.
5952 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
5954 (c_parser_omp_all_clauses): Likewise. Handle
5955 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
5956 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
5957 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
5958 default memory order from requires directive if any. Adjust
5959 c_finish_omp_atomic caller.
5960 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
5961 (c_parser_omp_flush): Parse flush with memory-order-clause.
5962 (c_parser_omp_for_loop): Allow NE_EXPR even in
5963 OpenMP loops, adjust c_finish_omp_for caller.
5964 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
5965 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
5966 Allow to be called while parsing combined parallel master.
5967 Parse combined master taskloop{, simd}.
5968 (c_parser_omp_parallel): Parse combined
5969 parallel master{, taskloop{, simd}} constructs.
5970 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
5971 (OMP_TASKGROUP_CLAUSE_MASK): Define.
5972 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
5973 (OMP_TASKWAIT_CLAUSE_MASK): Define.
5974 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
5975 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
5976 around teams body. Use SET_EXPR_LOCATION.
5977 (c_parser_omp_target_data): Allow target data
5978 with only use_device_ptr clauses.
5979 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
5980 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
5981 (c_parser_omp_requires): New function.
5982 (c_finish_taskloop_clauses): New function.
5983 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
5984 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
5985 declaration. Disallow in_reduction clause when combined with parallel
5987 (c_parser_omp_construct): Adjust c_parser_omp_master and
5988 c_parser_omp_taskgroup callers.
5989 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
5991 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
5992 like OMP_CLAUSE_REDUCTION.
5993 (handle_omp_array_sections): Likewise. Call save_expr on array
5994 reductions before calling build_index_type. Handle depend clauses
5996 (struct c_find_omp_var_s): New type.
5997 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
5998 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
5999 with static, runtime or auto schedule kinds. Call save_expr for whole
6000 array reduction sizes. Diagnose reductions with zero sized elements
6001 or variable length structures. Diagnose nogroup clause used with
6002 reduction clause(s). Handle depend clause with
6003 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
6004 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
6005 some different type for other kinds. Use build_unary_op with
6006 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
6007 Handle depend clauses with iterators. Remove no longer needed special
6008 case that predetermined const qualified vars may be specified in
6009 firstprivate clause. Complain if const qualified vars are mentioned
6010 in data-sharing clauses other than firstprivate or shared. Use
6011 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
6012 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
6013 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
6014 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
6016 2018-10-29 David Malcolm <dmalcolm@redhat.com>
6018 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
6019 logic for change to name_hint::operator bool.
6020 (undeclared_variable): Likewise.
6021 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
6022 (c_parser_parameter_declaration): Likewise.
6024 2018-10-17 Joseph Myers <joseph@codesourcery.com>
6026 * c-errors.c (pedwarn_c11): New function.
6027 * c-parser.c (disable_extension_diagnostics): Save
6028 warn_c11_c2x_compat and set it to 0.
6029 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
6030 (c_parser_static_assert_declaration_no_semi): Handle
6031 _Static_assert without string constant.
6032 * c-tree.h (pedwarn_c11): New prototype.
6034 2018-10-17 David Malcolm <dmalcolm@redhat.com>
6036 * Make-lang.in (selftest-c): New.
6037 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
6038 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
6039 from gcc/Makefile.in.
6041 2018-10-02 Richard Biener <rguenther@suse.de>
6043 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
6045 2018-09-26 Joseph Myers <joseph@codesourcery.com>
6048 * c-typeck.c (build_binary_op): Use excess precision for
6049 comparisons of integers and floating-point for C11 and later.
6051 2018-09-26 Martin Jambor <mjambor@suse.cz>
6054 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
6057 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6059 * c-objc-common.c (range_label_for_type_mismatch::get_text):
6060 Update for new param.
6061 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
6064 2018-09-17 Martin Jambor <mjambor@suse.cz>
6067 * c-parser.c: (warn_for_abs): New function.
6068 (c_parser_postfix_expression_after_primary): Call it.
6070 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
6072 * c-typeck.c (digest_init): Shorten overlength strings.
6074 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
6076 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
6078 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6080 * c-decl.c (finish_decl): Call braced_list_to_string here ...
6081 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
6083 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
6085 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
6086 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
6088 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6091 * c-decl.c (implicitly_declare): Update call to
6092 maybe_add_include_fixit to suggest overriding the location, as it
6094 * c-objc-common.c (c_tree_printer): Update for conversion of
6095 show_caret_p to a tri-state.
6097 2018-08-27 Martin Liska <mliska@suse.cz>
6099 * c-decl.c (locate_old_decl): Use new function
6100 fndecl_built_in_p and remove check for FUNCTION_DECL if
6102 (diagnose_mismatched_decls): Likewise.
6103 (merge_decls): Likewise.
6104 (warn_if_shadowing): Likewise.
6105 (pushdecl): Likewise.
6106 (implicitly_declare): Likewise.
6107 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6108 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
6109 * c-typeck.c (build_function_call_vec): Likewise.
6110 (convert_arguments): Likewise.
6112 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6115 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
6116 (diagnose_mismatched_decls): Likewise, in various places.
6117 (warn_if_shadowing): Likewise.
6118 (implicit_decl_warning): Likewise.
6119 (implicitly_declare): Likewise.
6120 (undeclared_variable): Likewise.
6121 (declare_label): Likewise.
6122 (grokdeclarator): Likewise.
6123 (start_function): Likewise.
6124 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
6125 (c_parser_parameter_declaration): Likewise.
6126 (c_parser_binary_expression): Likewise.
6127 * c-typeck.c (c_expr_sizeof_expr): Likewise.
6128 (parser_build_binary_op): Likewise.
6129 (build_unary_op): Likewise.
6130 (error_init): Likewise.
6131 (pedwarn_init): Likewise.
6132 (warning_init): Likewise.
6133 (convert_for_assignment): Likewise.
6135 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6137 * c-objc-common.c: Include "gcc-rich-location.h".
6138 (c_tree_printer): Move implemenation of '%T' to...
6139 (print_type): ...this new function.
6140 (range_label_for_type_mismatch::get_text): New function.
6141 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
6142 range for the various ic_argpass cases.
6143 (class maybe_range_label_for_tree_type_mismatch): New class.
6144 (build_binary_op): Use it when calling binary_op_error.
6146 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6148 * c-decl.c (start_decl): Do not warn if variables is named as main
6149 and is a local variable.
6151 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6154 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
6155 objects of unknown size.
6157 2018-08-13 Martin Sebor <msebor@redhat.com>
6159 PR tree-optimization/71625
6160 * c-parser.c (c_parser_declaration_or_fndef): Call
6161 braced_list_to_string.
6163 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
6166 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
6169 2018-08-01 Martin Sebor <msebor@redhat.com>
6171 PR tree-optimization/86650
6172 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
6173 and TREE_BLOCK (t) from within percent_K_format to this callsite.
6175 2018-08-01 Jakub Jelinek <jakub@redhat.com>
6178 * c-typeck.c (init_field_decl_cmp): New function.
6179 (output_pending_init_elements): Use it for field comparisons
6180 instead of pure bit_position comparisons.
6182 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6184 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
6185 type here, instead add "omp declare target implicit" attribute.
6186 (finish_decl): Diagnose vars without mappable type here.
6188 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
6189 Thomas Schwinge <thomas@codesourcery.com>
6190 Cesar Philippidis <cesar@codesourcery.com>
6192 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
6193 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
6194 to their non-present_or_* counterparts. Make 'self' an alias to
6195 PRAGMA_OACC_CLAUSE_HOST.
6196 (c_parser_oacc_data_clause): Update GOMP mappings for
6197 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
6198 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
6199 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
6200 Remove support for present_or_* clauses.
6201 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
6202 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
6203 (OACC_DECLARE_CLAUSE_MASK): Likewise.
6204 (OACC_DATA_CLAUSE_MASK): Likewise.
6205 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
6206 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
6207 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
6208 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
6209 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
6211 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
6213 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
6214 * gimple-parser.c (c_parser_gimple_statement): Likewise.
6215 (c_parser_gimple_unary_expression): Likewise.
6217 2018-06-15 Jakub Jelinek <jakub@redhat.com>
6220 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
6221 before doing POINTER_DIFF_EXPR.
6223 2018-06-07 Marek Polacek <polacek@redhat.com>
6226 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
6227 for loop initial declarations.
6229 2018-05-30 David Pagan <dave.pagan@oracle.com>
6232 * c-decl.c (grokdeclarator): Update check for return type warnings.
6233 (start_function): Likewise.
6234 (finish_function): Likewise.
6235 * c-typeck.c (c_finish_return): Update check for return type warnings.
6236 Pass OPT_Wreturn_type to pedwarn when appropriate.
6238 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
6240 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
6243 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6245 * gimple-parser.c: Include internal-fn.h.
6246 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
6247 (c_parser_gimple_call_internal): New function.
6248 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
6249 Fix typos in comment.
6251 2018-05-10 Jakub Jelinek <jakub@redhat.com>
6254 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
6255 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
6257 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
6258 fold_offsetof_1, pass argtype as TYPE to it and drop the
6261 2018-05-02 David Pagan <dave.pagan@oracle.com>
6264 * c-decl.c (old_style_parameter_scope): New function.
6265 * c-parser.c (c_parser_postfix_expression): Check for statement
6266 expressions in old-style function parameter list declarations.
6267 * c-parser.h (old_style_parameter_scope): New extern declaration.
6269 2018-04-25 Jakub Jelinek <jakub@redhat.com>
6272 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
6273 it is not TREE_STATIC.
6274 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
6275 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
6276 its COMPOUND_LITERAL_EXPR_DECL.
6278 2018-03-21 Joseph Myers <joseph@codesourcery.com>
6280 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
6281 where all functions return the same _FloatN or _FloatNx type,
6282 treat integer types as _Float64 instead of double.
6284 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6287 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
6288 building vector comparison, diagnose it and return error_mark_node.
6290 2018-03-15 Jakub Jelinek <jakub@redhat.com>
6293 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
6294 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
6295 INTEGER_TYPE element type.
6297 2018-03-13 David Pagan <dave.pagan@oracle.com>
6300 * c-typeck.c (output_init_element): Ensure field initializer
6301 expression is always evaluated if there are side effects.
6303 2018-03-06 Jakub Jelinek <jakub@redhat.com>
6306 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
6307 !building_stmt_list_p ().
6309 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
6312 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
6313 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
6314 and include the BIND_EXPR in the list of things that need to be
6317 2018-02-09 Nathan Sidwell <nathan@acm.org>
6320 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
6321 to strict_aliasing_warning.
6323 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
6325 * c-typeck.c (really_start_incremental_init, push_init_level,
6326 set_nonincremental_init, output_init_element, process_init_element):
6327 Use DECL_UNNAMED_BIT_FIELD.
6329 2018-01-31 Marek Polacek <polacek@redhat.com>
6332 * c-parser.c (c_parser_compound_statement_nostart): Call
6333 expansion_point_location_if_in_system_header.
6335 2018-01-17 David Malcolm <dmalcolm@redhat.com>
6338 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
6341 2018-01-13 Jakub Jelinek <jakub@redhat.com>
6344 * c-tree.h (decl_constant_value_1): Add a bool argument.
6345 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
6346 returning a CONSTRUCTOR if it is true. Use error_operand_p.
6347 (decl_constant_value): Adjust caller.
6348 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
6349 decl_constant_value_1 as IN_INIT. Otherwise, punt if
6350 decl_constant_value returns initializer that has BLKmode or
6352 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
6354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
6355 Alan Hayward <alan.hayward@arm.com>
6356 David Sherwood <david.sherwood@arm.com>
6358 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
6359 TYPE_VECTOR_SUBPARTS.
6361 2018-01-03 Jakub Jelinek <jakub@redhat.com>
6363 Update copyright years.
6365 2018-01-01 Jakub Jelinek <jakub@redhat.com>
6368 * c-parser.c (c_parser_braced_init, c_parser_initelt,
6369 c_parser_conditional_expression, c_parser_cast_expression,
6370 c_parser_sizeof_expression, c_parser_alignof_expression,
6371 c_parser_postfix_expression, c_parser_omp_declare_reduction,
6372 c_parser_transaction_expression): Use set_error () method instead
6373 of setting value member to error_mark_node.
6375 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
6377 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
6378 and _Float<N>X built-in functions.
6380 2017-12-22 Jakub Jelinek <jakub@redhat.com>
6383 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
6384 TYPE_STUB_DECL and call rest_of_type_compilation before processing
6385 incomplete vars rather than after it.
6388 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
6389 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
6390 and consider empty ones if there are no other stmts. For
6391 -Wunused-value walk all statements before the one only followed by
6394 2017-12-22 Mike Stump <mikestump@comcast.net>
6395 Eric Botcazou <ebotcazou@adacore.com>
6397 * c-parser.c (c_parser_while_statement): Add unroll parameter and
6398 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
6399 (c_parser_do_statement): Likewise.
6400 (c_parser_for_statement): Likewise.
6401 (c_parser_statement_after_labels): Adjust calls to above.
6402 (c_parse_pragma_ivdep): New static function.
6403 (c_parser_pragma_unroll): Likewise.
6404 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
6405 <PRAGMA_UNROLL>: New case.
6407 2017-12-19 Jakub Jelinek <jakub@redhat.com>
6409 * c-typeck.c (comptypes_internal, function_types_compatible_p,
6410 perform_integral_promotions, digest_init): Replace Yoda conditions
6411 with typical order conditions.
6412 * c-decl.c (check_bitfield_type_and_width): Likewise.
6414 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6416 * c-typeck.c (c_safe_arg_type_equiv_p,
6417 c_safe_function_type_cast_p): New function.
6418 (build_c_cast): Implement -Wcast-function-type.
6420 2017-12-14 Richard Biener <rguenther@suse.de>
6423 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
6424 like REALPART_EXPR for the behavior of whether its operand
6427 2017-12-12 Marek Polacek <polacek@redhat.com>
6430 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
6432 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
6434 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
6435 * c-parser.c (add_debug_begin_stmt): New.
6436 (c_parser_declaration_or_fndef): Call it.
6437 (c_parser_compound_statement_nostart): Likewise.
6438 (c_parser_statement_after_labels): Likewise.
6439 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
6441 2017-12-07 Joseph Myers <joseph@codesourcery.com>
6443 * c-decl.c (build_compound_literal): Add parameter alignas_align
6444 and set alignment of decl if nonzero.
6445 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
6446 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
6448 (c_parser_struct_declaration): Update syntax comment.
6449 (c_parser_type_name): Add alignas_ok argument and pass it to
6451 (c_parser_cast_expression): Pass true to c_parser_type_name and
6452 give error if a cast used an _Alignas specifier.
6453 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
6454 give error if sizeof (type-name) used an _Alignas specifier.
6455 (c_parser_alignof_expression): Pass true to c_parser_type_name and
6456 give error if _Alignof (type-name) used an _Alignas specifier.
6457 (c_parser_postfix_expression_after_paren_type): Check specified
6458 alignment for a compound literal and pass it to
6459 build_compound_literal.
6460 * c-parser.h (c_parser_type_name): Update prototype.
6461 * c-tree.h (build_compound_literal): Update prototype.
6463 2017-12-07 Martin Sebor <msebor@redhat.com>
6466 * c-decl.c (c_decl_attributes): Look up existing declaration and
6467 pass it to decl_attributes.
6469 2017-12-06 David Malcolm <dmalcolm@redhat.com>
6472 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
6473 reserved for use by the implementation.
6475 2017-12-06 David Malcolm <dmalcolm@redhat.com>
6477 * c-decl.c: Include "c-family/c-spellcheck.h".
6479 2017-12-05 Martin Liska <mliska@suse.cz>
6480 Jakub Jelinek <jakub@redhat.com>
6482 * c-typeck.c (pointer_diff): Add new argument and instrument
6483 pointer subtraction.
6484 (build_binary_op): Similar for pointer comparison.
6486 2017-12-01 Jakub Jelinek <jakub@redhat.com>
6489 * c-parser.c: Include tree-iterator.h.
6490 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
6491 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
6495 * c-tree.h (decl_constant_value_1): Declare.
6496 * c-typeck.c (decl_constant_value_1): New function.
6497 (decl_constant_value): Use it.
6498 * c-fold.c (c_fully_fold_internal): If in_init, use
6499 decl_constant_value_1 instead of decl_constant_value.
6501 2017-11-30 Jakub Jelinek <jakub@redhat.com>
6503 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
6505 2017-11-28 Jakub Jelinek <jakub@redhat.com>
6508 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
6509 c_switch_covers_all_cases_p returns true.
6511 2017-11-28 Julia Koval <julia.koval@intel.com>
6512 Sebastian Peryt <sebastian.peryt@intel.com>
6514 * Make-lang.in (c/c-array-notation.o): Remove.
6515 * c-array-notation.c: Delete.
6516 * c-decl.c: Remove cilkplus condition.
6517 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
6518 c_parser_cilk_verify_simd, c_parser_array_notation,
6519 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
6520 c_parser_cilk_simd_fn_vector_attrs,
6521 c_finish_cilk_simd_fn_tokens): Delete.
6522 (c_parser_declaration_or_fndef): Remove cilkplus condition.
6523 (c_parser_direct_declarator_inner): Ditto.
6524 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
6525 (c_parser_attributes, c_parser_compound_statement,
6526 c_parser_statement_after_labels, c_parser_if_statement,
6527 c_parser_switch_statement, c_parser_while_statement,
6528 c_parser_do_statement, c_parser_for_statement,
6529 c_parser_unary_expression, c_parser_postfix_expression,
6530 c_parser_postfix_expression_after_primary,
6531 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
6532 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
6534 * c-typeck.c (build_array_ref, build_function_call_vec,
6536 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
6537 c_finish_loop, build_binary_op): Remove cilkplus support.
6539 2017-11-28 Jakub Jelinek <jakub@redhat.com>
6541 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
6544 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
6546 * Make-lang.in (c.install-plugin): Install backend import library.
6548 2017-11-23 Jakub Jelinek <jakub@redhat.com>
6550 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
6551 pragma_stmt context.
6553 2017-11-23 Mike Stump <mikestump@comcast.net>
6554 Eric Botcazou <ebotcazou@adacore.com>
6556 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
6558 (c_parser_do_statement): Likewise.
6559 (c_parser_for_statement): Likewise.
6561 2017-11-22 David Malcolm <dmalcolm@redhat.com>
6564 * c-objc-common.c (c_tree_printer): Convert penultimate param from
6565 bool to bool *. Within '%T' handling, if showing an "aka", use
6566 "quoted" param to add appropriate quoting.
6568 2017-11-22 Marek Polacek <polacek@redhat.com>
6573 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
6575 2017-11-21 David Malcolm <dmalcolm@redhat.com>
6578 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
6579 earlier failed lookups.
6581 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
6583 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
6584 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
6586 2017-11-20 David Malcolm <dmalcolm@redhat.com>
6589 * c-decl.c: Include "c-family/known-headers.h".
6590 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
6591 to known-headers.cc.
6592 (class suggest_missing_header): Move to known-header.h.
6593 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
6594 than get_c_name_hint.
6596 2017-11-20 David Malcolm <dmalcolm@redhat.com>
6598 * c-decl.c (get_c_name_hint): New function.
6599 (class suggest_missing_header): New class.
6600 (lookup_name_fuzzy): Call get_c_name_hint and use it to
6601 suggest missing headers to the user.
6603 2017-11-20 David Malcolm <dmalcolm@redhat.com>
6605 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
6606 Include "c-family/name-hint.h"
6607 (implicit_decl_warning): Convert "hint" from
6608 const char * to name_hint. Pass location to
6609 lookup_name_fuzzy. Suppress any deferred diagnostic if the
6610 warning was not printed.
6611 (undeclared_variable): Likewise for "guessed_id".
6612 (lookup_name_fuzzy): Convert return type from const char *
6613 to name_hint. Add location_t param.
6614 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
6615 Include "c-family/name-hint.h"
6616 (c_parser_declaration_or_fndef): Convert "hint" from
6617 const char * to name_hint. Pass location to lookup_name_fuzzy.
6618 (c_parser_parameter_declaration): Likewise.
6620 2017-11-19 Jakub Jelinek <jakub@redhat.com>
6624 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
6626 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
6627 handle_omp_array_sections): Likewise.
6628 (digest_init): Don't call decl_constant_value_for_optimization.
6629 * c-tree.h (decl_constant_value_for_optimization): Removed.
6630 * c-fold.c (c_fold_array_ref): New function.
6631 (c_fully_fold_internal): Add LVAL argument, propagate it through
6632 recursive calls. For VAR_P call decl_constant_value and
6633 unshare if not LVAL and either optimizing or IN_INIT. Remove
6634 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
6635 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
6636 (c_fully_fold): Add LVAL argument, pass it through to
6637 c_fully_fold_internal.
6638 (decl_constant_value_for_optimization): Removed.
6640 2017-11-15 Joseph Myers <joseph@codesourcery.com>
6643 * c-parser.c (check_tgmath_function): New function.
6644 (enum tgmath_parm_kind): New enum.
6645 (c_parser_postfix_expression): Handle __builtin_tgmath.
6647 2017-10-31 David Malcolm <dmalcolm@redhat.com>
6649 * c-decl.c (implicit_decl_warning): Update for renaming of
6650 pedwarn_at_rich_loc and warning_at_rich_loc.
6651 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
6652 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
6653 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
6654 (c_parser_struct_or_union_specifier): Likewise for renaming of
6655 pedwarn_at_rich_loc.
6656 (c_parser_parameter_declaration): Likewise for renaming of
6658 * c-typeck.c (build_component_ref): Likewise.
6659 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
6660 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
6661 (set_init_label): Likewise for renaming of error_at_rich_loc.
6663 2017-10-30 Richard Biener <rguenther@suse.de>
6665 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
6668 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
6670 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
6671 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
6673 2017-10-25 David Malcolm <dmalcolm@redhat.com>
6676 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
6679 2017-10-25 Jakub Jelinek <jakub@redhat.com>
6682 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
6683 newdecl to corresponding __builtin_ if any.
6685 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
6688 * c-decl.c (diagnose_mismatched_decls): Use
6689 OPT_Wbuiltin_declaration_mismatch.
6691 2017-10-12 David Malcolm <dmalcolm@redhat.com>
6693 * c-parser.c (c_parser_require): Add "type_is_unique" param and
6694 use it to guard calls to maybe_suggest_missing_token_insertion.
6695 (c_parser_parms_list_declarator): Override default value of new
6696 "type_is_unique" param to c_parser_require.
6697 (c_parser_asm_statement): Likewise.
6698 * c-parser.h (c_parser_require): Add "type_is_unique" param,
6701 2017-10-11 Nathan Sidwell <nathan@acm.org>
6703 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
6705 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
6707 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
6708 operating on trees as wide_ints.
6709 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
6710 (c_tree_equal): Likewise.
6712 2017-10-04 David Malcolm <dmalcolm@redhat.com>
6714 * c-decl.c (push_parm_decl): Store c_parm's location into the
6716 (build_c_parm): Add "loc" param and store it within the c_parm.
6717 * c-parser.c (struct c_parser): Add "last_token_location" field.
6718 (c_parser_consume_token): Store location of the token into the
6720 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
6721 when handling a FUNCTION_DECL, if it doesn't already have them.
6722 (c_parser_parameter_declaration): Generate a location for the
6723 parameter, and pass it to the call to build_c_parm.
6724 * c-tree.h (struct c_parm): Add field "loc".
6725 (build_c_parm): Add location_t param.
6726 * c-typeck.c (get_fndecl_argument_location): New function.
6727 (inform_for_arg): New function.
6728 (convert_for_assignment): Use inform_for_arg when dealing with
6731 2017-09-29 Jakub Jelinek <jakub@redhat.com>
6733 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
6735 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
6736 don't SET_DECL_C_BIT_FIELD here.
6739 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
6740 instead of trying to set just TREE_READONLY manually.
6742 2017-09-16 Tom de Vries <tom@codesourcery.com>
6745 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
6748 2017-09-15 Joseph Myers <joseph@codesourcery.com>
6751 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
6753 (build_conditional_expr): For C11, generate result with excess
6754 precision when one argument is an integer and the other is of a
6755 type using excess precision.
6757 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
6759 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
6761 2017-09-13 Marek Polacek <polacek@redhat.com>
6764 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
6765 than expr.original_type.
6767 2017-09-12 Nathan Sidwell <nathan@acm.org>
6769 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
6770 resort_sorted_fields): Moved from c-family/c-common.c.
6771 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
6773 2017-09-01 Joseph Myers <joseph@codesourcery.com>
6776 * c-typeck.c (build_atomic_assign): Handle argument with excess
6777 precision. Ensure any EXCESS_PRECISION_EXPR is present in
6778 argument passed to build_binary_op and convert_for_assignment but
6779 not for call to c_fully_fold.
6780 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
6781 Ensure build_binary_op is called with argument with original
6782 semantic type. Avoid calling c_fully_fold with an
6783 EXCESS_PRECISION_EXPR from build_binary_op.
6785 2017-09-01 Jakub Jelinek <jakub@redhat.com>
6788 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
6790 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6791 Alan Hayward <alan.hayward@arm.com>
6792 David Sherwood <david.sherwood@arm.com>
6794 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
6795 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
6796 m1 and m2 to the signed equivalent of a fixed-point
6799 2017-08-24 David Malcolm <dmalcolm@redhat.com>
6801 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
6802 than CAN_HAVE_LOCATION_P when determining whether to use the
6803 location_t value within "value".
6805 2017-08-21 David Malcolm <dmalcolm@redhat.com>
6807 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
6808 rather than peeking the location of the first token.
6809 * c-tree.h (c_expr::get_location): New method.
6811 2017-08-21 David Malcolm <dmalcolm@redhat.com>
6813 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
6814 to check_function_arguments.
6816 2017-08-18 Marek Polacek <polacek@redhat.com>
6818 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
6821 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
6824 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
6825 (check_bitfield_type_and_width): Don't allow bit-field with
6826 warn_if_not_aligned type.
6828 2017-08-14 Martin Sebor <msebor@redhat.com>
6831 * c-objc-common.c (c_objc_common_init): Handle 'G'.
6833 2017-08-11 Marek Polacek <polacek@redhat.com>
6836 * c-decl.c (pushtag): Only print inform if the warning was printed.
6837 (grokdeclarator): Likewise.
6839 2017-08-10 David Malcolm <dmalcolm@redhat.com>
6841 * c-parser.c (c_parser_error): Rename to...
6842 (c_parser_error_richloc): ...this, making static, and adding
6843 "richloc" parameter, passing it to the c_parse_error call,
6844 rather than calling c_parser_set_source_position_from_token.
6845 (c_parser_error): Reintroduce, reimplementing in terms of the
6846 above, converting return type from void to bool.
6847 (class token_pair): New class.
6848 (struct matching_paren_traits): New struct.
6849 (matching_parens): New typedef.
6850 (struct matching_brace_traits): New struct.
6851 (matching_braces): New typedef.
6852 (get_matching_symbol): New function.
6853 (c_parser_require): Add param MATCHING_LOCATION, using it to
6854 highlight matching "opening" tokens for missing "closing" tokens.
6855 (c_parser_skip_until_found): Likewise.
6856 (c_parser_static_assert_declaration_no_semi): Convert explicit
6857 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
6858 class matching_parens, so that the pertinent open parenthesis is
6859 highlighted when there are problems locating the close
6861 (c_parser_struct_or_union_specifier): Likewise.
6862 (c_parser_typeof_specifier): Likewise.
6863 (c_parser_alignas_specifier): Likewise.
6864 (c_parser_simple_asm_expr): Likewise.
6865 (c_parser_braced_init): Likewise, for matching_braces.
6866 (c_parser_paren_condition): Likewise, for matching_parens.
6867 (c_parser_switch_statement): Likewise.
6868 (c_parser_for_statement): Likewise.
6869 (c_parser_asm_statement): Likewise.
6870 (c_parser_asm_operands): Likewise.
6871 (c_parser_cast_expression): Likewise.
6872 (c_parser_sizeof_expression): Likewise.
6873 (c_parser_alignof_expression): Likewise.
6874 (c_parser_generic_selection): Likewise.
6875 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
6876 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
6877 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
6878 In case CPP_OPEN_PAREN, pass loc_open_paren to the
6879 c_parser_skip_until_found call.
6880 (c_parser_objc_class_definition): Use class matching_parens as
6882 (c_parser_objc_method_decl): Likewise.
6883 (c_parser_objc_try_catch_finally_statement): Likewise.
6884 (c_parser_objc_synchronized_statement): Likewise.
6885 (c_parser_objc_at_property_declaration): Likewise.
6886 (c_parser_oacc_wait_list): Likewise.
6887 (c_parser_omp_var_list_parens): Likewise.
6888 (c_parser_omp_clause_collapse): Likewise.
6889 (c_parser_omp_clause_default): Likewise.
6890 (c_parser_omp_clause_if): Likewise.
6891 (c_parser_omp_clause_num_threads): Likewise.
6892 (c_parser_omp_clause_num_tasks): Likewise.
6893 (c_parser_omp_clause_grainsize): Likewise.
6894 (c_parser_omp_clause_priority): Likewise.
6895 (c_parser_omp_clause_hint): Likewise.
6896 (c_parser_omp_clause_defaultmap): Likewise.
6897 (c_parser_oacc_single_int_clause): Likewise.
6898 (c_parser_omp_clause_ordered): Likewise.
6899 (c_parser_omp_clause_reduction): Likewise.
6900 (c_parser_omp_clause_schedule): Likewise.
6901 (c_parser_omp_clause_num_teams): Likewise.
6902 (c_parser_omp_clause_thread_limit): Likewise.
6903 (c_parser_omp_clause_aligned): Likewise.
6904 (c_parser_omp_clause_linear): Likewise.
6905 (c_parser_omp_clause_safelen): Likewise.
6906 (c_parser_omp_clause_simdlen): Likewise.
6907 (c_parser_omp_clause_depend): Likewise.
6908 (c_parser_omp_clause_map): Likewise.
6909 (c_parser_omp_clause_device): Likewise.
6910 (c_parser_omp_clause_dist_schedule): Likewise.
6911 (c_parser_omp_clause_proc_bind): Likewise.
6912 (c_parser_omp_clause_uniform): Likewise.
6913 (c_parser_omp_for_loop): Likewise.
6914 (c_parser_cilk_clause_vectorlength): Likewise.
6915 (c_parser_cilk_clause_linear): Likewise.
6916 (c_parser_transaction_expression): Likewise.
6917 * c-parser.h (c_parser_require): Add param matching_location with
6918 default UNKNOWN_LOCATION.
6919 (c_parser_error): Convert return type from void to bool.
6920 (c_parser_skip_until_found): Add param matching_location with
6921 default UNKNOWN_LOCATION.
6923 2017-08-09 Marek Polacek <polacek@redhat.com>
6925 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
6926 * c-tree.h (build_external_ref): Update declaration.
6927 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
6928 (build_external_ref): Change the type of a parameter to bool.
6929 (parser_build_binary_op): Use true/false instead of 1/0.
6930 (pointer_diff): Likewise.
6931 (build_modify_expr): Likewise.
6932 (set_designator): Change the type of a parameter to bool.
6933 (set_init_index): Use true/false instead of 1/0.
6934 (set_init_label): Likewise.
6935 (output_init_element): Change the type of a parameter to bool.
6936 (output_pending_init_elements): Use true/false instead of 1/0.
6937 (process_init_element): Likewise.
6938 (build_binary_op): Change the type of a parameter to bool.
6940 2017-08-09 Marek Polacek <polacek@redhat.com>
6943 * c-typeck.c (pedwarn_init): Make the function take a variable list.
6944 Call emit_diagnostic_valist instead of pedwarn.
6945 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
6946 Print the relevant types in diagnostics.
6948 2017-08-09 Marek Polacek <polacek@redhat.com>
6951 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
6952 build_conditional_expr.
6953 * c-parser.c (c_parser_conditional_expression): Create locations for
6954 EXP1 and EXP2 from their source ranges. Pass the locations down to
6955 build_conditional_expr.
6956 * c-tree.h (build_conditional_expr): Update declaration.
6957 * c-typeck.c (build_conditional_expr): Add location_t parameters.
6958 For -Wsign-compare, also print the types.
6960 2017-08-08 Martin Liska <mliska@suse.cz>
6962 * c-convert.c: Include header files.
6963 * c-typeck.c: Likewise.
6965 2017-08-07 Martin Liska <mliska@suse.cz>
6967 * c-parser.c (c_parser_attributes): Canonicalize name of an
6970 2017-08-02 Marek Polacek <polacek@redhat.com>
6973 * c-parser.c (c_parser_unary_expression): Use set_error.
6977 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
6978 warnings. Avoid walking MACRO_MAP_LOCATIONS.
6980 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
6981 Martin Liska <mliska@suse.cz>
6983 * c-typeck.c (c_finish_goto_label): Build gimple predict
6986 2017-07-31 Martin Liska <mliska@suse.cz>
6989 * c-convert.c (convert): Guard condition with flag_sanitize_p
6990 also with current_function_decl non-null equality.
6991 * c-decl.c (grokdeclarator): Likewise.
6992 * c-typeck.c (build_binary_op): Likewise.
6994 2017-07-25 Marek Polacek <polacek@redhat.com>
6996 * c-decl.c (grokfield): Remove local variable.
6998 2017-07-25 Marek Polacek <polacek@redhat.com>
7001 * c-parser.c (c_parser_else_body): Don't warn about multistatement
7002 macro expansion if the body is in { }.
7003 (c_parser_while_statement): Likewise.
7004 (c_parser_for_statement): Likewise.
7006 2017-07-18 Nathan Sidwell <nathan@acm.org>
7008 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
7010 2017-07-14 David Malcolm <dmalcolm@redhat.com>
7012 * c-decl.c (implicitly_declare): When suggesting a missing
7013 #include, provide a fix-it hint.
7015 2017-07-06 David Malcolm <dmalcolm@redhat.com>
7017 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
7018 and call that instead.
7019 * c-tree.h (selftest::run_c_tests): New decl.
7021 2017-06-26 Marek Polacek <polacek@redhat.com>
7024 * c-parser.c (c_parser_if_body): Set the location of the
7025 body of the conditional after parsing all the labels. Call
7026 warn_for_multistatement_macros.
7027 (c_parser_else_body): Likewise.
7028 (c_parser_switch_statement): Likewise.
7029 (c_parser_while_statement): Likewise.
7030 (c_parser_for_statement): Likewise.
7031 (c_parser_statement): Add a default argument. Save the location
7032 after labels have been parsed.
7033 (c_parser_c99_block_statement): Likewise.
7035 2017-06-19 Richard Biener <rguenther@suse.de>
7037 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
7038 negated _Literals to parse _Literal (int) -1.
7040 2017-06-13 Martin Liska <mliska@suse.cz>
7043 * c-convert.c (convert): Use sanitize_flags_p.
7044 * c-decl.c (grokdeclarator): Likewise.
7045 * c-typeck.c (convert_for_assignment): Likewise.
7046 (c_finish_return): Likewise.
7047 (build_binary_op): Likewise.
7049 2017-06-08 Jakub Jelinek <jakub@redhat.com>
7052 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
7053 to sizetype before size_binop.
7055 2017-06-07 Jakub Jelinek <jakub@redhat.com>
7057 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
7060 2017-06-06 Marek Polacek <polacek@redhat.com>
7063 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
7065 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
7067 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
7069 * c-parser.c (c_parser_binary_expression): Implement the
7070 -Wsizeof_pointer_div warning.
7071 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
7072 from a parenthesized expression.
7073 (c_parser_expr_list): Use c_last_sizeof_loc.
7074 * c-tree.h (c_last_sizeof_loc): New external.
7075 * c-typeck.c (c_last_sizeof_loc): New variable.
7076 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
7078 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
7081 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
7083 2017-05-30 David Malcolm <dmalcolm@redhat.com>
7085 * c-objc-common.c (c_tree_printer): Gain bool and const char **
7088 2017-05-24 Martin Sebor <msebor@redhat.com>
7091 * c-fold.c (c_fully_fold_internal): Adjust.
7092 * c-typeck.c (parser_build_unary_op): Adjust.
7094 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
7096 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
7097 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
7100 2017-05-23 Marek Polacek <polacek@redhat.com>
7102 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
7105 2017-05-22 Jakub Jelinek <jakub@redhat.com>
7107 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
7108 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
7109 it returned invariant. Call tree_invariant_p unconditionally
7110 afterwards to decide whether to return expr or op0.
7112 2017-05-22 Nathan Sidwell <nathan@acm.org>
7114 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
7116 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
7118 * c-parser.c (c_parser_omp_clause_default): Handle
7119 "OMP_CLAUSE_DEFAULT_PRESENT".
7121 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
7123 * config-lang.in (gtfiles): Add c-family/c-format.c.
7125 2017-05-18 Nathan Sidwell <nathan@acm.org>
7127 * c-decl.c (pushdecl_top_level): Delete unused function.
7129 2017-05-18 Marek Polacek <polacek@redhat.com>
7131 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
7132 (check_earlier_gotos): Likewise.
7133 (define_label): Likewise.
7134 (pending_xref_error): Likewise.
7135 (smallest_type_quals_location): Likewise.
7136 (grokdeclarator): Likewise.
7137 (grokparms): Likewise.
7138 (identifier_global_value): Likewise.
7139 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
7140 (find_init_member): Likewise.
7142 2017-05-18 Marek Polacek <polacek@redhat.com>
7144 * c-decl.c (start_decl): Use false/true instead of 0/1.
7145 (grokdeclarator): Likewise.
7146 (finish_struct): Likewise.
7147 (start_function): Change the return type to bool. Use false/true
7149 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
7150 * c-tree.h (start_function): Update.
7151 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
7152 (set_designator): Change the return type to bool. Use false/true
7155 2017-05-17 Marek Polacek <polacek@redhat.com>
7157 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
7158 * c-typeck.c: Likewise.
7160 2017-05-17 Marek Polacek <polacek@redhat.com>
7163 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
7164 DECL_IGNORED_P even for non-static compound literals.
7166 2017-05-17 Martin Liska <mliska@suse.cz>
7168 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
7169 use it instead of int type.
7171 2017-05-17 Marek Polacek <polacek@redhat.com>
7173 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
7175 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
7176 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
7177 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
7178 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
7180 (c_parser_conditional_expression): Likewise.
7181 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
7182 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
7183 (process_init_element): Likewise.
7184 (build_binary_op): Likewise.
7185 (handle_omp_array_sections_1): Likewise.
7187 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
7189 * c-parser.c (c_parser_omp_clause_num_gangs)
7190 (c_parser_omp_clause_num_workers)
7191 (c_parser_omp_clause_vector_length): Merge functions into...
7192 (c_parser_oacc_single_int_clause): ... this new function. Adjust
7195 2017-05-11 Nathan Sidwell <nathan@acm.org>
7197 * gimple-parser.c: Don't #include tree-dump.h.
7199 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7202 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
7204 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7207 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
7208 incorrect __MEM syntax.
7210 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7213 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
7216 2017-05-09 Nathan Sidwell <nathan@acm.org>
7218 * c-tree.h (pushdecl): Declare.
7220 2017-05-05 David Malcolm <dmalcolm@redhat.com>
7222 * c-decl.c (warn_defaults_to): Replace report_diagnostic
7223 with diagnostic_report_diagnostic.
7224 * c-errors.c (pedwarn_c99): Likewise.
7225 (pedwarn_c90): Likewise.
7227 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
7230 * c-gimplify.c (c_gimplify_expr): Remove calls to
7231 cilk_gimplifY_call_params_in_spawned_fn.
7233 2017-04-25 David Malcolm <dmalcolm@redhat.com>
7235 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
7236 hint for removing extra semicolon.
7238 2017-04-21 Jakub Jelinek <jakub@redhat.com>
7241 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
7242 enabled, set specs->type to integer_type_node.
7244 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
7246 * c-array-notation.c: Fix typo in comment.
7248 2017-03-29 Marek Polacek <polacek@redhat.com>
7251 * c-decl.c (finish_decl): Check VAR_P.
7253 2017-03-27 Jakub Jelinek <jakub@redhat.com>
7256 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
7257 * c-typeck.c (c_mark_addressable): Likewise. Look through
7258 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
7260 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
7262 2017-03-23 Marek Polacek <polacek@redhat.com>
7264 * c-tree.h: Remove a C_RID_YYCODE reference.
7266 2017-03-21 Jakub Jelinek <jakub@redhat.com>
7269 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
7270 optional COMPOUND_EXPR with ubsan instrumentation.
7272 2017-03-17 Marek Polacek <polacek@redhat.com>
7274 * c-parser.c: Add C11 references.
7276 2017-03-15 Marek Polacek <polacek@redhat.com>
7278 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
7280 2017-03-11 Marek Polacek <polacek@redhat.com>
7282 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
7284 2017-03-10 David Malcolm <dmalcolm@redhat.com>
7286 PR translation/79848
7287 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
7289 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
7291 2017-03-09 Marek Polacek <polacek@redhat.com>
7294 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
7295 parameter declarations with initializers.
7297 2017-03-09 Jakub Jelinek <jakub@redhat.com>
7300 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
7303 2017-03-07 Jakub Jelinek <jakub@redhat.com>
7306 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
7307 for "may only be used in compound statements" diagnostics, change it
7308 such that the same translatable string is used for all pragmas. For
7309 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
7311 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
7312 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
7313 "may only be used in compound statements" diagnostics, such that the
7314 same translatable string is used for all pragmas.
7316 2017-03-04 Marek Polacek <polacek@redhat.com>
7319 * c-decl.c (implicit_decl_warning): Add missing space.
7321 2017-03-03 Marek Polacek <polacek@redhat.com>
7324 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
7325 current_function_prototype_arg_types is error_mark_node. Fix
7326 formatting. Use TREE_VALUE instead of TREE_TYPE.
7328 2017-03-03 Jakub Jelinek <jakub@redhat.com>
7331 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
7332 %<min%> or %<max%> in the diagnostics, instead mention identifier.
7333 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
7337 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
7338 instead of %<_Generic>.
7339 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
7340 (c_parser_omp_target_exit_data): Use %<release%> instead of
7343 2017-02-28 Jakub Jelinek <jakub@redhat.com>
7345 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
7346 instead of just cond ? "..." : "...".
7347 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
7348 for "enter"/"exit" keyword.
7349 (c_finish_oacc_routine): Don't use %s to supply portions of the
7352 2017-02-24 Jakub Jelinek <jakub@redhat.com>
7355 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
7356 handle -Wrestrict here.
7357 * c-typeck.c (build_function_call_vec): Adjust
7358 check_function_arguments caller.
7360 2017-02-23 Richard Biener <rguenther@suse.de>
7363 * gimple-parser.c (c_parser_gimple_statement): Use set_error
7364 to initialize c_exprs to return.
7365 (c_parser_gimple_binary_expression): Likewise.
7366 (c_parser_gimple_unary_expression): Likewise.
7367 (c_parser_gimple_postfix_expression): Likewise.
7369 2017-02-22 Marek Polacek <polacek@redhat.com>
7372 * c-typeck.c (convert_arguments): Handle error_mark_node.
7374 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7376 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
7377 value of c_parser_parse_ssa_name against error_mark_node and emit
7378 error if ssa name is anonymous and written as default definition.
7380 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7382 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
7385 2017-02-16 Jakub Jelinek <jakub@redhat.com>
7388 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
7389 ignore #pragma omp target even when not followed by identifier.
7391 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7393 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
7394 (c_parser_gimple_unary_expression): Likewise.
7396 2017-02-13 Jakub Jelinek <jakub@redhat.com>
7398 * c-parser.c (c_parser_oacc_declare): Add missing space in
7401 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7404 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
7405 set_c_expr_source_range when parsing ssa-name.
7407 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
7408 Richard Biener <rguenther@suse.de>
7410 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
7411 building IL when arguments are error_mark_node.
7412 (c_parser_gimple_unary_expression): Likewise.
7413 (c_parser_gimple_if_stmt): Likewise.
7414 (c_parser_gimple_switch_stmt): Likewise.
7415 (c_parser_gimple_return_stmt): Likewise.
7416 (c_parser_parse_ssa_name): When name lookup fails do not build
7417 an SSA name. Use undeclared rather than not declared in error
7420 2017-02-09 Marek Polacek <polacek@redhat.com>
7423 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
7424 instead of c_parser_skip_until_found.
7426 2017-02-09 Jakub Jelinek <jakub@redhat.com>
7429 * c-parser.c (c_parser_omp_declare_target): Don't invoke
7430 symtab_node::get on automatic variables.
7432 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
7433 Chung-Lin Tang <cltang@codesourcery.com>
7435 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
7436 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
7438 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
7440 2017-02-07 Richard Biener <rguenther@suse.de>
7442 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
7443 (c_parser_gimple_postfix_expression_after_primary):
7444 Do not use c_build_function_call_vec to avoid folding and promotion.
7447 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
7450 * c-decl.c (pop_scope): Pass main_input_filename to
7451 build_translation_unit_decl.
7453 2017-01-24 David Malcolm <dmalcolm@redhat.com>
7455 * c-parser.c: Include "read-rtl-function.h" and
7457 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
7458 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
7459 production. Update for renaming of field "gimple_pass" to
7460 "gimple_or_rtl_pass". If __RTL was seen, call
7461 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
7462 to an auto_timevar, to cope with early exit.
7463 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
7464 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
7465 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
7467 (c_parser_parse_rtl_body): New function.
7468 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
7469 (struct c_declspecs): Rename field "gimple_pass" to
7470 "gimple_or_rtl_pass". Add field "rtl_p".
7471 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
7472 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
7473 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
7474 (c_parser_gimple_or_rtl_pass_list): ...this.
7476 2017-01-20 Marek Polacek <polacek@redhat.com>
7479 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
7481 2017-01-13 Richard Biener <rguenther@suse.de>
7483 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
7486 2017-01-13 Richard Biener <rguenther@suse.de>
7488 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
7489 _Literal ( type-name ) number.
7491 2017-01-12 Richard Biener <rguenther@suse.de>
7493 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
7496 2017-01-11 Jakub Jelinek <jakub@redhat.com>
7499 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
7502 2017-01-11 Richard Biener <rguenther@suse.de>
7505 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
7506 returns on parse errors.
7508 2017-01-04 Marek Polacek <polacek@redhat.com>
7511 * c-parser.c (c_parser_postfix_expression): Mark zero character
7512 constants by setting original_type in c_expr.
7513 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
7514 with a zero character constant.
7515 (char_type_p): New function.
7517 2017-01-04 David Malcolm <dmalcolm@redhat.com>
7519 * c-parser.c (c_parser_declaration_or_fndef): Create a
7520 rich_location at init_loc and parse it to start_init.
7521 (last_init_list_comma): New global.
7522 (c_parser_braced_init): Update last_init_list_comma when parsing
7523 commas. Pass it to pop_init_level. Pass location of closing
7524 brace to pop_init_level.
7525 (c_parser_postfix_expression_after_paren_type): Create a
7526 rich_location at type_loc and parse it to start_init.
7527 (c_parser_omp_declare_reduction): Likewise for loc.
7528 * c-tree.h (start_init): Add rich_location * param.
7529 (pop_init_level): Add location_t param.
7530 * c-typeck.c (struct initializer_stack): Add field
7531 "missing_brace_richloc".
7532 (start_init): Add richloc param, use it to initialize
7533 the stack node's missing_brace_richloc.
7534 (last_init_list_comma): New decl.
7535 (finish_implicit_inits): Pass last_init_list_comma to
7537 (push_init_level): When finding missing open braces, add fix-it
7538 hints to the richloc.
7539 (pop_init_level): Add "insert_before" param and pass it
7540 when calling pop_init_level. Add fixits about missing
7541 close braces to any richloc. Use the richloc for the
7542 -Wmissing-braces warning.
7543 (set_designator): Pass last_init_list_comma to pop_init_level.
7544 (process_init_element): Likewise.
7546 2017-01-01 Jakub Jelinek <jakub@redhat.com>
7548 Update copyright years.
7550 2016-12-21 Jakub Jelinek <jakub@redhat.com>
7553 * c-typeck.c (build_function_call_vec): If check_function_arguments
7554 returns true, set TREE_NO_WARNING on CALL_EXPR.
7557 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
7558 to *expr instead of overwriting it.
7560 2016-12-20 Richard Biener <rguenther@suse.de>
7562 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
7564 (c_parser_gimple_statement): Only build assigns for non-error
7566 (c_parser_gimple_postfix_expression_after): Improve error recovery.
7568 2016-12-14 Martin Jambor <mjambor@suse.cz>
7570 * c-parser.c: Include omp-general.h and omp-offload.h instead of
7572 (c_finish_oacc_routine): Adjusted call to
7573 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
7574 to use their new names.
7575 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
7577 (c_parser_oacc_update): Likewise.
7578 (c_parser_omp_simd): Likewise.
7579 (c_parser_omp_target_update): Likewise.
7580 * c-typeck.c: Include omp-general.h instead of omp-low.h.
7581 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
7583 (c_finish_omp_cancellation_point): Likewise.
7584 * gimple-parser.c: Do not include omp-low.h
7586 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
7587 James Norris <jnorris@codesourcery.com>
7589 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
7590 EXIT_DATA,WAIT} are not used in compound statements.
7591 (c_parser_oacc_enter_exit_data): Update diagnostics.
7593 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7596 * c-decl.c (diagnose_mismatched_decls): Use
7597 OPT_Wbuiltin_declaration_mismatch here too.
7599 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
7600 Alan Hayward <alan.hayward@arm.com>
7601 David Sherwood <david.sherwood@arm.com>
7603 * c-decl.c (merge_decls): Use SET_DECL_MODE.
7604 (make_label, finish_struct): Likewise.
7606 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
7607 Richard Biener <rguenther@suse.de>
7609 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
7610 * config-lang.in (gtfiles): Add c/c-parser.h.
7611 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
7612 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
7613 * c-parser.c (enum c_id_kind, struct c_token,
7614 c_parser_next_token_is, c_parser_next_token_is_not,
7615 c_parser_next_token_is_keyword,
7616 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
7618 * c-parser.h: ... new header.
7619 * c-parser.c: Include c-parser.h and gimple-parser.h.
7620 (c_parser_peek_token, c_parser_peek_2nd_token,
7621 c_token_starts_typename, c_parser_next_token_starts_declspecs,
7622 c_parser_next_tokens_start_declaration, c_parser_consume_token,
7623 c_parser_error, c_parser_require, c_parser_skip_until_found,
7624 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
7625 c_parser_type_name): Export.
7626 (c_parser_tokens_buf): New function.
7627 (c_parser_error): Likewise.
7628 (c_parser_set_error): Likewise.
7629 (c_parser_declspecs): Handle RID_GIMPLE.
7630 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
7631 via c_parser_parse_gimple_body.
7632 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
7633 c_token_starts_typename, c_parser_next_token_starts_declspecs,
7634 c_parser_next_tokens_start_declaration, c_parser_consume_token,
7635 c_parser_error, c_parser_require, c_parser_skip_until_found,
7636 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
7637 c_parser_type_name): Declare.
7638 (struct c_parser): Declare forward.
7639 (c_parser_tokens_buf): Declare.
7640 (c_parser_error): Likewise.
7641 (c_parser_set_error): Likewise.
7642 * gimple-parser.c: New file.
7643 * gimple-parser.h: Likewise.
7645 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7648 * c-parser.c (c_parser_postfix_expression_after_primary): Call
7651 2016-09-11 Le-Chun Wu <lcwu@google.com>
7652 Mark Wielaard <mjw@redhat.com>
7654 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
7655 to the given -Wshadow= variant.
7657 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7659 * c-typeck.c: Include memmodel.h.
7661 2016-10-13 Jakub Jelinek <jakub@redhat.com>
7664 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
7665 instead of lhd_return_null_tree_v.
7667 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
7670 * c-decl.c (smallest_type_quals_location): New static function.
7671 (grokdeclarator): Try to find the correct location for an ignored
7674 2016-09-26 Marek Polacek <polacek@redhat.com>
7677 * c-decl.c (pop_scope): Add gcc_fallthrough.
7679 2016-09-26 Marek Polacek <polacek@redhat.com>
7682 * c-parser.c (struct c_token): Add flags field.
7683 (c_lex_one_token): Pass it to c_lex_with_flags.
7684 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
7685 into IFN_FALLTHROUGH.
7686 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
7687 attribute fallthrough after a case label or default label.
7688 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
7690 2016-09-24 Marek Polacek <polacek@redhat.com>
7693 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
7694 have boolean value. Warn about ++/-- on booleans.
7696 2016-09-23 Jakub Jelinek <jakub@redhat.com>
7698 * c-parser.c (incomplete_record_decls): Remove unnecessary
7699 = vNULL initialization of file scope vec.
7701 2016-09-16 Marek Polacek <polacek@redhat.com>
7703 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
7705 2016-09-14 Marek Polacek <polacek@redhat.com>
7707 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
7708 (fix_array_notation_expr): Likewise.
7709 * c-decl.c (finish_decl): Likewise.
7710 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7711 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
7712 (function_to_pointer_conversion): Use false instead of 0.
7713 (convert_lvalue_to_rvalue): Likewise.
7714 (parser_build_unary_op): Likewise.
7715 (build_atomic_assign): Likewise.
7716 (build_unary_op): Change nonconvert parameter type to bool, use
7717 true/false instead of 1/0.
7718 (build_binary_op): Use true instead of 1.
7720 2016-09-13 David Malcolm <dmalcolm@redhat.com>
7722 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
7723 of add_fixit_insert to add_fixit_insert_before.
7725 2016-09-13 Marek Polacek <polacek@redhat.com>
7727 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
7730 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
7733 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
7734 COMPOUND_EXPR to warn_for_omitted_condop.
7736 2016-09-07 David Malcolm <dmalcolm@redhat.com>
7738 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
7739 c_get_substring_location for this new langhook.
7741 2016-09-02 Jakub Jelinek <jakub@redhat.com>
7744 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
7746 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
7747 instead of mark_exp_read on low_bound/length expression.
7748 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
7749 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7750 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7751 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
7752 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
7753 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
7754 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
7755 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
7756 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
7757 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
7758 instead of mark_expr_read.
7759 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
7760 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
7761 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
7762 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
7763 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
7764 array section bases outside of depend clause, for depend clause
7765 use convert_lvalue_to_rvalue on the base.
7766 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
7767 linear, aligned, map, to and from clauses.
7768 (c_omp_clause_copy_ctor): New function.
7770 2016-09-01 Marek Polacek <polacek@redhat.com>
7773 * c-typeck.c (composite_type): Add FALLTHRU comment.
7775 2016-08-31 David Malcolm <dmalcolm@redhat.com>
7777 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
7778 to the insertion fixits for "struct", "union", and "enum".
7780 2016-08-30 David Malcolm <dmalcolm@redhat.com>
7782 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
7783 rather than add_fixit_misspelled_id.
7784 (undeclared_variable): Likewise.
7785 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
7786 now-redundant "here" params from add_fixit_insert method calls.
7787 (c_parser_parameter_declaration): Likewise.
7788 * c-typeck.c (build_component_ref): Remove now-redundant range
7789 param from add_fixit_replace method calls.
7791 2016-08-25 Marek Polacek <polacek@redhat.com>
7793 * c-typeck.c (parser_build_binary_op): Pass LHS to
7794 warn_logical_not_parentheses.
7796 2016-08-25 Marek Polacek <polacek@redhat.com>
7799 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
7800 or _FloatN or _FloatNx is not supported.
7801 (finish_declspecs): Set type to integer_type_node when _FloatN or
7802 _FloatNx is not supported.
7804 2016-08-19 Joseph Myers <joseph@codesourcery.com>
7807 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
7808 (struct c_declspecs): Add field floatn_nx_idx.
7809 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
7810 and _FloatNx type specifiers.
7811 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
7812 (c_parser_declspecs, c_parser_attribute_any_word)
7813 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
7814 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
7815 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
7816 narrower than double.
7818 2016-08-12 Jakub Jelinek <jakub@redhat.com>
7819 Martin Liska <mliska@suse.cz>
7822 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
7823 % to determine val element to change. Assert that
7824 wchar_bytes * charwidth fits into val array.
7826 2016-08-12 Marek Polacek <polacek@redhat.com>
7829 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
7830 (c_parser_postfix_expression): Likewise.
7831 * c-typeck.c (build_unary_op): Adjust fall through comment.
7832 (c_mark_addressable): Likewise.
7834 2016-08-11 Jakub Jelinek <jakub@redhat.com>
7837 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
7838 array member through typedef, for orig_qual_indirect == 0 clear
7841 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7844 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
7845 this up to selftest::run_c_tests.
7846 (selftest::run_c_tests): New function.
7848 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
7850 * c-parser.c (struct oacc_routine_data): Add error_seen and
7851 fndecl_seen members.
7852 (c_finish_oacc_routine): Use these.
7853 (c_parser_declaration_or_fndef): Adjust.
7854 (c_parser_oacc_routine): Likewise. Support more C language
7855 constructs, and improve diagnostics. Move pragma context
7857 (c_parser_pragma): ... here.
7859 * c-parser.c (struct oacc_routine_data): New.
7860 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
7862 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
7863 declare target" attribute.
7865 2016-08-01 Jan Beulich <jbeulich@suse.com>
7867 * c-fold.c (c_fully_fold_internal): Also emit shift count
7868 warnings for vector types.
7869 * c-typeck.c (build_binary_op): Likewise.
7871 2016-07-29 Marek Polacek <polacek@redhat.com>
7874 * c-decl.c (finish_struct): Rephrase an error message.
7877 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
7878 to error node for invalid code.
7881 * c-decl.c (implicitly_declare): Return decl early not only for
7882 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
7884 2016-07-29 Jakub Jelinek <jakub@redhat.com>
7887 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
7888 on GNU extern inline functions.
7890 2016-07-29 Marek Polacek <polacek@redhat.com>
7893 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
7896 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
7898 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
7900 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7902 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
7904 (best_macro_match): Likewise, converting from a typedef to a
7906 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
7907 (lookup_name_fuzzy): Update for change of best_macro_match to a
7908 subclass with a ctor that calls cpp_forall_identifiers.
7910 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7912 * c-decl.c (implicit_decl_warning): Update for conversion of
7913 return type of lookup_name_fuzzy to const char *.
7914 (undeclared_variable): Likewise.
7915 (lookup_name_fuzzy): Convert return type from tree to
7917 * c-parser.c (c_parser_declaration_or_fndef): Update for
7918 conversion of return type of lookup_name_fuzzy to const char *.
7919 (c_parser_parameter_declaration): Likewise.
7921 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
7923 * c-parser.c (c_parser_oacc_declare): Don't scan for
7925 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
7926 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
7927 zero-length subarrays.
7929 2016-07-15 Jakub Jelinek <jakub@redhat.com>
7932 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
7933 instead of FUZZY_LOOKUP_NAME.
7934 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
7935 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
7937 2016-07-14 Jakub Jelinek <jakub@redhat.com>
7940 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
7942 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7944 * c-parser.c (c_parser_generic_selection): Make type of variable
7946 (c_parser_omp_declare_simd): Likewise.
7948 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7950 * c-decl.c (struct c_struct_parse_info): Change member types
7951 from vec to auto_vec.
7952 (start_struct): Adjust.
7953 (finish_struct): Likewise.
7955 2016-07-02 Jakub Jelinek <jakub@redhat.com>
7958 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
7960 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7962 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
7963 Move pragma context checking into...
7964 (c_parser_omp_cancellation_point): ... here, and improve
7965 diagnostic messages.
7966 * c-typeck.c (c_finish_omp_cancel)
7967 (c_finish_omp_cancellation_point): Improve diagnostic messages.
7969 2016-06-29 Jakub Jelinek <jakub@redhat.com>
7972 * c-typeck.c (c_build_qualified_type): Don't clear
7973 C_TYPE_INCOMPLETE_VARS for the main variant.
7975 2016-06-28 Martin Sebor <msebor@redhat.com>
7978 * c-typeck.c (output_init_element): Diagnose incompatible types
7979 before non-constant initializers.
7981 2016-06-28 Jakub Jelinek <jakub@redhat.com>
7983 * Make-lang.in: Don't cat ../stage_current if it does not exist.
7985 2016-06-23 Andi Kleen <ak@linux.intel.com>
7987 * Make-lang.in: Add support for autofdo.
7989 2016-06-22 David Malcolm <dmalcolm@redhat.com>
7992 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
7993 (implicit_decl_warning): When issuing warnings for implicit
7994 declarations, attempt to provide a suggestion via
7996 (undeclared_variable): Likewise when issuing errors.
7997 (lookup_name_in_scope): Likewise.
7998 (struct edit_distance_traits<cpp_hashnode *>): New struct.
7999 (best_macro_match): New typedef.
8000 (find_closest_macro_cpp_cb): New function.
8001 (lookup_name_fuzzy): New function.
8002 * c-parser.c: Include gcc-rich-location.h.
8003 (c_token_starts_typename): Split out case CPP_KEYWORD into...
8004 (c_keyword_starts_typename): ...this new function.
8005 (c_parser_declaration_or_fndef): When issuing errors about
8006 missing "struct" etc, add a fixit. For other kinds of errors,
8007 attempt to provide a suggestion via lookup_name_fuzzy.
8008 (c_parser_parms_declarator): When looking ahead to detect typos in
8009 type names, also reject CPP_KEYWORD.
8010 (c_parser_parameter_declaration): When issuing errors about
8011 unknown type names, attempt to provide a suggestion via
8013 * c-tree.h (c_keyword_starts_typename): New prototype.
8015 2016-06-20 Joseph Myers <joseph@codesourcery.com>
8018 * c-typeck.c (build_conditional_expr): Return error_mark_node if
8019 c_common_type returns error_mark_node.
8021 2016-06-19 Martin Sebor <msebor@redhat.com>
8024 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
8025 __alignof__ (expression).
8027 2016-06-14 David Malcolm <dmalcolm@redhat.com>
8029 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
8031 2016-06-14 David Malcolm <dmalcolm@redhat.com>
8033 * c-typeck.c (build_component_ref): Simplify fixit code by
8034 using gcc_rich_location::add_fixit_misspelled_id.
8035 (set_init_label): Likewise.
8037 2016-06-13 David Malcolm <dmalcolm@redhat.com>
8039 * c-parser.c (c_parser_initelt): Provide location of name for new
8040 location_t param of set_init_label.
8041 * c-tree.h (set_init_label): Add location_t param.
8042 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
8043 param and use it when issuing error messages about unrecognized
8044 field names. Attempt to provide a fixit hint if appropriate,
8045 otherwise update the error message to provide the type name.
8047 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
8050 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
8053 2016-06-08 Martin Sebor <msebor@redhat.com>
8054 Jakub Jelinek <jakub@redhat.com>
8058 * c-typeck.c (convert_arguments): Don't promote last argument
8059 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
8061 2016-06-08 Marek Polacek <polacek@redhat.com>
8064 * c-decl.c (grokdeclarator): Check TYPE_P.
8067 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
8070 2016-06-07 David Malcolm <dmalcolm@redhat.com>
8072 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
8073 and structure element reference, capture the location of the
8074 element name token and pass it to build_component_ref.
8075 (c_parser_postfix_expression_after_primary): Likewise for
8076 structure element dereference.
8077 (c_parser_omp_variable_list): Likewise for
8078 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
8079 * c-tree.h (build_component_ref): Add location_t param.
8080 * c-typeck.c (build_component_ref): Add location_t param
8081 COMPONENT_LOC. Use it, if available, when issuing hints about
8082 mispelled member names to provide a fixit replacement hint.
8084 2016-06-06 Marek Polacek <polacek@redhat.com>
8087 * c-parser.c (c_parser_direct_declarator): Set location.
8089 2016-06-06 Marek Polacek <polacek@redhat.com>
8091 * c-typeck.c (comptypes_internal): Handle comparisons of
8092 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
8093 TYPE_REF_CAN_ALIAS_ALL.
8095 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
8097 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
8098 arguments as addressable when async clause exists.
8100 2016-05-30 Jakub Jelinek <jakub@redhat.com>
8103 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
8104 when combined with target construct.
8106 2016-05-26 Jakub Jelinek <jakub@redhat.com>
8108 * c-parser.c (c_parser_omp_clause_schedule): Warn if
8109 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
8111 2016-05-25 Marek Polacek <polacek@redhat.com>
8114 * c-decl.c (c_make_fname_decl): Don't check seen_error.
8117 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
8119 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
8121 * c-parser.c (c_parser_oacc_declare): Add support for
8122 GOMP_MAP_FIRSTPRIVATE_POINTER.
8123 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
8124 argument with enum c_omp_region_type ort.
8125 (handle_omp_array_sections): Likewise. Update call to
8126 handle_omp_array_sections_1.
8127 (c_finish_omp_clauses): Add specific errors and warning messages for
8128 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
8129 call to handle_omp_array_sections.
8131 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
8133 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
8135 2016-05-24 Richard Biener <rguenther@suse.de>
8139 * c-typeck.c (build_array_ref): Do not complain about indexing
8140 non-lvalue vectors. Adjust for function name change.
8142 2016-05-20 Martin Sebor <msebor@redhat.com>
8145 * c-typeck.c (error_init): Use
8146 expansion_point_location_if_in_system_header.
8147 (warning_init): Same.
8149 2016-05-19 David Malcolm <dmalcolm@redhat.com>
8152 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
8154 (c_parser_postfix_expression): Likewise.
8155 * c-tree.h (c_expr::set_error): New method.
8156 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
8157 that result's range is initialized.
8159 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8161 * c-typeck.c (parser_build_unary_op): Fix formatting.
8163 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
8165 * c-decl.c (grokdeclarator): Remove errmsg and use of
8166 targetm.invalid_return_type.
8167 (grokparms): Remove errmsg and use of
8168 targetm.invalid_parameter_type.
8170 2016-05-13 Joseph Myers <joseph@codesourcery.com>
8172 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
8173 function return type.
8175 2016-05-12 Marek Polacek <polacek@redhat.com>
8178 * c-decl.c (build_compound_literal): Pass LOC down to
8179 c_incomplete_type_error.
8180 * c-tree.h (require_complete_type): Adjust declaration.
8181 (c_incomplete_type_error): Likewise.
8182 * c-typeck.c (require_complete_type): Add location parameter, pass it
8183 down to c_incomplete_type_error.
8184 (c_incomplete_type_error): Add location parameter, pass it down to
8186 (build_component_ref): Pass location down to c_incomplete_type_error.
8187 (default_conversion): Pass location down to require_complete_type.
8188 (build_array_ref): Likewise.
8189 (build_function_call_vec): Likewise.
8190 (convert_arguments): Likewise.
8191 (build_unary_op): Likewise.
8192 (build_c_cast): Likewise.
8193 (build_modify_expr): Likewise.
8194 (convert_for_assignment): Likewise.
8195 (c_finish_omp_clauses): Likewise.
8197 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
8200 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
8202 * c-errors.c (pedwarn_c90): Return true if warned.
8203 * c-tree.h (pedwarn_c90): Change return type to bool.
8204 (enum c_declspec_word): Add new enumerator cdw_atomic.
8206 2016-05-11 Marek Polacek <polacek@redhat.com>
8209 * c-decl.c (diagnose_mismatched_decls): Factor out code to
8210 diagnose_mismatched_attributes and call it.
8212 2016-05-10 Marek Polacek <polacek@redhat.com>
8215 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
8216 on a declaration following the definition.
8218 2016-05-05 Jakub Jelinek <jakub@redhat.com>
8220 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
8221 parse it through to c_parser_c99_block_statement.
8222 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
8225 2016-05-04 Marek Polacek <polacek@redhat.com>
8227 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
8230 2016-05-04 Marek Polacek <polacek@redhat.com>
8233 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
8234 for macro expansions.
8236 2016-05-03 Marek Polacek <polacek@redhat.com>
8239 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
8240 check_builtin_function_arguments.
8242 2016-05-03 Richard Biener <rguenther@suse.de>
8244 * Make-lang.in (cc1-checksum.c): For stage-final re-use
8245 the checksum from the previous stage.
8247 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
8249 * c-parser.c (c_parser_oacc_all_clauses): Update call to
8250 c_finish_omp_clauses.
8251 (c_parser_omp_all_clauses): Likewise.
8252 (c_parser_oacc_cache): Likewise.
8253 (c_parser_oacc_loop): Likewise.
8254 (omp_split_clauses): Likewise.
8255 (c_parser_omp_declare_target): Likewise.
8256 (c_parser_cilk_all_clauses): Likewise.
8257 (c_parser_cilk_for): Likewise.
8258 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
8259 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
8261 2016-05-02 Marek Polacek <polacek@redhat.com>
8264 * c-decl.c (grokdeclarator): Diagnose when array's size has an
8267 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
8270 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
8271 OACC_LOOP_CLAUSE_MASK.
8272 (c_parser_oacc_kernels_parallel): Update call to
8273 c_oacc_split_loop_clauses.
8275 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
8277 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
8278 argument to build_modify_expr in two cases.
8280 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
8282 * c-parser.c (c_parser_postfix_expression_after_primary): Call
8283 warn_for_memset instead of warning directly here.
8285 2016-04-26 Marek Polacek <polacek@redhat.com>
8288 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
8290 (c_parser_for_statement): ... here.
8291 (c_parser_if_statement): Use it.
8292 (c_parser_switch_statement): Use it.
8293 (c_parser_while_statement): Use it.
8296 * c-decl.c (pushdecl): Pass LOCUS down to warning.
8298 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
8301 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
8302 instead of c_finish_cilk_clauses.
8303 * c-tree.h (c_finish_omp_clauses): Add new default argument.
8304 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
8305 floating-point variables in the linear clause for Cilk Plus.
8307 2016-04-18 Michael Matz <matz@suse.de>
8309 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
8310 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
8312 2016-04-15 Marek Polacek <polacek@redhat.com>
8315 * c-typeck.c (build_unary_op): Pass location down to error and
8318 2016-04-15 Jakub Jelinek <jakub@redhat.com>
8321 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
8323 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
8324 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
8325 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
8326 Adjust c_parser_pragma callers.
8327 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
8329 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
8331 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
8332 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
8333 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
8334 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
8335 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
8336 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
8337 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
8338 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
8340 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
8341 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
8344 2016-04-13 Marek Polacek <polacek@redhat.com>
8347 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
8349 (c_parser_statement): Likewise.
8350 (c_parser_c99_block_statement): Likewise.
8351 (c_parser_while_statement): Likewise.
8352 (c_parser_for_statement): Likewise.
8353 (c_parser_if_body): Don't set IF_P here.
8354 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
8355 about dangling else here.
8356 * c-tree.h (c_finish_if_stmt): Adjust declaration.
8357 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
8358 warn about dangling else here.
8360 2016-04-04 Marek Polacek <polacek@redhat.com>
8363 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
8365 2016-03-31 Marek Polacek <polacek@redhat.com>
8368 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
8370 2016-03-18 David Malcolm <dmalcolm@redhat.com>
8373 * c-parser.c (c_parser_postfix_expression): Set the source range
8374 for uses of "__builtin_types_compatible_p".
8376 2016-03-17 Jakub Jelinek <jakub@redhat.com>
8379 * c-typeck.c (composite_type): Don't count void_list_node
8380 into len, if the list is terminated by void_list_node, start
8381 with void_list_node instead of NULL for newargs. Stop
8384 2016-03-16 Marek Polacek <polacek@redhat.com>
8387 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
8388 nested functions returning VM types.
8390 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
8392 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
8393 when calling c_finish_omp_clauses.
8395 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
8398 * c-decl.c (get_parm_info): Don't queue implicit function declarations
8401 2016-03-04 Marek Polacek <polacek@redhat.com>
8404 * c-parser.c (c_parser_postfix_expression): Call
8405 c_parser_cast_expression rather than c_parser_postfix_expression.
8407 2016-03-01 Jakub Jelinek <jakub@redhat.com>
8411 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
8412 of incomplete decls to error_mark_node.
8414 2016-02-24 Marek Polacek <polacek@redhat.com>
8417 * c-decl.c (finish_decl): Don't update the copy of the type of a
8418 different decl type.
8420 2016-02-23 Jakub Jelinek <jakub@redhat.com>
8423 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
8424 in id_kind reclassification.
8426 2016-02-16 Jakub Jelinek <jakub@redhat.com>
8429 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
8431 2016-02-16 James Norris <jnorris@codesourcery.com>
8434 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
8436 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
8438 * c-decl.c (build_null_declspecs): Zero the entire struct.
8441 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
8442 callers changed. If nested_p is true, use it to call
8443 finish_implicit_inits.
8444 * c-tree.h (finish_implicit_inits): Declare.
8445 * c-typeck.c (finish_implicit_inits): New function. Move code
8447 (push_init_level): ... here.
8448 (set_designator, process_init_element): Call finish_implicit_inits.
8450 2016-02-11 Jakub Jelinek <jakub@redhat.com>
8453 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
8454 arguments for -Waddress warning.
8456 2016-02-04 Jakub Jelinek <jakub@redhat.com>
8459 * c-decl.c (finish_enum): When honoring mode attribute,
8460 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
8462 2016-01-29 Jakub Jelinek <jakub@redhat.com>
8465 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
8466 all type variants, not just TYPE_MAIN_VARIANT.
8468 2016-01-27 Jakub Jelinek <jakub@redhat.com>
8471 * c-decl.c (c_write_global_declarations_1): Warn with
8472 warn_unused_function if static prototype without definition
8475 2016-01-27 Marek Polacek <polacek@redhat.com>
8478 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
8479 to unsigned, if needed. Add -Wsign-compare warning.
8481 2016-01-26 Jakub Jelinek <jakub@redhat.com>
8483 PR tree-optimization/69483
8484 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
8486 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8489 * c-tree.h (incomplete_record_decls): Declare.
8490 * c-parser.c (incomplete_record_decls): Define.
8491 (c_parser_translation_unit): Iterate through incomplete_record_decls and
8492 report error if any decl has zero size.
8493 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
8494 or enum type to incomplete_record_decls.
8496 2016-01-14 Tom de Vries <tom@codesourcery.com>
8498 PR tree-optimization/68773
8499 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
8502 2016-01-14 Marek Polacek <polacek@redhat.com>
8505 * c-decl.c (grokdeclarator): Provide more information for invalid
8508 2016-01-06 David Malcolm <dmalcolm@redhat.com>
8510 * c-parser.c (c_parser_unary_expression): For dereferences, build
8511 a combined location before calling build_indirect_ref, so that
8512 error reports cover the full range, manually updating the c_expr
8515 2016-01-06 Marek Polacek <polacek@redhat.com>
8518 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
8519 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
8522 2016-01-04 Jakub Jelinek <jakub@redhat.com>
8524 Update copyright years.
8526 2016-01-04 Marek Polacek <polacek@redhat.com>
8529 * c-typeck.c (build_atomic_assign): Improve commentary. Add
8530 optimization to use __atomic_fetch_* built-in if possible.
8532 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
8534 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
8536 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
8539 2015-12-22 Marek Polacek <polacek@redhat.com>
8542 * c-typeck.c (build_component_ref): Warn when acessing elements of
8543 atomic structures or unions.
8545 2015-12-21 David Malcolm <dmalcolm@redhat.com>
8547 * c-typeck.c: Include "gcc-rich-location.h".
8548 (build_binary_op): In the two places that call binary_op_error,
8549 create a gcc_rich_location and populate it with the location of
8550 the binary op and its two operands.
8552 2015-12-16 David Malcolm <dmalcolm@redhat.com>
8554 * c-parser.c (c_parser_statement_after_labels): When calling
8555 c_finish_return, Use the return expression's location if it has
8556 one, falling back to the location of the first token within it.
8557 * c-typeck.c (c_finish_return): When issuing warnings about
8558 the incorrect presence/absence of a return value, issue a note
8559 showing the declaration of the function.
8561 2015-12-16 David Malcolm <dmalcolm@redhat.com>
8563 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
8565 (c_parser_peek_nth_token): New function.
8566 (c_parser_peek_conflict_marker): New function.
8567 (c_parser_error): Detect conflict markers and report them as such.
8569 2015-12-16 David Malcolm <dmalcolm@redhat.com>
8571 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
8572 to preserve range information for the primary expression
8573 in the call to c_parser_postfix_expression_after_primary.
8575 2015-12-16 David Malcolm <dmalcolm@redhat.com>
8577 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
8578 expression location, falling back on the first token location,
8579 rather than always using the latter.
8581 2015-12-16 Marek Polacek <polacek@redhat.com>
8584 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
8587 2015-12-15 Marek Polacek <polacek@redhat.com>
8590 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
8593 2015-12-08 David Malcolm <dmalcolm@redhat.com>
8595 * c-parser.c (c_parser_alignof_expression): Capture location of
8596 closing parenthesis (if any), or of end of unary expression, and
8597 use it to build a src_range for the expression.
8599 2015-12-08 David Malcolm <dmalcolm@redhat.com>
8602 * c-parser.c (c_parser_get_builtin_args): Add
8603 "out_close_paren_loc" param, and write back to it.
8604 (c_parser_postfix_expression): Capture the closing
8605 parenthesis location for RID_CHOOSE_EXPR,
8606 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
8607 RID_BUILTIN_SHUFFLE and use it to set the source range
8608 for such expressions; within RID_BUILTIN_COMPLEX set
8609 the underlying location.
8611 2015-12-07 Marek Polacek <polacek@redhat.com>
8614 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
8615 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
8617 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
8619 * c-tree.h (c_build_va_arg): Adjust prototype.
8620 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
8621 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
8622 parameter, adjust throughout and issue an error if EXPR is a component
8623 with reverse storage order.
8625 2015-12-02 Jason Merrill <jason@redhat.com>
8627 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8628 (c_fully_fold_internal, decl_constant_value_for_optimization):
8629 Move from c-common.c.
8630 * c-tree.h: Declare decl_constant_value_for_optimization.
8631 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
8633 2015-12-02 Joseph Myers <joseph@codesourcery.com>
8636 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
8637 following link from declarator to next declarator. Track original
8638 qualified type and pass it to c_build_qualified_type.
8639 * c-typeck.c (c_build_qualified_type): Add arguments
8640 orig_qual_type and orig_qual_indirect.
8642 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
8644 * c-parser.c (c_parser_omp_clause_name)
8645 (c_parser_oacc_all_clauses): Alphabetical sorting.
8647 2015-12-02 Jakub Jelinek <jakub@redhat.com>
8650 * c-decl.c (get_parm_info): Use b->locus instead of input_location
8653 2015-12-01 Julian Brown <julian@codesourcery.com>
8654 Cesar Philippidis <cesar@codesourcery.com>
8655 James Norris <James_Norris@mentor.com>
8657 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
8658 (c_parser_oacc_clause_use_device): New function.
8659 (c_parser_oacc_all_clauses): Add use_device support.
8660 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
8661 (c_parser_oacc_host_data): New function.
8662 (c_parser_omp_construct): Add host_data support.
8663 * c-tree.h (c_finish_oacc_host_data): Add prototype.
8664 * c-typeck.c (c_finish_oacc_host_data): New function.
8665 (c_finish_omp_clauses): Add use_device support.
8667 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
8670 * c-decl.c: Set TYPE_PACKED in variants.
8672 2015-11-27 Martin Liska <mliska@suse.cz>
8675 * c-array-notation.c (fix_builtin_array_notation_fn):
8676 Use release_vec_vec instead of vec::release.
8677 (build_array_notation_expr): Likewise.
8678 (fix_conditional_array_notations_1): Likewise.
8679 (fix_array_notation_expr): Likewise.
8680 (fix_array_notation_call_expr): Likewise.
8682 2015-11-27 Jakub Jelinek <jakub@redhat.com>
8685 * c-parser.c (c_parser_compound_statement_nostart): If
8686 last_label is true, use pragma_stmt instead of pragma_compound
8687 as second c_parser_pragma argument.
8688 (c_parser_omp_ordered, c_parser_omp_target_update,
8689 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
8690 false as second argument to c_parser_skip_to_pragma_eol after
8691 diagnosing standalone directives used in pragma_stmt context.
8693 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
8695 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
8696 with "if (ENABLE_OFFLOADING)".
8698 2015-11-23 David Malcolm <dmalcolm@redhat.com>
8701 * c-parser.c (c_parser_postfix_expression): Set up source ranges
8702 for various Objective-C constructs: Class.name syntax,
8703 @selector(), @protocol(), @encode(), and [] message syntax.
8705 2015-11-20 David Malcolm <dmalcolm@redhat.com>
8708 * c-typeck.c (should_suggest_deref_p): New function.
8709 (build_component_ref): Special-case POINTER_TYPE when
8710 generating a "not a structure of union" error message, and
8711 suggest a "->" rather than a ".", providing a fix-it hint.
8713 2015-11-19 David Malcolm <dmalcolm@redhat.com>
8715 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
8716 candidate into a new function, find_closest_identifier.
8718 2015-11-19 Marek Polacek <polacek@redhat.com>
8721 * c-typeck.c (parser_build_binary_op): Properly handle
8722 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
8724 2015-11-17 David Malcolm <dmalcolm@redhat.com>
8726 * c-parser.c (set_c_expr_source_range): Bulletproof both
8727 overloaded implementations against NULL expr->value.
8728 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
8730 (c_parser_unary_expression): Likewise when handling addresses of
8732 (c_parser_postfix_expression): Likewise for statement expressions,
8733 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
8734 __builtin_va_arg, and for __builtin_offset_of.
8735 (c_parser_postfix_expression_after_paren_type): Initialize expr's
8736 src_range using the range of the braced initializer.
8737 (c_parser_transaction_expression): Set src_range for "ret" to a
8738 sane pair of values.
8740 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8742 * c-parser.c (c_finish_omp_declare_simd): Look for
8743 "simd" attribute as well. Update error message.
8745 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8747 * c-parser.c (c_parser_omp_declare_target): Adjust.
8749 2015-11-14 Jakub Jelinek <jakub@redhat.com>
8751 * c-typeck.c (c_finish_omp_clauses): Don't mark
8752 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
8754 2015-11-14 Marek Polacek <polacek@redhat.com>
8756 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
8757 * c-typeck.c: Likewise.
8759 2015-11-13 David Malcolm <dmalcolm@redhat.com>
8761 * c-decl.c (warn_defaults_to): Pass line_table to
8763 * c-errors.c (pedwarn_c99): Likewise.
8764 (pedwarn_c90): Likewise.
8765 * c-parser.c (set_c_expr_source_range): New functions.
8766 (c_token::get_range): New method.
8767 (c_token::get_finish): New method.
8768 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
8769 based on the range from the start of the LHS to the end of the
8771 (c_parser_conditional_expression): Likewise, based on the range
8772 from the start of the cond.value to the end of exp2.value.
8773 (c_parser_binary_expression): Call set_c_expr_source_range on
8774 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
8775 (c_parser_cast_expression): Call set_c_expr_source_range on ret
8776 based on the cast_loc through to the end of the expr.
8777 (c_parser_unary_expression): Likewise, based on the
8778 op_loc through to the end of op.
8779 (c_parser_sizeof_expression) Likewise, based on the start of the
8780 sizeof token through to either the closing paren or the end of
8782 (c_parser_postfix_expression): Likewise, using the token range,
8783 or from the open paren through to the close paren for
8784 parenthesized expressions.
8785 (c_parser_postfix_expression_after_primary): Likewise, for
8786 various kinds of expression.
8787 * c-tree.h (struct c_expr): Add field "src_range".
8788 (c_expr::get_start): New method.
8789 (c_expr::get_finish): New method.
8790 (set_c_expr_source_range): New decls.
8791 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
8792 on ret for prefix unary ops.
8793 (parser_build_binary_op): Likewise, running from the start of
8794 arg1.value through to the end of arg2.value.
8796 2015-11-13 Marek Polacek <polacek@redhat.com>
8799 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
8801 2015-11-13 David Malcolm <dmalcolm@redhat.com>
8803 * c-typeck.c: Include spellcheck.h.
8804 (lookup_field_fuzzy_find_candidates): New function.
8805 (lookup_field_fuzzy): New function.
8806 (build_component_ref): If the field was not found, try using
8807 lookup_field_fuzzy and potentially offer a suggestion.
8809 2015-11-12 James Norris <jnorris@codesourcery.com>
8810 Joseph Myers <joseph@codesourcery.com>
8812 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
8813 (c_parser_omp_clause_name): Handle 'device_resident' clause.
8814 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
8815 and PRAGMA_OMP_CLAUSE_LINK.
8816 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
8817 and PRAGMA_OACC_CLAUSE_LINK.
8818 (OACC_DECLARE_CLAUSE_MASK): New definition.
8819 (c_parser_oacc_declare): New function.
8821 2015-11-12 Marek Polacek <polacek@redhat.com>
8824 * c-parser.c (c_parser_for_statement): Reclassify the token in
8827 2015-11-11 Marek Polacek <polacek@redhat.com>
8831 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
8832 checking the size of an array.
8834 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
8836 * c-array-notation.c: Remove unused header files.
8837 * c-aux-info.c: Likewise.
8838 * c-convert.c: Likewise.
8839 * c-decl.c: Likewise.
8840 * c-errors.c: Likewise.
8841 * c-lang.c: Likewise.
8842 * c-objc-common.c: Likewise.
8843 * c-parser.c: Likewise.
8844 * c-typeck.c: Likewise.
8845 * gccspec.c: Likewise.
8847 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8848 Cesar Philippidis <cesar@codesourcery.com>
8849 James Norris <jnorris@codesourcery.com>
8850 Julian Brown <julian@codesourcery.com>
8851 Nathan Sidwell <nathan@codesourcery.com>
8853 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
8855 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
8856 (c_parser_pragma): Parse 'acc routine'.
8857 (OACC_ROUTINE_CLAUSE_MARK): Define.
8858 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
8860 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
8863 * c-typeck.c (c_finish_loop): For unconditional loops, set the
8864 location of the backward-goto to the start of the loop body.
8866 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
8869 * c-parser.c (c_parser_while_statement): Finish the loop before
8870 parsing ahead for misleading indentation.
8871 (c_parser_for_statement): Likewise.
8873 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8875 * c-decl.c (finish_struct): If the structure has reverse storage
8876 order, rewrite the type of array fields with scalar component. Call
8877 maybe_apply_pragma_scalar_storage_order on entry.
8878 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
8879 errors on bit-fields and reverse SSO here and not...
8880 (c_mark_addressable): ...here.
8881 (output_init_element): Adjust call to initializer_constant_valid_p.
8882 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
8884 2015-11-06 David Malcolm <dmalcolm@redhat.com>
8886 * c-decl.c (warn_defaults_to): Update for change in signature
8887 of diagnostic_set_info.
8888 * c-errors.c (pedwarn_c99): Likewise.
8889 (pedwarn_c90): Likewise.
8890 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
8891 for textinfo::set_location.
8893 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8894 Thomas Schwinge <thomas@codesourcery.com>
8895 James Norris <jnorris@codesourcery.com>
8897 * c-parser.c (c_parser_omp_clause_name): Add support for
8898 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
8899 (c_parser_omp_clause_default): Add is_oacc argument. Handle
8900 default(none) in OpenACC.
8901 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
8903 (c_parser_oacc_clause_tile): New function.
8904 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
8905 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
8906 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
8908 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
8909 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
8911 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
8912 (c_parser_oacc_update): Update the error message for missing clauses.
8913 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
8914 and OMP_CLAUSE_INDEPENDENT.
8916 2015-11-05 Marek Polacek <polacek@redhat.com>
8919 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
8920 deal with pre-evaluation on invalid types.
8922 2015-11-05 Jakub Jelinek <jakub@redhat.com>
8923 Ilya Verbin <ilya.verbin@intel.com>
8925 * c-parser.c: Include context.h and gimple-expr.h.
8926 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
8927 monotonic together with nonmonotonic.
8928 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
8929 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
8930 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
8931 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
8932 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
8933 expressions on combined target teams before the target.
8934 (c_parser_omp_declare_target): If decl has "omp declare target" or
8935 "omp declare target link" attribute, and cgraph or varpool node already
8936 exists, then set corresponding flags. Call c_finish_omp_clauses
8937 in the parenthesized extended-list syntax case.
8938 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
8940 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
8941 on OMP_CLAUSE_REDUCTION array sections.
8942 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
8943 into the constant offset, or for variable low-bound using
8944 POINTER_PLUS_EXPR. For structure element based array sections use
8945 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
8946 (c_finish_omp_clauses): Drop generic_field_head, structure
8947 elements are now always mapped even as array section bases,
8948 diagnose same var in data sharing and mapping clauses. Diagnose if
8949 linear step on declare simd is neither a constant nor a uniform
8950 parameter. Look through POINTER_PLUS_EXPR for array section
8951 reductions. Diagnose the same var or function appearing multiple
8952 times on the same directive. Fix up wording for the to clause if t
8953 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
8954 modifier on kinds other than dynamic or guided or nonmonotonic
8955 modifier together with ordered clause.
8957 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8958 Chung-Lin Tang <cltang@codesourcery.com>
8960 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
8962 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
8964 * c-array-notation.c: Reorder #include's and remove duplicates.
8965 * c-aux-info.c: Likewise.
8966 * c-convert.c: Likewise.
8967 * c-decl.c: Likewise.
8968 * c-errors.c: Likewise.
8969 * c-lang.c: Likewise.
8970 * c-objc-common.c: Likewise.
8971 * c-parser.c: Likewise.
8972 * c-typeck.c: Likewise.
8974 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
8977 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
8978 after calling build_qualified_type.
8980 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
8981 Thomas Schwinge <thomas@codesourcery.com>
8982 James Norris <jnorris@codesourcery.com>
8983 Joseph Myers <joseph@codesourcery.com>
8984 Julian Brown <julian@codesourcery.com>
8985 Bernd Schmidt <bschmidt@redhat.com>
8987 * c-parser.c (c_parser_oacc_shape_clause): New.
8988 (c_parser_oacc_simple_clause): New.
8989 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
8990 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
8992 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8993 James Norris <jnorris@codesourcery.com>
8994 Cesar Philippidis <cesar@codesourcery.com>
8998 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
8999 parameters, and handle these. Adjust all users.
9000 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
9002 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
9004 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
9006 (c_finish_omp_construct): Declare function.
9007 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
9008 Merge functions into...
9009 (c_finish_omp_construct): ... this new function.
9011 2015-10-22 Richard Biener <rguenther@suse.de>
9013 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
9014 before folding a MINUS_EXPR.
9016 2015-10-21 Marek Polacek <polacek@redhat.com>
9019 * c-decl.c (start_function): Warn about vararg functions without
9022 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
9024 * c-typeck.c (build_conditional_expr): Use boolean vector
9025 type for vector comparison.
9026 (build_vec_cmp): New.
9027 (build_binary_op): Use build_vec_cmp for comparison.
9029 2015-10-20 Marek Polacek <polacek@redhat.com>
9031 * c-parser.c (is_cilkplus_vector_p): Don't define here.
9033 2015-10-20 Marek Polacek <polacek@redhat.com>
9036 * c-parser.c (c_parser_attributes): Break out of the loop if the
9037 token after an attribute isn't a comma.
9039 2015-10-13 Jakub Jelinek <jakub@redhat.com>
9040 Aldy Hernandez <aldyh@redhat.com>
9042 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
9043 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
9044 (c_parser_omp_variable_list): Handle structure elements for
9045 map, to and from clauses. Handle array sections in reduction
9046 clause. Formatting fixes.
9047 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
9048 if clause modifiers.
9049 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
9050 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
9051 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
9052 c_parser_omp_clause_is_device_ptr): New functions.
9053 (c_parser_omp_clause_ordered): Parse optional parameter.
9054 (c_parser_omp_clause_reduction): Handle array reductions.
9055 (c_parser_omp_clause_schedule): Parse optional simd modifier.
9056 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
9058 (c_parser_omp_clause_linear): Parse linear clause modifiers.
9059 (c_parser_omp_clause_depend_sink): New function.
9060 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
9061 (c_parser_omp_clause_map): Parse release/delete map kinds and
9062 optional always modifier.
9063 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
9064 and c_finish_omp_clauses callers.
9065 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
9066 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
9067 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
9068 (OMP_CRITICAL_CLAUSE_MASK): Define.
9069 (c_parser_omp_critical): Parse critical clauses.
9070 (c_parser_omp_for_loop): Handle doacross loops, adjust
9071 c_finish_omp_for and c_finish_omp_clauses callers.
9072 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
9073 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
9074 (OMP_FOR_CLAUSE_MASK): Add linear clause.
9075 (c_parser_omp_for): Disallow ordered clause when combined with
9076 distribute. Disallow linear clause when combined with distribute
9077 and not combined with simd.
9078 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
9079 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
9080 parse clauses and if depend clause is found, don't parse a body.
9081 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
9082 Allow target parallel without for after it.
9083 (OMP_TASK_CLAUSE_MASK): Add priority clause.
9084 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
9085 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
9087 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
9088 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
9089 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
9090 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
9092 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
9093 defaultmap and is_device_ptr clauses.
9094 (c_parser_omp_target): Parse target parallel and target simd. Set
9095 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
9096 and target exit data. Diagnose invalid map kinds.
9097 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
9098 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
9100 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
9102 (OMP_TASKLOOP_CLAUSE_MASK): Define.
9103 (c_parser_omp_taskloop): New function.
9104 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
9105 handle PRAGMA_OMP_TASKLOOP.
9106 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
9107 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
9108 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
9109 Add IS_OMP argument, handle structure element bases, diagnose
9110 bitfields, pass IS_OMP recursively, diagnose known zero length
9111 array sections in depend clauses, handle array sections in reduction
9112 clause, diagnose negative length even for pointers.
9113 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
9114 types, pass IS_OMP down to handle_omp_array_sections_1, handle
9115 array sections in reduction clause, set
9116 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
9117 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
9118 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
9119 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
9121 2015-10-06 Marek Polacek <polacek@redhat.com>
9123 * c-parser.c (c_parser_statement_after_labels): Use
9124 protected_set_expr_location.
9125 (c_parser_omp_clause_num_gangs): Likewise.
9126 (c_parser_omp_clause_num_threads): Likewise.
9127 (c_parser_omp_clause_num_workers): Likewise.
9128 (c_parser_omp_clause_vector_length): Likewise.
9129 (c_parser_omp_clause_num_teams): Likewise.
9130 (c_parser_omp_clause_thread_limit): Likewise.
9131 * c-typeck.c (build_c_cast): Likewise.
9132 (c_cast_expr): Likewise.
9134 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
9136 * c-typeck.c (c_tree_equal): Use real_equal instead of
9139 2015-10-04 Jason Merrill <jason@redhat.com>
9141 * c-parser.c (c_lex_one_token): Handle @synchronized.
9142 * c-decl.c (match_builtin_function_types): A declaration of a built-in
9143 can change whether the function is transaction_safe.
9145 2015-10-02 Marek Polacek <polacek@redhat.com>
9148 * c-typeck.c (convert_for_assignment): Use the expansion point
9149 location throughout.
9151 2015-10-02 Marek Polacek <polacek@redhat.com>
9154 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
9155 and pass it down to c_parser_if_statement.
9156 (c_parser_else_body): Add CHAIN parameter and pass it down to
9157 c_parser_statement_after_labels.
9158 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
9159 duplicated if-else-if conditions.
9161 2015-10-01 Marek Polacek <polacek@redhat.com>
9163 * c-typeck.c (convert_for_assignment): Improve commentary.
9165 2015-09-30 Marek Polacek <polacek@redhat.com>
9168 * c-typeck.c (c_finish_return): Use the expansion point location for
9169 certain "return with value" warnings.
9171 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
9173 * c-parser.c (pragma_lex): Add loc argument.
9175 2015-09-15 Marek Polacek <polacek@redhat.com>
9178 * c-decl.c (tag_exists_p): New function.
9179 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
9180 struct/union/enum keywords are missing.
9181 * c-tree.h (tag_exists_p): Declare.
9183 2015-09-15 Marek Polacek <polacek@redhat.com>
9185 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
9186 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
9187 Return NULL_TREE instead of 0.
9188 (lookup_name): Return NULL_TREE instead of 0.
9189 (lookup_name_in_scope): Likewise.
9190 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
9191 (parser_xref_tag): Use false instead of 0.
9192 (start_struct): Use true instead of 1.
9193 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
9195 2015-09-14 Marek Polacek <polacek@redhat.com>
9197 * c-typeck.c (set_nonincremental_init_from_string): Use
9198 HOST_WIDE_INT_M1U when shifting a negative value.
9200 2015-09-09 Mark Wielaard <mjw@redhat.com>
9202 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
9205 2015-09-10 Jakub Jelinek <jakub@redhat.com>
9208 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
9209 into OMP_FOR_PRE_BODY rather than before the loop.
9211 2015-09-09 Jakub Jelinek <jakub@redhat.com>
9214 * c-parser.c (c_parser_oacc_all_clauses,
9215 c_parser_omp_all_clauses): Remove invalid clause from
9216 list of clauses even if parser->error is set.
9219 * c-parser.c (c_parser_omp_clause_aligned,
9220 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
9222 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
9226 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
9227 instead of c_parser_unary_expression. If the result is !lvalue_p,
9228 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
9230 2015-09-04 Marek Polacek <polacek@redhat.com>
9233 * c-typeck.c (build_binary_op): Don't instrument static initializers.
9235 2015-09-03 Martin Sebor <msebor@redhat.com>
9238 * c-typeck.c (convert_arguments, parser_build_unary_op,
9239 build_conditional_expr, c_cast_expr, convert_for_assignment,
9240 build_binary_op, _objc_common_truthvalue_conversion): Call
9242 (c_decl_implicit): Define.
9244 2015-09-02 Marek Polacek <polacek@redhat.com>
9247 * c-parser.c (c_parser_enum_specifier): Give a better error for
9250 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
9252 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
9254 2015-08-12 Marek Polacek <polacek@redhat.com>
9256 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
9259 2015-08-03 Marek Polacek <polacek@redhat.com>
9262 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
9264 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
9266 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
9268 * c-parser.c (c_parser_if_body): Take token_indent_info
9269 argument. Call warn_for_misleading_indentation even when the
9270 body is a semicolon. Extract token_indent_infos corresponding
9271 to the guard, body and next tokens. Adjust call to
9272 warn_for_misleading_indentation accordingly.
9273 (c_parser_else_body): Likewise.
9274 (c_parser_if_statement): Likewise.
9275 (c_parser_while_statement): Likewise.
9276 (c_parser_for_statement): Likewise.
9278 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
9279 Manuel López-Ibáñez <manu@gcc.gnu.org>
9281 * c-decl.c (get_parm_info): Remove static var. Update warning
9284 2015-07-27 Marek Polacek <polacek@redhat.com>
9288 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
9290 2015-07-20 Marek Polacek <polacek@redhat.com>
9293 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
9294 (build_binary_op): Warn about left shift overflows.
9296 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
9298 * c-array-notation.c: Adjust includes for flags.h changes.
9299 * c-objc-common.c: Likewise.
9301 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
9303 * c-array-notation.c: Adjust includes.
9304 * c-aux-info.c: Likewise.
9305 * c-convert.c: Likewise.
9306 * c-decl.c: Likewise.
9307 * c-errors.c: Likewise.
9308 * c-lang.c: Likewise.
9309 * c-objc-common.c: Likewise.
9310 * c-parser.c: Likewise.
9311 * c-typeck.c: Likewise.
9313 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9316 * c-decl.c (finish_function): Call do_warn_unused_parameter.
9318 2015-06-29 Marek Polacek <polacek@redhat.com>
9321 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
9322 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
9323 about -Wswitch-bool here.
9324 (do_case): Update c_add_case_label call.
9325 (c_finish_case): Update c_do_switch_warnings call.
9327 2015-06-27 Marek Polacek <polacek@redhat.com>
9329 * c-typeck.c: Use VECTOR_TYPE_P throughout.
9331 2015-06-26 Marek Polacek <polacek@redhat.com>
9333 * c-array-notation.c (fix_builtin_array_notation_fn): Use
9335 * c-typeck.c (array_to_pointer_conversion): Likewise.
9336 (build_unary_op): Likewise.
9337 (c_finish_return): Likewise.
9339 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
9341 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
9342 * c-parser.c: Likewise.
9344 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
9346 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
9347 instead of pointer_hash.
9348 (detect_field_duplicates): Likewise.
9350 2015-06-25 Marek Polacek <polacek@redhat.com>
9352 * c-array-notation.c: Use VAR_P throughout.
9353 * c-decl.c: Likewise.
9354 * c-objc-common.c: Likewise.
9355 * c-parser.c: Likewise.
9356 * c-typeck.c: Likewise.
9358 2015-06-25 Marek Polacek <polacek@redhat.com>
9360 * c-decl.c: Use is_global_var throughout.
9361 * c-parser.c: Likewise.
9362 * c-typeck.c: Likewise.
9364 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
9366 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
9367 * c-aux-info.c: Likewise.
9368 * c-convert.c: Likewise.
9369 * c-decl.c: Likewise.
9370 * c-errors.c: Likewise.
9371 * c-lang.c: Likewise.
9372 * c-objc-common.c: Likewise.
9373 * c-parser.c: Likewise.
9374 * c-typeck.c: Likewise.
9376 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
9379 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
9382 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
9384 * c-decl.c (pop_scope): Register the main translation unit
9385 through the new debug hook.
9387 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
9389 * c-array-notation.c : Adjust include files.
9390 * c-aux-info.c : Likewise.
9391 * c-convert.c : Likewise.
9392 * c-decl.c : Likewise.
9393 * c-errors.c : Likewise.
9394 * c-lang.c : Likewise.
9395 * c-lang.h : Likewise.
9396 * c-objc-common.c : Likewise.
9397 * c-parser.c : Likewise.
9398 * c-typeck.c : Likewise.
9400 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
9402 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
9403 immediately clobber it.
9404 (c_write_global_declarations_1): Remove call to
9405 check_global_declaration_1.
9406 (c_write_global_declarations_2): Remove.
9407 (c_write_final_cleanups): Rename from c_write_global_declarations.
9408 Remove call to finalize_compilation_unit.
9409 Remove calls to debugging hooks.
9410 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
9411 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
9412 * c-tree.h: Remove c_write_global_declarations.
9414 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
9416 * c-array-notation.c: Adjust includes for restructured coretypes.h.
9417 * c-aux-info.c: Likewise.
9418 * c-convert.c: Likewise.
9419 * c-decl.c: Likewise.
9420 * c-errors.c: Likewise.
9421 * c-lang.c: Likewise.
9422 * c-objc-common.c: Likewise.
9423 * c-parser.c: Likewise.
9424 * c-typeck.c: Likewise.
9426 2015-06-04 Marek Polacek <polacek@redhat.com>
9429 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
9432 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9434 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
9435 Warn for empty struct.
9436 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
9438 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
9440 * c-decl.c (start_function): Call plugin before parsing.
9441 (finish_function): Call plugin after parsing.
9443 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9446 * c-decl.c (merge_decls): Merge DECL_COMMON.
9448 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
9450 * Make-lang.in (check_gcc_pallelize): Define.
9452 2015-05-22 Marek Polacek <polacek@redhat.com>
9455 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
9458 2015-05-21 Marek Polacek <polacek@redhat.com>
9460 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
9463 2015-05-20 Marek Polacek <polacek@redhat.com>
9465 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
9466 * c-typeck.c: Likewise.
9468 2015-05-19 Marek Polacek <polacek@redhat.com>
9470 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
9472 2015-05-19 Jakub Jelinek <jakub@redhat.com>
9475 * c-parser.c (c_parser_omp_for_loop): Don't add
9476 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
9477 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
9478 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
9481 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
9483 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
9486 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9489 * c-objc-common.c (c_tree_printer): Replace locus pointer with
9492 2015-05-14 Marek Polacek <polacek@redhat.com>
9496 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
9499 2015-05-12 David Malcolm <dmalcolm@redhat.com>
9501 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
9502 to add a call to warn_for_misleading_indentation.
9503 (c_parser_else_body): Likewise, adding param "else_loc".
9504 (c_parser_if_statement): Check for misleading indentation.
9505 (c_parser_while_statement): Likewise.
9506 (c_parser_for_statement): Likewise.
9508 2015-05-08 Marek Polacek <polacek@redhat.com>
9511 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
9512 (output_init_element): Likewise.
9514 2015-05-07 Marek Polacek <polacek@redhat.com>
9517 * c-typeck.c (build_binary_op): Warn when left shifting a negative
9520 2015-04-30 Marek Polacek <polacek@redhat.com>
9522 * c-typeck.c (set_init_label): Call error_at instead of error and
9525 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
9528 * c-typeck.c (c_build_va_arg): Clarify the error message.
9530 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
9532 * c-parser.c (c_parser_oacc_enter_exit_data): Use
9533 OMP_STANDALONE_CLAUSES.
9535 2015-04-28 Marek Polacek <polacek@redhat.com>
9537 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
9539 2015-04-28 Marek Polacek <polacek@redhat.com>
9542 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
9544 2015-04-25 Marek Polacek <polacek@redhat.com>
9547 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
9550 2015-04-23 Marek Polacek <polacek@redhat.com>
9553 * c-decl.c (set_labels_context_r): New function.
9554 (store_parm_decls): Call it via walk_tree_without_duplicates.
9555 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
9556 instead of create_tmp_var. Build TARGET_EXPR instead of
9558 (build_atomic_assign): Use create_tmp_var_raw instead of
9559 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
9561 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
9563 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
9564 (c_parser_omp_target_update): Add missed %> to error_at ().
9566 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9569 * c-decl.c (c_default_pointer_mode): Remove definition.
9570 * c-tree.h (c_default_pointer_mode): Remove declaration.
9572 2015-03-27 Tobias Burnus <burnus@net-b.de>
9575 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
9577 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
9578 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
9579 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
9581 2015-03-19 Jakub Jelinek <jakub@redhat.com>
9583 * c-decl.c (c_decl_attributes): Also add "omp declare target"
9584 attribute for DECL_EXTERNAL VAR_DECLs.
9586 2015-03-11 Jakub Jelinek <jakub@redhat.com>
9588 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
9591 2015-03-10 Jakub Jelinek <jakub@redhat.com>
9594 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
9595 before preparing arguments to warn_logical_not_parentheses.
9597 2015-03-09 Jakub Jelinek <jakub@redhat.com>
9600 * c-typeck.c (parser_build_binary_op): Don't warn for
9601 !!x == y or !b == y where b is _Bool.
9603 2015-03-09 Marek Polacek <polacek@redhat.com>
9605 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
9606 * c-decl.c (grokdeclarator): Likewise.
9607 * c-typeck.c (build_binary_op): Likewise.
9609 2015-02-27 Marek Polacek <polacek@redhat.com>
9612 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
9614 2015-02-14 Marek Polacek <polacek@redhat.com>
9617 * c-decl.c (grokdeclarator): Set the range of a flexible array member
9618 declared through a typedef name.
9620 2015-02-13 Marek Polacek <polacek@redhat.com>
9623 * c-decl.c (grokdeclarator): Print also the type when giving
9624 the error message about array's incomplete element type.
9626 2015-02-11 Jakub Jelinek <jakub@redhat.com>
9629 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
9630 check in the POP macro.
9632 2015-02-09 Marek Polacek <polacek@redhat.com>
9635 * c-typeck.c (process_init_element): Don't always wrap
9636 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
9637 initializing a range of elements.
9639 2015-02-04 Jakub Jelinek <jakub@redhat.com>
9643 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
9645 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
9647 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
9648 processing enum declaration.
9650 2015-01-29 Marek Polacek <polacek@redhat.com>
9653 * c-typeck.c (pop_init_level): If constructor_elements has
9654 exactly one element with integer_zerop value, set constructor_zeroinit
9655 to 1. Remove braces around warning_init call.
9657 2015-01-27 Jakub Jelinek <jakub@redhat.com>
9660 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
9661 of FUNCTION_DECLs with error_mark_node.
9663 2015-01-26 Jakub Jelinek <jakub@redhat.com>
9666 * c-typeck.c (convert_arguments): Return -1 if there are
9667 error_args, even if we've diagnosed too many arguments.
9669 2015-01-21 Richard Biener <rguenther@suse.de>
9672 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
9673 for builtins the user declared correctly.
9675 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9676 Bernd Schmidt <bernds@codesourcery.com>
9677 Cesar Philippidis <cesar@codesourcery.com>
9678 James Norris <jnorris@codesourcery.com>
9679 Jakub Jelinek <jakub@redhat.com>
9680 Ilmir Usmanov <i.usmanov@samsung.com>
9682 * c-parser.c: Include "gomp-constants.h".
9683 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
9684 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
9685 Use OMP_CLAUSE_SET_MAP_KIND.
9686 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
9687 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
9688 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
9689 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
9690 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
9691 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
9692 "copyout", "create", "delete", "deviceptr", "gang", "host",
9693 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
9694 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
9695 "present_or_create", "pcreate", "seq", "self", "vector",
9696 "vector_length", "wait", "worker".
9697 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
9698 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
9699 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
9700 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
9701 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
9702 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
9703 (c_parser_oacc_data_clause_deviceptr)
9704 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
9705 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
9706 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
9707 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
9708 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
9709 (c_parser_oacc_parallel, c_parser_oacc_update)
9710 (c_parser_oacc_wait): New functions.
9711 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
9712 (c_finish_oacc_data): New prototypes.
9713 * c-typeck.c: Include "gomp-constants.h".
9714 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
9715 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
9716 OMP_CLAUSE_SET_MAP_KIND.
9717 (c_finish_oacc_parallel, c_finish_oacc_kernels)
9718 (c_finish_oacc_data): New functions.
9719 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
9720 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
9721 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
9722 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
9723 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
9724 GOMP_MAP_FORCE_DEVICEPTR.
9726 2015-01-09 Michael Collison <michael.collison@linaro.org>
9728 * c-array-notation.c: Include hash-set.h, machmode.h,
9729 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9730 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9731 * c-aux-info.c: Ditto.
9732 * c-convert.c: Ditto.
9734 * c-errors.c: Ditto.
9735 * c-lang.c: Dittoxs.
9736 * c-objc-common.c: Ditto.
9737 * c-parser.c: Ditto.
9738 * c-typeck.c: Include hash-set.h, machmode.h,
9739 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9740 fold-const.h, wide-int.h, inchash.h, real.h and
9741 fixed-value.h due to flattening of tree.h.
9743 2015-01-07 Marek Polacek <polacek@redhat.com>
9746 * c-typeck.c (process_init_element): Disallow initialization of
9747 a flexible array member with a string constant if the structure
9750 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9753 * c-typeck.c (convert_for_assignment, c_finish_return): For
9754 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
9755 types also set in_late_binary_op around convert call.
9756 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
9757 to integral type casts, if not in_late_binary_op, pass c_fully_fold
9758 result on expr as last argument to ubsan_instrument_float_cast,
9759 if in_late_binary_op, don't use c_save_expr but save_expr.
9761 Update copyright years.
9763 2015-01-05 Marek Polacek <polacek@redhat.com>
9766 * c-typeck.c (build_array_ref): Pass loc down to
9767 warn_array_subscript_with_type_char.
9769 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9771 * c-typeck.c: New behavious for pointers to arrays with qualifiers
9772 (common-pointer-type): For pointers to arrays take qualifiers from
9774 (build_conditional_expr): Add warnings for lost qualifiers.
9775 (comp-target-types): Allow pointers to arrays with different qualifiers.
9776 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
9777 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
9778 to PEDWARN_FOR_QUALIFIERS.
9780 2014-12-17 Jakub Jelinek <jakub@redhat.com>
9783 * c-convert.c: Include ubsan.h.
9784 (convert): For real -> integral casts and
9785 -fsanitize=float-cast-overflow don't call convert_to_integer, but
9786 instead instrument the float cast directly.
9788 2014-11-29 Jakub Jelinek <jakub@redhat.com>
9790 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
9791 c_finish_stmt_expr): Remove NULL last argument from
9792 create_tmp_var_raw and create_tmp_var calls.
9793 * c-array-notation.c (fix_builtin_array_notation_fn,
9794 build_array_notation_expr, fix_conditional_array_notations_1,
9795 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
9797 2014-11-28 Marek Polacek <polacek@redhat.com>
9800 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
9801 convert the right operand to integer type.
9803 2014-11-25 Marek Polacek <polacek@redhat.com>
9806 * c-decl.c (start_function): Disable -Wmissing-declarations warning
9807 for inline functions.
9809 2014-11-21 Jakub Jelinek <jakub@redhat.com>
9812 * c-typeck.c (build_array_ref): Adjust
9813 convert_vector_to_pointer_for_subscript caller. If it returns true,
9814 call non_lvalue_loc on the result.
9816 2014-11-11 Richard Biener <rguenther@suse.de>
9818 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
9821 2014-11-10 Andi Kleen <ak@linux.intel.com>
9824 * c-parser.c (c_parser_statement_after_labels): Call
9826 (c_parser_if_statement): Dito.
9827 (c_parser_switch_statement): Dito.
9828 (c_parser_while_statement): Dito.
9829 (c_parser_do_statement): Dito.
9830 (c_parser_for_statement): Dito.
9831 * c-typeck.c (c_finish_loop): Dito.
9833 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9835 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
9836 OPT_Wshift_count_overflow in the warnings.
9838 2014-10-30 Marek Polacek <polacek@redhat.com>
9840 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
9841 print the stripped version as well, if they're not the same.
9843 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9845 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
9848 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
9850 * c-decl.c: Adjust include files.
9851 * c-parser.c: Ditto.
9853 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
9854 Tom Tromey <tromey@redhat.com>
9856 * c-tree.h (enum c_oracle_request): New.
9857 (c_binding_oracle_function): New typedef.
9858 (c_binding_oracle, c_pushtag, c_bind): Declare.
9859 * c-decl.c (c_binding_oracle): New global.
9860 (I_SYMBOL_CHECKED): New macro.
9861 (i_symbol_binding): New function.
9862 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
9863 (I_TAG_CHECKED): New macro.
9864 (i_tag_binding): New function.
9865 (I_TAG_BINDING, I_TAG_DECL): Redefine.
9866 (I_LABEL_CHECKED): New macro.
9867 (i_label_binding): New function.
9868 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
9869 (c_print_identifier): Save and restore c_binding_oracle.
9870 (c_pushtag, c_bind): New functions.
9872 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
9874 * c-typeck.c: Adjust include files.
9876 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9879 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
9880 initialization here...
9881 (c_initialize_diagnostics): ... but here. Set defaults after
9882 building pretty-printer.
9884 2014-10-23 Marek Polacek <polacek@redhat.com>
9887 * c-decl.c (pop_scope): Don't print warning in external_scope.
9889 2014-10-19 Marek Polacek <polacek@redhat.com>
9892 * c-typeck.c (output_init_element): Allow initializing objects with
9893 static storage duration with compound literals even in C99 and add
9896 2014-10-17 Marek Polacek <polacek@redhat.com>
9899 * c-typeck.c (digest_init): Allow initializing objects with static
9900 storage duration with compound literals even in C99 and add pedwarn
9903 2014-10-17 Marek Polacek <polacek@redhat.com>
9906 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
9907 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
9908 error multiple times. Print the type.
9910 2014-10-17 Marek Polacek <polacek@redhat.com>
9913 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
9916 2014-10-17 Marek Polacek <polacek@redhat.com>
9918 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
9919 (start_function): Use OPT_Wimplicit_int instead of 0.
9920 (store_parm_decls_oldstyle): Likewise.
9922 2014-10-17 Alan Modra <amodra@gmail.com>
9925 * c-decl.c (merge_decls): Don't merge section name or tls model
9926 to newdecl symtab node, instead merge to olddecl. Override
9927 existing olddecl section name. Set tls_model for all thread-local
9928 vars, not just OMP thread-private ones. Remove incorrect comment.
9930 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
9932 * c-decl.c: Adjust include files.
9934 2014-10-14 DJ Delorie <dj@redhat.com>
9936 * c-parser.c (c_parse_init): Add RID entries for each __intN.
9937 (c_token_starts_typename): Check all __intN, not just __int128.
9938 (c_token_starts_declspecs): Likewise.
9939 (c_parser_declspecs): Likewise.
9940 (c_parser_attribute_any_word): Likewise.
9941 (c_parser_objc_selector): Likewise.
9942 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
9943 (struct c_declspecs): Add int_n_idx field to record *which* __intN
9945 * c-decl.c (declspecs_add_type): Check for all __intN, not just
9947 (finish_declspecs): Likewise.
9949 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
9951 * c-parser.c (c_parser_all_labels): New function to replace
9953 (c_parser_statement): Call the new function.
9955 2014-10-09 Marek Polacek <polacek@redhat.com>
9958 * c-typeck.c (pop_init_level): Don't warn about initializing
9961 2014-10-07 Marek Polacek <polacek@redhat.com>
9964 * c-decl.c (header_for_builtin_fn): New function.
9965 (implicitly_declare): Suggest which header to include.
9967 2014-10-07 Marek Polacek <polacek@redhat.com>
9969 * c-convert.c (convert): Use error_operand_p.
9970 * c-typeck.c (require_complete_type): Likewise.
9971 (really_atomic_lvalue): Likewise.
9972 (digest_init): Likewise.
9973 (handle_omp_array_sections_1): Likewise.
9975 2014-10-03 Marek Polacek <polacek@redhat.com>
9978 * c-decl.c (pop_scope): Don't warn about "inline function declared
9979 but never defined" for functions marked with gnu_inline attribute.
9981 2014-09-25 Jakub Jelinek <jakub@redhat.com>
9984 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
9985 on low_bound and length.
9987 2014-09-24 Marek Polacek <polacek@redhat.com>
9991 * c-parser.c: Don't define CPP_KEYWORD.
9992 (c_parser_switch_statement): Pass original type to c_finish_case.
9993 * c-tree.h (c_finish_case): Update declaration.
9994 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
9995 conditionally to c_do_switch_warnings.
9997 2014-09-03 Marek Polacek <polacek@redhat.com>
10000 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
10003 2014-09-02 Jakub Jelinek <jakub@redhat.com>
10004 Balaji V. Iyer <balaji.v.iyer@intel.com>
10005 Igor Zamyatin <igor.zamyatin@intel.com>
10007 * c-parser.c (c_parser_cilk_for): New function.
10008 (c_parser_cilk_grainsize): Likewise.
10009 (c_get_temp_regvar): Likewise.
10010 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
10011 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
10012 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
10013 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
10016 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
10018 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
10019 with using HOST_WIDE_INT without truncation to 'int'
10021 2014-08-22 Marek Polacek <polacek@redhat.com>
10024 * c-typeck.c (parser_build_binary_op): Adjust call to
10025 warn_logical_not_parentheses.
10027 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
10030 * c-parser.c (c_parser_array_notation): Check for correct
10031 type of an array added.
10033 2014-08-19 Marek Polacek <polacek@redhat.com>
10036 * c-typeck.c (build_binary_op): If either operand of a comparison
10037 is a boolean expression, call maybe_warn_bool_compare.
10039 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
10042 * c-typeck.c (build_c_cast): Do a conversion even when the
10043 TYPE_MAIN_VARIANTs are the same.
10045 2014-08-19 Marek Polacek <polacek@redhat.com>
10047 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
10048 pedwarn_c99 instead of pedwarn.
10049 (grokfield): Likewise.
10050 (warn_defaults_to): New function.
10051 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
10052 Unconditionally call pedwarn_c99 instead of pedwarn.
10053 (start_function): Call warn_defaults_to instead of pedwarn_c99.
10054 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
10055 check flag_isoc11 before.
10056 * c-errors.c (pedwarn_c99): Change the return type to bool.
10057 Handle -Wc99-c11-compat.
10058 * c-parser.c (disable_extension_diagnostics): Handle
10059 warn_c99_c11_compat.
10060 (restore_extension_diagnostics): Likewise.
10061 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
10062 instead of pedwarn, don't check flag_isoc11 before.
10063 (c_parser_declspecs): Likewise.
10064 (c_parser_alignas_specifier): Likewise.
10065 (c_parser_alignof_expression): Likewise.
10066 (c_parser_generic_selection): Likewise.
10067 * c-tree.h (pedwarn_c99): Update declaration.
10068 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
10071 2014-08-19 Marek Polacek <polacek@redhat.com>
10073 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
10075 * c-errors.c: Include "opts.h".
10076 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
10077 * c-parser.c (disable_extension_diagnostics): Handle negative value
10078 of warn_c90_c99_compat, too.
10079 (restore_extension_diagnostics): Likewise.
10080 (c_parser_compound_statement_nostart): Pass
10081 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
10083 2014-08-12 Marek Polacek <polacek@redhat.com>
10085 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
10087 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
10089 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
10091 2014-08-10 Marek Polacek <polacek@redhat.com>
10094 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
10095 Call pedwarn_c90 instead of pedwarn.
10096 (check_bitfield_type_and_width): Likewise.
10097 (declspecs_add_qual): Likewise.
10098 (declspecs_add_type): Likewise.
10099 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
10100 Adjust to only call pedwarn_c90.
10101 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
10102 pedwarn_c90 instead of pedwarn.
10103 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
10104 * c-parser.c (disable_extension_diagnostics): Handle
10105 warn_c90_c99_compat.
10106 (restore_extension_diagnostics): Likewise.
10107 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
10108 pedwarn_c90 instead of pedwarn.
10109 (c_parser_initelt): Likewise.
10110 (c_parser_postfix_expression): Likewise.
10111 (c_parser_postfix_expression_after_paren_type): Likewise.
10112 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
10113 * c-tree.h: Fix formatting.
10114 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
10115 pedwarn_c90 instead of pedwarn.
10117 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
10119 * c-typeck.c: Remove include of pointer-set.h.
10121 2014-08-07 Marek Polacek <polacek@redhat.com>
10123 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
10125 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10127 * c-typeck.c: Use hash_map instead of pointer_map.
10129 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
10131 * c-decl.c: Use hash_set instead of pointer_set.
10133 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
10135 PR middle-end/61455
10136 * c-array-notation.c (expand_array_notations): Handling
10137 of DECL_EXPR added.
10139 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
10142 * c-typeck.c (c_finish_return): Return 0 instead of the address of
10145 2014-07-30 Tom Tromey <tromey@redhat.com>
10147 * c-typeck.c (struct constructor_stack) <designator_depth>: New
10149 (really_start_incremental_init, push_init_level): Initialize
10151 (pop_init_level): Set global designator_depth.
10152 (process_init_element): Check for designated_init attribute.
10154 2014-07-20 Marek Polacek <polacek@redhat.com>
10157 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
10158 (implicitly_declare): Pass location to implicit_decl_warning.
10160 2014-07-14 Jakub Jelinek <jakub@redhat.com>
10162 PR middle-end/61294
10163 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
10164 If non-NULL, call c_parser_check_literal_zero.
10165 (c_parser_check_literal_zero): New function.
10166 (c_parser_postfix_expression_after_primary): Adjust
10167 c_parser_expr_list caller, handle -Wmemset-transposed-args.
10169 2014-07-06 Marek Polacek <polacek@redhat.com>
10172 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
10173 * c-tree.h (C_ARRAY_PARAMETER): Define.
10174 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
10175 function parameter.
10177 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
10178 Chen Gang <gang.chen.5i5j@gmail.com>
10180 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
10183 2014-07-01 Marek Polacek <polacek@redhat.com>
10185 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
10186 instead of 0 to WARN_FOR_ASSIGNMENT.
10188 2014-07-01 Marek Polacek <polacek@redhat.com>
10191 * c-typeck.c (convert_for_assignment): Pass
10192 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
10194 2014-06-30 Marek Polacek <polacek@redhat.com>
10196 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
10197 has no_sanitize_undefined attribute.
10199 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
10201 PR middle-end/57541
10202 * c-array-notation.c (fix_builtin_array_notation_fn):
10203 Check for 0 arguments in builtin call. Check that bultin argument is
10205 * c-parser.c (c_parser_array_notation): Check for incorrect initial
10208 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
10210 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
10211 qualifiers in __auto_type for atomic types.
10212 (c_parser_typeof_specifier): Discard all type qualifiers in
10213 __typeof__ for atomic types.
10215 2014-06-25 Marek Polacek <polacek@redhat.com>
10218 * c-parser.c (c_parser_statement_after_labels): Pass the location of
10219 the return expression to c_finish_return.
10221 2014-06-25 Jakub Jelinek <jakub@redhat.com>
10223 * c-typeck.c (c_finish_omp_clauses): Make sure
10224 OMP_CLAUSE_LINEAR_STEP has correct type.
10226 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
10228 * c-decl.c: Adjust.
10230 2014-06-24 Jakub Jelinek <jakub@redhat.com>
10232 * c-parser.c (c_parser_omp_for_loop): For
10233 #pragma omp parallel for simd move lastprivate clause from parallel
10234 to for rather than simd.
10236 2014-06-23 Marek Polacek <polacek@redhat.com>
10238 * c-typeck.c (parser_build_binary_op): Don't call
10239 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
10241 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
10243 * c-parser.c (c_parser_omp_threadprivate): Likewise.
10244 * c-decl.c (merge_decls): Likewise.
10246 2014-06-09 Marek Polacek <polacek@redhat.com>
10249 * c-typeck.c (error_init): Call inform instead of error_at.
10250 (pedwarn_init): Call inform instead of pedwarn.
10251 (warning_init): Call inform instead of warning_at.
10253 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
10255 * c-decl.c (merge_decls): Use set_decl_section_name.
10256 (duplicate_decls): Remove node if it exists.
10258 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
10261 * c-typeck.c (push_init_level, process_init_element,
10262 pop_init_level): Correct check for zero initialization, move
10263 missing brace warning to respect zero initialization.
10265 2014-06-05 Marek Polacek <polacek@redhat.com>
10268 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
10270 2014-06-05 Marek Polacek <polacek@redhat.com>
10273 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
10274 on the left hand side operand of a comparison.
10276 2014-06-05 Marek Polacek <polacek@redhat.com>
10279 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
10280 Print note only if the warning was printed.
10282 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
10285 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
10288 2014-06-03 Marek Polacek <polacek@redhat.com>
10291 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
10293 * c-tree.h (c_start_case): Update.
10294 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
10295 switch condition has boolean value.
10297 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
10299 * c-decl.c: Include builtins.h.
10300 * c-parser.c: Likewise.
10302 2014-05-27 Marek Polacek <polacek@redhat.com>
10305 * c-typeck.c (convert_arguments): Get location of a parameter. Change
10306 error and warning calls to error_at and warning_at. Pass location of
10307 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
10308 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
10309 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
10311 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
10314 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
10315 function parameters.
10317 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
10319 * c-decl.c (merge_decls): Preserve symtab node pointers.
10320 (duplicate_decls): Free new decl.
10322 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
10324 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
10327 * c-parser.c (c_parser_omp_target): Return bool values.
10329 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10331 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
10332 num_teams_loc variable to num_thread_limit_loc.
10334 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10336 * c-array-notation.c (expand_array_notations): Use void_node
10337 instead of void_zero_node.
10339 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10341 * c-decl.c (finish_struct): Adjust.
10342 (finish_enum): Likewise.
10344 (record_inline_static): Likewise.
10345 (push_scope): Likewise.
10346 (make_label): Likewise.
10347 (lookup_label_for_goto): Likewise.
10348 (finish_struct): Likewise.
10349 (finish_enum): Likewise.
10350 (store_parm_decls): Likewise.
10351 (c_push_function_context): Likewise.
10352 * c-lang.h: Remove usage of variable_size gty attribute.
10353 * c-parser.c (c_parse_init): Adjust.
10354 (c_parse_file): Likewise.
10356 2014-05-13 Marek Polacek <polacek@redhat.com>
10359 * c-typeck.c (convert_for_assignment): Pass location to
10360 WARN_FOR_ASSIGNMENT instead of input_location.
10362 2014-05-10 Marek Polacek <polacek@redhat.com>
10364 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
10365 maybe_warn_string_init.
10366 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
10367 maybe_warn_string_init.
10368 * c-tree.h (maybe_warn_string_init): Update declaration.
10369 * c-typeck.c (maybe_warn_string_init): Add location parameter.
10370 Call pedwarn_init with loc instead of with input_location.
10371 (digest_init): Pass init_loc to maybe_warn_string_init.
10372 (pop_init_level): Call pedwarn_init with loc instead of with
10374 (set_init_index): Likewise.
10375 (process_init_element): Likewise.
10377 2014-05-09 Marek Polacek <polacek@redhat.com>
10380 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
10381 (c_parser_initelt): Pass location to set_init_label. Pass array index
10382 location to set_init_index.
10383 * c-tree.h (push_init_level): Update declaration.
10384 (pop_init_level): Likewise.
10385 (set_init_index): Likewise.
10386 (set_init_label): Likewise.
10387 * c-typeck.c (error_init): Add location parameter. Call error_at
10389 (digest_init): Pass init_loc to error_init.
10390 (really_start_incremental_init):
10391 (push_init_level): Add location parameter. Pass loc to pop_init_level
10393 (pop_init_level): Likewise.
10394 (set_designator): Add location parameter. Pass loc to pop_init_level,
10395 push_init_level, and error_init.
10396 (set_init_index): Add location parameter. Pass loc to error_init and
10398 (set_init_label): Likewise.
10399 (output_init_element): Pass loc to error_init.
10400 (process_init_element): Pass loc to error_init, pop_init_level,
10401 pedwarn_init, and push_init_level.
10403 2014-05-09 Marek Polacek <polacek@redhat.com>
10406 * c-parser.c (c_parser_attributes): Parse the arguments as an
10407 expression-list if the attribute takes identifier.
10409 2014-05-08 Marek Polacek <polacek@redhat.com>
10412 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
10415 2014-05-08 Marek Polacek <polacek@redhat.com>
10418 * c-decl.c (start_function): Warn for _Atomic-qualified return type
10421 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10422 Mike Stump <mikestump@comcast.net>
10423 Richard Sandiford <rdsandiford@googlemail.com>
10425 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
10426 (finish_enum): Use wide-int interfaces.
10427 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
10428 * c-typeck.c (build_c_cast): Likewise.
10429 (set_nonincremental_init_from_string): Likewise.
10430 (c_tree_equal): Likewise.
10432 2014-05-02 Marek Polacek <polacek@redhat.com>
10435 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
10436 Return size_one_node when the type is not complete.
10437 (pointer_diff): Remove comment.
10438 (build_unary_op): Improve error messages.
10440 2014-05-02 Marek Polacek <polacek@redhat.com>
10442 * c-typeck.c (c_finish_return): Separate warning_at calls.
10444 2014-05-02 Marek Polacek <polacek@redhat.com>
10446 * c-tree.h (error_init): Remove declaration.
10447 (pedwarn_init): Likewise.
10448 * c-typeck.c (error_init): Make static and move above.
10449 (pedwarn_init): Likewise.
10450 (warning_init): Move above.
10451 (maybe_warn_string_init): Likewise.
10453 2014-05-01 Jeff Law <law@redhat.com>
10457 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
10458 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
10461 2014-05-02 Marek Polacek <polacek@redhat.com>
10464 * c-typeck.c (push_init_level): Set constructor_designated to
10465 p->designated for structures.
10467 2014-05-01 Marek Polacek <polacek@redhat.com>
10470 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
10471 function-definition has an attribute after the declarator.
10473 2014-05-01 Marek Polacek <polacek@redhat.com>
10476 * c-typeck.c (warning_init): Add location_t parameter. Call
10477 warning_at instead of warning.
10478 (push_init_level): Pass input_location to warning_init.
10479 (add_pending_init): Add location_t parameter. Pass loc to
10481 (set_nonincremental_init): Pass input_location to add_pending_init.
10482 (set_nonincremental_init_from_string): Likewise.
10483 (output_init_element): Pass loc to warning_init and to
10486 2014-05-01 Marek Polacek <polacek@redhat.com>
10489 * c-typeck.c (c_finish_return): Distinguish between label and variable
10490 when warning about returning local address.
10492 2014-05-01 Marek Polacek <polacek@redhat.com>
10495 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
10498 2014-05-01 Marek Polacek <polacek@redhat.com>
10501 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
10502 instead of 0 to WARN_FOR_QUALIFIERS.
10504 2014-05-01 Marek Polacek <polacek@redhat.com>
10507 * c-typeck.c (default_conversion): Use better location for
10510 2014-04-30 Marek Polacek <polacek@redhat.com>
10512 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
10513 also when SANITIZE_FLOAT_DIVIDE is on.
10515 2014-04-30 Marek Polacek <polacek@redhat.com>
10518 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
10519 and pedwarn_init. Use loc insted of input_location.
10521 2014-04-30 Marek Polacek <polacek@redhat.com>
10524 * c-typeck.c (build_binary_op): Use location when warning about
10527 2014-04-25 Marek Polacek <polacek@redhat.com>
10530 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
10531 always_inline/noinline and hot/cold attributes.
10533 2014-04-25 Marek Polacek <polacek@redhat.com>
10536 * c-parser.c (c_parser_initelt): Pass input_location to
10537 process_init_element.
10538 (c_parser_initval): Pass loc to process_init_element.
10539 * c-tree.h (process_init_element): Adjust declaration.
10540 * c-typeck.c (push_init_level): Pass input_location to
10541 process_init_element.
10542 (pop_init_level): Likewise.
10543 (set_designator): Likewise.
10544 (output_init_element): Add location_t parameter. Pass loc to
10546 (output_pending_init_elements): Pass input_location to
10547 output_init_element.
10548 (process_init_element): Add location_t parameter. Pass loc to
10549 output_init_element.
10551 2014-04-24 Jakub Jelinek <jakub@redhat.com>
10553 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
10554 atomic-clause, allow comma in between atomic-clause and
10557 2014-04-22 Jakub Jelinek <jakub@redhat.com>
10560 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
10561 fails, don't set OM_PARALLEL_COMBINED and return NULL.
10563 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10565 PR middle-end/60469
10566 * c-array-notation.c (fix_builtin_array_notation_fn): Use
10567 create_tmp_var instead build_decl for creating temps.
10568 (build_array_notation_expr): Likewise.
10569 (fix_conditional_array_notations_1): Likewise.
10570 (fix_array_notation_expr): Likewise.
10571 (fix_array_notation_call_expr): Likewise.
10573 2014-03-28 Jakub Jelinek <jakub@redhat.com>
10576 * c-tree.h (c_build_function_call_vec): New prototype.
10577 * c-typeck.c (build_function_call_vec): Don't call
10578 resolve_overloaded_builtin here.
10579 (c_build_function_call_vec): New wrapper function around
10580 build_function_call_vec. Call resolve_overloaded_builtin here.
10581 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
10582 Call c_build_function_call_vec instead of build_function_call_vec.
10583 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
10584 * c-decl.c (finish_decl): Likewise.
10586 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
10589 * c-typeck.c: Use correct format string in cast-qual warning
10591 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
10593 * c-decl.c (c_decl_attributes): Use
10594 lang_hooks.types.omp_mappable_type.
10595 * c-typeck.c (c_finish_omp_clauses): Likewise.
10597 2014-03-06 Marek Polacek <polacek@redhat.com>
10600 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
10601 of checking tree code.
10603 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
10605 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
10606 (c_parser_parameter_declaration): Likewise.
10608 2014-02-19 Marek Polacek <polacek@redhat.com>
10611 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
10612 Call mark_exp_read on exp.value.
10613 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
10614 TREE_ADDRESSABLE on old instead of val.
10615 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
10617 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
10619 * c-parser.c (c_parser_get_builtin_args): Replace calls to
10620 C_EXPR_APPEND by vec_safe_push.
10621 * c-tree.h (C_EXPR_APPEND): Remove.
10623 2014-01-31 Marek Polacek <polacek@redhat.com>
10626 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
10627 build_function_call_vec.
10628 (build_function_call): Likewise.
10629 (build_atomic_assign): Likewise.
10630 (build_function_call_vec): Add arg_loc parameter. Use it.
10631 (convert_arguments): Likewise.
10632 (convert_for_assignment): Rename rhs_loc to expr_loc.
10633 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
10634 (c_parser_objc_keywordexpr): Likewise.
10635 (c_parser_postfix_expression_after_primary): Call
10636 build_function_call_vec with expr_loc rather than op_loc.
10637 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
10638 build_function_call_vec.
10639 (c_parser_expr_list): Add locations parameter. Fill it with locations
10640 of function arguments.
10641 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
10643 2014-01-30 Marek Polacek <polacek@redhat.com>
10646 * c-typeck.c (build_function_call_vec): Use loc parameter.
10647 (convert_arguments): Add location parameter. Use it.
10648 (ep_convert_and_check): Likewise.
10649 (build_atomic_assign): Adjust convert_for_assignment call.
10650 (build_modify_expr): Likewise.
10651 (digest_init): Likewise.
10652 (c_finish_return): Likewise.
10653 (build_conditional_expr): Adjust ep_convert_and_check calls.
10654 (convert_for_assignment): Add rhs_loc parameter. Use it.
10655 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
10658 2014-01-30 Richard Biener <rguenther@suse.de>
10661 * c-typeck.c (build_function_call_vec): Do not replace calls
10662 to a function via an incompatible type with a runtime abort.
10664 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10666 * c-parser.c (c_parser_declaration_or_fndef): Replaced
10667 flag_enable_cilkplus with flag_cilkplus.
10668 (c_parser_direct_declarator_inner): Likewise.
10669 (c_parser_attribute_any_word): Likewise.
10670 (c_parser_attributes): Likewise.
10671 (c_parser_compound_statement): Likewise.
10672 (c_parser_statement_after_labels): Likewise.
10673 (c_parser_if_statement): Likewise.
10674 (c_parser_switch_statement): Likewise.
10675 (c_parser_do_statement): Likewise.
10676 (c_parser_for_statement): Likewise.
10677 (c_parser_unary_expression): Likewise.
10678 (c_parser_postfix_expression): Likewise.
10679 (c_parser_postfix_expression_after_primary): Likewise.
10680 (c_parser_postfix_expression_after_primary): Likewise.
10681 (c_parser_omp_clause_name): Likewise.
10682 (c_finish_omp_declare_simd): Likewise.
10683 (c_parser_cilk_verify_simd): Likewise.
10684 * c-typeck.c (build_array_ref): Likewise.
10685 (build_function_call_vec): Likewise.
10686 (convert_arguments): Likewise.
10687 (build_compound_expr): Likewise.
10688 (c_finish_return): Likewise.
10689 (c_finish_if_stmt): Likewise.
10690 (c_finish_loop): Likewise.
10691 (build_binary_op): Likewise.
10693 2014-01-23 Marek Polacek <polacek@redhat.com>
10696 * c-typeck.c (parser_build_binary_op): Use location instead of
10698 (build_binary_op): Pass location to shorten_compare.
10700 2014-01-23 Marek Polacek <polacek@redhat.com>
10703 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
10704 an empty aggregate.
10706 2014-01-23 Marek Polacek <polacek@redhat.com>
10709 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
10710 of a comma expression.
10711 (emit_side_effect_warnings): Likewise.
10713 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
10716 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
10717 function to use walk_tree and moved a lot of its functionality to
10718 expand_array_notations.
10719 (expand_array_notations): New function.
10721 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
10723 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
10724 attribute an attribute without value.
10726 2014-01-23 Jakub Jelinek <jakub@redhat.com>
10728 PR middle-end/58809
10729 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
10730 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
10732 2014-01-22 Marek Polacek <polacek@redhat.com>
10735 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
10736 of remove_c_maybe_const_expr on op1 and op2.
10738 2014-01-15 Jakub Jelinek <jakub@redhat.com>
10741 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
10742 effects, preevaluate rhs using SAVE_EXPR first.
10744 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
10747 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
10748 statements with if-elseif statements.
10750 2014-01-06 Marek Polacek <polacek@redhat.com>
10753 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
10754 defined bit-field types only in ISO C.
10756 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10758 Update copyright years
10760 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10762 * c-array-notation.c: Use the standard form for the copyright notice.
10764 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10766 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
10767 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
10768 field in parser is not empty. If not-empty, call the function
10769 c_parser_finish_omp_declare_simd.
10770 (c_parser_cilk_clause_vectorlength): Modified function to be shared
10771 between SIMD-enabled functions and #pragma simd. Added new parameter.
10772 (c_parser_cilk_all_clauses): Modified the usage of the function
10773 c_parser_cilk_clause_vectorlength as mentioned above.
10774 (c_parser_cilk_simd_fn_vector_attrs): New function.
10775 (c_finish_cilk_simd_fn_tokens): Likewise.
10776 (is_cilkplus_vector_p): Likewise.
10777 (c_parser_omp_clause_name): Added checking for "vectorlength,"
10778 "nomask," and "mask" strings in clause name.
10779 (c_parser_omp_all_clauses): Added 3 new case statements:
10780 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
10781 PRAGMA_CILK_CLAUSE_NOMASK.
10782 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
10783 check for vector attribute and if so call the function
10784 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
10785 called the function c_finish_cilk_simd_fn_tokens.
10786 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
10787 parser field is non-empty. If so, parse them as you would parse
10788 the omp declare simd pragma.
10789 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
10790 Added a check when step is a parameter and flag it as error.
10791 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
10792 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
10795 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
10797 * c-parser.c (c_parser_omp_parallel): Fix description.
10799 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10801 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
10802 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
10803 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
10804 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
10806 2013-12-04 Joseph Myers <joseph@codesourcery.com>
10809 * c-parser.c (c_parser_alignas_specifier): Use
10810 c_sizeof_or_alignof_type instead of c_alignof.
10811 (c_parser_alignof_expression): Likewise, with min_alignof
10812 parameter depending on alignof spelling used.
10814 2013-12-04 Marek Polacek <polacek@redhat.com>
10817 * c-decl.c (start_function): Don't warn for missing prototype for
10820 2013-12-03 Marek Polacek <polacek@redhat.com>
10823 * c-decl.c (build_compound_literal): Allow compound literals with
10824 empty initial value.
10826 2013-12-02 Joseph Myers <joseph@codesourcery.com>
10829 * c-typeck.c (build_modify_expr): Diagnose assignment to
10830 expression with array type.
10832 2013-11-29 Joseph Myers <joseph@codesourcery.com>
10835 * c-typeck.c (process_init_element): Do not treat a string as
10836 initializing a whole array when used with a designator for an
10837 individual element.
10839 2013-11-29 Joseph Myers <joseph@codesourcery.com>
10842 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
10843 an inline function following a static declaration.
10845 2013-11-28 Jakub Jelinek <jakub@redhat.com>
10848 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
10849 to p_name before calling c_parser_omp_teams instead of after.
10850 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
10851 argument. Remove unused p_name variable.
10853 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
10854 Jakub Jelinek <jakub@redhat.com>
10856 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
10857 external_scope is NULL.
10859 2013-11-27 Tom de Vries <tom@codesourcery.com>
10860 Marc Glisse <marc.glisse@inria.fr>
10863 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
10865 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
10867 * c-typeck.c: Add required include files from gimple.h.
10869 2013-11-22 David Malcolm <dmalcolm@redhat.com>
10871 * c-decl.c (define_label, shadow_tag_warned)
10872 (check_bitfield_type_and_width, grokdeclarator, grokparms,
10873 store_parm_decls_newstyle, store_parm_decls_oldstyle)
10874 (declspecs_add_type): Remove use of in_system_header macro.
10875 * c-parser.c (c_parser_unary_expression): Likewise.
10876 * c-typeck.c (store_init_value, process_init_element)
10877 (c_start_case): Likewise.
10879 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
10882 * c-parser.c (c_parser_set_source_position_from_token): Remove
10883 reference to in_system_header from comment.
10885 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10887 * c-decl.c (grokdeclarator): Update comment to refer to
10888 tree_to_[su]hwi rather than tree_low_cst.
10890 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10892 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
10893 tree_to_uhwi throughout.
10895 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10897 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
10900 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10902 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
10905 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
10907 * c-parser.c (c_parser_cilk_simd): New.
10908 (c_parser_cilk_verify_simd): New.
10909 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
10910 (c_parser_omp_for_loop): Add case for NE_EXPR.
10911 Set c_break_label for CILK_SIMD.
10912 (c_parser_cilk_clause_vectorlength): New.
10913 (c_parser_cilk_clause_linear): New.
10914 (c_parser_cilk_clause_name): New.
10915 (c_parser_cilk_all_clauses): New.
10916 * c-typeck.c (build_unary_op): Pass location argument to
10918 (build_modify_expr): Same.
10919 (build_asm_expr): Same.
10920 (c_finish_bc_stmt): Error on break/continue in loops.
10922 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
10924 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
10926 2013-11-14 Diego Novillo <dnovillo@google.com>
10928 * c-decl.c: Include print-tree.h.
10929 Include stor-layout.h.
10932 Include stringpool.h.
10933 * c-lang.c: Include fold-const.h.
10934 * c-parser.c: Include stringpool.h.
10936 Include stor-layout.h.
10938 Include trans-mem.h.
10939 * c-typeck.c: Include stor-layout.h.
10940 Include trans-mem.h.
10944 2013-11-13 Joseph Myers <joseph@codesourcery.com>
10946 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
10947 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
10949 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
10950 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
10952 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
10953 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
10954 (c_parser_declarator, c_parser_direct_declarator_inner)
10955 (c_parser_parameter_declaration, c_parser_type_name): All callers
10957 (c_parser_declaration_or_fndef): Handle declarations with type
10958 determined from the initializer.
10960 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
10962 * c-typeck.c: Include gimplify.h.
10964 2013-11-12 Joseph Myers <joseph@codesourcery.com>
10966 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
10967 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
10969 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
10970 or _Thread_local as appropriate in diagnostics.
10971 (build_null_declspecs): Initialize ret->thread_gnu_p.
10972 (declspecs_add_scspec): Handle either __thread or _Thread_local
10973 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
10974 pedantic. Do not disallow _Thread_local extern and _Thread_local
10977 2013-11-07 Joseph Myers <joseph@codesourcery.com>
10978 Andrew MacLeod <amacleod@redhat.com>
10980 * c-aux-info.c (gen_type): Handle atomic qualifier.
10981 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
10982 qualifiers when compating types.
10983 (shadow_tag_warned): Handle atomic_p in declspecs.
10984 (quals_from_declspecs): Likewise.
10985 (start_decl): Use c_type_promotes_to when promoting argument
10987 (grokdeclarator): Handle _Atomic.
10988 (get_parm_info): Diagnose any qualifier on "void" as only
10990 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
10991 comparing types. Use c_type_promotes_to when promoting argument
10993 (finish_function): Use c_type_promotes_to when promoting argument
10995 (build_null_declspecs): Handle atomic_p in declspecs.
10996 (declspecs_add_qual): Handle RID_ATOMIC.
10997 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
10998 (c_token_starts_declspecs): Handle RID_ATOMIC.
10999 (c_parser_declspecs): Handle atomic type specifiers and
11001 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
11002 from types of expressions with atomic type.
11003 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
11004 (c_parser_attribute_any_word): Handle RID_ATOMIC.
11005 (c_parser_initializer, c_parser_initelt, c_parser_initval)
11006 (c_parser_statement_after_labels, c_parser_switch_statement)
11007 (c_parser_for_statement, c_parser_expr_no_commas)
11008 (c_parser_conditional_expression, c_parser_binary_expression)
11009 (c_parser_cast_expression, c_parser_unary_expression)
11010 (c_parser_postfix_expression)
11011 (c_parser_postfix_expression_after_primary, c_parser_expression):
11012 Use convert_lvalue_to_rvalue.
11013 (c_parser_expression_conv, c_parser_expr_list): Document
11014 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
11015 (c_parser_objc_synchronized_statement): Use
11016 convert_lvalue_to_rvalue.
11017 (c_parser_objc_selector): Handle RID_ATOMIC.
11018 (c_parser_objc_receiver, c_parser_array_notation): Use
11019 convert_lvalue_to_rvalue.
11020 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
11021 _Atomic (type-name).
11022 (struct c_declspecs): Add atomic_p field.
11023 (convert_lvalue_to_rvalue): Declare.
11024 * c-typeck.c (c_type_promotes_to): Promote atomic types to
11025 corresponding atomic types.
11026 (qualify_type): Don't add _Atomic qualifiers from second argument.
11027 (comp_target_types): Do not allow _Atomic mismatches.
11028 (type_lists_compatible_p): Do not remove atomic qualifiers when
11030 (really_atomic_lvalue, convert_lvalue_to_rvalue)
11031 (build_atomic_assign): New functions.
11032 (build_unary_op): Use build_atomic_assign for atomic increment and
11034 (build_conditional_expr): Do not treat _Atomic void as a qualified
11036 (build_modify_expr): Use build_atomic_assign for atomic LHS.
11037 (find_anonymous_field_with_type, convert_to_anonymous_field)
11038 (convert_for_assignment): Do not remove atomic qualifiers when
11040 (digest_init): Do not accept initialization of arrays of atomic
11041 elements by string constants.
11042 (build_asm_expr): Use convert_lvalue_to_rvalue.
11043 (build_binary_op): Do not treat _Atomic void as a qualified
11046 2013-11-06 DJ Delorie <dj@redhat.com>
11048 * c-decl.c (locate_old_decl): If a previous conflicting decl is
11049 both explicit and builtin, print the location of the explicit one.
11051 2013-11-05 Tobias Burnus <burnus@net-b.de>
11053 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
11054 c_parser_omp_distribute, c_parser_omp_teams,
11055 c_parser_omp_target, c_parser_omp_declare): Handle
11058 2013-11-03 Marek Polacek <polacek@redhat.com>
11060 * c-decl.c (grokdeclarator): Add VLA instrumentation.
11062 2013-11-01 Jakub Jelinek <jakub@redhat.com>
11064 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
11065 check_dup_generic at the end, unless remove is true.
11066 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
11068 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
11070 2013-10-31 Jakub Jelinek <jakub@redhat.com>
11072 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
11073 with decl that is not pointer nor array.
11075 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
11077 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
11078 a spawning function is found.
11079 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
11080 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
11081 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
11082 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
11084 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
11085 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
11087 (c_finish_return): Added a check to reject _Cilk_spawn in return
11089 (build_cilk_spawn): New function.
11090 (build_cilk_sync): Likewise.
11091 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
11093 2013-10-27 Tobias Burnus <burnus@net-b.de>
11096 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
11097 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
11098 (c_parser_statement_after_labels): Update calls.
11100 2013-10-24 Tobias Burnus <burnus@net-b.de>
11103 * c-parser.c (c_parser_pragma, c_parser_for_statement):
11104 Handle PRAGMA_IVDEP.
11105 (c_parser_statement_after_labels): Update call.
11107 2013-10-24 Marek Polacek <polacek@redhat.com>
11109 * c-parser.c (c_parser_struct_declaration): Add a comment.
11110 (c_parser_declarator): Don't allow _Alignas here.
11112 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
11114 * c-parser.c: Include omp-low.h.
11115 * c-typeck.c: Likewise.
11117 2013-10-17 Marek Polacek <polacek@redhat.com>
11120 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
11121 Document syntax of the array-declarator.
11122 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
11124 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
11125 (c_parser_struct_declaration): Likewise.
11126 (c_parser_declarator): Likewise.
11127 (c_parser_direct_declarator_inner): Likewise.
11128 (c_parser_parameter_declaration): Likewise.
11129 (c_parser_type_name): Likewise.
11131 2013-10-11 Jakub Jelinek <jakub@redhat.com>
11133 * c-lang.h (current_omp_declare_target_attribute): New extern
11135 * c-parser.c: Include c-lang.h.
11136 (struct c_parser): Change tokens to c_token *.
11137 Add tokens_buf field. Change tokens_avail type to unsigned int.
11138 (c_parser_consume_token): If parser->tokens isn't
11139 &parser->tokens_buf[0], increment parser->tokens.
11140 (c_parser_consume_pragma): Likewise.
11141 (enum pragma_context): Add pragma_struct and pragma_param.
11142 (c_parser_external_declaration): Adjust
11143 c_parser_declaration_or_fndef caller.
11144 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
11145 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
11146 Adjust recursive call.
11147 (c_parser_struct_or_union_specifier): Use pragma_struct instead
11148 of pragma_external.
11149 (c_parser_parameter_declaration): Use pragma_param instead of
11151 (c_parser_compound_statement_nostart, c_parser_label,
11152 c_parser_for_statement): Adjust
11153 c_parser_declaration_or_fndef callers.
11154 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
11155 it through to c_parser_conditional_expression.
11156 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
11157 pass it through to c_parser_binary_expression. Adjust recursive
11159 (c_parser_binary_expression): Remove prec argument, add
11160 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
11161 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
11162 binop matches it, use build2 instead of parser_build_binary_op.
11163 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
11164 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
11165 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
11166 Handle pragma_struct and pragma_param the same as pragma_external.
11167 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
11168 (c_parser_omp_variable_list): Parse array sections for
11169 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
11170 (c_parser_omp_clause_collapse): Fully fold collapse expression.
11171 (c_parser_omp_clause_reduction): Handle user defined reductions.
11172 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
11173 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
11174 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
11175 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
11176 c_parser_omp_clause_depend, c_parser_omp_clause_map,
11177 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
11178 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
11179 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
11180 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
11181 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
11182 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
11183 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
11184 (c_parser_omp_for_loop): Add CODE argument, pass it through
11185 to c_finish_omp_for. Change last argument to cclauses,
11186 and adjust uses to grab parallel clauses from the array of all
11187 the split clauses. Adjust c_parser_binary_expression,
11188 c_parser_declaration_or_fndef and c_finish_omp_for callers.
11189 (omp_split_clauses): New function.
11190 (c_parser_omp_simd): New function.
11191 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
11192 Allow the function to be called also when parsing combined constructs,
11193 and call c_parser_omp_simd when parsing for simd.
11194 (c_parser_omp_sections_scope): If section-sequence doesn't start with
11195 #pragma omp section, require exactly one structured-block instead of
11196 sequence of statements.
11197 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
11198 Allow the function to be called also when parsing combined constructs.
11199 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
11200 Allow the function to be called also when parsing combined
11202 (c_parser_omp_taskgroup, c_parser_omp_cancel,
11203 c_parser_omp_cancellation_point, c_parser_omp_distribute,
11204 c_parser_omp_teams, c_parser_omp_target_data,
11205 c_parser_omp_target_update, c_parser_omp_target,
11206 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
11207 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
11208 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
11209 (c_parser_omp_construct): Add p_name and mask vars. Handle
11210 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
11211 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
11212 and c_parser_omp_sections callers.
11213 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
11214 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
11215 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
11216 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
11217 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
11219 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
11220 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
11221 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
11222 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
11223 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
11224 * c-typeck.c: Include tree-inline.h.
11225 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
11226 handle_omp_array_sections_1, handle_omp_array_sections,
11227 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
11228 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
11229 user defined reductions.
11230 (c_tree_equal): New function.
11231 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
11232 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
11233 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
11234 c_check_omp_declare_reduction_r): New prototypes.
11235 * c-decl.c (current_omp_declare_target_attribute): New variable.
11236 (c_decl_attributes): New function.
11237 (start_decl, start_function): Use it instead of decl_attributes.
11238 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
11239 c_omp_reduction_decl, c_omp_reduction_lookup,
11240 c_check_omp_declare_reduction_r): New functions.
11242 2013-09-25 Tom Tromey <tromey@redhat.com>
11244 * Make-lang.in (c/gccspec.o): Remove.
11245 (CFLAGS-c/gccspec.o): New variable.
11246 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
11247 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
11248 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
11250 2013-09-25 Tom Tromey <tromey@redhat.com>
11252 * Make-lang.in (c/gccspec.o): Don't use subshell.
11254 2013-09-18 Marek Polacek <polacek@redhat.com>
11257 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
11258 Remove unnecessary check.
11260 2013-09-18 Marek Polacek <polacek@redhat.com>
11263 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
11264 no_sanitize_undefined attribute.
11266 2013-09-13 Kai Tietz <ktietz@redhat.com>
11269 * c-decl.c (c_builtin_function_ext_scope): Remove
11270 wrong assumption that it is never called on prexisting
11273 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11275 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
11277 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11279 * c-objc-common.c (c_tree_printer): Tidy.
11281 2013-08-30 Marek Polacek <polacek@redhat.com>
11283 * c-typeck.c (build_binary_op): Add division by zero and shift
11286 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
11287 Joseph Myers <joseph@codesourcery.com>
11290 * c-typeck.c (c_common_type): Prefer double_type_node over
11291 other REAL_TYPE types with the same precision.
11292 (convert_arguments): Likewise.
11294 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
11296 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
11297 (c_initialize_diagnostics): Call a destructor for the early printer.
11299 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11301 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
11302 printer initialization.
11304 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
11307 * c-array-notation.c (fix_conditional_array_notations_1): Added a
11308 check for truth values.
11309 (expand_array_notation_exprs): Added truth values case. Removed an
11310 unwanted else. Added for-loop to walk through subtrees in default
11313 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11315 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
11317 2013-07-23 Joseph Myers <joseph@codesourcery.com>
11319 * c-parser.c (struct c_generic_association): Fix typo.
11321 2013-07-23 Tom Tromey <tromey@redhat.com>
11322 Joseph Myers <joseph@codesourcery.com>
11324 * c-parser.c (struct c_generic_association): New.
11325 (c_generic_association_d): New typedef.
11326 (c_parser_generic_selection): New function.
11327 (c_parser_postfix_expression): Handle RID_GENERIC.
11329 2013-07-13 Jason Merrill <jason@redhat.com>
11332 * c-decl.c (finish_struct): Check for too-large class.
11334 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11337 * c-typeck.c (set_init_index): When folding, check for index overflow.
11339 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11341 * c-parser.c (c_parser_array_notation): Removed rejection of array
11342 notations in an array of function pointers.
11344 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11346 * c-array-notation.c (make_triplet_val_inv): New function.
11347 (create_cmp_incr): Likewise.
11348 (create_array_refs): Likewise.
11349 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
11350 Also modularized common parts between functions and called the function.
11351 (build_array_notation_expr): Likewise.
11352 (fix_conditional_array_notations_1): Likewise.
11353 (fix_array_notation_expr): Likewise.
11354 (fix_array_notation_call_expr): Likewise.
11356 2013-06-18 Marek Polacek <polacek@redhat.com>
11359 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
11361 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
11363 * c-array-notation.c (build_array_notation_expr): Reject array notation
11364 mismatch between LHS and RHS even inside a call_expr. Also, removed
11365 a couple while statements that were dead code.
11367 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
11369 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
11370 excessive precision expressions in function parameters. Also removed
11371 couple unwanted while statements.
11373 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11375 * c-array-notation.c (expand_array_notation_exprs): Added
11376 ARRAY_NOTATION_REF case.
11378 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11380 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
11381 function to c-family/array-notation-common.c.
11382 (is_cilkplus_reduce_builtin): Likewise.
11383 (find_rank): Likewise.
11384 (extract_array_notation_exprs): Likewise.
11385 (replace_array_notations): Likewise.
11386 (find_inv_trees): Likewise.
11387 (replace_inv_trees): Likewise.
11388 (contains_array_notation_expr): Likewise.
11389 (find_correct_array_notation_type): Likewise.
11390 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
11391 (struct inv_list): Moved this to c-family/array-notation-common.c.
11392 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
11394 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
11396 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
11397 reduction functions outside the for-loop. Added a check if the fundecl
11398 is non-NULL. Finally, removed an unwanted if-statement, and made the
11399 body unconditional.
11401 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
11403 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
11404 condition of the if-statement matches the rank of else-block and then-
11405 block when array notations are used.
11406 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
11407 expression after the entire function body is parsed.
11408 (c_parser_expr_no_commas): Delayed creating array notation expressions
11409 to the end of function parsing.
11410 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
11411 whole if-statement instead of just the condition.
11412 (expand_array_notation_exprs): Added MODIFY_EXPR case.
11414 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
11417 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
11418 array to NULL_TREE if they are unused. Also added a check for the
11419 field to be NULL before its fields are used in future.
11421 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11424 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
11425 (build_array_notation_expr): Likewise.
11427 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11429 * c-typeck.c (build_array_ref): Added a check to see if array's
11430 index is greater than one. If true, then emit an error.
11431 (build_function_call_vec): Exclude error reporting and checking
11432 for builtin array-notation functions.
11433 (convert_arguments): Likewise.
11434 (c_finish_return): Added a check for array notations as a return
11435 expression. If true, then emit an error.
11436 (c_finish_loop): Added a check for array notations in a loop
11437 condition. If true then emit an error.
11438 (lvalue_p): Added a ARRAY_NOTATION_REF case.
11439 (build_binary_op): Added a check for array notation expr inside
11440 op1 and op0. If present, we call another function to find correct
11442 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
11443 * c-parser.c (c_parser_compound_statement): Check if array
11444 notation code is used in tree, if so, then transform them into
11445 appropriate C code.
11446 (c_parser_expr_no_commas): Check if array notation is used in LHS
11447 or RHS, if so, then build array notation expression instead of
11449 (c_parser_postfix_expression_after_primary): Added a check for
11450 colon(s) after square braces, if so then handle it like an array
11451 notation. Also, break up array notations in unary op if found.
11452 (c_parser_direct_declarator_inner): Added a check for array
11454 (c_parser_compound_statement): Added a check for array notation in
11455 a stmt. If one is present, then expand array notation expr.
11456 (c_parser_if_statement): Likewise.
11457 (c_parser_switch_statement): Added a check for array notations in
11458 a switch statement's condition. If true, then output an error.
11459 (c_parser_while_statement): Similarly, but for a while.
11460 (c_parser_do_statement): Similarly, but for a do-while.
11461 (c_parser_for_statement): Similarly, but for a for-loop.
11462 (c_parser_unary_expression): Check if array notation is used in a
11463 pre-increment or pre-decrement expression. If true, then expand
11465 (c_parser_array_notation): New function.
11466 * c-array-notation.c: New file.
11467 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
11469 2013-05-23 Mike Stump <mikestump@comcast.net>
11471 * c-typeck.c (convert_for_assignment): Handle references to memory
11474 2013-05-16 Jason Merrill <jason@redhat.com>
11476 * Make-lang.in (cc1$(exeext)): Use link mutex.
11478 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11480 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
11481 to simply use OPT_Wpointer_arith.
11482 (build_unary_op): Likewise.
11484 2013-04-03 Jakub Jelinek <jakub@redhat.com>
11487 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
11488 argument. If set, or it temporarily for parsing of the first
11489 argument into force_folding_builtin_constant_p.
11490 (c_parser_postfix_expression): Adjust callers.
11492 2013-03-21 Richard Biener <rguenther@suse.de>
11494 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
11495 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
11497 2013-02-12 Marek Polacek <polacek@redhat.com>
11500 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
11503 2013-01-24 Jakub Jelinek <jakub@redhat.com>
11506 * c-typeck.c (set_nonincremental_init_from_string): If
11507 constructor_max_index is NULL, treat it as if tree_int_cst_lt
11509 (process_init_element): Likewise.
11511 2012-12-20 Jakub Jelinek <jakub@redhat.com>
11514 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
11515 argument, don't call default_function_array_conversion
11516 nor c_fully_fold here.
11517 (c_parser_asm_statement): Adjust callers.
11518 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
11519 and outputs here, and call default_function_array_conversion
11520 on inputs that don't need to be addressable.
11522 2012-12-18 Jakub Jelinek <jakub@redhat.com>
11525 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
11526 warning require that both c_common_unsigned_type as well as
11527 c_common_signed_type is the same for both mvl and mvr types.
11529 2012-11-16 Diego Novillo <dnovillo@google.com>
11531 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
11533 * c-common.c: Use new vec API in vec.h.
11534 * c-common.h: Likewise.
11535 * c-gimplify.c: Likewise.
11536 * c-pragma.c: Likewise.
11537 * c-pretty-print.c: Likewise.
11538 * c-pretty-print.h: Likewise.
11539 * c-semantics.c: Likewise.
11540 * c-decl.c: Likewise.
11541 * c-parser.c: Likewise.
11542 * c-tree.h: Likewise.
11543 * c-typeck.c: Likewise.
11545 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11548 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
11550 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11553 * c-decl.c (warn_if_shadowing): Do not warn if a variable
11554 shadows a function, unless the variable is a function or a
11555 pointer-to-function.
11557 2012-10-12 Jakub Jelinek <jakub@redhat.com>
11560 * c-parser.c (struct c_tree_loc_pair): Removed.
11561 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
11562 add location_t * and tree * arguments, fill in array of 3
11563 sizeof_arg trees and corresponding locs.
11564 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
11565 c_parser_expr_list callers.
11566 (c_parser_postfix_expression_after_primary): Likewise. Pass
11567 array of 3 sizeof_arg trees and locs (corresponding to first
11568 3 arguments) to sizeof_pointer_memaccess_warning.
11570 2012-10-09 Lawrence Crowl <crowl@google.com>
11572 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
11573 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
11576 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11579 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
11582 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
11585 * c-typeck.c: Include c-common.h.
11586 (enum stv_conv): Moved to c-common.h.
11587 (scalar_to_vector): Moved to c-common.c.
11588 (build_binary_op): Adapt to scalar_to_vector's new prototype.
11589 * Make-lang.in: c-typeck.c depends on c-common.h.
11591 2012-10-04 Arnaud Charlet <charlet@adacore.com>
11593 * c-decl.c (c_write_global_declarations): Fix handling of
11596 2012-09-30 Sharad Singhai <singhai@google.com>
11598 * c-decl.c (c_write_global_declarations): Use a different method
11599 to determine if the dump has ben initialized.
11601 2012-09-14 Joseph Myers <joseph@codesourcery.com>
11604 * c-typeck.c (c_cast_expr): When casting to a type requiring
11605 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
11606 c_fully_fold first.
11608 2012-09-14 Joseph Myers <joseph@codesourcery.com>
11611 * c-typeck.c (build_unary_op): Pass original argument of
11612 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
11613 any C_MAYBE_CONST_EXPR, if it has integer operands.
11614 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
11615 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
11616 to c_objc_common_truthvalue_conversion, then remove any
11617 C_MAYBE_CONST_EXPR, if they have integer operands. Use
11618 c_objc_common_truthvalue_conversion not
11619 c_common_truthvalue_conversion.
11620 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
11621 call note_integer_operands for arguments with integer operands
11622 that are not integer constants.
11624 2012-09-13 Jakub Jelinek <jakub@redhat.com>
11627 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
11628 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
11630 2012-08-31 Jakub Jelinek <jakub@redhat.com>
11633 * c-convert.c (convert): Don't call fold_convert_loc if
11634 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
11635 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
11636 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
11638 2012-08-24 Jakub Jelinek <jakub@redhat.com>
11641 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
11642 for nested and empty_ok arguments in the call to
11643 c_parser_declaration_or_fndef.
11645 2012-08-17 Jakub Jelinek <jakub@redhat.com>
11647 * c-tree.h (c_last_sizeof_arg): Declare.
11648 * c-parser.c (struct c_tree_loc_pair): New type.
11649 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
11651 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
11652 (c_parser_postfix_expression_after_primary): Likewise. Call
11653 sizeof_pointer_memaccess_warning if needed.
11654 (sizeof_ptr_memacc_comptypes): New function.
11655 * c-typeck.c (c_last_sizeof_arg): New global variable.
11656 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
11658 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
11660 * c-lang.h (lang_decl): Add variable_size GTY option.
11662 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11664 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
11665 * Make-lang.in: Fix dependencies.
11667 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11669 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
11670 and add language Makefile hooks.
11671 * config-lang.in: New file.
11672 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
11673 add the required "normal" config-lang.in rules.
11674 * c-lang.h: Moved from gcc/ to here.
11675 * c-tree.h: Likewise.
11676 * c-objc-common.c: Likewise.
11677 * c-objc-common.h: Likewise.
11678 * c-typeck.c: Likewise.
11679 * c-convert.c: Likewise.
11680 * c-lang.c: Likewise.
11681 * c-aux-info.c: Likewise.
11682 * c-errors.c: Likewise.
11683 * gccspec.c: Likewise.
11684 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
11685 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
11687 Copyright (C) 2012-2025 Free Software Foundation, Inc.
11689 Copying and distribution of this file, with or without modification,
11690 are permitted in any medium without royalty provided the copyright
11691 notice and this notice are preserved.