1 2024-04-19 Martin Uecker <uecker@tugraz.at>
2 Jakub Jelinek <jakub@redhat.com>
6 * c-decl.cc (shadow_tag_warned): For flag_isoc23 and code not
7 ENUMERAL_TYPE use SET_TYPE_STRUCTURAL_EQUALITY.
8 (parser_xref_tag): Likewise.
9 (start_struct): For flag_isoc23 use SET_TYPE_STRUCTURAL_EQUALITY.
10 (c_update_type_canonical): New function.
11 (finish_struct): Put NULL as second == operand rather than first.
12 Assert TYPE_STRUCTURAL_EQUALITY_P. Call c_update_type_canonical.
13 * c-typeck.cc (composite_type_internal): Use
14 SET_TYPE_STRUCTURAL_EQUALITY. Formatting fix.
16 2024-04-09 Jakub Jelinek <jakub@redhat.com>
18 * c-decl.cc (previous_tag): Fix duplicated words in comment; the the
20 (diagnose_mismatched_decls): Fix duplicated words in comment;
23 2024-04-05 Martin Uecker <uecker@tugraz.at>
26 2024-04-02 Martin Uecker <uecker@tugraz.at>
29 * c-decl.cc (finish_struct): Set TYPE_CANONICAL when completing
32 2024-04-02 Martin Uecker <uecker@tugraz.at>
35 * c-decl.cc (finish_struct): Set TYPE_CANONICAL when completing
38 2024-03-14 Chung-Lin Tang <cltang@baylibre.com>
40 * c-parser.cc (c_parser_oacc_data_clause): Add parsing support for
41 'readonly' modifier, set OMP_CLAUSE_MAP_READONLY if readonly modifier
42 found, update comments.
43 (c_parser_oacc_cache): Add parsing support for 'readonly' modifier,
44 set OMP_CLAUSE__CACHE__READONLY if readonly modifier found, update
47 2024-03-08 Jakub Jelinek <jakub@redhat.com>
50 * c-tree.h (c_type_dwarf_attribute): Declare.
51 * c-objc-common.h (LANG_HOOKS_TYPE_DWARF_ATTRIBUTE): Redefine.
52 * c-objc-common.cc: Include dwarf2.h.
53 (c_type_dwarf_attribute): New function.
55 2024-02-26 Jakub Jelinek <jakub@redhat.com>
58 * c-parser.cc (c_parser_postfix_expression): Diagnose
59 __builtin_stdc_bit_* argument with ENUMERAL_TYPE or BOOLEAN_TYPE
60 type or if signed here rather than on the replacement builtins
61 in check_builtin_function_arguments.
63 2024-02-22 Jakub Jelinek <jakub@redhat.com>
66 * c-parser.cc (c_parser_std_attribute): Remove loose_scope_p argument.
67 Instead of checking it, parse 2 CPP_COLONs with the first one with
68 COLON_SCOPE flag the same as CPP_SCOPE.
69 (c_parser_std_attribute_list): Remove loose_scope_p argument, don't
70 pass it to c_parser_std_attribute.
71 (c_parser_std_attribute_specifier): Adjust c_parser_std_attribute_list
74 2024-02-13 Tobias Burnus <tburnus@baylibre.com>
77 * c-parser.cc (c_parser_omp_context_selector): Handle splitting of
78 OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR.
80 2024-02-10 Jakub Jelinek <jakub@redhat.com>
82 * c-decl.cc (get_parm_array_spec): Use HOST_WIDE_INT_PRINT_UNSIGNED
83 instead of "%lu" and casts to unsigned long or unsigned long long.
85 2024-02-08 Joseph Myers <josmyers@redhat.com>
88 * c-typeck.cc (c_objc_common_truthvalue_conversion): Return an
89 integer constant expression for boolean conversion of floating
92 2024-02-05 Jakub Jelinek <jakub@redhat.com>
95 * c-decl.cc (finish_struct): Only use build_bitint_type if
96 bit-field has width larger or equal to minimum _BitInt
99 2024-01-31 Joseph Myers <josmyers@redhat.com>
102 * c-decl.cc (start_enum): Clear ENUM_FIXED_UNDERLYING_TYPE_P when
103 defining without a fixed underlying type an enumeration previously
104 declared with a fixed underlying type.
106 2024-01-31 Martin Uecker <uecker@tugraz.at>
109 * c-typeck.cc (composite_type_internal): Set TYPE_STUB_DECL.
111 2024-01-31 Joseph Myers <josmyers@redhat.com>
115 * c-tree.h (c_objc_common_truthvalue_conversion): Add third
117 * c-convert.cc (c_convert): For conversions to boolean, pass third
118 argument to c_objc_common_truthvalue_conversion rather than
120 * c-typeck.cc (build_c_cast): Ensure arguments with integer
121 operands are marked as such for conversion to boolean.
122 (c_objc_common_truthvalue_conversion): Add third argument TYPE.
124 2024-01-21 Martin Uecker <uecker@tugraz.at>
127 * c-decl.cc (grokdeclarator): Use c_common_unsigned_type instead of
128 unsigned_type_for to create the unsigned type for bitfields declared
129 with int when using -funsigned-bitfields.
131 2024-01-12 Jakub Jelinek <jakub@redhat.com>
134 * c-typeck.cc (build_array_ref): If index has BITINT_TYPE type with
135 precision larger than sizetype precision, convert it to sizetype.
137 2024-01-11 Julian Brown <julian@codesourcery.com>
139 * c-parser.cc (c_parser_braced_init, c_parser_conditional_expression):
140 Don't allow OpenMP array section.
141 (c_parser_postfix_expression): Don't allow array section in statement
143 (c_parser_postfix_expression_after_primary): Add support for OpenMP
144 array section parsing.
145 (c_parser_expr_list): Don't allow OpenMP array section here.
146 (c_parser_omp_variable_list): Change ALLOW_DEREF parameter to
147 MAP_LVALUE. Support parsing of general lvalues in "map", "to" and
149 (c_parser_omp_var_list_parens): Change ALLOW_DEREF parameter to
150 MAP_LVALUE. Update call to c_parser_omp_variable_list.
151 (c_parser_oacc_data_clause): Update calls to
152 c_parser_omp_var_list_parens.
153 (c_parser_omp_clause_reduction): Use OMP_ARRAY_SECTION tree node
154 instead of TREE_LIST for array sections.
155 (c_parser_omp_target): Allow GOMP_MAP_ATTACH.
156 * c-tree.h (c_omp_array_section_p): Add extern declaration.
157 (build_omp_array_section): Add prototype.
158 * c-typeck.cc (c_omp_array_section_p): Add flag.
159 (mark_exp_read): Support OMP_ARRAY_SECTION.
160 (build_omp_array_section): Add function.
161 (build_external_ref): Tweak error path for OpenMP array sections.
162 (handle_omp_array_sections_1): Use OMP_ARRAY_SECTION tree code instead
163 of TREE_LIST. Handle more kinds of expressions.
164 (c_oacc_check_attachments): Use OMP_ARRAY_SECTION instead of TREE_LIST
166 (c_finish_omp_clauses): Use OMP_ARRAY_SECTION instead of TREE_LIST.
167 Check for supported expression types.
169 2024-01-09 Tamar Christina <tamar.christina@arm.com>
172 * c-parser.cc (c_parser_for_statement): Skip the pragma is no cond.
174 2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
176 * c-parser.cc (c_parser_omp_clause_name): Move handling of indirect
177 clause to correspond to alphabetical order.
179 2023-12-30 Martin Uecker <uecker@tugraz.at>
181 * c-typeck.cc (tagged_types_tu_compatible_p): Revise.
183 2023-12-22 Martin Uecker <uecker@tugraz.at>
185 * c-typeck.cc (composite_type_internal): Adapted from
186 composite_type to support structs and unions.
187 (composite_type): New wrapper function.
188 (build_conditional_operator): Return composite type.
189 * c-decl.cc (finish_struct): Allow NULL for
190 enclosing_struct_parse_info.
192 2023-12-21 Martin Uecker <uecker@tugraz.at>
194 * c-decl.cc (c_struct_hasher): Hash stable for struct
196 (c_struct_hasher::hash, c_struct_hasher::equal): New
198 (finish_struct): Set TYPE_CANONICAL to first struct in
200 * c-objc-common.cc (c_get_alias_set): Let structs or
201 unions with variable size alias anything.
202 * c-tree.h (comptypes_equiv): New prototype.
203 * c-typeck.cc (comptypes_equiv): New function.
204 (comptypes_internal): Implement equivalence mode.
205 (tagged_types_tu_compatible): Implement equivalence mode.
207 2023-12-21 Martin Uecker <uecker@tugraz.at>
209 * c-tree.h (c_parser_enum_specifier): Add parameter.
210 * c-decl.cc (start_enum): Allow redefinition.
211 (finish_enum): Diagnose conflicts.
212 (build_enumerator): Set context.
213 (diagnose_mismatched_decls): Diagnose conflicting enumerators.
214 (push_decl): Preserve context for enumerators.
215 * c-typeck.cc (tagged_types_tu_compatible_p): Adapt.
216 * c-parser.cc (c_parser_enum_specifier): Remember when
217 seen is from an enum type which is not yet defined.
219 2023-12-21 Martin Uecker <uecker@tugraz.at>
221 * c-decl.cc (previous_tag): New function.
222 (parser_xref_tag): Find earlier definition.
223 (get_parm_info): Turn off warning for C23.
224 (start_struct): Allow redefinitons.
225 (finish_struct): Diagnose conflicts.
226 * c-tree.h (comptypes_same_p): Add prototype.
227 * c-typeck.cc (comptypes_same_p): New function.
228 (comptypes_internal): Activate comparison of tagged types.
229 (convert_for_assignment): Ignore qualifiers.
230 (digest_init): Add error.
231 (initialized_elementwise_p): Allow compatible types.
233 2023-12-20 Jakub Jelinek <jakub@redhat.com>
235 * c-parser.cc (c_parser_postfix_expression_after_primary): Grow
236 sizeof_arg and sizeof_arg_loc arrays to 6 elements. Call
237 warn_for_calloc if warn_calloc_transposed_args for functions with
238 alloc_size type attribute with 2 arguments.
239 (c_parser_expr_list): Use 6 instead of 3.
240 * c-typeck.cc (build_c_cast): Call warn_for_alloc_size for casts
241 of calls to functions with alloc_size type attribute.
242 (convert_for_assignment): Likewise.
244 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
246 * c-parser.cc (omp_construct_selectors): Delete.
247 (omp_device_selectors): Delete.
248 (omp_implementation_selectors): Delete.
249 (omp_user_selectors): Delete.
250 (c_parser_omp_context_selector): Adjust for new representations
251 and simplify dispatch logic. Uniformly warn instead of sometimes
252 error when an unknown selector is found. Adjust error messages
253 for extraneous/incorrect score.
254 (c_parser_omp_context_selector_specification): Likewise.
255 (c_finish_omp_declare_variant): Adjust for new representations.
257 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
259 * c-parser.cc (c_parser_omp_context_selector): Adjust for new
260 namelist property representation.
262 2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
264 * c-parser.cc (c_parser_omp_context_selector): Use new constructors.
266 2023-12-18 Richard Biener <rguenther@suse.de>
269 * gimple-parser.cc (c_parser_gimple_postfix_expression):
270 Parse TARGET_MEM_REF extended operands for __MEM.
272 2023-12-13 Jason Merrill <jason@redhat.com>
274 * c-typeck.cc (convert_for_assignment): Adjust call to
275 warn_for_address_of_packed_member.
277 2023-12-13 Julian Brown <julian@codesourcery.com>
279 * c-parser.cc (c_parser_oacc_all_clauses): Add TARGET_P parameter. Use
280 to select region type for c_finish_omp_clauses call.
281 (c_parser_oacc_loop): Update calls to c_parser_oacc_all_clauses.
282 (c_parser_oacc_compute): Likewise.
283 (c_parser_omp_target_data, c_parser_omp_target_enter_data): Support
285 (c_parser_omp_target_exit_data): Support DETACH kind.
286 (check_clauses): Handle GOMP_MAP_POINTER and GOMP_MAP_ATTACH here.
287 * c-typeck.cc (handle_omp_array_sections_1,
288 handle_omp_array_sections, c_finish_omp_clauses): Use
289 c_omp_address_inspector class and OMP address tokenizer to analyze and
290 expand map clause expressions. Fix some diagnostics. Fix "is OpenACC"
291 condition for C_ORT_ACC_TARGET addition.
293 2023-12-13 Julian Brown <julian@codesourcery.com>
295 * c-typeck.cc (c_finish_omp_clauses): Add braces and reindent
296 OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza.
298 2023-12-11 Martin Uecker <uecker@tugraz.at>
301 * c-decl.cc (add_decl_expr): Revise.
302 (finish_struct): Create DECL_EXPR.
303 * c-parser.cc (c_parser_struct_or_union_specifier): Call
304 finish_struct with expression for VLA sizes.
305 * c-tree.h (finish_struct): Add argument.
307 2023-12-11 Tobias Burnus <tobias@codesourcery.com>
309 * c-parser.cc (c_parser_omp_requires): Handle acquires/release
310 in atomic_default_mem_order clause.
311 (c_parser_omp_atomic): Update.
313 2023-12-05 Richard Sandiford <richard.sandiford@arm.com>
315 * c-decl.cc (std_attribute_table): Add extra braces to work
316 around PR 16333 in older compilers.
318 2023-12-05 Richard Biener <rguenther@suse.de>
321 * c-typeck.cc (c_build_qualified_type): Preserve address-space
324 2023-12-02 Richard Sandiford <richard.sandiford@arm.com>
326 * c-tree.h (std_attribute_table): Declare.
327 * c-decl.cc (std_attribute_table): Change type to
328 scoped_attribute_specs, using...
329 (std_attributes): ...this as the underlying array.
330 (c_init_decl_processing): Remove call to register_scoped_attributes.
331 * c-objc-common.h (c_objc_attribute_table): New global.
332 (LANG_HOOKS_ATTRIBUTE_TABLE): Use it.
333 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
334 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
336 2023-12-01 Florian Weimer <fweimer@redhat.com>
339 * c-decl.cc (grokparms): Issue permerror for
340 OPT_Wdeclaration_missing_parameter_type instead of a pedwarn.
342 2023-12-01 Florian Weimer <fweimer@redhat.com>
345 * c-typeck.cc (build_conditional_expr): Upgrade most pointer
346 type mismatches to a permerror.
347 (convert_for_assignment): Use permerror_opt and
348 permerror_init for OPT_Wincompatible_pointer_types warnings.
350 2023-12-01 Florian Weimer <fweimer@redhat.com>
353 * c-typeck.cc (c_finish_return): Use permerrors
354 for OPT_Wreturn_mismatch diagnostics.
356 2023-12-01 Florian Weimer <fweimer@redhat.com>
358 * c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int
359 warnings or errors in system headers.
361 2023-12-01 Florian Weimer <fweimer@redhat.com>
363 * c-decl.cc (warn_defaults_to): Remove.
364 (grok_declarator, start_function): Call permerror_opt
365 instead of warn_defaults_to.
366 (store_parm_decls_oldstyle): Call permerror_opt for
369 2023-12-01 Florian Weimer <fweimer@redhat.com>
373 * c-decl.cc (implicit_decl_permerror): Rename from
374 implicit_decl_warning. Call permerror_opt instead of
375 pedwarn and warning_at.
376 (implicitly_declare): Adjust callers.
378 2023-12-01 Florian Weimer <fweimer@redhat.com>
382 * c-typeck.cc (build_conditional_expr): Use permerror_opt for
383 pointer/integer type mismatches, based on -Wint-conversion.
384 (pedwarn_permerror_init, permerror_init): New function.
385 (pedwarn_init): Call pedwarn_permerror_init.
386 (convert_for_assignment): Use permerror_opt and
387 permerror_init for -Wint-conversion warnings.
389 2023-11-29 Alexandre Oliva <oliva@adacore.com>
391 * c-typeck.cc (convert_lvalue_to_rvalue): Decay hardbools.
392 * c-convert.cc (convert): Convert to hardbool through
394 * c-decl.cc (check_bitfield_type_and_width): Skip enumeral
395 truncation warnings for hardbool.
396 (finish_struct): Propagate hardbool attribute to bitfield
398 (digest_init): Convert to hardbool.
400 2023-11-28 Jason Merrill <jason@redhat.com>
404 * c-typeck.cc (array_to_pointer_conversion): Adjust -Wc++-compat
407 2023-11-28 Richard Biener <rguenther@suse.de>
410 * gimple-parser.cc (c_parser_parse_gimple_body): Also
411 set DECL_SEEN_IN_BIND_EXPR_Pfor locals.
413 2023-11-27 Alex Coplan <alex.coplan@arm.com>
414 Iain Sandoe <iain@sandoe.co.uk>
417 * c-lang.cc (c_family_register_lang_features): New.
418 * c-objc-common.cc (struct c_feature_info): New.
419 (c_register_features): New.
420 * c-objc-common.h (c_register_features): New.
422 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
424 * c-parser.cc (c_parser_omp_clause_num_threads,
425 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
426 c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
427 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
428 c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
429 c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
430 Add OPT_Wopenmp to warning_at.
432 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
434 * c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
435 to the destroy clause.
437 2023-11-23 Jakub Jelinek <jakub@redhat.com>
439 * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
440 * c-decl.cc (names_builtin_p): Likewise.
442 2023-11-14 Jakub Jelinek <jakub@redhat.com>
445 * c-typeck.cc (convert_arguments): Don't promote first argument
446 of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
448 2023-11-10 Martin Uecker <uecker@tugraz.at>
450 * c-typeck.cc (struct comptypes_data): Add anon_field flag.
451 (comptypes, comptypes_check_unum_int,
452 comptypes_check_different_types): Remove old cache.
453 (tagged_tu_types_compatible_p): Rewrite.
455 2023-11-09 Florian Weimer <fweimer@redhat.com>
457 * c-typeck.cc (c_finish_return): Use pedwarn with
458 OPT_Wreturn_mismatch for missing/extra return expressions.
460 2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
462 * c-decl.cc (c_decl_attributes): Add attribute for indirect
464 * c-lang.h (c_omp_declare_target_attr): Add indirect field.
465 * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
466 (c_parser_omp_clause_indirect): New.
467 (c_parser_omp_all_clauses): Handle indirect clause.
468 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
469 (c_parser_omp_declare_target): Handle indirect clause. Emit error
470 message if device_type or indirect clauses used alone. Emit error
471 if indirect clause used with device_type that is not 'any'.
472 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
473 (c_parser_omp_begin): Handle indirect clause.
474 * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
476 2023-11-07 Joseph Myers <joseph@codesourcery.com>
478 * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
479 instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics
481 * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
482 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
483 instead of C2X in comments.
484 * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
485 warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
486 instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23
487 instead of C2X in diagnostics and comments.
488 * c-tree.h: Refer to C23 instead of C2X in comments.
489 (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
490 * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
491 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
492 instead of C2X in diagnostics and comments.
494 2023-11-06 Joseph Myers <joseph@codesourcery.com>
497 * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
499 * c-typeck.cc (build_conditional_expr, convert_for_assignment):
500 Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
502 2023-11-04 Jakub Jelinek <jakub@redhat.com>
504 * c-parser.h (c_maybe_parse_omp_decl): Declare.
505 * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
506 (c_parser_std_attribute): Uncoment omp::decl handling.
507 (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
508 don't expect any arguments, instead create clause or TREE_LIST for
510 (c_maybe_parse_omp_decl): New function.
511 (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
512 first token isn't name or comma invoke c_parser_omp_var_list_parens.
513 * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
514 use *node rather than non-existing *decl.
516 2023-11-04 Jakub Jelinek <jakub@redhat.com>
518 * c-tree.def: New file.
519 * c-tree.h (struct c_tree_token_vec): Forward declare.
520 (c_tree_size): Declare.
521 * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
522 (struct c_omp_begin_assumes_data): New type.
523 (current_omp_begin_assumes): Change type from int to
524 vec<c_omp_begin_assumes_data, va_gc> *.
525 * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
526 * c-parser.h (struct c_tree_token_vec_struct): New type.
527 (C_TOKEN_VEC_TOKENS): New macro.
528 * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
529 in_omp_attribute_pragma members.
530 (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
531 parser->in_omp_attribute_pragma.
532 (c_parser_skip_to_pragma_eol): Likewise.
533 (c_parser_translation_unit): Adjust for current_omp_begin_assumes
534 being a vector rather than counter.
535 (c_parser_declaration_or_fndef): Handle omp::directive and
536 omp::sequence attributes on attribute declaration and declare simd
537 or declare variant directives in those on function declarations.
538 (c_parser_check_balanced_raw_token_sequence): Forward declare.
539 (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
541 (c_parser_std_attribute): Handle omp::directive and omp::sequence
543 (struct c_omp_attribute_data): New type.
544 (c_parser_handle_statement_omp_attributes,
545 c_parser_handle_directive_omp_attributes): New functions.
546 (c_parser_compound_statement_nostart): Handle omp::directive and
547 omp::sequence attributes on statements. Formatting fix.
548 (c_parser_all_labels): Handle omp::directive and omp::sequence
549 attributes on statements.
550 (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
551 (c_parser_omp_variable_list): Handle parser->tokens
552 != &parser->tokens_buf[0] by saving/restoring it.
553 (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
554 (c_parser_omp_section_scan): New function.
555 (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
557 (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
558 (c_parser_omp_task): Likewise.
559 (c_parser_omp_declare_simd): Handle function declaration after
561 (c_finish_omp_declare_simd): Don't assert all kinds are the same.
562 (c_parser_omp_declare_target): Also push attr_syntax flag.
563 (c_parser_omp_begin): Likewise. Adjust for current_omp_begin_assumes
565 (c_parser_omp_end): Adjust for current_omp_begin_assumes type
566 change. Diagnose mixing of attribute vs. pragma syntax on end assumes
567 or end declare target.
568 (c_parser_omp_declare_reduction): Handle parser->tokens
569 != &parser->tokens_buf[0] by saving/restoring it.
570 * c-decl.cc: Include c-parser.h.
571 (current_omp_begin_assumes): Change type from int to
572 vec<c_omp_begin_assumes_data, va_gc> *.
573 (struct c_tree_token_vec): New type. Add static assertions
574 for sizeof and offsetof.
575 (union lang_tree_node): Add c_token_vec member and adjust GTY
577 (c_tree_size): New function.
578 (c_decl_attributes): Diagnose invalid omp::directive attribute
580 * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
582 2023-11-02 Martin Uecker <uecker@tugraz.at>
585 * c-typeck.cc (convert_for_assignment): Add missing check.
587 2023-11-01 Martin Uecker <uecker@tugraz.at>
590 * c-typeck.cc (convert_for_assignment): Add warning.
592 2023-10-26 liuhongt <hongtao.liu@intel.com>
594 * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
597 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
599 * c-parser.cc (c_parser_omp_clause_name): Return
600 'PRAGMA_OACC_CLAUSE_SELF' for "self".
601 (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
602 (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
603 parameter, and instead locally determine whether we're called for
604 an OpenACC compute construct or OpenACC 'update' directive.
605 (c_parser_oacc_compute): Adjust.
607 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
609 * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
610 (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
611 parameter, add parsing of self clause when compute_p is true.
612 (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
613 (OACC_PARALLEL_CLAUSE_MASK): Likewise,
614 (OACC_SERIAL_CLAUSE_MASK): Likewise.
615 (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
616 set compute_p argument to true.
617 * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
619 2023-10-20 Florian Weimer <fweimer@redhat.com>
623 * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
624 for pointer/integer mismatch warnings.
626 2023-10-20 Florian Weimer <fweimer@redhat.com>
630 * c-typeck.cc (build_conditional_expr): Use
631 OPT_Wincompatible_pointer_types for pointer mismatches.
632 Emit location information for the operand.
634 2023-10-19 Andrew Pinski <pinskia@gmail.com>
637 * c-typeck.cc (convert_argument): After erroring out
638 about an incomplete type return error_mark_node.
640 2023-10-19 Andrew Pinski <pinskia@gmail.com>
643 * c-typeck.cc (convert_for_assignment): Check for null pointer
644 before warning about an incompatible scalar storage order.
646 2023-10-18 Andrew Pinski <pinskia@gmail.com>
649 * c-decl.cc (diagnose_arglist_conflict): Test for
650 error mark before calling of c_type_promotes_to.
652 2023-10-18 Andrew Pinski <pinskia@gmail.com>
655 * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
658 2023-10-17 Martin Uecker <uecker@tugraz.at>
661 * c-decl.cc (grokdeclarator): Add error.
663 2023-10-03 David Malcolm <dmalcolm@redhat.com>
665 * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
668 2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
670 * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
672 2023-09-20 Jakub Jelinek <jakub@redhat.com>
674 * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
675 __builtin_classify_type call with typename as argument.
677 2023-09-19 Richard Biener <rguenther@suse.de>
680 * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
682 2023-09-19 Richard Biener <rguenther@suse.de>
685 * gimple-parser.cc (c_parser_gimple_binary_expression): Add
686 return type argument.
687 (c_parser_gimple_statement): Adjust.
688 (c_parser_gimple_paren_condition): Likewise.
689 (c_parser_gimple_binary_expression): Use passed in return type,
690 add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
691 __UNORDERED and __ORDERED.
693 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
695 * c-parser.cc (struct c_omp_loc_tree): New.
696 (c_check_omp_allocate_allocator_r): New; checking moved from ...
697 (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
698 ICE with tree_to_shwi for invalid too-large value.
700 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
702 * c-parser.cc (c_parser_omp_construct): Move call to
703 c_parser_omp_allocate to ...
704 (c_parser_pragma): ... here.
705 (c_parser_omp_allocate): Avoid ICE is allocator could not be
706 parsed; set 'omp allocate' attribute for stack/automatic variables
707 and only reject static variables; add several additional
709 * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
710 * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
711 (c_mark_decl_jump_unsafe_in_current_scope): New.
712 (warn_about_goto, c_check_switch_jump_warnings): Add error for
715 2023-09-12 Martin Uecker <uecker@tugraz.at>
717 * c-typeck.cc (struct comptypes_data): Add structure.
718 (tagged_types_tu_compatible_p,
719 function_types_compatible_p, type_lists_compatible_p,
720 comptypes_internal): Add structure to interface, change
721 return type to bool, and adapt calls.
722 (comptarget_types): Change return type too bool.
723 (comptypes, comptypes_check_enum_int,
724 comptypes_check_different_types): Adapt calls.
726 2023-09-06 Jakub Jelinek <jakub@redhat.com>
729 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
730 * c-typeck.cc (c_common_type): Emit sorry for common type between
731 _Complex integer and larger _BitInt and return the _Complex integer.
733 2023-09-06 Jakub Jelinek <jakub@redhat.com>
736 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
737 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
739 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
741 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
742 for added union in *specs. Handle RID_BITINT.
743 (finish_declspecs): Handle cts_bitint. Adjust for added union
745 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
746 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
748 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
749 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
750 Add cts_bitint enumerator.
751 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
752 and add bitint_prec there as well.
753 * c-typeck.cc (c_common_type, comptypes_internal):
755 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
757 (build_array_ref, build_unary_op, build_conditional_expr,
758 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
760 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
762 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
764 2023-09-06 Jakub Jelinek <jakub@redhat.com>
766 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
767 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
770 2023-09-05 Tobias Burnus <tobias@codesourcery.com>
772 * c-parser.cc (c_parser_omp_clause_allocate): Handle
775 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
777 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
778 (struct omp_for_parse_data): New.
779 (check_omp_intervening_code): New.
780 (add_structured_block_stmt): New.
781 (c_parser_compound_statement_nostart): Recognize intervening code,
782 nested loops, and other things that need special handling in
783 OpenMP loop constructs.
784 (c_parser_while_statement): Error on loop in intervening code.
785 (c_parser_do_statement): Likewise.
786 (c_parser_for_statement): Likewise.
787 (c_parser_postfix_expression_after_primary): Error on calls to
788 the OpenMP runtime in intervening code.
789 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
790 (c_parser_omp_loop_nest): New.
791 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
792 c_parser_omp_loop_nest to do the heavy lifting.
794 2023-08-24 Richard Sandiford <richard.sandiford@arm.com>
796 * c-parser.cc (c_parser_std_attribute): Conditionally allow
797 two colons to be used in place of ::.
798 (c_parser_std_attribute_list): New function, split out from...
799 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
800 to start with __extension__. When it does, also allow two colons
801 to be used in place of ::.
803 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
805 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
808 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
811 * c-typeck.cc (build_binary_op): Warning on comparing distinct
812 pointer types only when -Wcompare-distinct-pointer-types.
814 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
815 Thomas Schwinge <thomas@codesourcery.com>
817 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
819 2023-08-11 Jakub Jelinek <jakub@redhat.com>
821 * c-parser.cc (c_parser_typeof_specifier): Handle
822 __typeof_unqual and __typeof_unqual__ as !is_std.
824 2023-08-11 Martin Uecker <uecker@tugraz.at>
827 * c-typeck.cc (build_c_cast): Add warning.
829 2023-08-05 Martin Uecker <uecker@tugraz.at>
831 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
832 warnings branches that are known not be taken during parsing.
834 2023-08-04 Tamar Christina <tamar.christina@arm.com>
836 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
837 c_parser_for_statement, c_parser_statement_after_labels,
838 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
841 2023-08-02 Eric Feng <ef2648@columbia.edu>
844 * c-parser.cc: New functions on stashing values for the
847 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
849 * c-parser.cc (pragma_lex_discard_to_eol): New function.
850 (c_init_preprocess): New function.
852 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
855 * c-decl.cc (start_decl): Handle
856 -Wmissing-variable-declarations.
858 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
860 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
861 host_data construct to have an use_device clause.
863 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
866 * c-decl.cc (finish_struct): Issue warnings for new option.
868 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
870 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
873 2023-06-29 Richard Biener <rguenther@suse.de>
876 * c-typeck.cc (convert_argument): Sink formal_prec compute
877 to where TYPE_PRECISION is valid to use.
879 2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
881 * Make-lang.in: Pass correct stage cc1 when processing
882 profile data collected while building target libraries
884 2023-06-16 David Malcolm <dmalcolm@redhat.com>
887 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
890 2023-06-12 Tobias Burnus <tobias@codesourcery.com>
892 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
893 clearness especially with 'omp target (enter/exit) data.'
895 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
896 Tobias Burnus <tobias@codesourcery.com>
898 * c-parser.cc (c_parser_omp_clause_defaultmap,
899 c_parser_omp_clause_map): Parse 'present'.
900 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
901 (c_parser_omp_clause_from_to): New; parse to/from clauses with
902 optional present modifer.
903 (c_parser_omp_all_clauses): Update call.
904 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
905 c_parser_omp_target_exit_data): Handle new map enum values
906 for 'present' mapping.
908 2023-05-30 Tobias Burnus <tobias@codesourcery.com>
911 * c-parser.cc (c_parser_oacc_all_clauses,
912 c_parser_omp_all_clauses): Improve error wording.
914 2023-05-23 Martin Uecker <uecker@tugraz.at>
917 * c-decl.cc (add_decl_expr): New function.
918 (grokdeclarator): Add decl expr for size expression in
919 types pointed to by parameters declared as arrays.
921 2023-05-23 Martin Uecker <uecker@tugraz.at>
927 * c-decl.cc (start_decl): Make sure size expression are
928 evaluated only in correct context.
929 (grokdeclarator): Size expression in fields may need a bind
930 expression, make sure DECL_EXPR is always created.
931 (grokfield, declspecs_add_type): Pass along size expressions.
932 (finish_struct): Remove unneeded DECL_EXPR.
933 (start_function): Evaluate size expressions for nested functions.
934 * c-parser.cc (c_parser_struct_declarations,
935 c_parser_struct_or_union_specifier): Pass along size expressions.
936 (c_parser_declaration_or_fndef): Evaluate size expression.
937 (c_parser_objc_at_property_declaration,
938 c_parser_objc_class_instance_variables): Adapt.
939 * c-tree.h (grokfield): Adapt declaration.
941 2023-05-19 Martin Uecker <uecker@tugraz.at>
943 * c-decl.cc (set_type_context): Remove.
944 (pop_scope, diagnose_mismatched_decls, pushdecl):
946 * c-typeck.cc (comptypes_internal): Remove dead code.
947 (same_translation_unit_p): Remove.
948 (tagged_types_tu_compatible_p): Some fixes.
950 2023-05-19 Joseph Myers <joseph@codesourcery.com>
952 * c-decl.cc (diagnose_mismatched_decls): Do not handle
953 thread-local declarations as tentative definitions for C2x.
954 (finish_decl): Do not allow thread-local definition with
955 incomplete type for C2x.
957 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
959 * c-convert.cc (c_convert): Ditto.
960 * c-decl.cc (merge_decls): Ditto.
961 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
962 (c_parser_omp_declare_reduction): Ditto.
963 * c-typeck.cc (build_component_ref): Ditto.
964 (convert_argument): Ditto.
965 (pointer_diff): Ditto.
966 (build_unary_op): Ditto.
967 (build_c_cast): Ditto.
968 (build_modify_expr): Ditto.
969 (store_init_value): Ditto.
970 (constexpr_init_fits_real_type): Ditto.
971 (check_constexpr_init): Ditto.
972 (c_finish_return): Ditto.
973 (handle_omp_array_sections_1): Ditto.
974 (c_finish_omp_clauses): Ditto.
975 * gimple-parser.cc (c_finish_gimple_return): Ditto.
977 2023-05-16 Joseph Myers <joseph@codesourcery.com>
979 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
982 2023-05-15 Joseph Myers <joseph@codesourcery.com>
984 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
987 2023-04-30 Andrew Pinski <apinski@marvell.com>
989 * c-typeck.cc (process_init_element): Print out array type
990 for excessive elements.
992 2023-04-30 Andrew Pinski <apinski@marvell.com>
995 * c-typeck.cc (process_init_element): Move the check
996 for string cst until after the error message.
998 2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
1000 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
1002 2023-04-27 Jakub Jelinek <jakub@redhat.com>
1005 * c-parser.cc (c_parser_initializer): Move diagnostics about
1006 initialization of variable sized object with non-empty initializer
1007 after c_parser_expr_no_commas call and ret.set_error (); after it.
1009 2023-04-27 Jakub Jelinek <jakub@redhat.com>
1013 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
1014 reject empty initializer as invalid.
1016 2023-04-26 Richard Biener <rguenther@suse.de>
1018 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
1021 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
1023 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
1024 zero exec statements before/after 'omp scan'.
1026 2023-04-20 Jakub Jelinek <jakub@redhat.com>
1029 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
1030 warning on acc_on_device declaration.
1032 2023-03-28 David Malcolm <dmalcolm@redhat.com>
1035 * c-typeck.cc (parser_build_binary_op): Update for new param of
1036 check_for_xor_used_as_pow.
1038 2023-03-10 Jakub Jelinek <jakub@redhat.com>
1041 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
1042 after diagnosing it.
1044 2023-02-28 Jakub Jelinek <jakub@redhat.com>
1047 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
1048 and rename to c_strict_flex_array_level_of.
1049 (is_flexible_array_member_p): Adjust caller.
1051 2023-02-18 Martin Uecker <uecker@tugraz.at>
1054 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
1055 (diagnose_mismatched_decl): Dito.
1056 (warn_about_goto): Dito:
1057 (c_check_switch_jump_warnings): Dito.
1058 (finish_decl): Dito.
1059 (finish_struct): Dito.
1060 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
1061 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
1062 * c-objc-common.cc (c_var_mod_p): New function.
1063 (c_var_unspec_p): Remove.
1064 * c-objc-common.h: Set lang hook.
1065 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
1066 (c_parser_typeof_specifier): Dito.
1067 (c_parser_has_attribute_expression): Dito.
1068 (c_parser_generic_selection): Dito.
1069 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
1070 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
1072 2023-02-16 Patrick Palka <ppalka@redhat.com>
1074 * c-parser.h: Mechanically drop static from static inline
1075 functions via s/^static inline/inline/g.
1077 2023-02-10 Joseph Myers <joseph@codesourcery.com>
1079 * c-convert.cc (c_convert): Allow conversion of a null pointer
1080 constant to nullptr_t.
1081 * c-typeck.cc (null_pointer_constant_p): Remove static.
1082 (convert_for_assignment): Allow conversion of a null pointer
1083 constant to nullptr_t.
1084 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
1085 * c-tree.h (null_pointer_constant_p): Declare.
1087 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
1089 * c-parser.cc (c_parser_omp_allocate): Parse align
1090 clause and check for restrictions.
1092 2023-02-08 Joseph Myers <joseph@codesourcery.com>
1094 * c-typeck.cc (check_constexpr_init): Remove argument
1095 null_pointer_constant. Only check pointer initializers for being
1097 (digest_init): Update calls to check_constexpr_init.
1099 2023-02-02 Joseph Myers <joseph@codesourcery.com>
1101 * c-typeck.cc (build_binary_op): Allow comparisons between
1102 pointers and nullptr_t values that are not null pointer constants.
1104 2023-02-02 Joseph Myers <joseph@codesourcery.com>
1106 * c-typeck.cc: Include "realmpfr.h".
1107 (constexpr_init_fits_real_type): Do not allow signaling NaN
1108 conversions to different types with the same mode. Handle
1109 conversions from binary to decimal types.
1110 (check_constexpr_init): Do not disallow real initializers for
1111 complex types. Do not disallow binary initializers for decimal
1114 2023-01-31 Marek Polacek <polacek@redhat.com>
1118 * c-objc-common.cc (instantiation_dependent_expression_p): New.
1120 2023-01-27 Joseph Myers <joseph@codesourcery.com>
1122 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
1123 around auto initializer.
1125 2023-01-16 Jakub Jelinek <jakub@redhat.com>
1128 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
1129 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
1132 2023-01-14 Jakub Jelinek <jakub@redhat.com>
1135 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
1138 2023-01-13 Qing Zhao <qing.zhao@oracle.com>
1140 * c-decl.cc (strict_flex_array_level_of): ... here.
1142 2023-01-11 Jakub Jelinek <jakub@redhat.com>
1145 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
1146 markers for K&R function parameter declarations of nested functions.
1148 2023-01-09 Joseph Myers <joseph@codesourcery.com>
1150 * c-decl.cc (build_compound_literal): Call record_inline_static.
1152 2023-01-06 Joseph Myers <joseph@codesourcery.com>
1154 * c-parser.cc (c_parser_postfix_expression): Handle integer
1155 generic arguments to functions passed to __builtin_tgmath as
1156 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
1157 Do not handle integer arguments to some narrowing functions as
1160 2022-12-19 Jakub Jelinek <jakub@redhat.com>
1163 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
1164 compound literals with function type.
1166 2022-12-07 Joseph Myers <joseph@codesourcery.com>
1168 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
1169 auto, constexpr and a type used together.
1171 2022-12-06 Qing Zhao <qing.zhao@oracle.com>
1173 * c-decl.cc (is_flexible_array_member_p): Call new function
1174 strict_flex_array_level_of.
1176 2022-11-24 Florian Weimer <fweimer@redhat.com>
1179 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
1182 2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1184 * c-decl.cc (start_function): Set the result decl source
1185 location to the location of the typespec.
1187 2022-11-17 David Malcolm <dmalcolm@redhat.com>
1190 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
1191 to cpp_create_reader, rather than ident_hash, so that the new
1192 reader gets its own hash table.
1194 2022-11-15 David Malcolm <dmalcolm@redhat.com>
1197 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
1198 (class ana::c_translation_unit): New.
1199 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
1201 2022-11-12 Joseph Myers <joseph@codesourcery.com>
1203 * c-decl.cc (start_underspecified_init)
1204 (finish_underspecified_init): Handle name == NULL_TREE for
1206 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
1207 (shadow_tag_warned): Check for constexpr.
1208 (start_decl): Add parameter do_push.
1209 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
1210 (grokdeclarator): Handle constexpr.
1211 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
1212 (declspecs_add_scspec): Handle constexpr.
1213 * c-parser.cc (c_token_starts_compound_literal)
1214 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
1215 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
1216 (c_parser_compound_literal_scspecs)
1217 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
1218 Update calls to start_init.
1219 (c_parser_declaration_or_fndef, c_parser_initializer)
1220 (c_parser_initval): Pass true for new argument of
1221 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
1222 constexpr compound literals.
1223 (c_parser_static_assert_declaration_no_semi)
1224 (c_parser_enum_specifier, c_parser_struct_declaration)
1225 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
1226 Call convert_lvalue_to_rvalue on expressions required to be
1227 integer constant expressions.
1228 (c_parser_omp_declare_reduction): Update call to start_init.
1229 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
1230 (C_DECL_DECLARED_CONSTEXPR): New macros.
1231 (struct c_declspecs): Add constexpr_p.
1232 (start_decl, convert_lvalue_to_rvalue, start_init): Update
1234 * c-typeck.cc (require_constant_value, require_constant_elements):
1236 (require_constexpr_value, maybe_get_constexpr_init)
1237 (constexpr_init_fits_real_type, check_constexpr_init): New.
1238 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
1239 maybe_get_constexpr_init.
1240 (store_init_value): Update call to digest_init.
1241 (digest_init): Add parameters int_const_expr, arith_const_expr and
1242 require_constexpr. Check constexpr initializers.
1243 (constructor_top_level): Remove.
1244 (struct initializer_stack): Remove top_level. Add
1245 require_constexpr_value.
1246 (start_init): Remove parameter top_level. Add parameters
1247 init_require_constant and init_require_constexpr. Save
1248 require_constexpr_value on stack.
1249 (pop_init_level): Use a null pointer constant for zero initializer
1250 of pointer initialized with {}.
1251 (output_init_element): Update call to digest_init. Avoid passing
1252 null pointer constants of pointer type through digest_init a
1253 second time when initializing a constexpr object.
1255 2022-11-03 Joseph Myers <joseph@codesourcery.com>
1257 * c-decl.cc (in_underspecified_init, start_underspecified_init)
1258 (finish_underspecified_init): New.
1259 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
1260 Give errors inside initializers of underspecified declarations.
1261 (grokdeclarator): Handle (erroneous) case of C2X auto on a
1263 (declspecs_add_type): Handle c2x_auto_p case.
1264 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
1266 (finish_declspecs): Handle c2x_auto_p.
1267 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
1268 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
1269 (struct c_declspecs): Add c2x_auto_p.
1270 (start_underspecified_init, finish_underspecified_init): New
1272 * c-typeck.cc (build_external_ref): Give error for underspecified
1273 declaration referenced in its initializer.
1275 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1277 * c-decl.cc (grokdeclarator): Pass
1278 arg_info->no_named_args_stdarg_p to build_function_type.
1279 (grokparms): Check arg_info->no_named_args_stdarg_p before
1280 converting () to (void).
1281 (build_arg_info): Initialize no_named_args_stdarg_p.
1282 (get_parm_info): Set no_named_args_stdarg_p.
1283 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
1284 build_function_type.
1285 (store_parm_decls): Count (...) functions as prototyped.
1286 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
1287 parenthesis to start parameter list.
1288 (c_parser_parms_list_declarator): Always allow '...' with no
1289 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
1290 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
1291 * c-typeck.cc (composite_type): Handle
1292 TYPE_NO_NAMED_ARGS_STDARG_P.
1293 (function_types_compatible_p): Compare
1294 TYPE_NO_NAMED_ARGS_STDARG_P.
1296 2022-10-28 Jakub Jelinek <jakub@redhat.com>
1298 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
1299 comma before the first clause.
1300 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
1301 c_parser_omp_flush, c_parser_omp_scan_loop_body,
1302 c_parser_omp_ordered, c_finish_omp_declare_variant,
1303 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
1304 c_parser_omp_requires, c_parser_omp_error,
1305 c_parser_omp_assumption_clauses): Likewise.
1307 2022-10-28 Joseph Myers <joseph@codesourcery.com>
1310 * c-convert.cc (c_convert): Handle enums with underlying boolean
1312 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
1313 enums with enum type specifier, but give errors for storage class
1314 specifiers, qualifiers or alignment specifiers in non-definition
1315 declarations of such enums.
1316 (grokdeclarator): Give error for non-definition use of type
1317 specifier with an enum type specifier.
1318 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
1319 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
1320 (xref_tag): Update call to parser_xref_tag.
1321 (start_enum): Add argument fixed_underlying_type. Complete enum
1322 type with a fixed underlying type given in the definition. Give
1323 error for defining without a fixed underlying type in the
1324 definition if one was given in a prior declaration. Do not mark
1325 enums with fixed underlying type as packed for -fshort-enums.
1326 Store the enum type in the_enum.
1327 (finish_enum): Do not adjust types of values or check their range
1328 for an enum with a fixed underlying type. Set underlying type of
1330 (build_enumerator): Check enumeration constants for enum with
1331 fixed underlying type against that type and convert to that type.
1332 Increment in the underlying integer type, with handling for bool.
1333 (c_simulate_enum_decl): Update call to start_enum.
1334 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
1335 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
1336 rather than recomputing an underlying type based on size.
1337 * c-parser.cc (c_parser_declspecs)
1338 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
1339 Set has_enum_type_specifier for type specifiers.
1340 (c_parser_enum_specifier): Handle enum type specifiers.
1341 (c_parser_struct_or_union_specifier): Update call to
1343 (c_parser_omp_atomic): Check for boolean increment or decrement
1344 using C_BOOLEAN_TYPE_P.
1345 * c-tree.h (C_BOOLEAN_TYPE_P): New.
1346 (struct c_typespec): Add has_enum_type_specifier.
1347 (struct c_declspecs): Add enum_type_specifier_ref_p.
1348 (struct c_enum_contents): Add enum_type.
1349 (start_enum, parser_xref_tag): Update prototypes.
1350 * c-typeck.cc (composite_type): Allow for enumerated types
1351 compatible with bool.
1352 (common_type, comptypes_internal, perform_integral_promotions):
1353 Use ENUM_UNDERLYING_TYPE.
1354 (parser_build_binary_op, build_unary_op, convert_for_assignment)
1355 (c_finish_return, c_start_switch, build_binary_op): Check for
1356 boolean types using C_BOOLEAN_TYPE_P.
1358 2022-10-24 Jakub Jelinek <jakub@redhat.com>
1361 * c-typeck.cc (build_binary_op): Pass operands before excess precision
1362 promotions to scalar_to_vector call.
1364 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
1366 * c-decl.cc (finish_function): Ignore hosted when deciding
1367 whether to implicitly return zero, but check noreturn.
1368 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
1369 requirements to just MAIN_NAME_P when hosted, or `int main'
1372 2022-10-20 Richard Biener <rguenther@suse.de>
1376 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
1377 the parsed IL and zap the body on error.
1379 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1382 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
1383 with previous declaration visible.
1385 2022-10-18 Joseph Myers <joseph@codesourcery.com>
1388 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
1389 convert all to the type of the enumeration. pedwarn if no integer
1390 type fits all enumerators and default to
1391 widest_integer_literal_type_node in that case. Otherwise pedwarn
1392 for type wider than intmax_t.
1393 (build_enumerator): pedwarn for enumerators outside the range of
1394 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
1395 enumerators outside the range of int. On overflow, attempt to
1396 find a wider type that can hold the value of the next enumerator.
1397 Do not convert value to type determined with
1398 c_common_type_for_size.
1400 2022-10-14 Jakub Jelinek <jakub@redhat.com>
1402 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
1405 2022-10-14 Joseph Myers <joseph@codesourcery.com>
1407 * c-decl.cc (build_compound_literal): Add parameter scspecs.
1408 Handle storage class specifiers.
1409 * c-parser.cc (c_token_starts_compound_literal)
1410 (c_parser_compound_literal_scspecs): New.
1411 (c_parser_postfix_expression_after_paren_type): Add parameter
1412 scspecs. Call pedwarn_c11 for use of storage class specifiers.
1413 Update call to build_compound_literal.
1414 (c_parser_cast_expression, c_parser_sizeof_expression)
1415 (c_parser_alignof_expression): Handle storage class specifiers for
1416 compound literals. Update calls to
1417 c_parser_postfix_expression_after_paren_type.
1418 (c_parser_postfix_expression): Update syntax comment.
1419 * c-tree.h (build_compound_literal): Update prototype.
1420 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
1421 register compound literal.
1423 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
1425 * c-decl.cc (flexible_array_member_type_p): New function.
1426 (one_element_array_type_p): Likewise.
1427 (zero_length_array_type_p): Likewise.
1428 (add_flexible_array_elts_to_size): Call new utility
1429 routine flexible_array_member_type_p.
1430 (is_flexible_array_member_p): New function.
1431 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
1433 2022-10-06 Joseph Myers <joseph@codesourcery.com>
1435 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
1437 (c_keyword_starts_typename, c_token_starts_declspecs)
1438 (c_parser_declspecs, c_parser_objc_selector): Handle
1440 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
1441 Distinguish typeof for C2x from __typeof__ for all standard
1442 versions and typeof before C2x.
1443 * c-typeck.cc (build_function_call_vec): Use unqualified version
1444 of non-void return type.
1445 (build_unary_op): Use unqualified type for increment and
1448 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1450 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
1451 call for holds clause on assume construct.
1453 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1456 * c-parser.cc (handle_assume_attribute): New function.
1457 (c_parser_declaration_or_fndef): Handle assume attribute.
1458 (c_parser_attribute_arguments): Add assume_attr argument,
1459 if true, parse first argument as conditional expression.
1460 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
1461 c_parser_attribute_arguments callers.
1462 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
1465 2022-10-04 Jakub Jelinek <jakub@redhat.com>
1467 * c-lang.h (struct c_omp_declare_target_attr): New type.
1468 (current_omp_declare_target_attribute): Change type from
1469 int to vec<c_omp_declare_target_attr, va_gc> *.
1470 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
1471 If last pushed directive was begin declare target, use different
1472 wording and simplify format strings for easier translations.
1473 (c_parser_omp_clause_device_type): Uncomment
1474 check_no_duplicate_clause call.
1475 (c_parser_omp_declare_target): Adjust for the
1476 current_omp_declare_target_attribute type change, push { -1 }.
1477 Use error_at rather than warning_at for declare target with
1478 only device_type clauses.
1479 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
1480 (c_parser_omp_begin): Add begin declare target support.
1481 (c_parser_omp_end): Adjust for the
1482 current_omp_declare_target_attribute type change, adjust
1483 diagnostics wording and simplify format strings for easier
1485 * c-decl.cc (current_omp_declare_target_attribute): Change type from
1486 int to vec<c_omp_declare_target_attr, va_gc> *.
1487 (c_decl_attributes): Adjust for the
1488 current_omp_declare_target_attribute type change. If device_type
1489 was present on begin declare target, add "omp declare target host"
1490 and/or "omp declare target nohost" attributes.
1492 2022-09-29 Joseph Myers <joseph@codesourcery.com>
1494 * c-decl.cc (handle_std_noreturn_attribute): New function.
1495 (std_attribute_table): Add _Noreturn and noreturn.
1497 2022-09-27 Jakub Jelinek <jakub@redhat.com>
1499 * c-lang.h (current_omp_begin_assumes): Declare.
1500 * c-parser.cc: Include bitmap.h.
1501 (c_parser_omp_end_declare_target): Rename to ...
1502 (c_parser_omp_end): ... this. Handle also end assumes.
1503 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
1504 c_parser_omp_assumes, c_parser_omp_assume): New functions.
1505 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
1506 without corresponding #pragma omp end assumes.
1507 (c_parser_pragma): Use %s in may only be used at file scope
1508 diagnostics to decrease number of translatable messages. Handle
1509 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
1510 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
1511 for it rather than c_parser_omp_end_declare_target.
1512 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
1513 * c-decl.cc (current_omp_begin_assumes): Define.
1515 2022-09-24 Jakub Jelinek <jakub@redhat.com>
1518 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
1519 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
1520 t2 have different types.
1522 2022-09-22 David Malcolm <dmalcolm@redhat.com>
1525 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
1526 (c_parser_cast_expression): Likewise.
1527 (c_parser_alignof_expression): Likewise.
1528 (c_parser_postfix_expression_after_paren_type): Likewise.
1529 (c_parser_postfix_expression_after_primary): Likewise.
1530 (c_parser_expression): Likewise.
1531 (c_parser_omp_variable_list): Likewise.
1532 (c_parser_transaction_expression): Likewise.
1533 * c-tree.h (c_expr::set_error): Likewise.
1534 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
1535 (parser_build_unary_op): Likewise.
1536 (parser_build_binary_op): Likewise.
1537 (digest_init): Likewise.
1538 (pop_init_level): Likewise.
1539 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
1541 2022-09-19 Marek Polacek <polacek@redhat.com>
1544 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
1547 2022-09-15 Richard Biener <rguenther@suse.de>
1549 * c-decl.cc (build_void_list_node): Remove.
1551 2022-09-14 Julian Brown <julian@codesourcery.com>
1553 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
1556 2022-09-07 Joseph Myers <joseph@codesourcery.com>
1558 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
1559 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
1560 for C2x spellings of keywords.
1561 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
1563 2022-09-06 Jakub Jelinek <jakub@redhat.com>
1565 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
1566 in omp_cur_iteration - 1 has integer_type_node type.
1568 2022-09-03 Jakub Jelinek <jakub@redhat.com>
1570 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
1571 (c_parser_omp_clause_depend_sink): Renamed to ...
1572 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
1573 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
1574 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
1575 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
1576 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
1577 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
1578 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
1579 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
1580 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
1581 (c_parser_omp_clause_doacross): New function.
1582 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
1583 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
1584 OMP_CLAUSE_DEPEND_SOURCE.
1585 (c_parser_omp_for_loop): Don't diagnose here linear clause together
1586 with ordered with argument.
1587 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
1589 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1590 (c_parser_omp_ordered): Handle also doacross and adjust for it
1592 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
1593 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
1595 2022-09-02 David Malcolm <dmalcolm@redhat.com>
1598 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
1599 (c_parser_expr_no_commas): Likewise.
1600 (c_parser_conditional_expression): Likewise.
1601 (c_parser_binary_expression): Clear m_decimal when popping the
1603 (c_parser_unary_expression): Clear ret.m_decimal.
1604 (c_parser_has_attribute_expression): Likewise for result.
1605 (c_parser_predefined_identifier): Likewise for expr.
1606 (c_parser_postfix_expression): Likewise for expr.
1607 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
1609 * c-tree.h (c_expr::m_decimal): New bitfield.
1610 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
1611 (parser_build_binary_op): Call check_for_xor_used_as_pow.
1613 2022-09-01 Joseph Myers <joseph@codesourcery.com>
1615 * c-decl.cc (grokparms): Handle () in a function declaration the
1616 same as (void) for C2X.
1618 2022-08-31 Joseph Myers <joseph@codesourcery.com>
1620 * c-parser.cc (c_parser_label): Pass attributes to do_case.
1621 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
1624 2022-08-26 Jakub Jelinek <jakub@redhat.com>
1626 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
1628 2022-08-25 Marek Polacek <polacek@redhat.com>
1630 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
1631 Give a better diagnostic when converting to nullptr_t.
1632 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
1634 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
1635 (c_parser_postfix_expression): Handle RID_NULLPTR.
1636 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
1638 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
1639 (build_conditional_expr): Handle the case when the second/third operand
1640 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
1641 (convert_for_assignment): Handle converting an expression of type
1642 nullptr_t to pointer/bool.
1643 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
1644 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
1646 2022-08-25 Joseph Myers <joseph@codesourcery.com>
1648 * c-decl.cc (start_decl): Do not diagnose initialization of
1649 variable-sized objects here.
1650 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
1652 (c_parser_initializer): Diagnose initialization of variable-sized
1653 objects other than with braced initializer.
1654 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
1655 braces and update diagnostic text. Diagnose initialization of
1656 variable-sized objects with nonempty braces.
1657 * c-typeck.cc (digest_init): Update diagnostic for initialization
1658 of variable-sized objects.
1659 (really_start_incremental_init, set_designator)
1660 (process_init_element): Update comments.
1661 (pop_init_level): Allow scalar empty initializers.
1663 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
1664 Chung-Lin Tang <cltang@codesourcery.com>
1667 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1668 instead of removed langhook.
1669 * c-typeck.cc (c_finish_omp_clauses): Likewise.
1671 2022-08-11 Marek Polacek <polacek@redhat.com>
1673 PR middle-end/102633
1674 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
1675 Call suppress_warning.
1676 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1677 (c_parser_omp_declare_reduction): Pass omp_priv down to
1678 c_parser_initializer.
1680 2022-08-08 Tom Honermann <tom@honermann.net>
1682 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1683 of CPP_UTF8STRING when char8_t support is enabled.
1684 * c-typeck.cc (digest_init): Allow initialization of an array
1685 of character type by a string literal with type array of
1688 2022-08-01 David Malcolm <dmalcolm@redhat.com>
1690 * c-typeck.cc (build_c_cast): Quote names of address spaces in
1692 (convert_for_assignment): Add a note to address space mismatch
1693 diagnostics, specifying the expected and actual types.
1695 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
1697 PR preprocessor/97498
1698 * c-parser.cc (c_parser_pragma): Set input_location to the
1699 location of the pragma, rather than the start of the line.
1701 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
1702 Chung-Lin Tang <cltang@codesourcery.com>
1703 Thomas Schwinge <thomas@codesourcery.com>
1705 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1706 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1707 OMP_REQUIRES_TARGET_USED.
1708 (c_parser_omp_requires): Remove sorry.
1710 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
1712 * c-parser.cc (c_parser_omp_target_enter_data,
1713 c_parser_omp_target_exit_data): Accept tofrom
1714 map-type modifier but use 'to' / 'from' internally.
1716 2022-06-16 David Malcolm <dmalcolm@redhat.com>
1718 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1719 group the warning with any note.
1720 (warn_about_goto): Likewise to group error or warning with note.
1721 Bail out if the warning wasn't emitted, to avoid emitting orphan
1723 (lookup_label_for_goto): Add auto_diagnostic_group to
1724 group the error with the note.
1725 (check_earlier_gotos): Likewise.
1726 (c_check_switch_jump_warnings): Likewise for any error/warning.
1727 Conditionalize emission of the notes.
1728 (diagnose_uninitialized_cst_member): Likewise for warning,
1729 conditionalizing emission of the note.
1730 (grokdeclarator): Add auto_diagnostic_group to group the "array
1731 type has incomplete element type" error with any note.
1732 (parser_xref_tag): Add auto_diagnostic_group to group warnings
1733 with their notes. Conditionalize emission of notes.
1734 (start_struct): Add auto_diagnostic_group to group the
1735 "redefinition of" errors with any note.
1736 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1737 (check_for_loop_decls): Likewise for pre-C99 error.
1739 2022-06-07 Jakub Jelinek <jakub@redhat.com>
1741 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1742 style linear clause modifiers. Set
1743 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1744 old style modifiers are used.
1745 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1746 with val modifier on simd or for if the old style modifiers are
1749 2022-06-02 David Malcolm <dmalcolm@redhat.com>
1751 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1752 (c_get_sarif_source_language): New.
1753 * c-tree.h (c_get_sarif_source_language): New decl.
1755 2022-05-31 Jason Merrill <jason@redhat.com>
1757 * Make-lang.in (c.tags): Look at *.cc.
1759 2022-05-31 Jakub Jelinek <jakub@redhat.com>
1761 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1764 2022-05-28 Jakub Jelinek <jakub@redhat.com>
1766 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1767 seen first, use "%<to%>" or "%<enter%>" depending on
1768 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1769 "%<to%> or %<enter%>" wording.
1771 2022-05-27 Jakub Jelinek <jakub@redhat.com>
1773 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1774 (c_parser_omp_all_clauses): For to clause on declare target, use
1775 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1776 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
1777 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1778 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1779 OMP_CLAUSE_TO_DECLARE.
1780 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1781 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1782 name in diagnostics instead of
1783 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1785 2022-05-25 Jakub Jelinek <jakub@redhat.com>
1788 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1789 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
1790 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1791 diagnostic and fixit hint if DATUM has pointer type.
1792 * c-parser.cc (c_parser_postfix_expression,
1793 c_parser_omp_variable_list): Adjust build_component_ref callers.
1794 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1797 2022-05-24 Jakub Jelinek <jakub@redhat.com>
1800 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1802 2022-05-18 Marek Polacek <polacek@redhat.com>
1805 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1807 * c-tree.h (comptypes_check_enum_int): Declare.
1808 * c-typeck.cc (comptypes): No longer static.
1810 2022-05-17 Marek Polacek <polacek@redhat.com>
1812 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1815 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1817 * c-parser.cc (c_parser_omp_clause_depend): Parse
1818 inoutset depend-kind.
1819 (c_parser_omp_depobj): Likewise.
1821 2022-05-16 Martin Liska <mliska@suse.cz>
1823 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1825 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1827 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1829 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1830 in postfix expressions.
1831 (c_parser_omp_variable_list): Handle omp_all_memory in depend
1833 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1834 keyword in depend clause as null_pointer_node, diagnose invalid
1837 2022-05-09 Martin Liska <mliska@suse.cz>
1839 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1841 (c_parser_binary_expression): Likewise.
1843 2022-05-07 Marek Polacek <polacek@redhat.com>
1847 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1849 2022-04-08 Jakub Jelinek <jakub@redhat.com>
1852 * c-typeck.cc (c_build_va_arg): Reject function types.
1854 2022-03-22 Marek Polacek <polacek@redhat.com>
1858 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1859 (start_init): Set it.
1860 (finish_init): Restore constructor_designated.
1861 (push_init_level): Set constructor_designated to the value of
1862 constructor_designated in the upper constructor_stack.
1864 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1867 * c-typeck.cc (handle_omp_array_sections_1)
1868 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1869 instead of 'c_omp_map_clause_name'.
1871 2022-03-09 Joseph Myers <joseph@codesourcery.com>
1873 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1874 differently from earlier standards for unprototyped function type
1877 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1880 * c-fold.cc (c_fully_fold_internal): Don't emit
1881 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1882 * c-typeck.cc (build_binary_op): Likewise.
1884 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1886 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1889 2022-02-23 Richard Biener <rguenther@suse.de>
1891 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1892 SSA names without definition.
1893 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1895 2022-02-17 Jakub Jelinek <jakub@redhat.com>
1898 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1899 convert_lvalue_to_rvalue and build_indirect_ref instead of
1900 build_simple_mem_ref.
1902 2022-02-11 Richard Biener <rguenther@suse.de>
1904 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1907 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1909 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1911 (c_parser_omp_variable_list): Handle array sections.
1912 (c_parser_omp_clause_has_device_addr): Added.
1913 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1915 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1917 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1918 (c_finish_omp_clauses): Handle array sections.
1920 2022-02-09 Jakub Jelinek <jakub@redhat.com>
1923 * c-parser.cc (c_parser_postfix_expression)
1924 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1925 instead of build1_loc to build PAREN_EXPR.
1926 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1927 * c-fold.cc (c_fully_fold_internal): Likewise.
1929 2022-01-17 Martin Liska <mliska@suse.cz>
1931 * Make-lang.in: Rename .c names to .cc.
1932 * c-convert.cc: Likewise.
1933 * c-decl.cc (struct lang_identifier): Likewise.
1934 (pop_scope): Likewise.
1935 (finish_decl): Likewise.
1936 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1937 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1938 * c-parser.h (GCC_C_PARSER_H): Likewise.
1939 * c-tree.h (c_keyword_starts_typename): Likewise.
1940 (finish_declspecs): Likewise.
1941 (c_get_alias_set): Likewise.
1942 (enum c_oracle_request): Likewise.
1943 (tag_exists_p): Likewise.
1944 (set_c_expr_source_range): Likewise.
1945 * c-typeck.cc (c_common_type): Likewise.
1946 (c_finish_omp_clauses): Likewise.
1947 * config-lang.in: Likewise.
1949 2022-01-17 Martin Liska <mliska@suse.cz>
1951 * c-aux-info.c: Moved to...
1952 * c-aux-info.cc: ...here.
1953 * c-convert.c: Moved to...
1954 * c-convert.cc: ...here.
1955 * c-decl.c: Moved to...
1956 * c-decl.cc: ...here.
1957 * c-errors.c: Moved to...
1958 * c-errors.cc: ...here.
1959 * c-fold.c: Moved to...
1960 * c-fold.cc: ...here.
1961 * c-lang.c: Moved to...
1962 * c-lang.cc: ...here.
1963 * c-objc-common.c: Moved to...
1964 * c-objc-common.cc: ...here.
1965 * c-parser.c: Moved to...
1966 * c-parser.cc: ...here.
1967 * c-typeck.c: Moved to...
1968 * c-typeck.cc: ...here.
1969 * gccspec.c: Moved to...
1970 * gccspec.cc: ...here.
1971 * gimple-parser.c: Moved to...
1972 * gimple-parser.cc: ...here.
1974 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
1976 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1978 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1981 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1982 outer node for ARRAY_REFs.
1984 2022-01-01 Jakub Jelinek <jakub@redhat.com>
1987 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1988 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1990 2021-12-17 Marek Polacek <polacek@redhat.com>
1993 * c-decl.c (c_warn_unused_attributes): Don't warn for
1994 attribute_ignored_p.
1995 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1996 arguments when the attribute is ignored.
1998 2021-12-14 Jakub Jelinek <jakub@redhat.com>
2001 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
2002 consume the pragma and silently skip to the pragma eol.
2004 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
2006 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
2007 * c-parser.c: Likewise.
2009 2021-12-09 Jakub Jelinek <jakub@redhat.com>
2012 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
2013 to resort_data.new_value.
2015 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
2017 * c-parser.c (struct omp_dim): New struct type for use inside
2018 c_parser_omp_variable_list.
2019 (c_parser_omp_variable_list): Allow multiple levels of array and
2020 component accesses in array section base-pointer expression.
2021 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
2022 c_parser_omp_var_list_parens.
2023 (c_parser_omp_clause_from): Likewise.
2024 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
2025 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
2027 (c_finish_omp_clauses): Extend allowed ranged of expressions
2028 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
2030 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
2033 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
2034 call to c_parser_omp_variable_list to 'true'.
2035 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
2036 array base handling.
2037 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
2039 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
2041 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
2042 orphan loop" checking.
2044 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
2045 Thomas Schwinge <thomas@codesourcery.com>
2047 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
2048 OpenACC gang reductions.
2050 2021-11-30 Richard Biener <rguenther@suse.de>
2052 * gimple-parser.c (c_parser_gimple_postfix_expression):
2053 avoid unreachable code after break.
2055 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
2058 * Make-lang.in: Use ETAGS variable in TAGS target.
2060 2021-11-29 Richard Biener <rguenther@suse.de>
2062 * c-typeck.c (c_tree_equal): Remove unreachable return.
2063 * c-parser.c (get_matching_symbol): Likewise.
2065 2021-11-23 Jakub Jelinek <jakub@redhat.com>
2067 * c-typeck.c (c_clone_omp_udr): Don't initialize
2068 id.transform_lang_insert_block.
2070 2021-11-19 Martin Sebor <msebor@redhat.com>
2074 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
2075 code resulting from macro expansion.
2077 2021-11-19 Martin Liska <mliska@suse.cz>
2080 2021-11-19 Martin Liska <mliska@suse.cz>
2082 * c-parser.c (add_debug_begin_stmt): Use option directly.
2084 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
2086 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
2087 * c-parser.c (c_parser_postfix_expression): Likewise.
2089 2021-11-18 Martin Liska <mliska@suse.cz>
2091 * c-parser.c (add_debug_begin_stmt): Use option directly.
2093 2021-11-17 Martin Sebor <msebor@redhat.com>
2096 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
2097 bounds before deciding if they're constant.
2099 2021-11-15 Jakub Jelinek <jakub@redhat.com>
2101 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
2102 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
2104 2021-11-11 Jakub Jelinek <jakub@redhat.com>
2106 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
2107 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
2108 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
2109 OMP_CLAUSE_NUM_TEAMS_EXPR.
2110 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
2111 combined target teams even lower-bound expression.
2113 2021-11-11 Richard Biener <rguenther@suse.de>
2115 * gimple-parser.c: Shuffle bitmap.h include.
2117 2021-11-03 Joseph Myers <joseph@codesourcery.com>
2120 * c-convert.c (c_convert): New function, based on convert.
2121 (convert): Make into wrapper of c_convert.
2122 (convert_init): New function.
2123 * c-typeck.c (enum impl_conv): Add ic_init_const.
2124 (convert_for_assignment): Handle ic_init_const like ic_init. Add
2125 new argument to convert_and_check call.
2126 (digest_init): Pass ic_init_const to convert_for_assignment for
2127 initializers required to be constant.
2129 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
2131 * c-tree.h (c_simulate_record_decl): Declare.
2132 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
2133 * c-decl.c (c_simulate_record_decl): New function.
2135 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
2138 * Make-lang.in: Add dummy c.install-dvi target.
2140 2021-10-15 Richard Biener <rguenther@suse.de>
2144 (c_parser_gimple_postfix_expression_after_primary): Check
2145 for a pointer do be dereferenced by ->.
2147 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
2149 * c-parser.c (c_finish_omp_declare_variant): Change call from
2150 c_omp_check_context_selector to omp_check_context_selector. Change
2151 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
2153 2021-10-09 Jakub Jelinek <jakub@redhat.com>
2155 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
2156 (c_parser_omp_scan_loop_body): Use it.
2157 (c_parser_omp_sections_scope): Likewise.
2159 2021-10-07 Richard Biener <rguenther@suse.de>
2161 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
2163 2021-10-05 Richard Biener <rguenther@suse.de>
2166 * gimple-parser.c (c_parser_gimple_postfix_expression):
2167 Accept more address _Literals.
2169 2021-10-04 Marek Polacek <polacek@redhat.com>
2172 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
2174 2021-10-01 Martin Sebor <msebor@redhat.com>
2177 * c-typeck.c (maybe_warn_for_null_address): New function.
2178 (build_binary_op): Call it.
2180 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2181 Richard Biener <rguenther@suse.de>
2184 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2185 for division even for SANITIZE_SI_OVERFLOW.
2187 2021-10-01 Jakub Jelinek <jakub@redhat.com>
2189 * c-parser.c (c_parser_omp_clause_order): Set
2190 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
2192 2021-09-28 Andrew Pinski <apinski@marvell.com>
2195 * c-parser.c (c_parser_statement_after_labels): Pass
2196 the c_expr instead of the tree to c_finish_goto_ptr.
2197 * c-typeck.c (c_finish_goto_ptr): Change the second
2198 argument type to c_expr.
2199 * c-tree.h (c_finish_goto_ptr): Likewise.
2200 Error out if the expression was not of a pointer type.
2202 2021-09-22 Jakub Jelinek <jakub@redhat.com>
2204 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
2207 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2209 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
2210 and reproducible modifiers.
2211 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
2213 2021-09-18 Jakub Jelinek <jakub@redhat.com>
2215 * c-parser.c (c_parser_omp_clause_default): Handle private and
2216 firstprivate arguments, adjust diagnostics on unknown argument.
2218 2021-09-17 Jakub Jelinek <jakub@redhat.com>
2220 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
2223 2021-09-10 Jakub Jelinek <jakub@redhat.com>
2225 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
2226 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
2227 don't call build_conditional_expr, instead build a COND_EXPR directly.
2228 (c_parser_binary_expression): Avoid calling parser_build_binary_op
2229 if omp_atomic_lhs even in more cases for >, < or ==.
2230 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
2231 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
2232 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
2233 * c-typeck.c (build_binary_op): For flag_openmp only handle
2236 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
2238 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
2241 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
2243 * c-decl.c (enum deprecated_states): Add unavailable state.
2244 (merge_decls): Copy unavailability.
2245 (quals_from_declspecs): Handle unavailable case.
2246 (start_decl): Amend the logic handling suppression of nested
2247 deprecation states to include unavailability.
2248 (smallest_type_quals_location): Amend comment.
2249 (grokdeclarator): Handle the unavailable deprecation state.
2250 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
2251 * c-tree.h (struct c_declspecs): Add unavailable_p.
2252 * c-typeck.c (build_component_ref): Handle unavailability.
2253 (build_external_ref): Likewise.
2255 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
2256 Joseph Myers <joseph@codesourcery.com>
2259 * c-decl.c (duplicate_decls): On significant mismatches, mark the
2260 types of both (non-function) decls as error_mark_node, so that the
2261 middle-end can see the code is malformed.
2262 (free_attr_access_data): Don't process if the type has been set to
2265 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
2267 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
2268 and 'ancestor' in 'target device' clauses.
2270 2021-08-23 Jakub Jelinek <jakub@redhat.com>
2272 * c-parser.c (c_parser_omp_clause_num_tasks,
2273 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
2275 2021-08-22 Martin Uecker <muecker@gwdg.de>
2278 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
2279 for pointers to arrays with qualifiers.
2280 (build_conditional_expr): For C23 don't lose qualifiers for pointers
2281 to arrays when the other pointer is a void pointer. Update warnings.
2282 (convert_for_assignment): Update warnings for C2X when converting from
2283 void* with qualifiers to a pointer to array with the same qualifiers.
2285 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2287 * c-parser.c (c_parser_omp_error): New function.
2288 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
2290 2021-08-20 Jakub Jelinek <jakub@redhat.com>
2292 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
2293 comma at the end of list.
2294 (c_parser_omp_requires): Likewise.
2296 2021-08-19 Jakub Jelinek <jakub@redhat.com>
2298 * c-parser.c (c_parser_omp_requires): Don't call
2299 c_parser_peek_2nd_token and optionally consume token if current
2300 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
2302 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2304 * c-parser.c (c_parser_omp_nothing): New function.
2305 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
2307 2021-08-18 Jakub Jelinek <jakub@redhat.com>
2309 * c-parser.c (c_parser_statement_after_labels): Add restart label
2310 near the start of the function. If c_parser_pragma returns false,
2312 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
2313 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
2314 return what c_parser_omp_declare returned. Return true instead of
2315 false after emitting errors that the directive is not allowed in
2316 pragma_stmt context.
2317 (c_parser_omp_ordered): Return true instead of
2318 false after emitting errors that the directive is not allowed in
2319 pragma_stmt context.
2320 (c_parser_omp_target_update): Likewise.
2321 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
2322 Change return type from tree to bool, return false if the
2323 directive should be ignored in pragma_stmt contexts.
2324 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
2325 return their result directly.
2326 (c_parser_omp_cancellation_point): Change return type from void to
2327 bool, return false if the directive should be ignored in pragma_stmt
2329 (c_parser_omp_declare): Likewise.
2331 2021-08-17 Jakub Jelinek <jakub@redhat.com>
2333 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
2334 (c_parser_omp_scope): New function.
2335 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
2337 2021-08-12 Jakub Jelinek <jakub@redhat.com>
2339 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
2340 (c_parser_omp_clause_filter): New function.
2341 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
2342 (OMP_MASKED_CLAUSE_MASK): Define.
2343 (c_parser_omp_masked): New function.
2344 (c_parser_omp_parallel): Handle parallel masked.
2345 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
2346 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
2348 2021-08-12 Martin Uecker <muecker@gwdg.de>
2352 * c-typeck.c (c_expr_sizeof_type): Evaluate
2353 size expressions for structs of variable size.
2355 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
2357 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
2358 'primary' as alias for 'master'.
2360 2021-08-10 Martin Uecker <muecker@gwdg.de>
2363 * c-typeck.c (c_expr_sizeof_expr): Evaluate
2364 size expressions for structs of variable size.
2366 2021-08-06 Tamar Christina <tamar.christina@arm.com>
2368 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
2369 * c-tree.h (c_simulate_enum_decl): Likewise.
2371 2021-08-06 Martin Sebor <msebor@redhat.com>
2373 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
2374 vec arguments to by-reference.
2375 (c_finish_omp_declare_simd): Same.
2376 (c_parser_compound_statement_nostart): Same.
2377 (c_parser_for_statement): Same.
2378 (c_parser_objc_methodprotolist): Same.
2379 (c_parser_oacc_routine): Same.
2380 (c_parser_omp_for_loop): Same.
2381 (c_parser_omp_declare_simd): Same.
2383 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
2384 Joseph Myers <joseph@codesourcery.com>
2385 Cesar Philippidis <cesar@codesourcery.com>
2387 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
2388 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
2389 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
2390 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
2392 2021-07-20 Martin Sebor <msebor@redhat.com>
2394 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
2396 * c-typeck.c (c_build_function_call_vec): Same.
2398 2021-07-15 Martin Sebor <msebor@redhat.com>
2402 * c-decl.c (get_parm_array_spec): Strip nops.
2404 2021-07-06 Martin Sebor <msebor@redhat.com>
2406 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
2408 2021-07-02 Jakub Jelinek <jakub@redhat.com>
2411 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
2412 appears before a CPP_NAME.
2414 2021-06-25 Martin Sebor <msebor@redhat.com>
2416 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
2417 warning_suppressed_p, suppress_warning, and copy_no_warning.
2418 (diagnose_mismatched_decls): Same.
2419 (duplicate_decls): Same.
2420 (grokdeclarator): Same.
2421 (finish_function): Same.
2422 (c_write_global_declarations_1): Same.
2423 * c-fold.c (c_fully_fold_internal): Same.
2424 * c-parser.c (c_parser_expr_no_commas): Same.
2425 (c_parser_postfix_expression): Same.
2426 * c-typeck.c (array_to_pointer_conversion): Same.
2427 (function_to_pointer_conversion): Same.
2428 (default_function_array_conversion): Same.
2429 (convert_lvalue_to_rvalue): Same.
2430 (default_conversion): Same.
2431 (build_indirect_ref): Same.
2432 (build_function_call_vec): Same.
2433 (build_atomic_assign): Same.
2434 (build_unary_op): Same.
2435 (c_finish_return): Same.
2436 (emit_side_effect_warnings): Same.
2437 (c_finish_stmt_expr): Same.
2438 (c_omp_clause_copy_ctor): Same.
2440 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2443 * c-parser.c (c_parser_has_attribute_expression): Set source range for
2446 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2449 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
2452 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2454 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
2455 C_ORT_OMP for clauses on target construct.
2456 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
2457 (c_parser_omp_target): For non-combined target add
2458 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
2459 C_ORT_OMP_TARGET to c_finish_omp_clauses.
2460 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
2461 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
2462 never present on C_ORT_*DECLARE_SIMD.
2463 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
2464 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
2465 corresponding map clauses.
2467 2021-06-21 Jakub Jelinek <jakub@redhat.com>
2469 PR inline-asm/100785
2470 * c-typeck.c (c_mark_addressable): Diagnose trying to make
2471 bit-fields addressable.
2473 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2475 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
2478 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
2481 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
2482 var in the error case.
2484 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
2487 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
2488 spot built-in functions.
2490 2021-06-06 Jakub Jelinek <jakub@redhat.com>
2493 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
2494 even when target is combined with other constructs.
2496 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
2499 * c-decl.c (finish_struct): Fix thinko in previous change.
2500 * c-typeck.c (convert_for_assignment): Do not warn on pointer
2501 assignment and initialization for storage order purposes if the
2502 RHS is a call to a DECL_IS_MALLOC function.
2504 2021-06-04 Martin Sebor <msebor@redhat.com>
2507 * c-objc-common.c (print_type): Handle erroneous types.
2509 2021-06-03 Jakub Jelinek <jakub@redhat.com>
2512 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2513 after depend only cases.
2515 2021-05-31 Richard Biener <rguenther@suse.de>
2518 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
2519 * c-parser.c (c_parser_postfix_expression): Likewise.
2521 2021-05-28 Richard Biener <rguenther@suse.de>
2524 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
2525 invalid if conditions.
2527 2021-05-28 Jakub Jelinek <jakub@redhat.com>
2530 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
2531 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2532 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
2533 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2534 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2535 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2536 if present in map_head, map_field_head or map_firstprivate_head
2539 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
2541 * c-parser.c (c_parser_omp_clause_affinity): New.
2542 (c_parser_omp_clause_name, c_parser_omp_variable_list,
2543 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
2544 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
2545 c_finish_omp_clauses): Likewise.
2547 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
2550 * c-decl.c (finish_struct): Warn for a union containing an aggregate
2551 field with a differing scalar storage order.
2553 2021-05-21 Jakub Jelinek <jakub@redhat.com>
2556 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
2557 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
2558 if a decl is mentioned both in map clause and in such firstprivate
2559 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2561 2021-05-19 Jakub Jelinek <jakub@redhat.com>
2564 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
2565 master when combined with taskloop.
2566 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2567 parallel master when not combined with taskloop.
2569 2021-05-18 Richard Biener <rguenther@suse.de>
2572 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
2573 Diagnose calls to non-functions.
2574 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2576 2021-05-17 Richard Biener <rguenther@suse.de>
2579 * gimple-parser.c (c_parser_gimple_label): Avoid building
2580 a GIMPLE label with NULL label decl.
2582 2021-05-13 Martin Sebor <msebor@redhat.com>
2585 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2587 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
2589 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
2592 2021-05-10 Martin Liska <mliska@suse.cz>
2594 * c-aux-info.c (affix_data_type): Use startswith
2595 function instead of strncmp.
2596 * c-typeck.c (build_function_call_vec): Likewise.
2597 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2599 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
2601 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
2602 on the address of a pointer field in a record with reverse SSO.
2604 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
2606 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
2607 for || and && reductions.
2609 2021-04-29 Joseph Myers <joseph@codesourcery.com>
2611 * c-typeck.c (function_types_compatible_p): For C2X, treat
2612 unprototyped function as compatible with non-variadic prototyped
2613 function even if some argument types are changed by the default
2614 argument promotions.
2616 2021-04-15 Martin Sebor <msebor@redhat.com>
2620 * c-decl.c (pushdecl): Always propagate type attribute.
2622 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
2625 * c-typeck.c (c_common_type): Do not drop attributes that
2626 affect type identity.
2628 2021-04-10 Jakub Jelinek <jakub@redhat.com>
2631 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
2634 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2637 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
2640 2021-03-19 Jakub Jelinek <jakub@redhat.com>
2643 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
2644 with modifycode NOP_EXPR produces and mark the _Atomic var as read
2646 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
2647 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
2648 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2650 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
2653 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
2654 ensure that the varpool node is marked as offloadable.
2656 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
2659 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2661 2021-02-24 Martin Sebor <msebor@redhat.com>
2664 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2666 2021-02-18 Jakub Jelinek <jakub@redhat.com>
2669 * c-typeck.c (c_finish_return): Don't wrap retval into
2670 EXCESS_PRECISION_EXPR in functions that return void.
2672 2021-02-11 Marek Polacek <polacek@redhat.com>
2674 * c-parser.c (c_parser_if_statement): Use vec_free.
2676 2021-02-04 Martin Sebor <msebor@redhat.com>
2679 * c-decl.c (locate_old_decl): Add type to diagnostic output.
2680 (diagnose_mismatched_decls): Same.
2681 (start_function): Introduce temporaries for better readability.
2682 * c-typeck.c (comptypes_internal): Only consider complete enum
2683 types in comparisons with integers.
2685 2021-02-01 Martin Sebor <msebor@redhat.com>
2688 * c-decl.c (free_attr_access_data): New function.
2689 (c_parse_final_cleanups): Call free_attr_access_data.
2691 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2693 * c-parser.c (c_parser_omp_clause_detach): New.
2694 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2695 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2696 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2697 clause. Prevent use of detach with mergeable and overriding the
2698 data sharing mode of the event handle.
2700 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2702 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2703 unqualified element type and then call c_build_qualified_type on the
2706 2021-01-07 Richard Biener <rguenther@suse.de>
2708 * gimple-parser.c (c_parser_gimple_compound_statement): Only
2709 reallocate loop array if it is too small.
2711 2020-12-16 Martin Uecker <muecker@gwdg.de>
2714 * c-typeck.c (build_modify_expr): Drop qualifiers.
2716 2020-12-16 Martin Uecker <muecker@gwdg.de>
2719 * c-parser.c (c_parser_expression): Look into
2720 nop expression when marking expressions as read.
2722 2020-12-14 Martin Liska <mliska@suse.cz>
2725 * c-typeck.c (pointer_diff): Do not emit a top-level
2727 (build_binary_op): Likewise.
2729 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2731 * c-parser.c (c_parser_omp_allocate): New.
2732 (c_parser_omp_construct): Call it.
2734 2020-12-09 Richard Biener <rguenther@suse.de>
2737 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2740 2020-12-07 Martin Uecker <muecker@gwdg.de>
2743 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2744 that drops qualifiers to the end of the function.
2746 2020-11-26 Martin Uecker <muecker@gwdg.de>
2750 * c-parser.c (c_parser_declaration_or_fndef): Remove
2751 redundant code to drop qualifiers of _Atomic types for __auto_type.
2752 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2753 types for __typeof__.
2755 2020-11-24 Jakub Jelinek <jakub@redhat.com>
2758 * c-parser.c (c_parser_binary_expression): For omp atomic binary
2759 expressions, use make_node instead of build2 to avoid checking build2
2762 2020-11-23 Joseph Myers <joseph@codesourcery.com>
2765 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2766 for comparisons of complete and incomplete pointers.
2768 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2770 * c-aux-info.c (gen_type): Support opaque types.
2772 2020-11-20 Martin Sebor <msebor@redhat.com>
2775 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2777 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2780 * Make-lang.in (c.serial): Change from goal to a variable.
2781 (.PHONY): Drop c.serial.
2783 2020-11-20 Martin Uecker <muecker@gwdg.de>
2785 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2787 2020-11-19 Jakub Jelinek <jakub@redhat.com>
2790 * c-decl.c (get_parm_array_spec): Bail out of nelts is
2793 2020-11-18 Jakub Jelinek <jakub@redhat.com>
2795 * Make-lang.in (c.serial): New goal.
2796 (.PHONY): Add c.serial c.prev.
2797 (cc1$(exeext)): Call LINK_PROGRESS.
2799 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2801 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2803 * c-typeck.c (build_asm_expr): Remove an assert checking output
2804 absence for asm goto.
2806 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2808 * c-typeck.c (c_finish_omp_clauses): Don't clear
2809 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2811 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2814 * c-parser.c (c_parser_objc_class_definition): Pass the
2815 location of the class name to the interface declaration.
2817 2020-11-10 Strager Neds <strager.nds@gmail.com>
2819 * c-decl.c (merge_decls): Use new overload of
2820 set_decl_section_name.
2822 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2824 * c-parser.c (c_parser_omp_target_data): Add use of
2825 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2826 handled map clause kind.
2827 (c_parser_omp_target_enter_data): Likewise.
2828 (c_parser_omp_target_exit_data): Likewise.
2829 (c_parser_omp_target): Likewise.
2830 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2831 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2832 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2833 same struct field access to co-exist on OpenMP construct.
2835 2020-11-07 Martin Uecker <muecker@gwdg.de>
2837 * c-parser.c (c_parser_label): Implement mixing of labels and code.
2838 (c_parser_all_labels): Likewise.
2840 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2842 * c-parser.c (c_parser_objc_at_property_declaration):
2843 Improve parsing fidelity. Associate better location info
2844 with @property attributes. Clean up the interface to
2845 objc_add_property_declaration ().
2847 2020-11-06 Nathan Sidwell <nathan@acm.org>
2849 * c-decl.c (diagnose_mismatched_decls): Rename
2850 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2851 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2852 (collect_source_refs): Likewise.
2853 * c-typeck.c (inform_declaration, inform_for_arg)
2854 (convert_for_assignment): Likewise.
2856 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
2858 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2860 (c_parser_omp_construct): Update call.
2862 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2865 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2866 find underlying decl to clear in the aligned_head bitmap.
2868 2020-11-04 Joseph Myers <joseph@codesourcery.com>
2870 * c-decl.c (handle_nodiscard_attribute): New.
2871 (std_attribute_table): Add nodiscard.
2872 * c-parser.c (c_parser_std_attribute): Expect argument to
2873 nodiscard attribute to be a string. Do not special-case ignoring
2875 * c-typeck.c (maybe_warn_nodiscard): New.
2876 (build_compound_expr, emit_side_effect_warnings): Call
2877 maybe_warn_nodiscard.
2878 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2879 emit_side_effect_warnings if warn_unused_result.
2881 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
2883 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2885 (finish_init): Likewise.
2886 (pop_init_level): Likewise.
2888 2020-10-28 Joseph Myers <joseph@codesourcery.com>
2890 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2891 error_at for omitted parameter name.
2893 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2895 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2896 (c_parser_omp_clause_allocate): New function.
2897 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2898 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2899 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2900 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2901 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2902 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2903 PRAGMA_OMP_CLAUSE_ALLOCATE.
2904 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2906 2020-10-27 Joseph Myers <joseph@codesourcery.com>
2908 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2909 standard attributes.
2911 2020-10-23 Marek Polacek <polacek@redhat.com>
2914 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2915 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2916 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2917 * c-tree.h (char_type_p): Declare.
2918 * c-typeck.c (char_type_p): No longer static.
2920 2020-10-23 Martin Sebor <msebor@redhat.com>
2923 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2925 2020-09-19 Martin Sebor <msebor@redhat.com>
2928 * c-decl.c (lookup_last_decl): Define new function.
2929 (c_decl_attributes): Call it.
2930 (start_decl): Add argument and use it.
2931 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2932 (get_parm_array_spec): Define new function.
2933 (push_parm_decl): Call get_parm_array_spec.
2934 (start_function): Call warn_parm_array_mismatch. Build attribute
2935 access and add it to current function.
2936 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2937 in forms of array parameters.
2938 * c-tree.h (start_decl): Add argument.
2940 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2942 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2944 (in_statement): New.
2945 (start_function): Adjust for above change.
2946 (c_push_function_context, c_pop_function_context): Likewise.
2947 * c-lang.h (struct language_function): Likewise.
2948 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2949 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2951 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2952 (c_parser_switch_statement): Adjust break/switch context handling
2953 and calls to renamed functions.
2954 (c_parser_while_statement): Adjust break/switch context handling and
2956 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2957 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2958 (c_parser_omp_for_loop): Adjust break/switch context handling.
2959 * c-tree.h (c_break_label, c_cont_label): Delete.
2960 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2961 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2962 (in_statement, switch_statement_break_seen_p): Declare.
2963 (c_start_case, c_finish_case): Renamed to...
2964 (c_start_switch, c_finish_switch).
2965 (c_finish_bc_stmt): Adjust arguments.
2966 * c-typeck.c (build_function_call_vec): Don't try to print
2967 statements with %qE format.
2968 (struct c_switch): Rename switch_expr field to switch_stmt.
2969 Add break_stmt_seen_p field.
2970 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2971 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2972 (do_case): Update for changes to struct c_switch.
2973 (c_finish_case): Rename to c_finish_switch. Update for changes to
2974 struct c_switch and change of representation from SWITCH_EXPR to
2976 (c_finish_loop): Delete.
2977 (c_finish_bc_stmt): Update to reflect changes to break/continue
2978 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2979 of a GOTO_EXPR except for objc foreach loops.
2981 2020-09-01 Jakub Jelinek <jakub@redhat.com>
2984 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2987 2020-08-28 Martin Sebor <msebor@redhat.com>
2990 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2993 2020-08-27 Martin Liska <mliska@suse.cz>
2995 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2996 growth function to true.
2998 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
3001 * c-typeck.c (handle_omp_array_sections_1): Talk about
3002 array function parameter in the error message.
3004 2020-08-18 Jakub Jelinek <jakub@redhat.com>
3007 * c-parser.c (c_parser_generic_selection): Change match_found from bool
3008 to int, holding index of the match. Call mark_exp_read on the selector
3009 expression and on expressions other than the selected one.
3011 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
3014 * c-typeck.c (process_init_element): Split test for whether to
3015 recurse into a record, union or array into...
3016 (initialize_elementwise_p): ...this new function. Don't recurse
3017 into a vector type if the initialization value is also a vector.
3019 2020-07-31 Richard Biener <rguenther@suse.de>
3022 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
3023 Define to c_common_finalize_early_debug.
3025 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
3027 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
3028 (c_parser_omp_critical): Permit hint(0) clause without named critical.
3029 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
3031 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
3034 * c-decl.c (finish_decl): Call target hook
3035 lower_local_decl_alignment to lower local decl alignment.
3037 2020-07-09 Julian Brown <julian@codesourcery.com>
3038 Thomas Schwinge <thomas@codesourcery.com>
3041 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
3042 for standalone attach/detach clauses.
3044 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
3046 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
3047 set, warn for conversion between pointers that point to incompatible
3048 scalar storage orders.
3050 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
3052 * c-parser.c (c_parser_statement_after_labels): Pass correct
3053 parameters to c_parser_do_statement.
3055 2020-06-16 Jakub Jelinek <jakub@redhat.com>
3057 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
3059 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
3060 premature c_fully_fold. Defer explicit c_fully_fold calls to after
3062 * c-tree.h (c_in_omp_for): Declare.
3063 * c-typeck.c (c_in_omp_for): Define.
3064 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
3065 (digest_init): Likewise.
3066 (build_binary_op): Likewise.
3068 2020-06-16 Jakub Jelinek <jakub@redhat.com>
3070 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
3071 from kind by comma rather than colon.
3073 2020-06-05 Mark Wielaard <mark@klomp.org>
3075 * c-decl.c (implicit_decl_warning): When warned and olddecl is
3076 an undeclared builtin, then add a fixit header hint, if found.
3077 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
3078 warning_at about implicit builtin declaration type mismatch.
3080 2020-06-03 Mark Wielaard <mark@klomp.org>
3082 * c-parser.c (struct c_parser): Add seen_string_literal
3084 (c_parser_consume_token): Reset seen_string_literal.
3085 (c_parser_error_richloc): Add name_hint if seen_string_literal
3086 and next token is a CPP_NAME and we have a missing header
3087 suggestion for the name.
3088 (c_parser_string_literal): Set seen_string_literal.
3090 2020-06-03 Mark Wielaard <mark@klomp.org>
3092 * c-parser.c (c_parser_postfix_expression_after_primary): Add
3093 scope with matching_parens after CPP_OPEN_PAREN.
3095 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
3097 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
3099 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
3101 * Make-lang.in: Remove extra slash.
3103 2020-05-19 Martin Liska <mliska@suse.cz>
3105 * c-parser.c: Fix typo.
3107 2020-05-14 Jakub Jelinek <jakub@redhat.com>
3109 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
3111 2020-05-07 Richard Biener <rguenther@suse.de>
3114 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
3117 2020-04-30 Jakub Jelinek <jakub@redhat.com>
3120 * c-decl.c (set_labels_context_r): In addition to context-less
3121 LABEL_DECLs adjust also LABEL_DECLs with context equal to
3122 parent function if any.
3123 (store_parm_decls): Adjust comment.
3125 2020-04-19 Jakub Jelinek <jakub@redhat.com>
3128 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
3129 two CPP_COLON tokens.
3131 2020-04-17 Jakub Jelinek <jakub@redhat.com>
3134 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
3137 2020-04-15 Jakub Jelinek <jakub@redhat.com>
3140 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
3141 requires directive when not at file scope.
3143 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
3146 * c-decl.c (c_check_in_current_scope): New function.
3147 * c-tree.h (c_check_in_current_scope): Declare it.
3148 * c-parser.c (c_parser_oacc_declare): Add check that variables
3149 are declared in the same scope as the directive. Fix handling
3152 2020-04-07 Jakub Jelinek <jakub@redhat.com>
3155 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3156 if c_parser_omp_master succeeded.
3158 2020-03-23 Jakub Jelinek <jakub@redhat.com>
3160 PR gcov-profile/94029
3162 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
3163 the function_start_locus location. Don't do that afterwards for the
3164 __GIMPLE body parsing.
3166 2020-03-19 Jakub Jelinek <jakub@redhat.com>
3168 PR gcov-profile/94029
3169 * c-tree.h (finish_function): Add location_t argument defaulted to
3171 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
3172 set it to the locus of closing } if non-NULL.
3173 (c_parser_compound_statement_nostart): Return locus of closing }.
3174 (c_parser_parse_rtl_body): Likewise.
3175 (c_parser_declaration_or_fndef): Propagate locus of closing } to
3177 * c-decl.c (finish_function): Add end_loc argument, use it instead of
3178 input_location to set function_end_locus.
3180 2020-03-17 Jakub Jelinek <jakub@redhat.com>
3183 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
3184 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
3185 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
3186 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
3188 (finish_incomplete_vars): New function, moved from finish_struct. Use
3189 relayout_decl instead of layout_decl.
3190 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
3191 being TYPE_VFIELD. Use finish_incomplete_vars.
3192 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
3193 finish_incomplete_vars.
3194 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3195 also on ENUMERAL_TYPEs.
3197 2020-03-16 Jakub Jelinek <jakub@redhat.com>
3200 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
3202 2020-03-13 Martin Sebor <msebor@redhat.com>
3205 * c-decl.c (builtin_structptr_type_count): New constant.
3206 (match_builtin_function_types): Reject decls that are incompatible
3207 in types pointed to by pointers.
3208 (diagnose_mismatched_decls): Adjust comments.
3210 2020-03-05 Joseph Myers <joseph@codesourcery.com>
3213 * c-typeck.c (pop_init_level): Do not diagnose initializers as
3214 empty when initialized type is error_mark_node.
3215 (set_designator, process_init_element): Ignore initializers for
3216 elements of a variable-size type or of error_mark_node.
3218 2020-03-01 Martin Sebor <msebor@redhat.com>
3221 * c-decl.c (types_close_enough_to_match): New function.
3222 (match_builtin_function_types):
3223 (diagnose_mismatched_decls): Add missing inform call to a warning.
3225 2020-03-01 Martin Sebor <msebor@redhat.com>
3228 * c-typeck.c (build_functype_attribute_variant): New function.
3229 (composite_type): Call it.
3231 2020-02-25 Jakub Jelinek <jakub@redhat.com>
3234 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
3235 Rename last argument from probablity to probability.
3237 2020-02-13 Jakub Jelinek <jakub@redhat.com>
3240 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
3241 *expr if it has side effects.
3243 2020-01-30 Jeff Law <law@redhat.com>
3246 * c-parser.c (c_parser_switch_statement): Make sure to request
3247 marking the switch expr as used.
3249 2020-01-22 Joseph Myers <joseph@codesourcery.com>
3252 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
3253 argument with integer operands.
3255 2020-01-16 Kerem Kat <keremkat@gmail.com>
3258 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
3259 to support 4 available tokens.
3261 2020-01-15 Joseph Myers <joseph@codesourcery.com>
3264 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
3265 determine whether to set DECL_CONTEXT.
3267 2020-01-13 Joseph Myers <joseph@codesourcery.com>
3270 * c-typeck.c (build_c_cast): Check for expressions with integer
3271 operands that can occur in an unevaluated part of an integer
3272 constant expression and call note_integer_operands as needed.
3274 2019-01-08 Richard Biener <rguenther@suse.de>
3277 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
3280 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3282 Update copyright years.
3284 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3286 * c-decl.c (collect_source_ref_cb): Delete.
3287 (for_each_global_decl): Rename into...
3288 (collect_source_refs): ...this. Call collect_source_ref directly.
3289 (c_parse_final_cleanups): Always call collect_source_ref on the main
3292 2019-12-19 Julian Brown <julian@codesourcery.com>
3293 Cesar Philippidis <cesar@codesourcery.com>
3295 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
3297 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
3298 Allow deref (->) in variable lists if true.
3299 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
3300 Pass to c_parser_omp_variable_list.
3301 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
3302 call to c_parser_omp_variable_list.
3303 (c_parser_oacc_all_clauses): Support attach and detach clauses.
3304 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
3305 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
3306 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
3307 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
3308 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
3309 and detach. Support deref.
3310 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
3311 GOMP_MAP_ALWAYS_POINTER for OpenACC.
3312 (c_oacc_check_attachments): New function.
3313 (c_finish_omp_clauses): Check attach/detach arguments for being
3314 pointers using above. Support deref.
3316 2019-12-19 Julian Brown <julian@codesourcery.com>
3317 Maciej W. Rozycki <macro@codesourcery.com>
3318 Tobias Burnus <tobias@codesourcery.com>
3319 Thomas Schwinge <thomas@codesourcery.com>
3321 * c-parser.c (c_parser_omp_clause_name): Support no_create.
3322 (c_parser_oacc_data_clause): Likewise.
3323 (c_parser_oacc_all_clauses): Likewise.
3324 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3325 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
3326 PRAGMA_OACC_CLAUSE_NO_CREATE.
3327 * c-typeck.c (handle_omp_array_sections): Support
3330 2019-12-09 David Malcolm <dmalcolm@redhat.com>
3332 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3333 Replace label_text ctor calls.
3335 2019-12-04 Joseph Myers <joseph@codesourcery.com>
3339 * c-typeck.c (convert_lvalue_to_rvalue): Call
3340 require_complete_type for arguments not of void types.
3341 (build_indirect_ref): Do not diagnose dereferencing pointers to
3343 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
3345 2019-12-03 Joseph Myers <joseph@codesourcery.com>
3348 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
3349 old-style parameter definitions.
3351 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
3355 * c-decl.c (flexible_array_type_p): Move to common code.
3357 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3359 * c-decl.c (start_decl): Allow initialization of variables whose
3360 size is a POLY_INT_CST.
3361 (finish_decl): Use verify_type_context to check whether the target
3362 allows variables with a particular type to have static or thread-local
3363 storage duration. Don't raise a second error if such variables do
3364 not have a constant size.
3365 (grokdeclarator): Use verify_type_context to check whether the
3366 target allows fields or array elements to have a particular type.
3367 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
3368 the target allows pointer difference for the types involved.
3369 (build_unary_op): Likewise for pointer increment and decrement.
3371 2019-11-29 Joseph Myers <joseph@codesourcery.com>
3373 * c-parser.c (struct c_parser): Add members raw_tokens and
3375 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
3376 using previously-lexed raw tokens.
3377 (c_parser_peek_nth_token_raw)
3378 (c_parser_check_balanced_raw_token_sequence): New functions.
3379 (c_parser_nth_token_starts_std_attributes): Use
3380 c_parser_check_balanced_raw_token_sequence for Objective-C.
3382 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3385 * c-decl.c (finish_declspecs): Use int instead of decimal
3386 floating-point types if decimal floating-point not supported.
3388 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3390 * c-tree.h (struct c_declarator): Use a structure for id member.
3391 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
3392 declarators at the start, not when handling individual declarators
3393 later. Use u.id.id instead of u.id.
3394 (grokfield): Use u.id.id instead of u.id.
3395 (build_id_declarator): Set u.id.id and u.id.attrs.
3396 (finish_declspecs): Handle postfix attributes in case of typedef
3397 name or typeof used.
3398 * c-parser.c (c_parser_direct_declarator)
3399 (c_parser_direct_declarator_inner): Place declarator for
3400 attributes inside that for function or array, not outside. Set
3401 u.id.attrs for identifiers.
3402 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
3403 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
3406 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3409 * c-decl.c (identifier_global_tag): Define.
3411 2019-11-20 Richard Biener <rguenther@suse.de>
3414 * c-decl.c (grokdeclarator): Prevent inlining of nested
3415 function with VLA arguments.
3417 2019-11-20 Joseph Myers <joseph@codesourcery.com>
3419 * c-decl.c (c_warn_type_attributes): New function.
3420 (groktypename, grokdeclarator, finish_declspecs): Call
3421 c_warn_type_attributes before applying attributes to types.
3422 * c-tree.h (c_warn_type_attributes): Declare.
3424 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3426 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
3427 standard attributes.
3428 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
3429 pedwarn for unknown standard attributes and return error_mark_node
3432 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
3434 * c-parser.c (c_parser_parse_rtl_body): Always call
3435 run_rtl_passes, even if startwith pass is not provided.
3437 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3439 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
3440 duplicate standard attributes.
3442 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3444 * c-decl.c (std_attribute_table): Add maybe_unused.
3446 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3448 * c-decl.c (std_attribute_table): Add fallthrough.
3449 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
3450 attribute at top level.
3452 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3454 * c-decl.c (std_attribute_table): New.
3455 (c_init_decl_processing): Register attributes from
3456 std_attribute_table.
3457 * c-parser.c (c_parser_attribute_arguments): Add arguments
3458 require_string and allow_empty_args. All callers changed.
3459 (c_parser_std_attribute): Set require_string argument for
3460 "deprecated" attribute.
3462 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3464 * c-parser.c (c_parser_postfix_expression)
3465 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
3466 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
3468 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
3470 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
3471 of build_same_sized_truth_vector_type.
3472 (build_vec_cmp): Likewise.
3474 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3476 * c-parser.c (c_parser_omp_context_selector): Don't require score
3477 argument to fit into shwi, just to be INTEGER_CST. Diagnose
3480 * c-parser.c (c_parser_omp_context_selector): Rename
3481 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
3482 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
3483 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
3484 and string literals.
3486 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3488 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
3489 ctsk_tagfirstref_attrs.
3490 (struct c_declspecs): Update description of attrs. Add
3491 postfix_attrs and non_std_attrs_seen_p. Increase size of
3492 typespec_kind bit-field.
3493 (c_warn_unused_attributes): New declaration.
3494 (parser_xref_tag): Update prototype.
3495 * c-decl.c (c_warn_unused_attributes): New function.
3496 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
3497 ctsk_tagref_attrs. Handle attribute declarations.
3498 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
3499 (grokdeclarator): Handle standard attributes.
3500 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
3501 attributes to incomplete type reference.
3502 (xref_tag): Update call to parser_xref_tag.
3503 (declspecs_add_addrspace, declspecs_add_type)
3504 (declspecs_add_scspec, declspecs_add_attrs): Set
3505 non_std_attrs_seen_p.
3506 (finish_declspecs): Apply postfix standard attributes to type.
3507 * c-parser.c (c_token_starts_declspecs)
3508 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
3509 (c_parser_next_tokens_start_declaration): Update comments.
3510 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
3511 parser->tokens[2] to parser->tokens[1].
3512 (c_parser_nth_token_starts_std_attributes)
3513 (c_parser_std_attribute_specifier_sequence): New functions.
3514 (c_parser_declaration_or_fndef): Add arguments have_attrs and
3515 attrs. All callers changed. Handle standard attributes.
3516 (c_parser_parms_declarator, c_parser_parms_list_declarator)
3517 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
3518 All callers changed.
3519 (c_parser_declspecs): Add arguments start_std_attr_ok and
3520 end_std_attr_ok. All callers changed. Handle standard
3522 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3523 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
3524 (c_parser_compound_statement_nostart, c_parser_all_labels)
3525 (c_parser_label, c_parser_statement, c_parser_for_statement):
3526 Handle standard attributes.
3527 * c-parser.h (c_parser_declspecs): Update prototype.
3528 * gimple-parser.c (c_parser_gimple_declaration): Update call to
3531 2019-11-12 Martin Liska <mliska@suse.cz>
3533 * gimple-parser.c: Do not include params.h.
3535 2019-11-12 Martin Liska <mliska@suse.cz>
3537 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
3538 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
3541 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3542 Frederik Harwath <frederik@codesourcery.com>
3545 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
3546 (c_parser_oacc_kernels_parallel): Rename function to...
3547 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
3548 (c_parser_omp_construct): Update accordingly.
3551 2019-11-11 Jakub Jelinek <jakub@redhat.com>
3553 * c-parser.c (c_parser_translation_unit): Diagnose declare target
3554 without corresponding end declare target.
3556 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3558 * c-convert.c (convert): Only handle vector conversions if one of
3559 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
3561 * c-typeck.c (build_array_ref): Only allow vector indexing if the
3562 vectors satisfy gnu_vector_type_p.
3563 (build_unary_op): Only allow unary operators to be applied to
3564 vectors if they satisfy gnu_vector_type_p.
3565 (digest_init): Only allow by-element initialization of vectors
3566 if they satisfy gnu_vector_type_p.
3567 (really_start_incremental_init): Likewise.
3568 (push_init_level): Likewise.
3569 (pop_init_level): Likewise.
3570 (process_init_element): Likewise.
3571 (build_binary_op): Only allow binary operators to be applied to
3572 vectors if they satisfy gnu_vector_type_p.
3574 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3576 * c-decl.c (grokparms): Convert () in a function definition to
3578 (store_parm_decls_oldstyle): Pedwarn for C2x.
3579 (store_parm_decls): Update comment about () not generating a
3582 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3584 * c-parser.c (c_parser_attribute_arguments): New function.
3585 Factored out of c_parser_gnu_attribute.
3586 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
3587 (c_parser_balanced_token_sequence, c_parser_std_attribute)
3588 (c_parser_std_attribute_specifier): New functions.
3589 (c_parser_transaction_attributes): Use
3590 c_parser_std_attribute_specifier.
3592 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3594 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
3595 lex_joined_string and translate_strings_p.
3596 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
3598 (c_parser_string_literal): New function.
3599 (c_parser_static_assert_declaration_no_semi): Use
3600 c_parser_string_literal. Do not set lex_untranslated_string.
3601 (c_parser_asm_string_literal): Use c_parser_string_literal.
3602 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
3603 (c_parser_gnu_attributes): Set and restore translate_strings_p
3604 instead of lex_untranslated_string.
3605 (c_parser_asm_statement): Do not set lex_untranslated_string.
3606 (c_parser_asm_operands): Likewise.
3607 (c_parser_has_attribute_expression): Set and restore
3608 translate_strings_p instead of lex_untranslated_string.
3609 (c_parser_postfix_expression): Use c_parser_string_literal.
3610 (pragma_lex): Likewise.
3611 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
3612 (c_parse_file): Set translate_strings_p.
3613 * gimple-parser.c (c_parser_gimple_postfix_expression)
3614 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
3615 * c-parser.c (c_parser_string_literal): Declare function.
3617 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3619 * c-parser.c (c_finish_omp_declare_variant): Use
3620 omp_get_context_selector instead of c_omp_get_context_selector.
3622 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3624 * c-tree.h (c_simulate_enum_decl): Declare.
3625 * c-decl.c (c_simulate_enum_decl): New function.
3626 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
3628 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3630 * c-tree.h (c_simulate_builtin_function_decl): Declare.
3631 * c-decl.c (c_simulate_builtin_function_decl): New function.
3632 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
3635 2019-10-28 Martin Sebor <msebor@redhat.com>
3638 * c-decl.c (names_builtin_p): Define a new function.
3640 2019-10-28 Richard Biener <rguenther@suse.de>
3643 * gimple-parser.c (c_parser_parse_gimple_body): Make
3644 current_bb the entry block initially to easier recover
3646 (c_parser_gimple_compound_statement): Adjust.
3648 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3650 * c-parser.c (c_finish_omp_declare_variant): Use
3651 omp_context_selector_matches instead of
3652 c_omp_context_selector_matches.
3653 * c-decl.c (c_decl_attributes): Add "omp declare target block"
3654 attribute in between declare target and end declare target
3657 2019-10-15 Joseph Myers <joseph@codesourcery.com>
3659 * c-parser.c (c_parser_attribute_any_word): Rename to
3660 c_parser_gnu_attribute_any_word. All callers changed.
3661 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
3663 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
3665 (c_parser_declaration_or_fndef, c_parser_declspecs)
3666 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3667 (c_parser_struct_declaration, c_parser_declarator)
3668 (c_parser_gnu_attribute, c_parser_compound_statement)
3669 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3670 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3671 attribute-related syntax productions.
3673 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3675 * c-objc-common.c (useful_aka_type_p): Replace with...
3676 (get_aka_type): ...this new function. Given the original type,
3677 decide which aka type to print (if any). Only look through typedefs
3678 if user_facing_original_type_p.
3679 (print_type): Update accordingly.
3681 2019-10-14 Jakub Jelinek <jakub@redhat.com>
3683 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3684 into int NESTED, if it is 2, diagnose missing commas in between
3686 (c_parser_omp_context_selector): Pass 2 as last argument to
3687 c_parser_omp_all_clauses.
3689 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3691 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3692 For simd properties, put them directly into TREE_VALUE.
3693 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3694 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3695 add "omp declare variant base" attribute rather than
3696 "omp declare variant".
3698 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3700 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3702 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3704 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3705 true, terminate processing on closing paren and don't skip to end of
3707 (c_parser_omp_declare_simd): Handle also declare variant.
3708 (omp_construct_selectors, omp_device_selectors,
3709 omp_implementation_selectors, omp_user_selectors): New variables.
3710 (c_parser_omp_context_selector,
3711 c_parser_omp_context_selector_specification,
3712 c_finish_omp_declare_variant): New functions.
3713 (c_finish_omp_declare_simd): Handle both declare simd and
3715 (c_parser_omp_declare): Handle declare variant.
3717 2019-10-02 Joseph Myers <joseph@codesourcery.com>
3719 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3722 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3724 * c-objc-common.c (useful_aka_type_p): New function.
3725 (print_type): Use it to decide whether an aka type is worth printing.
3727 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3730 * c-parser.c (c_parser_predefined_identifier): New function.
3731 (c_parser_postfix_expression): Use it.
3732 (c_parser_omp_variable_list): Parse predefined identifiers.
3733 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3734 in shared and firstprivate clauses, even when they are predetermined
3737 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3739 * c-typeck.c (build_function_call_vec): Take the original function
3740 decl as an optional final parameter. Pass all built-in calls to
3741 check_builtin_function_arguments.
3743 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
3746 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3747 of identifiers in the external scope only for variables and functions.
3749 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3752 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3754 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3757 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3758 after determining that the first token is not
3759 PRAGMA_GCC_PCH_PREPROCESS.
3761 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
3763 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3764 FUNCTION_DECL to the right value in the presence of nested declarators.
3766 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3769 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3771 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3774 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3775 of a built_in_function.
3776 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3778 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3780 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3781 (c_parser_omp_clause_device_type): New function.
3782 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3783 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3784 (c_parser_omp_declare_target): Handle device_type clauses. Remove
3785 diagnostics for declare target with clauses nested in clause-less
3786 declare target declaration-definition-seq.
3787 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3789 2019-08-09 Jakub Jelinek <jakub@redhat.com>
3791 * c-parser.c (check_no_duplicate_clause): Simplify using
3793 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3794 directive name modifiers.
3795 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3798 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3799 check_no_duplicate_clause call. Comment it out, instead emit a
3800 warning for duplicate dist_schedule clauses.
3802 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
3804 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3806 2019-08-08 Jakub Jelinek <jakub@redhat.com>
3808 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3809 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3810 instead of generic_head to track duplicates.
3812 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3814 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3815 (c_parser_omp_clause_use_device_addr): New function.
3816 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3817 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3818 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3819 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3820 map or use_device_* clauses.
3821 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3822 in OpenMP, require pointer type rather than pointer or array type.
3823 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3825 2019-07-31 Jakub Jelinek <jakub@redhat.com>
3828 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3829 even if finish is UNKNOWN_LOCATION, just use start as finish in that
3832 2019-07-25 Martin Liska <mliska@suse.cz>
3833 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
3836 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3838 2019-07-25 Martin Liska <mliska@suse.cz>
3840 * c-decl.c (merge_decls): Use new macros
3841 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3843 2019-07-23 Richard Biener <rguenther@suse.de>
3845 PR tree-optimization/83518
3846 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3847 a CFG also rebuild cgraph edges.
3849 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3851 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3852 (c_parser_omp_clause_bind): New function.
3853 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3854 (OMP_LOOP_CLAUSE_MASK): Define.
3855 (c_parser_omp_loop): New function.
3856 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3857 loop combined with parallel or teams.
3858 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3859 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3861 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3864 * c-decl.c (finish_function): Check targetm.warn_func_return
3865 before issuing a -Wreturn-type warning.
3867 2019-07-12 Alexandre Oliva <oliva@adacore.com>
3869 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3870 (c_parser_compound_statement): Call it.
3872 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3874 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3875 (c_parser_omp_clause_order): New function.
3876 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3877 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3878 PRAGMA_OMP_CLAUSE_ORDER.
3879 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3881 2019-07-10 Richard Biener <rguenther@suse.de>
3883 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3884 _Literal (int *) &x for address literals.
3886 2019-07-09 Martin Sebor <msebor@redhat.com>
3889 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3891 (field_decl_cmp): Same.
3892 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3894 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3896 2019-07-09 Martin Sebor <msebor@redhat.com>
3899 * c-decl.c: Change class-key from class to struct and vice versa
3900 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3901 * gimple-parser.c: Same.
3903 2019-07-01 Richard Biener <rguenther@suse.de>
3905 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3906 _Literal (char *) &"foo" for address literals pointing to
3909 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3911 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3912 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3913 C incompatibility if alternate "__intN__" form is used.
3915 2019-06-24 Martin Sebor <msebor@redhat.com>
3917 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3919 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3921 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3922 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3923 (c_parser_omp_scan_loop_body): New function.
3924 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3925 inscan reduction clauses.
3926 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3927 non-inscan reductions on the same construct, or inscan reductions with
3928 ordered or schedule clauses, or inscan array reductions.
3930 2019-06-05 Martin Sebor <msebor@redhat.com>
3933 * c-typeck.c (c_finish_return): Only consider functions returning
3934 pointers as candidates for -Wreturn-local-addr.
3936 2019-06-05 Martin Sebor <msebor@redhat.com>
3938 * c-decl.c (start_decl): Adjust quoting and hyphenation
3940 (finish_decl): Same.
3941 (finish_enum): Same.
3942 (start_function): Same.
3943 (declspecs_add_type): Same.
3944 * c-parser.c (warn_for_abs): Same.
3945 * c-typeck.c (build_binary_op): Same.
3947 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3950 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3951 marked with an OpenACC 'routine' directive.
3954 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3955 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3958 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3959 clauses from "omp declare target" attribute.
3961 2019-05-16 Martin Sebor <msebor@redhat.com>
3963 * c-decl.c (start_decl): Quote keywords, operators, and
3964 types in diagnostics.
3965 (finish_decl): Same.
3966 * c-parser.c (c_parser_asm_statement): Same.
3967 (c_parser_conditional_expression): Same.
3968 (c_parser_transaction_cancel): Same.
3969 * c-typeck.c (c_common_type): Same.
3970 (build_conditional_expr): Same.
3971 (digest_init): Same.
3972 (process_init_element): Same.
3973 (build_binary_op): Same.
3975 2019-05-17 Richard Biener <rguenther@suse.de>
3977 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3978 (c_parser_gimple_unary_expression): Likewise.
3979 (c_parser_gimple_parentized_ternary_expression): New function.
3981 2019-05-16 Richard Biener <rguenther@suse.de>
3983 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3984 (c_parser_gimple_unary_expression): Likewise.
3986 2019-05-15 Richard Biener <rguenther@suse.de>
3988 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3991 2019-05-14 Richard Biener <rguenther@suse.de>
3993 * gimple-parser.c (c_parser_gimple_statement): Remove
3994 questionable auto-promotion to VIEW_CONVERT_EXPR.
3995 (c_parser_gimple_typespec): Split out from __MEM parsing.
3996 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3997 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3998 as __VIEW_CONVERT with -gimple.
4000 2019-05-09 Martin Liska <mliska@suse.cz>
4002 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
4004 (c_parser_gimple_unary_expression): Parse also binary expression
4006 (c_parser_gimple_parentized_binary_expression): New function.
4008 2019-05-09 Martin Liska <mliska@suse.cz>
4010 * gimple-parser.c (struct gimple_parser): Add probability.
4011 for gimple_parser_edge.
4012 (gimple_parser::push_edge): Add new argument probability.
4013 (c_parser_gimple_parse_bb_spec): Parse also probability
4015 (c_parser_parse_gimple_body): Set edge probability.
4016 (c_parser_gimple_compound_statement): Consume token
4017 before calling c_parser_gimple_goto_stmt.
4019 (c_parser_gimple_statement): Pass new argument.
4020 (c_parser_gimple_goto_stmt): Likewise.
4021 (c_parser_gimple_if_stmt): Likewise.
4022 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
4023 * c-parser.c (c_parser_declaration_or_fndef): Pass
4024 hot_bb_threshold argument.
4025 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
4027 (c_parser_gimple_parse_bb_spec_edge_probability): New.
4029 2019-04-26 Jakub Jelinek <jakub@redhat.com>
4032 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
4033 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
4034 (c_parser_do_statement): Likewise.
4035 (c_parser_for_statement): Likewise. Formatting fixes.
4036 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
4037 emit DEBUG_BEGIN_STMTs if needed.
4039 2019-04-19 Jakub Jelinek <jakub@redhat.com>
4042 * c-typeck.c (struct c_switch): Remove outside_range_p member.
4043 (c_start_case): Don't clear it.
4044 (do_case): Adjust c_add_case_label caller.
4045 (c_finish_case): Adjust c_do_switch_warnings caller.
4048 * c-decl.c (merge_decls): If remove is main variant and
4049 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
4050 variant that has newdecl as TYPE_NAME if any.
4052 2019-04-12 Jakub Jelinek <jakub@redhat.com>
4055 * c-decl.c (merge_decls): When newdecl's type is its main variant,
4056 don't try to remove it from the variant list, but instead assert
4059 2019-04-01 Richard Biener <rguenther@suse.de>
4062 * c-tree.h (c_get_alias_set): Declare.
4063 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
4064 * c-objc-common.c (c_get_alias_set): Treat enumeral types
4065 as the underlying integer type.
4067 2019-03-19 Martin Sebor <msebor@redhat.com>
4069 PR tree-optimization/89688
4070 * c-decl.c (finish_decl): Call braced_lists_to_string for more
4071 kinds of initializers.
4073 2019-03-19 Jakub Jelinek <jakub@redhat.com>
4076 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
4077 return type even if quals_used is 0. Formatting fixes.
4079 2019-03-14 Richard Biener <rguenther@suse.de>
4081 * c-tree.h (enum c_declspec_il): New.
4082 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
4084 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
4085 Pass start pass and declspec_il to c_parser_parse_gimple_body.
4086 (c_parser_declspecs): Adjust.
4087 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
4088 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
4090 (struct gimple_parser): New.
4091 (gimple_parser::push_edge): New method.
4092 (c_parser_gimple_parse_bb_spec): New helper.
4093 (c_parser_parse_gimple_body): Get start pass and IL specification.
4094 Initialize SSA and CFG.
4095 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
4096 Build a gimple_parser parsing state and pass it along.
4097 (c_parser_gimple_statement): Change intermittend __PHI internal
4098 function argument for the edge.
4099 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
4100 (c_parser_gimple_goto_stmt): Record edges to build.
4101 (c_parser_gimple_if_stmt): Likewise.
4102 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
4103 (c_parser_gimple_or_rtl_pass_list): Likewise.
4105 2019-03-11 Martin Liska <mliska@suse.cz>
4107 * c-decl.c (check_for_loop_decls): Wrap an option name
4108 in a string format message and fix GNU coding style.
4109 * c-parser.c (c_parser_declspecs): Likewise.
4111 2019-03-08 Jakub Jelinek <jakub@redhat.com>
4113 PR tree-optimization/89550
4114 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
4116 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
4117 or warning returned true.
4119 2019-02-28 Jakub Jelinek <jakub@redhat.com>
4122 * c-typeck.c (convert_arguments): Call inform_declaration only if
4123 the previous warning_at call returned true.
4125 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
4127 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
4128 parameter. Adjust all users.
4129 (c_parser_oacc_simple_clause): Replace parser with loc formal
4130 parameter. Adjust all users.
4132 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
4135 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
4136 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
4138 2019-02-15 Jakub Jelinek <jakub@redhat.com>
4141 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
4142 before c_decl_attributes rather than after it.
4144 2019-02-06 Jakub Jelinek <jakub@redhat.com>
4147 * c-parser.c (c_parser_declaration_or_fndef): Don't update
4148 DECL_ARGUMENTS of d if it has been defined already. Use a single if
4149 instead of 3 nested ifs.
4151 2019-02-06 Joseph Myers <joseph@codesourcery.com>
4154 * c-decl.c (finish_decl): Do not complete array types for arrays
4155 with external linkage not at file scope.
4157 2019-02-05 Richard Biener <rguenther@suse.de>
4160 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
4161 all type variants when not supported.
4163 2019-01-30 Jakub Jelinek <jakub@redhat.com>
4166 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
4167 * c-decl.c (decl_jump_unsafe): Return false for
4168 C_DECL_COMPOUND_LITERAL_P decls.
4169 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
4171 2019-01-29 Jakub Jelinek <jakub@redhat.com>
4174 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
4178 * c-decl.c (last_fileptr_type): Remove.
4179 (last_structptr_types): New variable.
4180 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
4181 {old,new}rettype instead of the types themselves. Assert
4182 last_structptr_types array has the same number of elements
4183 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
4184 argument oldtype and newtype. Instead of handling
4185 just fileptr_type_node specially, handle all builtin_structptr_types
4186 pointer nodes. Formatting fix.
4188 2019-01-24 Martin Sebor <msebor@redhat.com>
4193 * c-decl.c (match_builtin_function_types): Add arguments.
4194 (diagnose_mismatched_decls): Diagnose mismatched declarations
4195 of built-ins more strictly.
4197 2019-01-24 Jakub Jelinek <jakub@redhat.com>
4200 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
4201 on #pragma omp cancel with different modifiers.
4203 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4207 * c-typeck.c (convert_for_assignment): Upate the
4208 warn_for_address_or_pointer_of_packed_member call.
4210 2019-01-16 Tom Honermann <tom@honermann.net>
4211 Jason Merrill <jason@redhat.com>
4213 * c-typeck.c (digest_init): Revised the error message produced for
4214 ill-formed cases of array initialization with a string literal.
4215 (error_init): Make variadic.
4217 2019-01-12 Jakub Jelinek <jakub@redhat.com>
4219 * c-typeck.c (convert_for_assignment): Fix a comment typo.
4221 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4224 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
4225 if current_function_decl is non-NULL.
4227 2019-01-07 Joseph Myers <joseph@codesourcery.com>
4231 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
4232 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
4233 functions declared but never defined only for external scope, not
4236 2019-01-07 Jakub Jelinek <jakub@redhat.com>
4239 * c-parser.c (c_parser_postfix_expression): Parse
4240 __builtin_convertvector.
4242 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4244 Update copyright years.
4246 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4249 * c-typeck.c (convert_for_assignment): Call
4250 warn_for_address_or_pointer_of_packed_member.
4252 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4254 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
4255 a more specific error message (instead of just falling through).
4257 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4259 * c-parser.c (c_parser_asm_statement): Keep track of the location each
4260 asm qualifier is first seen; use that to give nicer "duplicate asm
4261 qualifier" messages. Delete 'quals" variable, instead pass the
4262 "is_volatile_ flag to build_asm_stmt directly.
4263 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
4264 * c-typeck.c (build_asm_stmt): Ditto; adjust.
4266 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
4268 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
4269 "done" boolean variable.
4271 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4274 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
4275 Move from here to gcc-rich-location.h and gcc-rich-location.c.
4276 (build_binary_op): Use struct op_location_t and
4277 class binary_op_rich_location.
4279 2018-12-11 Jakub Jelinek <jakub@redhat.com>
4282 * c-convert.c (convert): Call c_fully_fold before calling
4283 ubsan_instrument_float_cast.
4285 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
4287 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
4290 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4292 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
4293 after asm. Pass a flag for it to build_asm_expr.
4294 * c-tree.h (build_asm_expr): Update declaration.
4295 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
4298 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
4301 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
4302 combination of volatile and goto, in any order, without repetitions.
4304 2018-12-04 James Norris <jnorris@codesourcery.com>
4305 Cesar Philippidis <cesar@codesourcery.com>
4306 Julian Brown <julian@codesourcery.com>
4308 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
4311 2018-11-30 Richard Biener <rguenther@suse.de>
4313 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4314 _Literal (type) { ... } as empty aggregate or vector constructor.
4316 2018-11-29 Martin Sebor <msebor@redhat.com>
4319 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
4320 (convert_arguments): Add comments. Pass additional argument to
4323 2018-11-29 Martin Sebor <msebor@redhat.com>
4327 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
4329 2018-11-23 Martin Sebor <msebor@redhat.com>
4332 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
4333 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
4335 2018-11-20 Martin Sebor <msebor@redhat.com>
4337 * c-parser.c (c_parser_has_attribute_expression): New function.
4338 (c_parser_attribute): New function.
4339 (c_parser_attributes): Move code into c_parser_attribute.
4340 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
4342 2018-11-15 Martin Sebor <msebor@redhat.com>
4345 * c-decl.c (header_for_builtin_fn): Declare.
4346 (diagnose_mismatched_decls): Diagnose declarations of built-in
4347 functions without a prototype.
4348 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
4349 (convert_argument): Same.
4350 (convert_arguments): Factor code out into convert_argument.
4351 Detect mismatches between built-in formal arguments in calls
4352 to built-in without prototype.
4353 (build_conditional_expr): Same.
4354 (type_or_builtin_type): New function.
4355 (convert_for_assignment): Add argument. Conditionally issue
4356 warnings instead of errors for mismatches.
4358 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4360 * c-decl.c: Replace "source_location" with "location_t".
4361 * c-tree.h: Likewise.
4362 * c-typeck.c: Likewise.
4363 * gimple-parser.c: Likewise.
4365 2018-11-09 Jakub Jelinek <jakub@redhat.com>
4367 * c-parser.c (c_parser_omp_clause_final): Use
4368 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
4369 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
4370 parsing instead of c_parser_paren_condition.
4371 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
4372 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
4373 c_fully_fold instead of c_parser_condition.
4374 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
4375 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
4376 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
4377 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
4378 c_parser_expr_no_commas instead of c_parser_expression.
4380 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
4381 reduction clause with inscan modifier.
4383 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
4384 clauses other than atomic_default_mem_order.
4386 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4388 * c-parser.c: Include memmode.h.
4389 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
4390 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
4391 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
4392 task_reduction clauses.
4393 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
4394 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
4395 section, or lvalue assignment expression.
4396 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
4397 (c_parser_omp_clause_lastprivate): Parse optional
4398 conditional: modifier.
4399 (c_parser_omp_clause_hint): Require constant integer expression rather
4400 than just integer expression.
4401 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
4403 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
4404 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
4405 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
4407 (c_parser_omp_clause_depend): Parse iterator modifier and handle
4408 iterators. Parse mutexinoutset and depobj kinds.
4409 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
4411 (c_parser_omp_all_clauses): Likewise. Handle
4412 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
4413 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4414 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
4415 default memory order from requires directive if any. Adjust
4416 c_finish_omp_atomic caller.
4417 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
4418 (c_parser_omp_flush): Parse flush with memory-order-clause.
4419 (c_parser_omp_for_loop): Allow NE_EXPR even in
4420 OpenMP loops, adjust c_finish_omp_for caller.
4421 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
4422 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
4423 Allow to be called while parsing combined parallel master.
4424 Parse combined master taskloop{, simd}.
4425 (c_parser_omp_parallel): Parse combined
4426 parallel master{, taskloop{, simd}} constructs.
4427 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
4428 (OMP_TASKGROUP_CLAUSE_MASK): Define.
4429 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
4430 (OMP_TASKWAIT_CLAUSE_MASK): Define.
4431 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
4432 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
4433 around teams body. Use SET_EXPR_LOCATION.
4434 (c_parser_omp_target_data): Allow target data
4435 with only use_device_ptr clauses.
4436 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
4437 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
4438 (c_parser_omp_requires): New function.
4439 (c_finish_taskloop_clauses): New function.
4440 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
4441 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
4442 declaration. Disallow in_reduction clause when combined with parallel
4444 (c_parser_omp_construct): Adjust c_parser_omp_master and
4445 c_parser_omp_taskgroup callers.
4446 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
4448 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
4449 like OMP_CLAUSE_REDUCTION.
4450 (handle_omp_array_sections): Likewise. Call save_expr on array
4451 reductions before calling build_index_type. Handle depend clauses
4453 (struct c_find_omp_var_s): New type.
4454 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
4455 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
4456 with static, runtime or auto schedule kinds. Call save_expr for whole
4457 array reduction sizes. Diagnose reductions with zero sized elements
4458 or variable length structures. Diagnose nogroup clause used with
4459 reduction clause(s). Handle depend clause with
4460 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
4461 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
4462 some different type for other kinds. Use build_unary_op with
4463 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
4464 Handle depend clauses with iterators. Remove no longer needed special
4465 case that predetermined const qualified vars may be specified in
4466 firstprivate clause. Complain if const qualified vars are mentioned
4467 in data-sharing clauses other than firstprivate or shared. Use
4468 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
4469 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
4470 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
4471 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
4473 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4475 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
4476 logic for change to name_hint::operator bool.
4477 (undeclared_variable): Likewise.
4478 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4479 (c_parser_parameter_declaration): Likewise.
4481 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4483 * c-errors.c (pedwarn_c11): New function.
4484 * c-parser.c (disable_extension_diagnostics): Save
4485 warn_c11_c2x_compat and set it to 0.
4486 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
4487 (c_parser_static_assert_declaration_no_semi): Handle
4488 _Static_assert without string constant.
4489 * c-tree.h (pedwarn_c11): New prototype.
4491 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4493 * Make-lang.in (selftest-c): New.
4494 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4495 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
4496 from gcc/Makefile.in.
4498 2018-10-02 Richard Biener <rguenther@suse.de>
4500 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4502 2018-09-26 Joseph Myers <joseph@codesourcery.com>
4505 * c-typeck.c (build_binary_op): Use excess precision for
4506 comparisons of integers and floating-point for C11 and later.
4508 2018-09-26 Martin Jambor <mjambor@suse.cz>
4511 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
4514 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4516 * c-objc-common.c (range_label_for_type_mismatch::get_text):
4517 Update for new param.
4518 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
4521 2018-09-17 Martin Jambor <mjambor@suse.cz>
4524 * c-parser.c: (warn_for_abs): New function.
4525 (c_parser_postfix_expression_after_primary): Call it.
4527 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4529 * c-typeck.c (digest_init): Shorten overlength strings.
4531 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4533 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
4535 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4537 * c-decl.c (finish_decl): Call braced_list_to_string here ...
4538 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
4540 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
4542 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4543 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
4545 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4548 * c-decl.c (implicitly_declare): Update call to
4549 maybe_add_include_fixit to suggest overriding the location, as it
4551 * c-objc-common.c (c_tree_printer): Update for conversion of
4552 show_caret_p to a tri-state.
4554 2018-08-27 Martin Liska <mliska@suse.cz>
4556 * c-decl.c (locate_old_decl): Use new function
4557 fndecl_built_in_p and remove check for FUNCTION_DECL if
4559 (diagnose_mismatched_decls): Likewise.
4560 (merge_decls): Likewise.
4561 (warn_if_shadowing): Likewise.
4562 (pushdecl): Likewise.
4563 (implicitly_declare): Likewise.
4564 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4565 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
4566 * c-typeck.c (build_function_call_vec): Likewise.
4567 (convert_arguments): Likewise.
4569 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4572 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
4573 (diagnose_mismatched_decls): Likewise, in various places.
4574 (warn_if_shadowing): Likewise.
4575 (implicit_decl_warning): Likewise.
4576 (implicitly_declare): Likewise.
4577 (undeclared_variable): Likewise.
4578 (declare_label): Likewise.
4579 (grokdeclarator): Likewise.
4580 (start_function): Likewise.
4581 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4582 (c_parser_parameter_declaration): Likewise.
4583 (c_parser_binary_expression): Likewise.
4584 * c-typeck.c (c_expr_sizeof_expr): Likewise.
4585 (parser_build_binary_op): Likewise.
4586 (build_unary_op): Likewise.
4587 (error_init): Likewise.
4588 (pedwarn_init): Likewise.
4589 (warning_init): Likewise.
4590 (convert_for_assignment): Likewise.
4592 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4594 * c-objc-common.c: Include "gcc-rich-location.h".
4595 (c_tree_printer): Move implemenation of '%T' to...
4596 (print_type): ...this new function.
4597 (range_label_for_type_mismatch::get_text): New function.
4598 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
4599 range for the various ic_argpass cases.
4600 (class maybe_range_label_for_tree_type_mismatch): New class.
4601 (build_binary_op): Use it when calling binary_op_error.
4603 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4605 * c-decl.c (start_decl): Do not warn if variables is named as main
4606 and is a local variable.
4608 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4611 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
4612 objects of unknown size.
4614 2018-08-13 Martin Sebor <msebor@redhat.com>
4616 PR tree-optimization/71625
4617 * c-parser.c (c_parser_declaration_or_fndef): Call
4618 braced_list_to_string.
4620 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
4623 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
4626 2018-08-01 Martin Sebor <msebor@redhat.com>
4628 PR tree-optimization/86650
4629 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
4630 and TREE_BLOCK (t) from within percent_K_format to this callsite.
4632 2018-08-01 Jakub Jelinek <jakub@redhat.com>
4635 * c-typeck.c (init_field_decl_cmp): New function.
4636 (output_pending_init_elements): Use it for field comparisons
4637 instead of pure bit_position comparisons.
4639 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4641 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
4642 type here, instead add "omp declare target implicit" attribute.
4643 (finish_decl): Diagnose vars without mappable type here.
4645 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4646 Thomas Schwinge <thomas@codesourcery.com>
4647 Cesar Philippidis <cesar@codesourcery.com>
4649 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
4650 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
4651 to their non-present_or_* counterparts. Make 'self' an alias to
4652 PRAGMA_OACC_CLAUSE_HOST.
4653 (c_parser_oacc_data_clause): Update GOMP mappings for
4654 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
4655 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
4656 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4657 Remove support for present_or_* clauses.
4658 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4659 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4660 (OACC_DECLARE_CLAUSE_MASK): Likewise.
4661 (OACC_DATA_CLAUSE_MASK): Likewise.
4662 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4663 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4664 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4665 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4666 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4668 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4670 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4671 * gimple-parser.c (c_parser_gimple_statement): Likewise.
4672 (c_parser_gimple_unary_expression): Likewise.
4674 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4677 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4678 before doing POINTER_DIFF_EXPR.
4680 2018-06-07 Marek Polacek <polacek@redhat.com>
4683 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4684 for loop initial declarations.
4686 2018-05-30 David Pagan <dave.pagan@oracle.com>
4689 * c-decl.c (grokdeclarator): Update check for return type warnings.
4690 (start_function): Likewise.
4691 (finish_function): Likewise.
4692 * c-typeck.c (c_finish_return): Update check for return type warnings.
4693 Pass OPT_Wreturn_type to pedwarn when appropriate.
4695 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
4697 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4700 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4702 * gimple-parser.c: Include internal-fn.h.
4703 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4704 (c_parser_gimple_call_internal): New function.
4705 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4706 Fix typos in comment.
4708 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4711 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4712 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4714 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4715 fold_offsetof_1, pass argtype as TYPE to it and drop the
4718 2018-05-02 David Pagan <dave.pagan@oracle.com>
4721 * c-decl.c (old_style_parameter_scope): New function.
4722 * c-parser.c (c_parser_postfix_expression): Check for statement
4723 expressions in old-style function parameter list declarations.
4724 * c-parser.h (old_style_parameter_scope): New extern declaration.
4726 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4729 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4730 it is not TREE_STATIC.
4731 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4732 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4733 its COMPOUND_LITERAL_EXPR_DECL.
4735 2018-03-21 Joseph Myers <joseph@codesourcery.com>
4737 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4738 where all functions return the same _FloatN or _FloatNx type,
4739 treat integer types as _Float64 instead of double.
4741 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4744 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4745 building vector comparison, diagnose it and return error_mark_node.
4747 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4750 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4751 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4752 INTEGER_TYPE element type.
4754 2018-03-13 David Pagan <dave.pagan@oracle.com>
4757 * c-typeck.c (output_init_element): Ensure field initializer
4758 expression is always evaluated if there are side effects.
4760 2018-03-06 Jakub Jelinek <jakub@redhat.com>
4763 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4764 !building_stmt_list_p ().
4766 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
4769 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4770 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4771 and include the BIND_EXPR in the list of things that need to be
4774 2018-02-09 Nathan Sidwell <nathan@acm.org>
4777 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4778 to strict_aliasing_warning.
4780 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4782 * c-typeck.c (really_start_incremental_init, push_init_level,
4783 set_nonincremental_init, output_init_element, process_init_element):
4784 Use DECL_UNNAMED_BIT_FIELD.
4786 2018-01-31 Marek Polacek <polacek@redhat.com>
4789 * c-parser.c (c_parser_compound_statement_nostart): Call
4790 expansion_point_location_if_in_system_header.
4792 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4795 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4798 2018-01-13 Jakub Jelinek <jakub@redhat.com>
4801 * c-tree.h (decl_constant_value_1): Add a bool argument.
4802 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4803 returning a CONSTRUCTOR if it is true. Use error_operand_p.
4804 (decl_constant_value): Adjust caller.
4805 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4806 decl_constant_value_1 as IN_INIT. Otherwise, punt if
4807 decl_constant_value returns initializer that has BLKmode or
4809 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4812 Alan Hayward <alan.hayward@arm.com>
4813 David Sherwood <david.sherwood@arm.com>
4815 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4816 TYPE_VECTOR_SUBPARTS.
4818 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4820 Update copyright years.
4822 2018-01-01 Jakub Jelinek <jakub@redhat.com>
4825 * c-parser.c (c_parser_braced_init, c_parser_initelt,
4826 c_parser_conditional_expression, c_parser_cast_expression,
4827 c_parser_sizeof_expression, c_parser_alignof_expression,
4828 c_parser_postfix_expression, c_parser_omp_declare_reduction,
4829 c_parser_transaction_expression): Use set_error () method instead
4830 of setting value member to error_mark_node.
4832 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
4834 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4835 and _Float<N>X built-in functions.
4837 2017-12-22 Jakub Jelinek <jakub@redhat.com>
4840 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4841 TYPE_STUB_DECL and call rest_of_type_compilation before processing
4842 incomplete vars rather than after it.
4845 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4846 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4847 and consider empty ones if there are no other stmts. For
4848 -Wunused-value walk all statements before the one only followed by
4851 2017-12-22 Mike Stump <mikestump@comcast.net>
4852 Eric Botcazou <ebotcazou@adacore.com>
4854 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4855 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4856 (c_parser_do_statement): Likewise.
4857 (c_parser_for_statement): Likewise.
4858 (c_parser_statement_after_labels): Adjust calls to above.
4859 (c_parse_pragma_ivdep): New static function.
4860 (c_parser_pragma_unroll): Likewise.
4861 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4862 <PRAGMA_UNROLL>: New case.
4864 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4866 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4867 perform_integral_promotions, digest_init): Replace Yoda conditions
4868 with typical order conditions.
4869 * c-decl.c (check_bitfield_type_and_width): Likewise.
4871 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4873 * c-typeck.c (c_safe_arg_type_equiv_p,
4874 c_safe_function_type_cast_p): New function.
4875 (build_c_cast): Implement -Wcast-function-type.
4877 2017-12-14 Richard Biener <rguenther@suse.de>
4880 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4881 like REALPART_EXPR for the behavior of whether its operand
4884 2017-12-12 Marek Polacek <polacek@redhat.com>
4887 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4889 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4891 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4892 * c-parser.c (add_debug_begin_stmt): New.
4893 (c_parser_declaration_or_fndef): Call it.
4894 (c_parser_compound_statement_nostart): Likewise.
4895 (c_parser_statement_after_labels): Likewise.
4896 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4898 2017-12-07 Joseph Myers <joseph@codesourcery.com>
4900 * c-decl.c (build_compound_literal): Add parameter alignas_align
4901 and set alignment of decl if nonzero.
4902 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4903 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4905 (c_parser_struct_declaration): Update syntax comment.
4906 (c_parser_type_name): Add alignas_ok argument and pass it to
4908 (c_parser_cast_expression): Pass true to c_parser_type_name and
4909 give error if a cast used an _Alignas specifier.
4910 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4911 give error if sizeof (type-name) used an _Alignas specifier.
4912 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4913 give error if _Alignof (type-name) used an _Alignas specifier.
4914 (c_parser_postfix_expression_after_paren_type): Check specified
4915 alignment for a compound literal and pass it to
4916 build_compound_literal.
4917 * c-parser.h (c_parser_type_name): Update prototype.
4918 * c-tree.h (build_compound_literal): Update prototype.
4920 2017-12-07 Martin Sebor <msebor@redhat.com>
4923 * c-decl.c (c_decl_attributes): Look up existing declaration and
4924 pass it to decl_attributes.
4926 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4929 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4930 reserved for use by the implementation.
4932 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4934 * c-decl.c: Include "c-family/c-spellcheck.h".
4936 2017-12-05 Martin Liska <mliska@suse.cz>
4937 Jakub Jelinek <jakub@redhat.com>
4939 * c-typeck.c (pointer_diff): Add new argument and instrument
4940 pointer subtraction.
4941 (build_binary_op): Similar for pointer comparison.
4943 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4946 * c-parser.c: Include tree-iterator.h.
4947 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4948 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4952 * c-tree.h (decl_constant_value_1): Declare.
4953 * c-typeck.c (decl_constant_value_1): New function.
4954 (decl_constant_value): Use it.
4955 * c-fold.c (c_fully_fold_internal): If in_init, use
4956 decl_constant_value_1 instead of decl_constant_value.
4958 2017-11-30 Jakub Jelinek <jakub@redhat.com>
4960 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4962 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4965 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4966 c_switch_covers_all_cases_p returns true.
4968 2017-11-28 Julia Koval <julia.koval@intel.com>
4969 Sebastian Peryt <sebastian.peryt@intel.com>
4971 * Make-lang.in (c/c-array-notation.o): Remove.
4972 * c-array-notation.c: Delete.
4973 * c-decl.c: Remove cilkplus condition.
4974 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4975 c_parser_cilk_verify_simd, c_parser_array_notation,
4976 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4977 c_parser_cilk_simd_fn_vector_attrs,
4978 c_finish_cilk_simd_fn_tokens): Delete.
4979 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4980 (c_parser_direct_declarator_inner): Ditto.
4981 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4982 (c_parser_attributes, c_parser_compound_statement,
4983 c_parser_statement_after_labels, c_parser_if_statement,
4984 c_parser_switch_statement, c_parser_while_statement,
4985 c_parser_do_statement, c_parser_for_statement,
4986 c_parser_unary_expression, c_parser_postfix_expression,
4987 c_parser_postfix_expression_after_primary,
4988 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4989 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4991 * c-typeck.c (build_array_ref, build_function_call_vec,
4993 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4994 c_finish_loop, build_binary_op): Remove cilkplus support.
4996 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4998 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
5001 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
5003 * Make-lang.in (c.install-plugin): Install backend import library.
5005 2017-11-23 Jakub Jelinek <jakub@redhat.com>
5007 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
5008 pragma_stmt context.
5010 2017-11-23 Mike Stump <mikestump@comcast.net>
5011 Eric Botcazou <ebotcazou@adacore.com>
5013 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
5015 (c_parser_do_statement): Likewise.
5016 (c_parser_for_statement): Likewise.
5018 2017-11-22 David Malcolm <dmalcolm@redhat.com>
5021 * c-objc-common.c (c_tree_printer): Convert penultimate param from
5022 bool to bool *. Within '%T' handling, if showing an "aka", use
5023 "quoted" param to add appropriate quoting.
5025 2017-11-22 Marek Polacek <polacek@redhat.com>
5030 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
5032 2017-11-21 David Malcolm <dmalcolm@redhat.com>
5035 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
5036 earlier failed lookups.
5038 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
5040 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
5041 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
5043 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5046 * c-decl.c: Include "c-family/known-headers.h".
5047 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
5048 to known-headers.cc.
5049 (class suggest_missing_header): Move to known-header.h.
5050 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
5051 than get_c_name_hint.
5053 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5055 * c-decl.c (get_c_name_hint): New function.
5056 (class suggest_missing_header): New class.
5057 (lookup_name_fuzzy): Call get_c_name_hint and use it to
5058 suggest missing headers to the user.
5060 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5062 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
5063 Include "c-family/name-hint.h"
5064 (implicit_decl_warning): Convert "hint" from
5065 const char * to name_hint. Pass location to
5066 lookup_name_fuzzy. Suppress any deferred diagnostic if the
5067 warning was not printed.
5068 (undeclared_variable): Likewise for "guessed_id".
5069 (lookup_name_fuzzy): Convert return type from const char *
5070 to name_hint. Add location_t param.
5071 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
5072 Include "c-family/name-hint.h"
5073 (c_parser_declaration_or_fndef): Convert "hint" from
5074 const char * to name_hint. Pass location to lookup_name_fuzzy.
5075 (c_parser_parameter_declaration): Likewise.
5077 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5081 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
5083 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
5084 handle_omp_array_sections): Likewise.
5085 (digest_init): Don't call decl_constant_value_for_optimization.
5086 * c-tree.h (decl_constant_value_for_optimization): Removed.
5087 * c-fold.c (c_fold_array_ref): New function.
5088 (c_fully_fold_internal): Add LVAL argument, propagate it through
5089 recursive calls. For VAR_P call decl_constant_value and
5090 unshare if not LVAL and either optimizing or IN_INIT. Remove
5091 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
5092 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
5093 (c_fully_fold): Add LVAL argument, pass it through to
5094 c_fully_fold_internal.
5095 (decl_constant_value_for_optimization): Removed.
5097 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5100 * c-parser.c (check_tgmath_function): New function.
5101 (enum tgmath_parm_kind): New enum.
5102 (c_parser_postfix_expression): Handle __builtin_tgmath.
5104 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5106 * c-decl.c (implicit_decl_warning): Update for renaming of
5107 pedwarn_at_rich_loc and warning_at_rich_loc.
5108 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
5109 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
5110 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
5111 (c_parser_struct_or_union_specifier): Likewise for renaming of
5112 pedwarn_at_rich_loc.
5113 (c_parser_parameter_declaration): Likewise for renaming of
5115 * c-typeck.c (build_component_ref): Likewise.
5116 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
5117 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
5118 (set_init_label): Likewise for renaming of error_at_rich_loc.
5120 2017-10-30 Richard Biener <rguenther@suse.de>
5122 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
5125 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5127 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
5128 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
5130 2017-10-25 David Malcolm <dmalcolm@redhat.com>
5133 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
5136 2017-10-25 Jakub Jelinek <jakub@redhat.com>
5139 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
5140 newdecl to corresponding __builtin_ if any.
5142 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
5145 * c-decl.c (diagnose_mismatched_decls): Use
5146 OPT_Wbuiltin_declaration_mismatch.
5148 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5150 * c-parser.c (c_parser_require): Add "type_is_unique" param and
5151 use it to guard calls to maybe_suggest_missing_token_insertion.
5152 (c_parser_parms_list_declarator): Override default value of new
5153 "type_is_unique" param to c_parser_require.
5154 (c_parser_asm_statement): Likewise.
5155 * c-parser.h (c_parser_require): Add "type_is_unique" param,
5158 2017-10-11 Nathan Sidwell <nathan@acm.org>
5160 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
5162 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5164 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
5165 operating on trees as wide_ints.
5166 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
5167 (c_tree_equal): Likewise.
5169 2017-10-04 David Malcolm <dmalcolm@redhat.com>
5171 * c-decl.c (push_parm_decl): Store c_parm's location into the
5173 (build_c_parm): Add "loc" param and store it within the c_parm.
5174 * c-parser.c (struct c_parser): Add "last_token_location" field.
5175 (c_parser_consume_token): Store location of the token into the
5177 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
5178 when handling a FUNCTION_DECL, if it doesn't already have them.
5179 (c_parser_parameter_declaration): Generate a location for the
5180 parameter, and pass it to the call to build_c_parm.
5181 * c-tree.h (struct c_parm): Add field "loc".
5182 (build_c_parm): Add location_t param.
5183 * c-typeck.c (get_fndecl_argument_location): New function.
5184 (inform_for_arg): New function.
5185 (convert_for_assignment): Use inform_for_arg when dealing with
5188 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5190 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
5192 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
5193 don't SET_DECL_C_BIT_FIELD here.
5196 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
5197 instead of trying to set just TREE_READONLY manually.
5199 2017-09-16 Tom de Vries <tom@codesourcery.com>
5202 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
5205 2017-09-15 Joseph Myers <joseph@codesourcery.com>
5208 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
5210 (build_conditional_expr): For C11, generate result with excess
5211 precision when one argument is an integer and the other is of a
5212 type using excess precision.
5214 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5216 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
5218 2017-09-13 Marek Polacek <polacek@redhat.com>
5221 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
5222 than expr.original_type.
5224 2017-09-12 Nathan Sidwell <nathan@acm.org>
5226 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5227 resort_sorted_fields): Moved from c-family/c-common.c.
5228 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
5230 2017-09-01 Joseph Myers <joseph@codesourcery.com>
5233 * c-typeck.c (build_atomic_assign): Handle argument with excess
5234 precision. Ensure any EXCESS_PRECISION_EXPR is present in
5235 argument passed to build_binary_op and convert_for_assignment but
5236 not for call to c_fully_fold.
5237 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
5238 Ensure build_binary_op is called with argument with original
5239 semantic type. Avoid calling c_fully_fold with an
5240 EXCESS_PRECISION_EXPR from build_binary_op.
5242 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5245 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
5247 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5248 Alan Hayward <alan.hayward@arm.com>
5249 David Sherwood <david.sherwood@arm.com>
5251 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
5252 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
5253 m1 and m2 to the signed equivalent of a fixed-point
5256 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5258 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
5259 than CAN_HAVE_LOCATION_P when determining whether to use the
5260 location_t value within "value".
5262 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5264 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
5265 rather than peeking the location of the first token.
5266 * c-tree.h (c_expr::get_location): New method.
5268 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5270 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
5271 to check_function_arguments.
5273 2017-08-18 Marek Polacek <polacek@redhat.com>
5275 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
5278 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5281 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
5282 (check_bitfield_type_and_width): Don't allow bit-field with
5283 warn_if_not_aligned type.
5285 2017-08-14 Martin Sebor <msebor@redhat.com>
5288 * c-objc-common.c (c_objc_common_init): Handle 'G'.
5290 2017-08-11 Marek Polacek <polacek@redhat.com>
5293 * c-decl.c (pushtag): Only print inform if the warning was printed.
5294 (grokdeclarator): Likewise.
5296 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5298 * c-parser.c (c_parser_error): Rename to...
5299 (c_parser_error_richloc): ...this, making static, and adding
5300 "richloc" parameter, passing it to the c_parse_error call,
5301 rather than calling c_parser_set_source_position_from_token.
5302 (c_parser_error): Reintroduce, reimplementing in terms of the
5303 above, converting return type from void to bool.
5304 (class token_pair): New class.
5305 (struct matching_paren_traits): New struct.
5306 (matching_parens): New typedef.
5307 (struct matching_brace_traits): New struct.
5308 (matching_braces): New typedef.
5309 (get_matching_symbol): New function.
5310 (c_parser_require): Add param MATCHING_LOCATION, using it to
5311 highlight matching "opening" tokens for missing "closing" tokens.
5312 (c_parser_skip_until_found): Likewise.
5313 (c_parser_static_assert_declaration_no_semi): Convert explicit
5314 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
5315 class matching_parens, so that the pertinent open parenthesis is
5316 highlighted when there are problems locating the close
5318 (c_parser_struct_or_union_specifier): Likewise.
5319 (c_parser_typeof_specifier): Likewise.
5320 (c_parser_alignas_specifier): Likewise.
5321 (c_parser_simple_asm_expr): Likewise.
5322 (c_parser_braced_init): Likewise, for matching_braces.
5323 (c_parser_paren_condition): Likewise, for matching_parens.
5324 (c_parser_switch_statement): Likewise.
5325 (c_parser_for_statement): Likewise.
5326 (c_parser_asm_statement): Likewise.
5327 (c_parser_asm_operands): Likewise.
5328 (c_parser_cast_expression): Likewise.
5329 (c_parser_sizeof_expression): Likewise.
5330 (c_parser_alignof_expression): Likewise.
5331 (c_parser_generic_selection): Likewise.
5332 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
5333 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
5334 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
5335 In case CPP_OPEN_PAREN, pass loc_open_paren to the
5336 c_parser_skip_until_found call.
5337 (c_parser_objc_class_definition): Use class matching_parens as
5339 (c_parser_objc_method_decl): Likewise.
5340 (c_parser_objc_try_catch_finally_statement): Likewise.
5341 (c_parser_objc_synchronized_statement): Likewise.
5342 (c_parser_objc_at_property_declaration): Likewise.
5343 (c_parser_oacc_wait_list): Likewise.
5344 (c_parser_omp_var_list_parens): Likewise.
5345 (c_parser_omp_clause_collapse): Likewise.
5346 (c_parser_omp_clause_default): Likewise.
5347 (c_parser_omp_clause_if): Likewise.
5348 (c_parser_omp_clause_num_threads): Likewise.
5349 (c_parser_omp_clause_num_tasks): Likewise.
5350 (c_parser_omp_clause_grainsize): Likewise.
5351 (c_parser_omp_clause_priority): Likewise.
5352 (c_parser_omp_clause_hint): Likewise.
5353 (c_parser_omp_clause_defaultmap): Likewise.
5354 (c_parser_oacc_single_int_clause): Likewise.
5355 (c_parser_omp_clause_ordered): Likewise.
5356 (c_parser_omp_clause_reduction): Likewise.
5357 (c_parser_omp_clause_schedule): Likewise.
5358 (c_parser_omp_clause_num_teams): Likewise.
5359 (c_parser_omp_clause_thread_limit): Likewise.
5360 (c_parser_omp_clause_aligned): Likewise.
5361 (c_parser_omp_clause_linear): Likewise.
5362 (c_parser_omp_clause_safelen): Likewise.
5363 (c_parser_omp_clause_simdlen): Likewise.
5364 (c_parser_omp_clause_depend): Likewise.
5365 (c_parser_omp_clause_map): Likewise.
5366 (c_parser_omp_clause_device): Likewise.
5367 (c_parser_omp_clause_dist_schedule): Likewise.
5368 (c_parser_omp_clause_proc_bind): Likewise.
5369 (c_parser_omp_clause_uniform): Likewise.
5370 (c_parser_omp_for_loop): Likewise.
5371 (c_parser_cilk_clause_vectorlength): Likewise.
5372 (c_parser_cilk_clause_linear): Likewise.
5373 (c_parser_transaction_expression): Likewise.
5374 * c-parser.h (c_parser_require): Add param matching_location with
5375 default UNKNOWN_LOCATION.
5376 (c_parser_error): Convert return type from void to bool.
5377 (c_parser_skip_until_found): Add param matching_location with
5378 default UNKNOWN_LOCATION.
5380 2017-08-09 Marek Polacek <polacek@redhat.com>
5382 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
5383 * c-tree.h (build_external_ref): Update declaration.
5384 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
5385 (build_external_ref): Change the type of a parameter to bool.
5386 (parser_build_binary_op): Use true/false instead of 1/0.
5387 (pointer_diff): Likewise.
5388 (build_modify_expr): Likewise.
5389 (set_designator): Change the type of a parameter to bool.
5390 (set_init_index): Use true/false instead of 1/0.
5391 (set_init_label): Likewise.
5392 (output_init_element): Change the type of a parameter to bool.
5393 (output_pending_init_elements): Use true/false instead of 1/0.
5394 (process_init_element): Likewise.
5395 (build_binary_op): Change the type of a parameter to bool.
5397 2017-08-09 Marek Polacek <polacek@redhat.com>
5400 * c-typeck.c (pedwarn_init): Make the function take a variable list.
5401 Call emit_diagnostic_valist instead of pedwarn.
5402 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
5403 Print the relevant types in diagnostics.
5405 2017-08-09 Marek Polacek <polacek@redhat.com>
5408 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
5409 build_conditional_expr.
5410 * c-parser.c (c_parser_conditional_expression): Create locations for
5411 EXP1 and EXP2 from their source ranges. Pass the locations down to
5412 build_conditional_expr.
5413 * c-tree.h (build_conditional_expr): Update declaration.
5414 * c-typeck.c (build_conditional_expr): Add location_t parameters.
5415 For -Wsign-compare, also print the types.
5417 2017-08-08 Martin Liska <mliska@suse.cz>
5419 * c-convert.c: Include header files.
5420 * c-typeck.c: Likewise.
5422 2017-08-07 Martin Liska <mliska@suse.cz>
5424 * c-parser.c (c_parser_attributes): Canonicalize name of an
5427 2017-08-02 Marek Polacek <polacek@redhat.com>
5430 * c-parser.c (c_parser_unary_expression): Use set_error.
5434 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
5435 warnings. Avoid walking MACRO_MAP_LOCATIONS.
5437 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
5438 Martin Liska <mliska@suse.cz>
5440 * c-typeck.c (c_finish_goto_label): Build gimple predict
5443 2017-07-31 Martin Liska <mliska@suse.cz>
5446 * c-convert.c (convert): Guard condition with flag_sanitize_p
5447 also with current_function_decl non-null equality.
5448 * c-decl.c (grokdeclarator): Likewise.
5449 * c-typeck.c (build_binary_op): Likewise.
5451 2017-07-25 Marek Polacek <polacek@redhat.com>
5453 * c-decl.c (grokfield): Remove local variable.
5455 2017-07-25 Marek Polacek <polacek@redhat.com>
5458 * c-parser.c (c_parser_else_body): Don't warn about multistatement
5459 macro expansion if the body is in { }.
5460 (c_parser_while_statement): Likewise.
5461 (c_parser_for_statement): Likewise.
5463 2017-07-18 Nathan Sidwell <nathan@acm.org>
5465 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
5467 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5469 * c-decl.c (implicitly_declare): When suggesting a missing
5470 #include, provide a fix-it hint.
5472 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5474 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
5475 and call that instead.
5476 * c-tree.h (selftest::run_c_tests): New decl.
5478 2017-06-26 Marek Polacek <polacek@redhat.com>
5481 * c-parser.c (c_parser_if_body): Set the location of the
5482 body of the conditional after parsing all the labels. Call
5483 warn_for_multistatement_macros.
5484 (c_parser_else_body): Likewise.
5485 (c_parser_switch_statement): Likewise.
5486 (c_parser_while_statement): Likewise.
5487 (c_parser_for_statement): Likewise.
5488 (c_parser_statement): Add a default argument. Save the location
5489 after labels have been parsed.
5490 (c_parser_c99_block_statement): Likewise.
5492 2017-06-19 Richard Biener <rguenther@suse.de>
5494 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5495 negated _Literals to parse _Literal (int) -1.
5497 2017-06-13 Martin Liska <mliska@suse.cz>
5500 * c-convert.c (convert): Use sanitize_flags_p.
5501 * c-decl.c (grokdeclarator): Likewise.
5502 * c-typeck.c (convert_for_assignment): Likewise.
5503 (c_finish_return): Likewise.
5504 (build_binary_op): Likewise.
5506 2017-06-08 Jakub Jelinek <jakub@redhat.com>
5509 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
5510 to sizetype before size_binop.
5512 2017-06-07 Jakub Jelinek <jakub@redhat.com>
5514 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
5517 2017-06-06 Marek Polacek <polacek@redhat.com>
5520 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
5522 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
5524 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5526 * c-parser.c (c_parser_binary_expression): Implement the
5527 -Wsizeof_pointer_div warning.
5528 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
5529 from a parenthesized expression.
5530 (c_parser_expr_list): Use c_last_sizeof_loc.
5531 * c-tree.h (c_last_sizeof_loc): New external.
5532 * c-typeck.c (c_last_sizeof_loc): New variable.
5533 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
5535 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
5538 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5540 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5542 * c-objc-common.c (c_tree_printer): Gain bool and const char **
5545 2017-05-24 Martin Sebor <msebor@redhat.com>
5548 * c-fold.c (c_fully_fold_internal): Adjust.
5549 * c-typeck.c (parser_build_unary_op): Adjust.
5551 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
5553 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
5554 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
5557 2017-05-23 Marek Polacek <polacek@redhat.com>
5559 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
5562 2017-05-22 Jakub Jelinek <jakub@redhat.com>
5564 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
5565 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
5566 it returned invariant. Call tree_invariant_p unconditionally
5567 afterwards to decide whether to return expr or op0.
5569 2017-05-22 Nathan Sidwell <nathan@acm.org>
5571 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
5573 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
5575 * c-parser.c (c_parser_omp_clause_default): Handle
5576 "OMP_CLAUSE_DEFAULT_PRESENT".
5578 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5580 * config-lang.in (gtfiles): Add c-family/c-format.c.
5582 2017-05-18 Nathan Sidwell <nathan@acm.org>
5584 * c-decl.c (pushdecl_top_level): Delete unused function.
5586 2017-05-18 Marek Polacek <polacek@redhat.com>
5588 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
5589 (check_earlier_gotos): Likewise.
5590 (define_label): Likewise.
5591 (pending_xref_error): Likewise.
5592 (smallest_type_quals_location): Likewise.
5593 (grokdeclarator): Likewise.
5594 (grokparms): Likewise.
5595 (identifier_global_value): Likewise.
5596 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
5597 (find_init_member): Likewise.
5599 2017-05-18 Marek Polacek <polacek@redhat.com>
5601 * c-decl.c (start_decl): Use false/true instead of 0/1.
5602 (grokdeclarator): Likewise.
5603 (finish_struct): Likewise.
5604 (start_function): Change the return type to bool. Use false/true
5606 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
5607 * c-tree.h (start_function): Update.
5608 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
5609 (set_designator): Change the return type to bool. Use false/true
5612 2017-05-17 Marek Polacek <polacek@redhat.com>
5614 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
5615 * c-typeck.c: Likewise.
5617 2017-05-17 Marek Polacek <polacek@redhat.com>
5620 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5621 DECL_IGNORED_P even for non-static compound literals.
5623 2017-05-17 Martin Liska <mliska@suse.cz>
5625 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
5626 use it instead of int type.
5628 2017-05-17 Marek Polacek <polacek@redhat.com>
5630 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
5632 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
5633 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
5634 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
5635 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
5637 (c_parser_conditional_expression): Likewise.
5638 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
5639 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
5640 (process_init_element): Likewise.
5641 (build_binary_op): Likewise.
5642 (handle_omp_array_sections_1): Likewise.
5644 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
5646 * c-parser.c (c_parser_omp_clause_num_gangs)
5647 (c_parser_omp_clause_num_workers)
5648 (c_parser_omp_clause_vector_length): Merge functions into...
5649 (c_parser_oacc_single_int_clause): ... this new function. Adjust
5652 2017-05-11 Nathan Sidwell <nathan@acm.org>
5654 * gimple-parser.c: Don't #include tree-dump.h.
5656 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5659 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5661 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5664 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5665 incorrect __MEM syntax.
5667 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5670 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5673 2017-05-09 Nathan Sidwell <nathan@acm.org>
5675 * c-tree.h (pushdecl): Declare.
5677 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5679 * c-decl.c (warn_defaults_to): Replace report_diagnostic
5680 with diagnostic_report_diagnostic.
5681 * c-errors.c (pedwarn_c99): Likewise.
5682 (pedwarn_c90): Likewise.
5684 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5687 * c-gimplify.c (c_gimplify_expr): Remove calls to
5688 cilk_gimplifY_call_params_in_spawned_fn.
5690 2017-04-25 David Malcolm <dmalcolm@redhat.com>
5692 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5693 hint for removing extra semicolon.
5695 2017-04-21 Jakub Jelinek <jakub@redhat.com>
5698 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5699 enabled, set specs->type to integer_type_node.
5701 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5703 * c-array-notation.c: Fix typo in comment.
5705 2017-03-29 Marek Polacek <polacek@redhat.com>
5708 * c-decl.c (finish_decl): Check VAR_P.
5710 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5713 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5714 * c-typeck.c (c_mark_addressable): Likewise. Look through
5715 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5717 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5719 2017-03-23 Marek Polacek <polacek@redhat.com>
5721 * c-tree.h: Remove a C_RID_YYCODE reference.
5723 2017-03-21 Jakub Jelinek <jakub@redhat.com>
5726 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5727 optional COMPOUND_EXPR with ubsan instrumentation.
5729 2017-03-17 Marek Polacek <polacek@redhat.com>
5731 * c-parser.c: Add C11 references.
5733 2017-03-15 Marek Polacek <polacek@redhat.com>
5735 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5737 2017-03-11 Marek Polacek <polacek@redhat.com>
5739 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
5741 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5743 PR translation/79848
5744 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5746 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5748 2017-03-09 Marek Polacek <polacek@redhat.com>
5751 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5752 parameter declarations with initializers.
5754 2017-03-09 Jakub Jelinek <jakub@redhat.com>
5757 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5760 2017-03-07 Jakub Jelinek <jakub@redhat.com>
5763 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5764 for "may only be used in compound statements" diagnostics, change it
5765 such that the same translatable string is used for all pragmas. For
5766 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5768 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5769 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5770 "may only be used in compound statements" diagnostics, such that the
5771 same translatable string is used for all pragmas.
5773 2017-03-04 Marek Polacek <polacek@redhat.com>
5776 * c-decl.c (implicit_decl_warning): Add missing space.
5778 2017-03-03 Marek Polacek <polacek@redhat.com>
5781 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5782 current_function_prototype_arg_types is error_mark_node. Fix
5783 formatting. Use TREE_VALUE instead of TREE_TYPE.
5785 2017-03-03 Jakub Jelinek <jakub@redhat.com>
5788 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5789 %<min%> or %<max%> in the diagnostics, instead mention identifier.
5790 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5794 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5795 instead of %<_Generic>.
5796 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5797 (c_parser_omp_target_exit_data): Use %<release%> instead of
5800 2017-02-28 Jakub Jelinek <jakub@redhat.com>
5802 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5803 instead of just cond ? "..." : "...".
5804 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5805 for "enter"/"exit" keyword.
5806 (c_finish_oacc_routine): Don't use %s to supply portions of the
5809 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5812 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5813 handle -Wrestrict here.
5814 * c-typeck.c (build_function_call_vec): Adjust
5815 check_function_arguments caller.
5817 2017-02-23 Richard Biener <rguenther@suse.de>
5820 * gimple-parser.c (c_parser_gimple_statement): Use set_error
5821 to initialize c_exprs to return.
5822 (c_parser_gimple_binary_expression): Likewise.
5823 (c_parser_gimple_unary_expression): Likewise.
5824 (c_parser_gimple_postfix_expression): Likewise.
5826 2017-02-22 Marek Polacek <polacek@redhat.com>
5829 * c-typeck.c (convert_arguments): Handle error_mark_node.
5831 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5833 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5834 value of c_parser_parse_ssa_name against error_mark_node and emit
5835 error if ssa name is anonymous and written as default definition.
5837 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5839 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5842 2017-02-16 Jakub Jelinek <jakub@redhat.com>
5845 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5846 ignore #pragma omp target even when not followed by identifier.
5848 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5850 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5851 (c_parser_gimple_unary_expression): Likewise.
5853 2017-02-13 Jakub Jelinek <jakub@redhat.com>
5855 * c-parser.c (c_parser_oacc_declare): Add missing space in
5858 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5861 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5862 set_c_expr_source_range when parsing ssa-name.
5864 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
5865 Richard Biener <rguenther@suse.de>
5867 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5868 building IL when arguments are error_mark_node.
5869 (c_parser_gimple_unary_expression): Likewise.
5870 (c_parser_gimple_if_stmt): Likewise.
5871 (c_parser_gimple_switch_stmt): Likewise.
5872 (c_parser_gimple_return_stmt): Likewise.
5873 (c_parser_parse_ssa_name): When name lookup fails do not build
5874 an SSA name. Use undeclared rather than not declared in error
5877 2017-02-09 Marek Polacek <polacek@redhat.com>
5880 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5881 instead of c_parser_skip_until_found.
5883 2017-02-09 Jakub Jelinek <jakub@redhat.com>
5886 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5887 symtab_node::get on automatic variables.
5889 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5890 Chung-Lin Tang <cltang@codesourcery.com>
5892 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5893 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5895 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5897 2017-02-07 Richard Biener <rguenther@suse.de>
5899 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5900 (c_parser_gimple_postfix_expression_after_primary):
5901 Do not use c_build_function_call_vec to avoid folding and promotion.
5904 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5907 * c-decl.c (pop_scope): Pass main_input_filename to
5908 build_translation_unit_decl.
5910 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5912 * c-parser.c: Include "read-rtl-function.h" and
5914 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5915 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5916 production. Update for renaming of field "gimple_pass" to
5917 "gimple_or_rtl_pass". If __RTL was seen, call
5918 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5919 to an auto_timevar, to cope with early exit.
5920 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5921 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5922 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5924 (c_parser_parse_rtl_body): New function.
5925 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5926 (struct c_declspecs): Rename field "gimple_pass" to
5927 "gimple_or_rtl_pass". Add field "rtl_p".
5928 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5929 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5930 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5931 (c_parser_gimple_or_rtl_pass_list): ...this.
5933 2017-01-20 Marek Polacek <polacek@redhat.com>
5936 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5938 2017-01-13 Richard Biener <rguenther@suse.de>
5940 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5943 2017-01-13 Richard Biener <rguenther@suse.de>
5945 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5946 _Literal ( type-name ) number.
5948 2017-01-12 Richard Biener <rguenther@suse.de>
5950 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5953 2017-01-11 Jakub Jelinek <jakub@redhat.com>
5956 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5959 2017-01-11 Richard Biener <rguenther@suse.de>
5962 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5963 returns on parse errors.
5965 2017-01-04 Marek Polacek <polacek@redhat.com>
5968 * c-parser.c (c_parser_postfix_expression): Mark zero character
5969 constants by setting original_type in c_expr.
5970 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5971 with a zero character constant.
5972 (char_type_p): New function.
5974 2017-01-04 David Malcolm <dmalcolm@redhat.com>
5976 * c-parser.c (c_parser_declaration_or_fndef): Create a
5977 rich_location at init_loc and parse it to start_init.
5978 (last_init_list_comma): New global.
5979 (c_parser_braced_init): Update last_init_list_comma when parsing
5980 commas. Pass it to pop_init_level. Pass location of closing
5981 brace to pop_init_level.
5982 (c_parser_postfix_expression_after_paren_type): Create a
5983 rich_location at type_loc and parse it to start_init.
5984 (c_parser_omp_declare_reduction): Likewise for loc.
5985 * c-tree.h (start_init): Add rich_location * param.
5986 (pop_init_level): Add location_t param.
5987 * c-typeck.c (struct initializer_stack): Add field
5988 "missing_brace_richloc".
5989 (start_init): Add richloc param, use it to initialize
5990 the stack node's missing_brace_richloc.
5991 (last_init_list_comma): New decl.
5992 (finish_implicit_inits): Pass last_init_list_comma to
5994 (push_init_level): When finding missing open braces, add fix-it
5995 hints to the richloc.
5996 (pop_init_level): Add "insert_before" param and pass it
5997 when calling pop_init_level. Add fixits about missing
5998 close braces to any richloc. Use the richloc for the
5999 -Wmissing-braces warning.
6000 (set_designator): Pass last_init_list_comma to pop_init_level.
6001 (process_init_element): Likewise.
6003 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6005 Update copyright years.
6007 2016-12-21 Jakub Jelinek <jakub@redhat.com>
6010 * c-typeck.c (build_function_call_vec): If check_function_arguments
6011 returns true, set TREE_NO_WARNING on CALL_EXPR.
6014 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
6015 to *expr instead of overwriting it.
6017 2016-12-20 Richard Biener <rguenther@suse.de>
6019 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
6021 (c_parser_gimple_statement): Only build assigns for non-error
6023 (c_parser_gimple_postfix_expression_after): Improve error recovery.
6025 2016-12-14 Martin Jambor <mjambor@suse.cz>
6027 * c-parser.c: Include omp-general.h and omp-offload.h instead of
6029 (c_finish_oacc_routine): Adjusted call to
6030 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
6031 to use their new names.
6032 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
6034 (c_parser_oacc_update): Likewise.
6035 (c_parser_omp_simd): Likewise.
6036 (c_parser_omp_target_update): Likewise.
6037 * c-typeck.c: Include omp-general.h instead of omp-low.h.
6038 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
6040 (c_finish_omp_cancellation_point): Likewise.
6041 * gimple-parser.c: Do not include omp-low.h
6043 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
6044 James Norris <jnorris@codesourcery.com>
6046 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
6047 EXIT_DATA,WAIT} are not used in compound statements.
6048 (c_parser_oacc_enter_exit_data): Update diagnostics.
6050 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6053 * c-decl.c (diagnose_mismatched_decls): Use
6054 OPT_Wbuiltin_declaration_mismatch here too.
6056 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
6057 Alan Hayward <alan.hayward@arm.com>
6058 David Sherwood <david.sherwood@arm.com>
6060 * c-decl.c (merge_decls): Use SET_DECL_MODE.
6061 (make_label, finish_struct): Likewise.
6063 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6064 Richard Biener <rguenther@suse.de>
6066 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
6067 * config-lang.in (gtfiles): Add c/c-parser.h.
6068 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
6069 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
6070 * c-parser.c (enum c_id_kind, struct c_token,
6071 c_parser_next_token_is, c_parser_next_token_is_not,
6072 c_parser_next_token_is_keyword,
6073 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
6075 * c-parser.h: ... new header.
6076 * c-parser.c: Include c-parser.h and gimple-parser.h.
6077 (c_parser_peek_token, c_parser_peek_2nd_token,
6078 c_token_starts_typename, c_parser_next_token_starts_declspecs,
6079 c_parser_next_tokens_start_declaration, c_parser_consume_token,
6080 c_parser_error, c_parser_require, c_parser_skip_until_found,
6081 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
6082 c_parser_type_name): Export.
6083 (c_parser_tokens_buf): New function.
6084 (c_parser_error): Likewise.
6085 (c_parser_set_error): Likewise.
6086 (c_parser_declspecs): Handle RID_GIMPLE.
6087 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
6088 via c_parser_parse_gimple_body.
6089 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
6090 c_token_starts_typename, c_parser_next_token_starts_declspecs,
6091 c_parser_next_tokens_start_declaration, c_parser_consume_token,
6092 c_parser_error, c_parser_require, c_parser_skip_until_found,
6093 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
6094 c_parser_type_name): Declare.
6095 (struct c_parser): Declare forward.
6096 (c_parser_tokens_buf): Declare.
6097 (c_parser_error): Likewise.
6098 (c_parser_set_error): Likewise.
6099 * gimple-parser.c: New file.
6100 * gimple-parser.h: Likewise.
6102 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6105 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6108 2016-09-11 Le-Chun Wu <lcwu@google.com>
6109 Mark Wielaard <mjw@redhat.com>
6111 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
6112 to the given -Wshadow= variant.
6114 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6116 * c-typeck.c: Include memmodel.h.
6118 2016-10-13 Jakub Jelinek <jakub@redhat.com>
6121 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
6122 instead of lhd_return_null_tree_v.
6124 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
6127 * c-decl.c (smallest_type_quals_location): New static function.
6128 (grokdeclarator): Try to find the correct location for an ignored
6131 2016-09-26 Marek Polacek <polacek@redhat.com>
6134 * c-decl.c (pop_scope): Add gcc_fallthrough.
6136 2016-09-26 Marek Polacek <polacek@redhat.com>
6139 * c-parser.c (struct c_token): Add flags field.
6140 (c_lex_one_token): Pass it to c_lex_with_flags.
6141 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
6142 into IFN_FALLTHROUGH.
6143 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
6144 attribute fallthrough after a case label or default label.
6145 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
6147 2016-09-24 Marek Polacek <polacek@redhat.com>
6150 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
6151 have boolean value. Warn about ++/-- on booleans.
6153 2016-09-23 Jakub Jelinek <jakub@redhat.com>
6155 * c-parser.c (incomplete_record_decls): Remove unnecessary
6156 = vNULL initialization of file scope vec.
6158 2016-09-16 Marek Polacek <polacek@redhat.com>
6160 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
6162 2016-09-14 Marek Polacek <polacek@redhat.com>
6164 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
6165 (fix_array_notation_expr): Likewise.
6166 * c-decl.c (finish_decl): Likewise.
6167 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6168 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
6169 (function_to_pointer_conversion): Use false instead of 0.
6170 (convert_lvalue_to_rvalue): Likewise.
6171 (parser_build_unary_op): Likewise.
6172 (build_atomic_assign): Likewise.
6173 (build_unary_op): Change nonconvert parameter type to bool, use
6174 true/false instead of 1/0.
6175 (build_binary_op): Use true instead of 1.
6177 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6179 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
6180 of add_fixit_insert to add_fixit_insert_before.
6182 2016-09-13 Marek Polacek <polacek@redhat.com>
6184 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
6187 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6190 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
6191 COMPOUND_EXPR to warn_for_omitted_condop.
6193 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6195 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
6196 c_get_substring_location for this new langhook.
6198 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6201 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
6203 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
6204 instead of mark_exp_read on low_bound/length expression.
6205 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
6206 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6207 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6208 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
6209 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
6210 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
6211 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
6212 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
6213 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
6214 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
6215 instead of mark_expr_read.
6216 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
6217 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
6218 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
6219 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
6220 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
6221 array section bases outside of depend clause, for depend clause
6222 use convert_lvalue_to_rvalue on the base.
6223 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
6224 linear, aligned, map, to and from clauses.
6225 (c_omp_clause_copy_ctor): New function.
6227 2016-09-01 Marek Polacek <polacek@redhat.com>
6230 * c-typeck.c (composite_type): Add FALLTHRU comment.
6232 2016-08-31 David Malcolm <dmalcolm@redhat.com>
6234 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
6235 to the insertion fixits for "struct", "union", and "enum".
6237 2016-08-30 David Malcolm <dmalcolm@redhat.com>
6239 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
6240 rather than add_fixit_misspelled_id.
6241 (undeclared_variable): Likewise.
6242 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
6243 now-redundant "here" params from add_fixit_insert method calls.
6244 (c_parser_parameter_declaration): Likewise.
6245 * c-typeck.c (build_component_ref): Remove now-redundant range
6246 param from add_fixit_replace method calls.
6248 2016-08-25 Marek Polacek <polacek@redhat.com>
6250 * c-typeck.c (parser_build_binary_op): Pass LHS to
6251 warn_logical_not_parentheses.
6253 2016-08-25 Marek Polacek <polacek@redhat.com>
6256 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
6257 or _FloatN or _FloatNx is not supported.
6258 (finish_declspecs): Set type to integer_type_node when _FloatN or
6259 _FloatNx is not supported.
6261 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6264 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
6265 (struct c_declspecs): Add field floatn_nx_idx.
6266 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
6267 and _FloatNx type specifiers.
6268 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
6269 (c_parser_declspecs, c_parser_attribute_any_word)
6270 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
6271 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
6272 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
6273 narrower than double.
6275 2016-08-12 Jakub Jelinek <jakub@redhat.com>
6276 Martin Liska <mliska@suse.cz>
6279 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
6280 % to determine val element to change. Assert that
6281 wchar_bytes * charwidth fits into val array.
6283 2016-08-12 Marek Polacek <polacek@redhat.com>
6286 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
6287 (c_parser_postfix_expression): Likewise.
6288 * c-typeck.c (build_unary_op): Adjust fall through comment.
6289 (c_mark_addressable): Likewise.
6291 2016-08-11 Jakub Jelinek <jakub@redhat.com>
6294 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
6295 array member through typedef, for orig_qual_indirect == 0 clear
6298 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6301 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
6302 this up to selftest::run_c_tests.
6303 (selftest::run_c_tests): New function.
6305 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
6307 * c-parser.c (struct oacc_routine_data): Add error_seen and
6308 fndecl_seen members.
6309 (c_finish_oacc_routine): Use these.
6310 (c_parser_declaration_or_fndef): Adjust.
6311 (c_parser_oacc_routine): Likewise. Support more C language
6312 constructs, and improve diagnostics. Move pragma context
6314 (c_parser_pragma): ... here.
6316 * c-parser.c (struct oacc_routine_data): New.
6317 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
6319 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
6320 declare target" attribute.
6322 2016-08-01 Jan Beulich <jbeulich@suse.com>
6324 * c-fold.c (c_fully_fold_internal): Also emit shift count
6325 warnings for vector types.
6326 * c-typeck.c (build_binary_op): Likewise.
6328 2016-07-29 Marek Polacek <polacek@redhat.com>
6331 * c-decl.c (finish_struct): Rephrase an error message.
6334 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
6335 to error node for invalid code.
6338 * c-decl.c (implicitly_declare): Return decl early not only for
6339 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
6341 2016-07-29 Jakub Jelinek <jakub@redhat.com>
6344 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
6345 on GNU extern inline functions.
6347 2016-07-29 Marek Polacek <polacek@redhat.com>
6350 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
6353 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
6355 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
6357 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6359 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
6361 (best_macro_match): Likewise, converting from a typedef to a
6363 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
6364 (lookup_name_fuzzy): Update for change of best_macro_match to a
6365 subclass with a ctor that calls cpp_forall_identifiers.
6367 2016-07-20 David Malcolm <dmalcolm@redhat.com>
6369 * c-decl.c (implicit_decl_warning): Update for conversion of
6370 return type of lookup_name_fuzzy to const char *.
6371 (undeclared_variable): Likewise.
6372 (lookup_name_fuzzy): Convert return type from tree to
6374 * c-parser.c (c_parser_declaration_or_fndef): Update for
6375 conversion of return type of lookup_name_fuzzy to const char *.
6376 (c_parser_parameter_declaration): Likewise.
6378 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
6380 * c-parser.c (c_parser_oacc_declare): Don't scan for
6382 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
6383 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
6384 zero-length subarrays.
6386 2016-07-15 Jakub Jelinek <jakub@redhat.com>
6389 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
6390 instead of FUZZY_LOOKUP_NAME.
6391 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
6392 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
6394 2016-07-14 Jakub Jelinek <jakub@redhat.com>
6397 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
6399 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6401 * c-parser.c (c_parser_generic_selection): Make type of variable
6403 (c_parser_omp_declare_simd): Likewise.
6405 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6407 * c-decl.c (struct c_struct_parse_info): Change member types
6408 from vec to auto_vec.
6409 (start_struct): Adjust.
6410 (finish_struct): Likewise.
6412 2016-07-02 Jakub Jelinek <jakub@redhat.com>
6415 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
6417 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6419 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
6420 Move pragma context checking into...
6421 (c_parser_omp_cancellation_point): ... here, and improve
6422 diagnostic messages.
6423 * c-typeck.c (c_finish_omp_cancel)
6424 (c_finish_omp_cancellation_point): Improve diagnostic messages.
6426 2016-06-29 Jakub Jelinek <jakub@redhat.com>
6429 * c-typeck.c (c_build_qualified_type): Don't clear
6430 C_TYPE_INCOMPLETE_VARS for the main variant.
6432 2016-06-28 Martin Sebor <msebor@redhat.com>
6435 * c-typeck.c (output_init_element): Diagnose incompatible types
6436 before non-constant initializers.
6438 2016-06-28 Jakub Jelinek <jakub@redhat.com>
6440 * Make-lang.in: Don't cat ../stage_current if it does not exist.
6442 2016-06-23 Andi Kleen <ak@linux.intel.com>
6444 * Make-lang.in: Add support for autofdo.
6446 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6449 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
6450 (implicit_decl_warning): When issuing warnings for implicit
6451 declarations, attempt to provide a suggestion via
6453 (undeclared_variable): Likewise when issuing errors.
6454 (lookup_name_in_scope): Likewise.
6455 (struct edit_distance_traits<cpp_hashnode *>): New struct.
6456 (best_macro_match): New typedef.
6457 (find_closest_macro_cpp_cb): New function.
6458 (lookup_name_fuzzy): New function.
6459 * c-parser.c: Include gcc-rich-location.h.
6460 (c_token_starts_typename): Split out case CPP_KEYWORD into...
6461 (c_keyword_starts_typename): ...this new function.
6462 (c_parser_declaration_or_fndef): When issuing errors about
6463 missing "struct" etc, add a fixit. For other kinds of errors,
6464 attempt to provide a suggestion via lookup_name_fuzzy.
6465 (c_parser_parms_declarator): When looking ahead to detect typos in
6466 type names, also reject CPP_KEYWORD.
6467 (c_parser_parameter_declaration): When issuing errors about
6468 unknown type names, attempt to provide a suggestion via
6470 * c-tree.h (c_keyword_starts_typename): New prototype.
6472 2016-06-20 Joseph Myers <joseph@codesourcery.com>
6475 * c-typeck.c (build_conditional_expr): Return error_mark_node if
6476 c_common_type returns error_mark_node.
6478 2016-06-19 Martin Sebor <msebor@redhat.com>
6481 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
6482 __alignof__ (expression).
6484 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6486 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
6488 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6490 * c-typeck.c (build_component_ref): Simplify fixit code by
6491 using gcc_rich_location::add_fixit_misspelled_id.
6492 (set_init_label): Likewise.
6494 2016-06-13 David Malcolm <dmalcolm@redhat.com>
6496 * c-parser.c (c_parser_initelt): Provide location of name for new
6497 location_t param of set_init_label.
6498 * c-tree.h (set_init_label): Add location_t param.
6499 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
6500 param and use it when issuing error messages about unrecognized
6501 field names. Attempt to provide a fixit hint if appropriate,
6502 otherwise update the error message to provide the type name.
6504 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
6507 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
6510 2016-06-08 Martin Sebor <msebor@redhat.com>
6511 Jakub Jelinek <jakub@redhat.com>
6515 * c-typeck.c (convert_arguments): Don't promote last argument
6516 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6518 2016-06-08 Marek Polacek <polacek@redhat.com>
6521 * c-decl.c (grokdeclarator): Check TYPE_P.
6524 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
6527 2016-06-07 David Malcolm <dmalcolm@redhat.com>
6529 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
6530 and structure element reference, capture the location of the
6531 element name token and pass it to build_component_ref.
6532 (c_parser_postfix_expression_after_primary): Likewise for
6533 structure element dereference.
6534 (c_parser_omp_variable_list): Likewise for
6535 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
6536 * c-tree.h (build_component_ref): Add location_t param.
6537 * c-typeck.c (build_component_ref): Add location_t param
6538 COMPONENT_LOC. Use it, if available, when issuing hints about
6539 mispelled member names to provide a fixit replacement hint.
6541 2016-06-06 Marek Polacek <polacek@redhat.com>
6544 * c-parser.c (c_parser_direct_declarator): Set location.
6546 2016-06-06 Marek Polacek <polacek@redhat.com>
6548 * c-typeck.c (comptypes_internal): Handle comparisons of
6549 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
6550 TYPE_REF_CAN_ALIAS_ALL.
6552 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
6554 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
6555 arguments as addressable when async clause exists.
6557 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6560 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
6561 when combined with target construct.
6563 2016-05-26 Jakub Jelinek <jakub@redhat.com>
6565 * c-parser.c (c_parser_omp_clause_schedule): Warn if
6566 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6568 2016-05-25 Marek Polacek <polacek@redhat.com>
6571 * c-decl.c (c_make_fname_decl): Don't check seen_error.
6574 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
6576 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
6578 * c-parser.c (c_parser_oacc_declare): Add support for
6579 GOMP_MAP_FIRSTPRIVATE_POINTER.
6580 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
6581 argument with enum c_omp_region_type ort.
6582 (handle_omp_array_sections): Likewise. Update call to
6583 handle_omp_array_sections_1.
6584 (c_finish_omp_clauses): Add specific errors and warning messages for
6585 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
6586 call to handle_omp_array_sections.
6588 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
6590 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
6592 2016-05-24 Richard Biener <rguenther@suse.de>
6596 * c-typeck.c (build_array_ref): Do not complain about indexing
6597 non-lvalue vectors. Adjust for function name change.
6599 2016-05-20 Martin Sebor <msebor@redhat.com>
6602 * c-typeck.c (error_init): Use
6603 expansion_point_location_if_in_system_header.
6604 (warning_init): Same.
6606 2016-05-19 David Malcolm <dmalcolm@redhat.com>
6609 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
6611 (c_parser_postfix_expression): Likewise.
6612 * c-tree.h (c_expr::set_error): New method.
6613 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
6614 that result's range is initialized.
6616 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6618 * c-typeck.c (parser_build_unary_op): Fix formatting.
6620 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
6622 * c-decl.c (grokdeclarator): Remove errmsg and use of
6623 targetm.invalid_return_type.
6624 (grokparms): Remove errmsg and use of
6625 targetm.invalid_parameter_type.
6627 2016-05-13 Joseph Myers <joseph@codesourcery.com>
6629 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
6630 function return type.
6632 2016-05-12 Marek Polacek <polacek@redhat.com>
6635 * c-decl.c (build_compound_literal): Pass LOC down to
6636 c_incomplete_type_error.
6637 * c-tree.h (require_complete_type): Adjust declaration.
6638 (c_incomplete_type_error): Likewise.
6639 * c-typeck.c (require_complete_type): Add location parameter, pass it
6640 down to c_incomplete_type_error.
6641 (c_incomplete_type_error): Add location parameter, pass it down to
6643 (build_component_ref): Pass location down to c_incomplete_type_error.
6644 (default_conversion): Pass location down to require_complete_type.
6645 (build_array_ref): Likewise.
6646 (build_function_call_vec): Likewise.
6647 (convert_arguments): Likewise.
6648 (build_unary_op): Likewise.
6649 (build_c_cast): Likewise.
6650 (build_modify_expr): Likewise.
6651 (convert_for_assignment): Likewise.
6652 (c_finish_omp_clauses): Likewise.
6654 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6657 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6659 * c-errors.c (pedwarn_c90): Return true if warned.
6660 * c-tree.h (pedwarn_c90): Change return type to bool.
6661 (enum c_declspec_word): Add new enumerator cdw_atomic.
6663 2016-05-11 Marek Polacek <polacek@redhat.com>
6666 * c-decl.c (diagnose_mismatched_decls): Factor out code to
6667 diagnose_mismatched_attributes and call it.
6669 2016-05-10 Marek Polacek <polacek@redhat.com>
6672 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6673 on a declaration following the definition.
6675 2016-05-05 Jakub Jelinek <jakub@redhat.com>
6677 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6678 parse it through to c_parser_c99_block_statement.
6679 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6682 2016-05-04 Marek Polacek <polacek@redhat.com>
6684 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6687 2016-05-04 Marek Polacek <polacek@redhat.com>
6690 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6691 for macro expansions.
6693 2016-05-03 Marek Polacek <polacek@redhat.com>
6696 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6697 check_builtin_function_arguments.
6699 2016-05-03 Richard Biener <rguenther@suse.de>
6701 * Make-lang.in (cc1-checksum.c): For stage-final re-use
6702 the checksum from the previous stage.
6704 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6706 * c-parser.c (c_parser_oacc_all_clauses): Update call to
6707 c_finish_omp_clauses.
6708 (c_parser_omp_all_clauses): Likewise.
6709 (c_parser_oacc_cache): Likewise.
6710 (c_parser_oacc_loop): Likewise.
6711 (omp_split_clauses): Likewise.
6712 (c_parser_omp_declare_target): Likewise.
6713 (c_parser_cilk_all_clauses): Likewise.
6714 (c_parser_cilk_for): Likewise.
6715 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6716 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6718 2016-05-02 Marek Polacek <polacek@redhat.com>
6721 * c-decl.c (grokdeclarator): Diagnose when array's size has an
6724 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6727 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6728 OACC_LOOP_CLAUSE_MASK.
6729 (c_parser_oacc_kernels_parallel): Update call to
6730 c_oacc_split_loop_clauses.
6732 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
6734 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6735 argument to build_modify_expr in two cases.
6737 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6739 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6740 warn_for_memset instead of warning directly here.
6742 2016-04-26 Marek Polacek <polacek@redhat.com>
6745 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6747 (c_parser_for_statement): ... here.
6748 (c_parser_if_statement): Use it.
6749 (c_parser_switch_statement): Use it.
6750 (c_parser_while_statement): Use it.
6753 * c-decl.c (pushdecl): Pass LOCUS down to warning.
6755 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6758 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6759 instead of c_finish_cilk_clauses.
6760 * c-tree.h (c_finish_omp_clauses): Add new default argument.
6761 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
6762 floating-point variables in the linear clause for Cilk Plus.
6764 2016-04-18 Michael Matz <matz@suse.de>
6766 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6767 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6769 2016-04-15 Marek Polacek <polacek@redhat.com>
6772 * c-typeck.c (build_unary_op): Pass location down to error and
6775 2016-04-15 Jakub Jelinek <jakub@redhat.com>
6778 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6780 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6781 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6782 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6783 Adjust c_parser_pragma callers.
6784 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
6786 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6788 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6789 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6790 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6791 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6792 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6793 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6794 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6795 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6797 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
6798 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6801 2016-04-13 Marek Polacek <polacek@redhat.com>
6804 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6806 (c_parser_statement): Likewise.
6807 (c_parser_c99_block_statement): Likewise.
6808 (c_parser_while_statement): Likewise.
6809 (c_parser_for_statement): Likewise.
6810 (c_parser_if_body): Don't set IF_P here.
6811 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
6812 about dangling else here.
6813 * c-tree.h (c_finish_if_stmt): Adjust declaration.
6814 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
6815 warn about dangling else here.
6817 2016-04-04 Marek Polacek <polacek@redhat.com>
6820 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6822 2016-03-31 Marek Polacek <polacek@redhat.com>
6825 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6827 2016-03-18 David Malcolm <dmalcolm@redhat.com>
6830 * c-parser.c (c_parser_postfix_expression): Set the source range
6831 for uses of "__builtin_types_compatible_p".
6833 2016-03-17 Jakub Jelinek <jakub@redhat.com>
6836 * c-typeck.c (composite_type): Don't count void_list_node
6837 into len, if the list is terminated by void_list_node, start
6838 with void_list_node instead of NULL for newargs. Stop
6841 2016-03-16 Marek Polacek <polacek@redhat.com>
6844 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6845 nested functions returning VM types.
6847 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6849 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6850 when calling c_finish_omp_clauses.
6852 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6855 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6858 2016-03-04 Marek Polacek <polacek@redhat.com>
6861 * c-parser.c (c_parser_postfix_expression): Call
6862 c_parser_cast_expression rather than c_parser_postfix_expression.
6864 2016-03-01 Jakub Jelinek <jakub@redhat.com>
6868 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6869 of incomplete decls to error_mark_node.
6871 2016-02-24 Marek Polacek <polacek@redhat.com>
6874 * c-decl.c (finish_decl): Don't update the copy of the type of a
6875 different decl type.
6877 2016-02-23 Jakub Jelinek <jakub@redhat.com>
6880 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6881 in id_kind reclassification.
6883 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6886 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6888 2016-02-16 James Norris <jnorris@codesourcery.com>
6891 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6893 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6895 * c-decl.c (build_null_declspecs): Zero the entire struct.
6898 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6899 callers changed. If nested_p is true, use it to call
6900 finish_implicit_inits.
6901 * c-tree.h (finish_implicit_inits): Declare.
6902 * c-typeck.c (finish_implicit_inits): New function. Move code
6904 (push_init_level): ... here.
6905 (set_designator, process_init_element): Call finish_implicit_inits.
6907 2016-02-11 Jakub Jelinek <jakub@redhat.com>
6910 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6911 arguments for -Waddress warning.
6913 2016-02-04 Jakub Jelinek <jakub@redhat.com>
6916 * c-decl.c (finish_enum): When honoring mode attribute,
6917 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6919 2016-01-29 Jakub Jelinek <jakub@redhat.com>
6922 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6923 all type variants, not just TYPE_MAIN_VARIANT.
6925 2016-01-27 Jakub Jelinek <jakub@redhat.com>
6928 * c-decl.c (c_write_global_declarations_1): Warn with
6929 warn_unused_function if static prototype without definition
6932 2016-01-27 Marek Polacek <polacek@redhat.com>
6935 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6936 to unsigned, if needed. Add -Wsign-compare warning.
6938 2016-01-26 Jakub Jelinek <jakub@redhat.com>
6940 PR tree-optimization/69483
6941 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6943 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6946 * c-tree.h (incomplete_record_decls): Declare.
6947 * c-parser.c (incomplete_record_decls): Define.
6948 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6949 report error if any decl has zero size.
6950 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6951 or enum type to incomplete_record_decls.
6953 2016-01-14 Tom de Vries <tom@codesourcery.com>
6955 PR tree-optimization/68773
6956 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6959 2016-01-14 Marek Polacek <polacek@redhat.com>
6962 * c-decl.c (grokdeclarator): Provide more information for invalid
6965 2016-01-06 David Malcolm <dmalcolm@redhat.com>
6967 * c-parser.c (c_parser_unary_expression): For dereferences, build
6968 a combined location before calling build_indirect_ref, so that
6969 error reports cover the full range, manually updating the c_expr
6972 2016-01-06 Marek Polacek <polacek@redhat.com>
6975 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6976 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6979 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6981 Update copyright years.
6983 2016-01-04 Marek Polacek <polacek@redhat.com>
6986 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6987 optimization to use __atomic_fetch_* built-in if possible.
6989 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6991 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6993 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6996 2015-12-22 Marek Polacek <polacek@redhat.com>
6999 * c-typeck.c (build_component_ref): Warn when acessing elements of
7000 atomic structures or unions.
7002 2015-12-21 David Malcolm <dmalcolm@redhat.com>
7004 * c-typeck.c: Include "gcc-rich-location.h".
7005 (build_binary_op): In the two places that call binary_op_error,
7006 create a gcc_rich_location and populate it with the location of
7007 the binary op and its two operands.
7009 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7011 * c-parser.c (c_parser_statement_after_labels): When calling
7012 c_finish_return, Use the return expression's location if it has
7013 one, falling back to the location of the first token within it.
7014 * c-typeck.c (c_finish_return): When issuing warnings about
7015 the incorrect presence/absence of a return value, issue a note
7016 showing the declaration of the function.
7018 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7020 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
7022 (c_parser_peek_nth_token): New function.
7023 (c_parser_peek_conflict_marker): New function.
7024 (c_parser_error): Detect conflict markers and report them as such.
7026 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7028 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
7029 to preserve range information for the primary expression
7030 in the call to c_parser_postfix_expression_after_primary.
7032 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7034 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
7035 expression location, falling back on the first token location,
7036 rather than always using the latter.
7038 2015-12-16 Marek Polacek <polacek@redhat.com>
7041 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
7044 2015-12-15 Marek Polacek <polacek@redhat.com>
7047 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
7050 2015-12-08 David Malcolm <dmalcolm@redhat.com>
7052 * c-parser.c (c_parser_alignof_expression): Capture location of
7053 closing parenthesis (if any), or of end of unary expression, and
7054 use it to build a src_range for the expression.
7056 2015-12-08 David Malcolm <dmalcolm@redhat.com>
7059 * c-parser.c (c_parser_get_builtin_args): Add
7060 "out_close_paren_loc" param, and write back to it.
7061 (c_parser_postfix_expression): Capture the closing
7062 parenthesis location for RID_CHOOSE_EXPR,
7063 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
7064 RID_BUILTIN_SHUFFLE and use it to set the source range
7065 for such expressions; within RID_BUILTIN_COMPLEX set
7066 the underlying location.
7068 2015-12-07 Marek Polacek <polacek@redhat.com>
7071 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
7072 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
7074 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
7076 * c-tree.h (c_build_va_arg): Adjust prototype.
7077 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
7078 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
7079 parameter, adjust throughout and issue an error if EXPR is a component
7080 with reverse storage order.
7082 2015-12-02 Jason Merrill <jason@redhat.com>
7084 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7085 (c_fully_fold_internal, decl_constant_value_for_optimization):
7086 Move from c-common.c.
7087 * c-tree.h: Declare decl_constant_value_for_optimization.
7088 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
7090 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7093 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
7094 following link from declarator to next declarator. Track original
7095 qualified type and pass it to c_build_qualified_type.
7096 * c-typeck.c (c_build_qualified_type): Add arguments
7097 orig_qual_type and orig_qual_indirect.
7099 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
7101 * c-parser.c (c_parser_omp_clause_name)
7102 (c_parser_oacc_all_clauses): Alphabetical sorting.
7104 2015-12-02 Jakub Jelinek <jakub@redhat.com>
7107 * c-decl.c (get_parm_info): Use b->locus instead of input_location
7110 2015-12-01 Julian Brown <julian@codesourcery.com>
7111 Cesar Philippidis <cesar@codesourcery.com>
7112 James Norris <James_Norris@mentor.com>
7114 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
7115 (c_parser_oacc_clause_use_device): New function.
7116 (c_parser_oacc_all_clauses): Add use_device support.
7117 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
7118 (c_parser_oacc_host_data): New function.
7119 (c_parser_omp_construct): Add host_data support.
7120 * c-tree.h (c_finish_oacc_host_data): Add prototype.
7121 * c-typeck.c (c_finish_oacc_host_data): New function.
7122 (c_finish_omp_clauses): Add use_device support.
7124 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7127 * c-decl.c: Set TYPE_PACKED in variants.
7129 2015-11-27 Martin Liska <mliska@suse.cz>
7132 * c-array-notation.c (fix_builtin_array_notation_fn):
7133 Use release_vec_vec instead of vec::release.
7134 (build_array_notation_expr): Likewise.
7135 (fix_conditional_array_notations_1): Likewise.
7136 (fix_array_notation_expr): Likewise.
7137 (fix_array_notation_call_expr): Likewise.
7139 2015-11-27 Jakub Jelinek <jakub@redhat.com>
7142 * c-parser.c (c_parser_compound_statement_nostart): If
7143 last_label is true, use pragma_stmt instead of pragma_compound
7144 as second c_parser_pragma argument.
7145 (c_parser_omp_ordered, c_parser_omp_target_update,
7146 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
7147 false as second argument to c_parser_skip_to_pragma_eol after
7148 diagnosing standalone directives used in pragma_stmt context.
7150 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
7152 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
7153 with "if (ENABLE_OFFLOADING)".
7155 2015-11-23 David Malcolm <dmalcolm@redhat.com>
7158 * c-parser.c (c_parser_postfix_expression): Set up source ranges
7159 for various Objective-C constructs: Class.name syntax,
7160 @selector(), @protocol(), @encode(), and [] message syntax.
7162 2015-11-20 David Malcolm <dmalcolm@redhat.com>
7165 * c-typeck.c (should_suggest_deref_p): New function.
7166 (build_component_ref): Special-case POINTER_TYPE when
7167 generating a "not a structure of union" error message, and
7168 suggest a "->" rather than a ".", providing a fix-it hint.
7170 2015-11-19 David Malcolm <dmalcolm@redhat.com>
7172 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
7173 candidate into a new function, find_closest_identifier.
7175 2015-11-19 Marek Polacek <polacek@redhat.com>
7178 * c-typeck.c (parser_build_binary_op): Properly handle
7179 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
7181 2015-11-17 David Malcolm <dmalcolm@redhat.com>
7183 * c-parser.c (set_c_expr_source_range): Bulletproof both
7184 overloaded implementations against NULL expr->value.
7185 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
7187 (c_parser_unary_expression): Likewise when handling addresses of
7189 (c_parser_postfix_expression): Likewise for statement expressions,
7190 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
7191 __builtin_va_arg, and for __builtin_offset_of.
7192 (c_parser_postfix_expression_after_paren_type): Initialize expr's
7193 src_range using the range of the braced initializer.
7194 (c_parser_transaction_expression): Set src_range for "ret" to a
7195 sane pair of values.
7197 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7199 * c-parser.c (c_finish_omp_declare_simd): Look for
7200 "simd" attribute as well. Update error message.
7202 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7204 * c-parser.c (c_parser_omp_declare_target): Adjust.
7206 2015-11-14 Jakub Jelinek <jakub@redhat.com>
7208 * c-typeck.c (c_finish_omp_clauses): Don't mark
7209 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
7211 2015-11-14 Marek Polacek <polacek@redhat.com>
7213 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
7214 * c-typeck.c: Likewise.
7216 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7218 * c-decl.c (warn_defaults_to): Pass line_table to
7220 * c-errors.c (pedwarn_c99): Likewise.
7221 (pedwarn_c90): Likewise.
7222 * c-parser.c (set_c_expr_source_range): New functions.
7223 (c_token::get_range): New method.
7224 (c_token::get_finish): New method.
7225 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
7226 based on the range from the start of the LHS to the end of the
7228 (c_parser_conditional_expression): Likewise, based on the range
7229 from the start of the cond.value to the end of exp2.value.
7230 (c_parser_binary_expression): Call set_c_expr_source_range on
7231 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
7232 (c_parser_cast_expression): Call set_c_expr_source_range on ret
7233 based on the cast_loc through to the end of the expr.
7234 (c_parser_unary_expression): Likewise, based on the
7235 op_loc through to the end of op.
7236 (c_parser_sizeof_expression) Likewise, based on the start of the
7237 sizeof token through to either the closing paren or the end of
7239 (c_parser_postfix_expression): Likewise, using the token range,
7240 or from the open paren through to the close paren for
7241 parenthesized expressions.
7242 (c_parser_postfix_expression_after_primary): Likewise, for
7243 various kinds of expression.
7244 * c-tree.h (struct c_expr): Add field "src_range".
7245 (c_expr::get_start): New method.
7246 (c_expr::get_finish): New method.
7247 (set_c_expr_source_range): New decls.
7248 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
7249 on ret for prefix unary ops.
7250 (parser_build_binary_op): Likewise, running from the start of
7251 arg1.value through to the end of arg2.value.
7253 2015-11-13 Marek Polacek <polacek@redhat.com>
7256 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
7258 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7260 * c-typeck.c: Include spellcheck.h.
7261 (lookup_field_fuzzy_find_candidates): New function.
7262 (lookup_field_fuzzy): New function.
7263 (build_component_ref): If the field was not found, try using
7264 lookup_field_fuzzy and potentially offer a suggestion.
7266 2015-11-12 James Norris <jnorris@codesourcery.com>
7267 Joseph Myers <joseph@codesourcery.com>
7269 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
7270 (c_parser_omp_clause_name): Handle 'device_resident' clause.
7271 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7272 and PRAGMA_OMP_CLAUSE_LINK.
7273 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
7274 and PRAGMA_OACC_CLAUSE_LINK.
7275 (OACC_DECLARE_CLAUSE_MASK): New definition.
7276 (c_parser_oacc_declare): New function.
7278 2015-11-12 Marek Polacek <polacek@redhat.com>
7281 * c-parser.c (c_parser_for_statement): Reclassify the token in
7284 2015-11-11 Marek Polacek <polacek@redhat.com>
7288 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
7289 checking the size of an array.
7291 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7293 * c-array-notation.c: Remove unused header files.
7294 * c-aux-info.c: Likewise.
7295 * c-convert.c: Likewise.
7296 * c-decl.c: Likewise.
7297 * c-errors.c: Likewise.
7298 * c-lang.c: Likewise.
7299 * c-objc-common.c: Likewise.
7300 * c-parser.c: Likewise.
7301 * c-typeck.c: Likewise.
7302 * gccspec.c: Likewise.
7304 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7305 Cesar Philippidis <cesar@codesourcery.com>
7306 James Norris <jnorris@codesourcery.com>
7307 Julian Brown <julian@codesourcery.com>
7308 Nathan Sidwell <nathan@codesourcery.com>
7310 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
7312 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
7313 (c_parser_pragma): Parse 'acc routine'.
7314 (OACC_ROUTINE_CLAUSE_MARK): Define.
7315 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
7317 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7320 * c-typeck.c (c_finish_loop): For unconditional loops, set the
7321 location of the backward-goto to the start of the loop body.
7323 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
7326 * c-parser.c (c_parser_while_statement): Finish the loop before
7327 parsing ahead for misleading indentation.
7328 (c_parser_for_statement): Likewise.
7330 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7332 * c-decl.c (finish_struct): If the structure has reverse storage
7333 order, rewrite the type of array fields with scalar component. Call
7334 maybe_apply_pragma_scalar_storage_order on entry.
7335 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
7336 errors on bit-fields and reverse SSO here and not...
7337 (c_mark_addressable): ...here.
7338 (output_init_element): Adjust call to initializer_constant_valid_p.
7339 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
7341 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7343 * c-decl.c (warn_defaults_to): Update for change in signature
7344 of diagnostic_set_info.
7345 * c-errors.c (pedwarn_c99): Likewise.
7346 (pedwarn_c90): Likewise.
7347 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
7348 for textinfo::set_location.
7350 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7351 Thomas Schwinge <thomas@codesourcery.com>
7352 James Norris <jnorris@codesourcery.com>
7354 * c-parser.c (c_parser_omp_clause_name): Add support for
7355 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
7356 (c_parser_omp_clause_default): Add is_oacc argument. Handle
7357 default(none) in OpenACC.
7358 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
7360 (c_parser_oacc_clause_tile): New function.
7361 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
7362 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
7363 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
7365 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
7366 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
7368 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
7369 (c_parser_oacc_update): Update the error message for missing clauses.
7370 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
7371 and OMP_CLAUSE_INDEPENDENT.
7373 2015-11-05 Marek Polacek <polacek@redhat.com>
7376 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
7377 deal with pre-evaluation on invalid types.
7379 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7380 Ilya Verbin <ilya.verbin@intel.com>
7382 * c-parser.c: Include context.h and gimple-expr.h.
7383 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
7384 monotonic together with nonmonotonic.
7385 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
7386 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
7387 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
7388 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
7389 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
7390 expressions on combined target teams before the target.
7391 (c_parser_omp_declare_target): If decl has "omp declare target" or
7392 "omp declare target link" attribute, and cgraph or varpool node already
7393 exists, then set corresponding flags. Call c_finish_omp_clauses
7394 in the parenthesized extended-list syntax case.
7395 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
7397 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
7398 on OMP_CLAUSE_REDUCTION array sections.
7399 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
7400 into the constant offset, or for variable low-bound using
7401 POINTER_PLUS_EXPR. For structure element based array sections use
7402 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
7403 (c_finish_omp_clauses): Drop generic_field_head, structure
7404 elements are now always mapped even as array section bases,
7405 diagnose same var in data sharing and mapping clauses. Diagnose if
7406 linear step on declare simd is neither a constant nor a uniform
7407 parameter. Look through POINTER_PLUS_EXPR for array section
7408 reductions. Diagnose the same var or function appearing multiple
7409 times on the same directive. Fix up wording for the to clause if t
7410 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
7411 modifier on kinds other than dynamic or guided or nonmonotonic
7412 modifier together with ordered clause.
7414 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7415 Chung-Lin Tang <cltang@codesourcery.com>
7417 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
7419 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7421 * c-array-notation.c: Reorder #include's and remove duplicates.
7422 * c-aux-info.c: Likewise.
7423 * c-convert.c: Likewise.
7424 * c-decl.c: Likewise.
7425 * c-errors.c: Likewise.
7426 * c-lang.c: Likewise.
7427 * c-objc-common.c: Likewise.
7428 * c-parser.c: Likewise.
7429 * c-typeck.c: Likewise.
7431 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
7434 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
7435 after calling build_qualified_type.
7437 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
7438 Thomas Schwinge <thomas@codesourcery.com>
7439 James Norris <jnorris@codesourcery.com>
7440 Joseph Myers <joseph@codesourcery.com>
7441 Julian Brown <julian@codesourcery.com>
7442 Bernd Schmidt <bschmidt@redhat.com>
7444 * c-parser.c (c_parser_oacc_shape_clause): New.
7445 (c_parser_oacc_simple_clause): New.
7446 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
7447 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
7449 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7450 James Norris <jnorris@codesourcery.com>
7451 Cesar Philippidis <cesar@codesourcery.com>
7455 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
7456 parameters, and handle these. Adjust all users.
7457 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
7459 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
7461 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
7463 (c_finish_omp_construct): Declare function.
7464 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
7465 Merge functions into...
7466 (c_finish_omp_construct): ... this new function.
7468 2015-10-22 Richard Biener <rguenther@suse.de>
7470 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
7471 before folding a MINUS_EXPR.
7473 2015-10-21 Marek Polacek <polacek@redhat.com>
7476 * c-decl.c (start_function): Warn about vararg functions without
7479 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
7481 * c-typeck.c (build_conditional_expr): Use boolean vector
7482 type for vector comparison.
7483 (build_vec_cmp): New.
7484 (build_binary_op): Use build_vec_cmp for comparison.
7486 2015-10-20 Marek Polacek <polacek@redhat.com>
7488 * c-parser.c (is_cilkplus_vector_p): Don't define here.
7490 2015-10-20 Marek Polacek <polacek@redhat.com>
7493 * c-parser.c (c_parser_attributes): Break out of the loop if the
7494 token after an attribute isn't a comma.
7496 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7497 Aldy Hernandez <aldyh@redhat.com>
7499 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
7500 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
7501 (c_parser_omp_variable_list): Handle structure elements for
7502 map, to and from clauses. Handle array sections in reduction
7503 clause. Formatting fixes.
7504 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
7505 if clause modifiers.
7506 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7507 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7508 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
7509 c_parser_omp_clause_is_device_ptr): New functions.
7510 (c_parser_omp_clause_ordered): Parse optional parameter.
7511 (c_parser_omp_clause_reduction): Handle array reductions.
7512 (c_parser_omp_clause_schedule): Parse optional simd modifier.
7513 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
7515 (c_parser_omp_clause_linear): Parse linear clause modifiers.
7516 (c_parser_omp_clause_depend_sink): New function.
7517 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
7518 (c_parser_omp_clause_map): Parse release/delete map kinds and
7519 optional always modifier.
7520 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
7521 and c_finish_omp_clauses callers.
7522 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
7523 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
7524 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
7525 (OMP_CRITICAL_CLAUSE_MASK): Define.
7526 (c_parser_omp_critical): Parse critical clauses.
7527 (c_parser_omp_for_loop): Handle doacross loops, adjust
7528 c_finish_omp_for and c_finish_omp_clauses callers.
7529 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
7530 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
7531 (OMP_FOR_CLAUSE_MASK): Add linear clause.
7532 (c_parser_omp_for): Disallow ordered clause when combined with
7533 distribute. Disallow linear clause when combined with distribute
7534 and not combined with simd.
7535 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
7536 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
7537 parse clauses and if depend clause is found, don't parse a body.
7538 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
7539 Allow target parallel without for after it.
7540 (OMP_TASK_CLAUSE_MASK): Add priority clause.
7541 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
7542 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
7544 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
7545 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
7546 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
7547 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
7549 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
7550 defaultmap and is_device_ptr clauses.
7551 (c_parser_omp_target): Parse target parallel and target simd. Set
7552 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
7553 and target exit data. Diagnose invalid map kinds.
7554 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
7555 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
7557 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
7559 (OMP_TASKLOOP_CLAUSE_MASK): Define.
7560 (c_parser_omp_taskloop): New function.
7561 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
7562 handle PRAGMA_OMP_TASKLOOP.
7563 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
7564 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
7565 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
7566 Add IS_OMP argument, handle structure element bases, diagnose
7567 bitfields, pass IS_OMP recursively, diagnose known zero length
7568 array sections in depend clauses, handle array sections in reduction
7569 clause, diagnose negative length even for pointers.
7570 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
7571 types, pass IS_OMP down to handle_omp_array_sections_1, handle
7572 array sections in reduction clause, set
7573 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
7574 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
7575 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
7576 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
7578 2015-10-06 Marek Polacek <polacek@redhat.com>
7580 * c-parser.c (c_parser_statement_after_labels): Use
7581 protected_set_expr_location.
7582 (c_parser_omp_clause_num_gangs): Likewise.
7583 (c_parser_omp_clause_num_threads): Likewise.
7584 (c_parser_omp_clause_num_workers): Likewise.
7585 (c_parser_omp_clause_vector_length): Likewise.
7586 (c_parser_omp_clause_num_teams): Likewise.
7587 (c_parser_omp_clause_thread_limit): Likewise.
7588 * c-typeck.c (build_c_cast): Likewise.
7589 (c_cast_expr): Likewise.
7591 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7593 * c-typeck.c (c_tree_equal): Use real_equal instead of
7596 2015-10-04 Jason Merrill <jason@redhat.com>
7598 * c-parser.c (c_lex_one_token): Handle @synchronized.
7599 * c-decl.c (match_builtin_function_types): A declaration of a built-in
7600 can change whether the function is transaction_safe.
7602 2015-10-02 Marek Polacek <polacek@redhat.com>
7605 * c-typeck.c (convert_for_assignment): Use the expansion point
7606 location throughout.
7608 2015-10-02 Marek Polacek <polacek@redhat.com>
7611 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
7612 and pass it down to c_parser_if_statement.
7613 (c_parser_else_body): Add CHAIN parameter and pass it down to
7614 c_parser_statement_after_labels.
7615 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
7616 duplicated if-else-if conditions.
7618 2015-10-01 Marek Polacek <polacek@redhat.com>
7620 * c-typeck.c (convert_for_assignment): Improve commentary.
7622 2015-09-30 Marek Polacek <polacek@redhat.com>
7625 * c-typeck.c (c_finish_return): Use the expansion point location for
7626 certain "return with value" warnings.
7628 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7630 * c-parser.c (pragma_lex): Add loc argument.
7632 2015-09-15 Marek Polacek <polacek@redhat.com>
7635 * c-decl.c (tag_exists_p): New function.
7636 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
7637 struct/union/enum keywords are missing.
7638 * c-tree.h (tag_exists_p): Declare.
7640 2015-09-15 Marek Polacek <polacek@redhat.com>
7642 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
7643 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
7644 Return NULL_TREE instead of 0.
7645 (lookup_name): Return NULL_TREE instead of 0.
7646 (lookup_name_in_scope): Likewise.
7647 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
7648 (parser_xref_tag): Use false instead of 0.
7649 (start_struct): Use true instead of 1.
7650 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
7652 2015-09-14 Marek Polacek <polacek@redhat.com>
7654 * c-typeck.c (set_nonincremental_init_from_string): Use
7655 HOST_WIDE_INT_M1U when shifting a negative value.
7657 2015-09-09 Mark Wielaard <mjw@redhat.com>
7659 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7662 2015-09-10 Jakub Jelinek <jakub@redhat.com>
7665 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7666 into OMP_FOR_PRE_BODY rather than before the loop.
7668 2015-09-09 Jakub Jelinek <jakub@redhat.com>
7671 * c-parser.c (c_parser_oacc_all_clauses,
7672 c_parser_omp_all_clauses): Remove invalid clause from
7673 list of clauses even if parser->error is set.
7676 * c-parser.c (c_parser_omp_clause_aligned,
7677 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7679 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7683 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7684 instead of c_parser_unary_expression. If the result is !lvalue_p,
7685 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7687 2015-09-04 Marek Polacek <polacek@redhat.com>
7690 * c-typeck.c (build_binary_op): Don't instrument static initializers.
7692 2015-09-03 Martin Sebor <msebor@redhat.com>
7695 * c-typeck.c (convert_arguments, parser_build_unary_op,
7696 build_conditional_expr, c_cast_expr, convert_for_assignment,
7697 build_binary_op, _objc_common_truthvalue_conversion): Call
7699 (c_decl_implicit): Define.
7701 2015-09-02 Marek Polacek <polacek@redhat.com>
7704 * c-parser.c (c_parser_enum_specifier): Give a better error for
7707 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7709 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7711 2015-08-12 Marek Polacek <polacek@redhat.com>
7713 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7716 2015-08-03 Marek Polacek <polacek@redhat.com>
7719 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7721 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7723 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7725 * c-parser.c (c_parser_if_body): Take token_indent_info
7726 argument. Call warn_for_misleading_indentation even when the
7727 body is a semicolon. Extract token_indent_infos corresponding
7728 to the guard, body and next tokens. Adjust call to
7729 warn_for_misleading_indentation accordingly.
7730 (c_parser_else_body): Likewise.
7731 (c_parser_if_statement): Likewise.
7732 (c_parser_while_statement): Likewise.
7733 (c_parser_for_statement): Likewise.
7735 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
7736 Manuel López-Ibáñez <manu@gcc.gnu.org>
7738 * c-decl.c (get_parm_info): Remove static var. Update warning
7741 2015-07-27 Marek Polacek <polacek@redhat.com>
7745 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7747 2015-07-20 Marek Polacek <polacek@redhat.com>
7750 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7751 (build_binary_op): Warn about left shift overflows.
7753 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7755 * c-array-notation.c: Adjust includes for flags.h changes.
7756 * c-objc-common.c: Likewise.
7758 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7760 * c-array-notation.c: Adjust includes.
7761 * c-aux-info.c: Likewise.
7762 * c-convert.c: Likewise.
7763 * c-decl.c: Likewise.
7764 * c-errors.c: Likewise.
7765 * c-lang.c: Likewise.
7766 * c-objc-common.c: Likewise.
7767 * c-parser.c: Likewise.
7768 * c-typeck.c: Likewise.
7770 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7773 * c-decl.c (finish_function): Call do_warn_unused_parameter.
7775 2015-06-29 Marek Polacek <polacek@redhat.com>
7778 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7779 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
7780 about -Wswitch-bool here.
7781 (do_case): Update c_add_case_label call.
7782 (c_finish_case): Update c_do_switch_warnings call.
7784 2015-06-27 Marek Polacek <polacek@redhat.com>
7786 * c-typeck.c: Use VECTOR_TYPE_P throughout.
7788 2015-06-26 Marek Polacek <polacek@redhat.com>
7790 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7792 * c-typeck.c (array_to_pointer_conversion): Likewise.
7793 (build_unary_op): Likewise.
7794 (c_finish_return): Likewise.
7796 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7798 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7799 * c-parser.c: Likewise.
7801 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7803 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7804 instead of pointer_hash.
7805 (detect_field_duplicates): Likewise.
7807 2015-06-25 Marek Polacek <polacek@redhat.com>
7809 * c-array-notation.c: Use VAR_P throughout.
7810 * c-decl.c: Likewise.
7811 * c-objc-common.c: Likewise.
7812 * c-parser.c: Likewise.
7813 * c-typeck.c: Likewise.
7815 2015-06-25 Marek Polacek <polacek@redhat.com>
7817 * c-decl.c: Use is_global_var throughout.
7818 * c-parser.c: Likewise.
7819 * c-typeck.c: Likewise.
7821 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7823 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7824 * c-aux-info.c: Likewise.
7825 * c-convert.c: Likewise.
7826 * c-decl.c: Likewise.
7827 * c-errors.c: Likewise.
7828 * c-lang.c: Likewise.
7829 * c-objc-common.c: Likewise.
7830 * c-parser.c: Likewise.
7831 * c-typeck.c: Likewise.
7833 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
7836 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7839 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
7841 * c-decl.c (pop_scope): Register the main translation unit
7842 through the new debug hook.
7844 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7846 * c-array-notation.c : Adjust include files.
7847 * c-aux-info.c : Likewise.
7848 * c-convert.c : Likewise.
7849 * c-decl.c : Likewise.
7850 * c-errors.c : Likewise.
7851 * c-lang.c : Likewise.
7852 * c-lang.h : Likewise.
7853 * c-objc-common.c : Likewise.
7854 * c-parser.c : Likewise.
7855 * c-typeck.c : Likewise.
7857 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7859 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7860 immediately clobber it.
7861 (c_write_global_declarations_1): Remove call to
7862 check_global_declaration_1.
7863 (c_write_global_declarations_2): Remove.
7864 (c_write_final_cleanups): Rename from c_write_global_declarations.
7865 Remove call to finalize_compilation_unit.
7866 Remove calls to debugging hooks.
7867 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7868 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7869 * c-tree.h: Remove c_write_global_declarations.
7871 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7873 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7874 * c-aux-info.c: Likewise.
7875 * c-convert.c: Likewise.
7876 * c-decl.c: Likewise.
7877 * c-errors.c: Likewise.
7878 * c-lang.c: Likewise.
7879 * c-objc-common.c: Likewise.
7880 * c-parser.c: Likewise.
7881 * c-typeck.c: Likewise.
7883 2015-06-04 Marek Polacek <polacek@redhat.com>
7886 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7889 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7891 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7892 Warn for empty struct.
7893 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7895 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7897 * c-decl.c (start_function): Call plugin before parsing.
7898 (finish_function): Call plugin after parsing.
7900 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7903 * c-decl.c (merge_decls): Merge DECL_COMMON.
7905 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
7907 * Make-lang.in (check_gcc_pallelize): Define.
7909 2015-05-22 Marek Polacek <polacek@redhat.com>
7912 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7915 2015-05-21 Marek Polacek <polacek@redhat.com>
7917 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7920 2015-05-20 Marek Polacek <polacek@redhat.com>
7922 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7923 * c-typeck.c: Likewise.
7925 2015-05-19 Marek Polacek <polacek@redhat.com>
7927 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7929 2015-05-19 Jakub Jelinek <jakub@redhat.com>
7932 * c-parser.c (c_parser_omp_for_loop): Don't add
7933 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7934 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7935 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7938 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7940 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
7943 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7946 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7949 2015-05-14 Marek Polacek <polacek@redhat.com>
7953 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7956 2015-05-12 David Malcolm <dmalcolm@redhat.com>
7958 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7959 to add a call to warn_for_misleading_indentation.
7960 (c_parser_else_body): Likewise, adding param "else_loc".
7961 (c_parser_if_statement): Check for misleading indentation.
7962 (c_parser_while_statement): Likewise.
7963 (c_parser_for_statement): Likewise.
7965 2015-05-08 Marek Polacek <polacek@redhat.com>
7968 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7969 (output_init_element): Likewise.
7971 2015-05-07 Marek Polacek <polacek@redhat.com>
7974 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7977 2015-04-30 Marek Polacek <polacek@redhat.com>
7979 * c-typeck.c (set_init_label): Call error_at instead of error and
7982 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7985 * c-typeck.c (c_build_va_arg): Clarify the error message.
7987 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7989 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7990 OMP_STANDALONE_CLAUSES.
7992 2015-04-28 Marek Polacek <polacek@redhat.com>
7994 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7996 2015-04-28 Marek Polacek <polacek@redhat.com>
7999 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
8001 2015-04-25 Marek Polacek <polacek@redhat.com>
8004 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
8007 2015-04-23 Marek Polacek <polacek@redhat.com>
8010 * c-decl.c (set_labels_context_r): New function.
8011 (store_parm_decls): Call it via walk_tree_without_duplicates.
8012 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
8013 instead of create_tmp_var. Build TARGET_EXPR instead of
8015 (build_atomic_assign): Use create_tmp_var_raw instead of
8016 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
8018 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
8020 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
8021 (c_parser_omp_target_update): Add missed %> to error_at ().
8023 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8026 * c-decl.c (c_default_pointer_mode): Remove definition.
8027 * c-tree.h (c_default_pointer_mode): Remove declaration.
8029 2015-03-27 Tobias Burnus <burnus@net-b.de>
8032 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
8034 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
8035 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
8036 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
8038 2015-03-19 Jakub Jelinek <jakub@redhat.com>
8040 * c-decl.c (c_decl_attributes): Also add "omp declare target"
8041 attribute for DECL_EXTERNAL VAR_DECLs.
8043 2015-03-11 Jakub Jelinek <jakub@redhat.com>
8045 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
8048 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8051 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
8052 before preparing arguments to warn_logical_not_parentheses.
8054 2015-03-09 Jakub Jelinek <jakub@redhat.com>
8057 * c-typeck.c (parser_build_binary_op): Don't warn for
8058 !!x == y or !b == y where b is _Bool.
8060 2015-03-09 Marek Polacek <polacek@redhat.com>
8062 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
8063 * c-decl.c (grokdeclarator): Likewise.
8064 * c-typeck.c (build_binary_op): Likewise.
8066 2015-02-27 Marek Polacek <polacek@redhat.com>
8069 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
8071 2015-02-14 Marek Polacek <polacek@redhat.com>
8074 * c-decl.c (grokdeclarator): Set the range of a flexible array member
8075 declared through a typedef name.
8077 2015-02-13 Marek Polacek <polacek@redhat.com>
8080 * c-decl.c (grokdeclarator): Print also the type when giving
8081 the error message about array's incomplete element type.
8083 2015-02-11 Jakub Jelinek <jakub@redhat.com>
8086 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
8087 check in the POP macro.
8089 2015-02-09 Marek Polacek <polacek@redhat.com>
8092 * c-typeck.c (process_init_element): Don't always wrap
8093 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
8094 initializing a range of elements.
8096 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8100 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
8102 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
8104 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
8105 processing enum declaration.
8107 2015-01-29 Marek Polacek <polacek@redhat.com>
8110 * c-typeck.c (pop_init_level): If constructor_elements has
8111 exactly one element with integer_zerop value, set constructor_zeroinit
8112 to 1. Remove braces around warning_init call.
8114 2015-01-27 Jakub Jelinek <jakub@redhat.com>
8117 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
8118 of FUNCTION_DECLs with error_mark_node.
8120 2015-01-26 Jakub Jelinek <jakub@redhat.com>
8123 * c-typeck.c (convert_arguments): Return -1 if there are
8124 error_args, even if we've diagnosed too many arguments.
8126 2015-01-21 Richard Biener <rguenther@suse.de>
8129 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
8130 for builtins the user declared correctly.
8132 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8133 Bernd Schmidt <bernds@codesourcery.com>
8134 Cesar Philippidis <cesar@codesourcery.com>
8135 James Norris <jnorris@codesourcery.com>
8136 Jakub Jelinek <jakub@redhat.com>
8137 Ilmir Usmanov <i.usmanov@samsung.com>
8139 * c-parser.c: Include "gomp-constants.h".
8140 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
8141 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
8142 Use OMP_CLAUSE_SET_MAP_KIND.
8143 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
8144 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
8145 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
8146 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
8147 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
8148 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
8149 "copyout", "create", "delete", "deviceptr", "gang", "host",
8150 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
8151 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
8152 "present_or_create", "pcreate", "seq", "self", "vector",
8153 "vector_length", "wait", "worker".
8154 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
8155 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
8156 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
8157 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
8158 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
8159 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
8160 (c_parser_oacc_data_clause_deviceptr)
8161 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
8162 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
8163 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
8164 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
8165 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
8166 (c_parser_oacc_parallel, c_parser_oacc_update)
8167 (c_parser_oacc_wait): New functions.
8168 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
8169 (c_finish_oacc_data): New prototypes.
8170 * c-typeck.c: Include "gomp-constants.h".
8171 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
8172 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
8173 OMP_CLAUSE_SET_MAP_KIND.
8174 (c_finish_oacc_parallel, c_finish_oacc_kernels)
8175 (c_finish_oacc_data): New functions.
8176 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
8177 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
8178 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
8179 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
8180 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
8181 GOMP_MAP_FORCE_DEVICEPTR.
8183 2015-01-09 Michael Collison <michael.collison@linaro.org>
8185 * c-array-notation.c: Include hash-set.h, machmode.h,
8186 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8187 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8188 * c-aux-info.c: Ditto.
8189 * c-convert.c: Ditto.
8191 * c-errors.c: Ditto.
8192 * c-lang.c: Dittoxs.
8193 * c-objc-common.c: Ditto.
8194 * c-parser.c: Ditto.
8195 * c-typeck.c: Include hash-set.h, machmode.h,
8196 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8197 fold-const.h, wide-int.h, inchash.h, real.h and
8198 fixed-value.h due to flattening of tree.h.
8200 2015-01-07 Marek Polacek <polacek@redhat.com>
8203 * c-typeck.c (process_init_element): Disallow initialization of
8204 a flexible array member with a string constant if the structure
8207 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8210 * c-typeck.c (convert_for_assignment, c_finish_return): For
8211 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
8212 types also set in_late_binary_op around convert call.
8213 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
8214 to integral type casts, if not in_late_binary_op, pass c_fully_fold
8215 result on expr as last argument to ubsan_instrument_float_cast,
8216 if in_late_binary_op, don't use c_save_expr but save_expr.
8218 Update copyright years.
8220 2015-01-05 Marek Polacek <polacek@redhat.com>
8223 * c-typeck.c (build_array_ref): Pass loc down to
8224 warn_array_subscript_with_type_char.
8226 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8228 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8229 (common-pointer-type): For pointers to arrays take qualifiers from
8231 (build_conditional_expr): Add warnings for lost qualifiers.
8232 (comp-target-types): Allow pointers to arrays with different qualifiers.
8233 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8234 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8235 to PEDWARN_FOR_QUALIFIERS.
8237 2014-12-17 Jakub Jelinek <jakub@redhat.com>
8240 * c-convert.c: Include ubsan.h.
8241 (convert): For real -> integral casts and
8242 -fsanitize=float-cast-overflow don't call convert_to_integer, but
8243 instead instrument the float cast directly.
8245 2014-11-29 Jakub Jelinek <jakub@redhat.com>
8247 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
8248 c_finish_stmt_expr): Remove NULL last argument from
8249 create_tmp_var_raw and create_tmp_var calls.
8250 * c-array-notation.c (fix_builtin_array_notation_fn,
8251 build_array_notation_expr, fix_conditional_array_notations_1,
8252 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
8254 2014-11-28 Marek Polacek <polacek@redhat.com>
8257 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
8258 convert the right operand to integer type.
8260 2014-11-25 Marek Polacek <polacek@redhat.com>
8263 * c-decl.c (start_function): Disable -Wmissing-declarations warning
8264 for inline functions.
8266 2014-11-21 Jakub Jelinek <jakub@redhat.com>
8269 * c-typeck.c (build_array_ref): Adjust
8270 convert_vector_to_pointer_for_subscript caller. If it returns true,
8271 call non_lvalue_loc on the result.
8273 2014-11-11 Richard Biener <rguenther@suse.de>
8275 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
8278 2014-11-10 Andi Kleen <ak@linux.intel.com>
8281 * c-parser.c (c_parser_statement_after_labels): Call
8283 (c_parser_if_statement): Dito.
8284 (c_parser_switch_statement): Dito.
8285 (c_parser_while_statement): Dito.
8286 (c_parser_do_statement): Dito.
8287 (c_parser_for_statement): Dito.
8288 * c-typeck.c (c_finish_loop): Dito.
8290 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8292 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
8293 OPT_Wshift_count_overflow in the warnings.
8295 2014-10-30 Marek Polacek <polacek@redhat.com>
8297 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
8298 print the stripped version as well, if they're not the same.
8300 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8302 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
8305 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8307 * c-decl.c: Adjust include files.
8308 * c-parser.c: Ditto.
8310 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
8311 Tom Tromey <tromey@redhat.com>
8313 * c-tree.h (enum c_oracle_request): New.
8314 (c_binding_oracle_function): New typedef.
8315 (c_binding_oracle, c_pushtag, c_bind): Declare.
8316 * c-decl.c (c_binding_oracle): New global.
8317 (I_SYMBOL_CHECKED): New macro.
8318 (i_symbol_binding): New function.
8319 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
8320 (I_TAG_CHECKED): New macro.
8321 (i_tag_binding): New function.
8322 (I_TAG_BINDING, I_TAG_DECL): Redefine.
8323 (I_LABEL_CHECKED): New macro.
8324 (i_label_binding): New function.
8325 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
8326 (c_print_identifier): Save and restore c_binding_oracle.
8327 (c_pushtag, c_bind): New functions.
8329 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8331 * c-typeck.c: Adjust include files.
8333 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8336 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
8337 initialization here...
8338 (c_initialize_diagnostics): ... but here. Set defaults after
8339 building pretty-printer.
8341 2014-10-23 Marek Polacek <polacek@redhat.com>
8344 * c-decl.c (pop_scope): Don't print warning in external_scope.
8346 2014-10-19 Marek Polacek <polacek@redhat.com>
8349 * c-typeck.c (output_init_element): Allow initializing objects with
8350 static storage duration with compound literals even in C99 and add
8353 2014-10-17 Marek Polacek <polacek@redhat.com>
8356 * c-typeck.c (digest_init): Allow initializing objects with static
8357 storage duration with compound literals even in C99 and add pedwarn
8360 2014-10-17 Marek Polacek <polacek@redhat.com>
8363 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
8364 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
8365 error multiple times. Print the type.
8367 2014-10-17 Marek Polacek <polacek@redhat.com>
8370 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
8373 2014-10-17 Marek Polacek <polacek@redhat.com>
8375 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
8376 (start_function): Use OPT_Wimplicit_int instead of 0.
8377 (store_parm_decls_oldstyle): Likewise.
8379 2014-10-17 Alan Modra <amodra@gmail.com>
8382 * c-decl.c (merge_decls): Don't merge section name or tls model
8383 to newdecl symtab node, instead merge to olddecl. Override
8384 existing olddecl section name. Set tls_model for all thread-local
8385 vars, not just OMP thread-private ones. Remove incorrect comment.
8387 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8389 * c-decl.c: Adjust include files.
8391 2014-10-14 DJ Delorie <dj@redhat.com>
8393 * c-parser.c (c_parse_init): Add RID entries for each __intN.
8394 (c_token_starts_typename): Check all __intN, not just __int128.
8395 (c_token_starts_declspecs): Likewise.
8396 (c_parser_declspecs): Likewise.
8397 (c_parser_attribute_any_word): Likewise.
8398 (c_parser_objc_selector): Likewise.
8399 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
8400 (struct c_declspecs): Add int_n_idx field to record *which* __intN
8402 * c-decl.c (declspecs_add_type): Check for all __intN, not just
8404 (finish_declspecs): Likewise.
8406 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
8408 * c-parser.c (c_parser_all_labels): New function to replace
8410 (c_parser_statement): Call the new function.
8412 2014-10-09 Marek Polacek <polacek@redhat.com>
8415 * c-typeck.c (pop_init_level): Don't warn about initializing
8418 2014-10-07 Marek Polacek <polacek@redhat.com>
8421 * c-decl.c (header_for_builtin_fn): New function.
8422 (implicitly_declare): Suggest which header to include.
8424 2014-10-07 Marek Polacek <polacek@redhat.com>
8426 * c-convert.c (convert): Use error_operand_p.
8427 * c-typeck.c (require_complete_type): Likewise.
8428 (really_atomic_lvalue): Likewise.
8429 (digest_init): Likewise.
8430 (handle_omp_array_sections_1): Likewise.
8432 2014-10-03 Marek Polacek <polacek@redhat.com>
8435 * c-decl.c (pop_scope): Don't warn about "inline function declared
8436 but never defined" for functions marked with gnu_inline attribute.
8438 2014-09-25 Jakub Jelinek <jakub@redhat.com>
8441 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
8442 on low_bound and length.
8444 2014-09-24 Marek Polacek <polacek@redhat.com>
8448 * c-parser.c: Don't define CPP_KEYWORD.
8449 (c_parser_switch_statement): Pass original type to c_finish_case.
8450 * c-tree.h (c_finish_case): Update declaration.
8451 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
8452 conditionally to c_do_switch_warnings.
8454 2014-09-03 Marek Polacek <polacek@redhat.com>
8457 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
8460 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8461 Balaji V. Iyer <balaji.v.iyer@intel.com>
8462 Igor Zamyatin <igor.zamyatin@intel.com>
8464 * c-parser.c (c_parser_cilk_for): New function.
8465 (c_parser_cilk_grainsize): Likewise.
8466 (c_get_temp_regvar): Likewise.
8467 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
8468 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
8469 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
8470 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
8473 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
8475 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
8476 with using HOST_WIDE_INT without truncation to 'int'
8478 2014-08-22 Marek Polacek <polacek@redhat.com>
8481 * c-typeck.c (parser_build_binary_op): Adjust call to
8482 warn_logical_not_parentheses.
8484 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
8487 * c-parser.c (c_parser_array_notation): Check for correct
8488 type of an array added.
8490 2014-08-19 Marek Polacek <polacek@redhat.com>
8493 * c-typeck.c (build_binary_op): If either operand of a comparison
8494 is a boolean expression, call maybe_warn_bool_compare.
8496 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
8499 * c-typeck.c (build_c_cast): Do a conversion even when the
8500 TYPE_MAIN_VARIANTs are the same.
8502 2014-08-19 Marek Polacek <polacek@redhat.com>
8504 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
8505 pedwarn_c99 instead of pedwarn.
8506 (grokfield): Likewise.
8507 (warn_defaults_to): New function.
8508 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
8509 Unconditionally call pedwarn_c99 instead of pedwarn.
8510 (start_function): Call warn_defaults_to instead of pedwarn_c99.
8511 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
8512 check flag_isoc11 before.
8513 * c-errors.c (pedwarn_c99): Change the return type to bool.
8514 Handle -Wc99-c11-compat.
8515 * c-parser.c (disable_extension_diagnostics): Handle
8516 warn_c99_c11_compat.
8517 (restore_extension_diagnostics): Likewise.
8518 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
8519 instead of pedwarn, don't check flag_isoc11 before.
8520 (c_parser_declspecs): Likewise.
8521 (c_parser_alignas_specifier): Likewise.
8522 (c_parser_alignof_expression): Likewise.
8523 (c_parser_generic_selection): Likewise.
8524 * c-tree.h (pedwarn_c99): Update declaration.
8525 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
8528 2014-08-19 Marek Polacek <polacek@redhat.com>
8530 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
8532 * c-errors.c: Include "opts.h".
8533 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
8534 * c-parser.c (disable_extension_diagnostics): Handle negative value
8535 of warn_c90_c99_compat, too.
8536 (restore_extension_diagnostics): Likewise.
8537 (c_parser_compound_statement_nostart): Pass
8538 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
8540 2014-08-12 Marek Polacek <polacek@redhat.com>
8542 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
8544 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
8546 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
8548 2014-08-10 Marek Polacek <polacek@redhat.com>
8551 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
8552 Call pedwarn_c90 instead of pedwarn.
8553 (check_bitfield_type_and_width): Likewise.
8554 (declspecs_add_qual): Likewise.
8555 (declspecs_add_type): Likewise.
8556 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
8557 Adjust to only call pedwarn_c90.
8558 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
8559 pedwarn_c90 instead of pedwarn.
8560 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
8561 * c-parser.c (disable_extension_diagnostics): Handle
8562 warn_c90_c99_compat.
8563 (restore_extension_diagnostics): Likewise.
8564 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
8565 pedwarn_c90 instead of pedwarn.
8566 (c_parser_initelt): Likewise.
8567 (c_parser_postfix_expression): Likewise.
8568 (c_parser_postfix_expression_after_paren_type): Likewise.
8569 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
8570 * c-tree.h: Fix formatting.
8571 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
8572 pedwarn_c90 instead of pedwarn.
8574 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8576 * c-typeck.c: Remove include of pointer-set.h.
8578 2014-08-07 Marek Polacek <polacek@redhat.com>
8580 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
8582 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8584 * c-typeck.c: Use hash_map instead of pointer_map.
8586 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8588 * c-decl.c: Use hash_set instead of pointer_set.
8590 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8593 * c-array-notation.c (expand_array_notations): Handling
8596 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
8599 * c-typeck.c (c_finish_return): Return 0 instead of the address of
8602 2014-07-30 Tom Tromey <tromey@redhat.com>
8604 * c-typeck.c (struct constructor_stack) <designator_depth>: New
8606 (really_start_incremental_init, push_init_level): Initialize
8608 (pop_init_level): Set global designator_depth.
8609 (process_init_element): Check for designated_init attribute.
8611 2014-07-20 Marek Polacek <polacek@redhat.com>
8614 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
8615 (implicitly_declare): Pass location to implicit_decl_warning.
8617 2014-07-14 Jakub Jelinek <jakub@redhat.com>
8620 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
8621 If non-NULL, call c_parser_check_literal_zero.
8622 (c_parser_check_literal_zero): New function.
8623 (c_parser_postfix_expression_after_primary): Adjust
8624 c_parser_expr_list caller, handle -Wmemset-transposed-args.
8626 2014-07-06 Marek Polacek <polacek@redhat.com>
8629 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
8630 * c-tree.h (C_ARRAY_PARAMETER): Define.
8631 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
8634 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
8635 Chen Gang <gang.chen.5i5j@gmail.com>
8637 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
8640 2014-07-01 Marek Polacek <polacek@redhat.com>
8642 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
8643 instead of 0 to WARN_FOR_ASSIGNMENT.
8645 2014-07-01 Marek Polacek <polacek@redhat.com>
8648 * c-typeck.c (convert_for_assignment): Pass
8649 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
8651 2014-06-30 Marek Polacek <polacek@redhat.com>
8653 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
8654 has no_sanitize_undefined attribute.
8656 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
8659 * c-array-notation.c (fix_builtin_array_notation_fn):
8660 Check for 0 arguments in builtin call. Check that bultin argument is
8662 * c-parser.c (c_parser_array_notation): Check for incorrect initial
8665 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
8667 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8668 qualifiers in __auto_type for atomic types.
8669 (c_parser_typeof_specifier): Discard all type qualifiers in
8670 __typeof__ for atomic types.
8672 2014-06-25 Marek Polacek <polacek@redhat.com>
8675 * c-parser.c (c_parser_statement_after_labels): Pass the location of
8676 the return expression to c_finish_return.
8678 2014-06-25 Jakub Jelinek <jakub@redhat.com>
8680 * c-typeck.c (c_finish_omp_clauses): Make sure
8681 OMP_CLAUSE_LINEAR_STEP has correct type.
8683 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
8687 2014-06-24 Jakub Jelinek <jakub@redhat.com>
8689 * c-parser.c (c_parser_omp_for_loop): For
8690 #pragma omp parallel for simd move lastprivate clause from parallel
8691 to for rather than simd.
8693 2014-06-23 Marek Polacek <polacek@redhat.com>
8695 * c-typeck.c (parser_build_binary_op): Don't call
8696 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8698 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8700 * c-parser.c (c_parser_omp_threadprivate): Likewise.
8701 * c-decl.c (merge_decls): Likewise.
8703 2014-06-09 Marek Polacek <polacek@redhat.com>
8706 * c-typeck.c (error_init): Call inform instead of error_at.
8707 (pedwarn_init): Call inform instead of pedwarn.
8708 (warning_init): Call inform instead of warning_at.
8710 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
8712 * c-decl.c (merge_decls): Use set_decl_section_name.
8713 (duplicate_decls): Remove node if it exists.
8715 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
8718 * c-typeck.c (push_init_level, process_init_element,
8719 pop_init_level): Correct check for zero initialization, move
8720 missing brace warning to respect zero initialization.
8722 2014-06-05 Marek Polacek <polacek@redhat.com>
8725 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8727 2014-06-05 Marek Polacek <polacek@redhat.com>
8730 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
8731 on the left hand side operand of a comparison.
8733 2014-06-05 Marek Polacek <polacek@redhat.com>
8736 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8737 Print note only if the warning was printed.
8739 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
8742 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8745 2014-06-03 Marek Polacek <polacek@redhat.com>
8748 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8750 * c-tree.h (c_start_case): Update.
8751 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
8752 switch condition has boolean value.
8754 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
8756 * c-decl.c: Include builtins.h.
8757 * c-parser.c: Likewise.
8759 2014-05-27 Marek Polacek <polacek@redhat.com>
8762 * c-typeck.c (convert_arguments): Get location of a parameter. Change
8763 error and warning calls to error_at and warning_at. Pass location of
8764 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
8765 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8766 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
8768 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
8771 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8772 function parameters.
8774 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
8776 * c-decl.c (merge_decls): Preserve symtab node pointers.
8777 (duplicate_decls): Free new decl.
8779 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
8781 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8784 * c-parser.c (c_parser_omp_target): Return bool values.
8786 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8788 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8789 num_teams_loc variable to num_thread_limit_loc.
8791 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8793 * c-array-notation.c (expand_array_notations): Use void_node
8794 instead of void_zero_node.
8796 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8798 * c-decl.c (finish_struct): Adjust.
8799 (finish_enum): Likewise.
8801 (record_inline_static): Likewise.
8802 (push_scope): Likewise.
8803 (make_label): Likewise.
8804 (lookup_label_for_goto): Likewise.
8805 (finish_struct): Likewise.
8806 (finish_enum): Likewise.
8807 (store_parm_decls): Likewise.
8808 (c_push_function_context): Likewise.
8809 * c-lang.h: Remove usage of variable_size gty attribute.
8810 * c-parser.c (c_parse_init): Adjust.
8811 (c_parse_file): Likewise.
8813 2014-05-13 Marek Polacek <polacek@redhat.com>
8816 * c-typeck.c (convert_for_assignment): Pass location to
8817 WARN_FOR_ASSIGNMENT instead of input_location.
8819 2014-05-10 Marek Polacek <polacek@redhat.com>
8821 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8822 maybe_warn_string_init.
8823 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8824 maybe_warn_string_init.
8825 * c-tree.h (maybe_warn_string_init): Update declaration.
8826 * c-typeck.c (maybe_warn_string_init): Add location parameter.
8827 Call pedwarn_init with loc instead of with input_location.
8828 (digest_init): Pass init_loc to maybe_warn_string_init.
8829 (pop_init_level): Call pedwarn_init with loc instead of with
8831 (set_init_index): Likewise.
8832 (process_init_element): Likewise.
8834 2014-05-09 Marek Polacek <polacek@redhat.com>
8837 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8838 (c_parser_initelt): Pass location to set_init_label. Pass array index
8839 location to set_init_index.
8840 * c-tree.h (push_init_level): Update declaration.
8841 (pop_init_level): Likewise.
8842 (set_init_index): Likewise.
8843 (set_init_label): Likewise.
8844 * c-typeck.c (error_init): Add location parameter. Call error_at
8846 (digest_init): Pass init_loc to error_init.
8847 (really_start_incremental_init):
8848 (push_init_level): Add location parameter. Pass loc to pop_init_level
8850 (pop_init_level): Likewise.
8851 (set_designator): Add location parameter. Pass loc to pop_init_level,
8852 push_init_level, and error_init.
8853 (set_init_index): Add location parameter. Pass loc to error_init and
8855 (set_init_label): Likewise.
8856 (output_init_element): Pass loc to error_init.
8857 (process_init_element): Pass loc to error_init, pop_init_level,
8858 pedwarn_init, and push_init_level.
8860 2014-05-09 Marek Polacek <polacek@redhat.com>
8863 * c-parser.c (c_parser_attributes): Parse the arguments as an
8864 expression-list if the attribute takes identifier.
8866 2014-05-08 Marek Polacek <polacek@redhat.com>
8869 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8872 2014-05-08 Marek Polacek <polacek@redhat.com>
8875 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8878 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8879 Mike Stump <mikestump@comcast.net>
8880 Richard Sandiford <rdsandiford@googlemail.com>
8882 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8883 (finish_enum): Use wide-int interfaces.
8884 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8885 * c-typeck.c (build_c_cast): Likewise.
8886 (set_nonincremental_init_from_string): Likewise.
8887 (c_tree_equal): Likewise.
8889 2014-05-02 Marek Polacek <polacek@redhat.com>
8892 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8893 Return size_one_node when the type is not complete.
8894 (pointer_diff): Remove comment.
8895 (build_unary_op): Improve error messages.
8897 2014-05-02 Marek Polacek <polacek@redhat.com>
8899 * c-typeck.c (c_finish_return): Separate warning_at calls.
8901 2014-05-02 Marek Polacek <polacek@redhat.com>
8903 * c-tree.h (error_init): Remove declaration.
8904 (pedwarn_init): Likewise.
8905 * c-typeck.c (error_init): Make static and move above.
8906 (pedwarn_init): Likewise.
8907 (warning_init): Move above.
8908 (maybe_warn_string_init): Likewise.
8910 2014-05-01 Jeff Law <law@redhat.com>
8914 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8915 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8918 2014-05-02 Marek Polacek <polacek@redhat.com>
8921 * c-typeck.c (push_init_level): Set constructor_designated to
8922 p->designated for structures.
8924 2014-05-01 Marek Polacek <polacek@redhat.com>
8927 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8928 function-definition has an attribute after the declarator.
8930 2014-05-01 Marek Polacek <polacek@redhat.com>
8933 * c-typeck.c (warning_init): Add location_t parameter. Call
8934 warning_at instead of warning.
8935 (push_init_level): Pass input_location to warning_init.
8936 (add_pending_init): Add location_t parameter. Pass loc to
8938 (set_nonincremental_init): Pass input_location to add_pending_init.
8939 (set_nonincremental_init_from_string): Likewise.
8940 (output_init_element): Pass loc to warning_init and to
8943 2014-05-01 Marek Polacek <polacek@redhat.com>
8946 * c-typeck.c (c_finish_return): Distinguish between label and variable
8947 when warning about returning local address.
8949 2014-05-01 Marek Polacek <polacek@redhat.com>
8952 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8955 2014-05-01 Marek Polacek <polacek@redhat.com>
8958 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8959 instead of 0 to WARN_FOR_QUALIFIERS.
8961 2014-05-01 Marek Polacek <polacek@redhat.com>
8964 * c-typeck.c (default_conversion): Use better location for
8967 2014-04-30 Marek Polacek <polacek@redhat.com>
8969 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8970 also when SANITIZE_FLOAT_DIVIDE is on.
8972 2014-04-30 Marek Polacek <polacek@redhat.com>
8975 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8976 and pedwarn_init. Use loc insted of input_location.
8978 2014-04-30 Marek Polacek <polacek@redhat.com>
8981 * c-typeck.c (build_binary_op): Use location when warning about
8984 2014-04-25 Marek Polacek <polacek@redhat.com>
8987 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8988 always_inline/noinline and hot/cold attributes.
8990 2014-04-25 Marek Polacek <polacek@redhat.com>
8993 * c-parser.c (c_parser_initelt): Pass input_location to
8994 process_init_element.
8995 (c_parser_initval): Pass loc to process_init_element.
8996 * c-tree.h (process_init_element): Adjust declaration.
8997 * c-typeck.c (push_init_level): Pass input_location to
8998 process_init_element.
8999 (pop_init_level): Likewise.
9000 (set_designator): Likewise.
9001 (output_init_element): Add location_t parameter. Pass loc to
9003 (output_pending_init_elements): Pass input_location to
9004 output_init_element.
9005 (process_init_element): Add location_t parameter. Pass loc to
9006 output_init_element.
9008 2014-04-24 Jakub Jelinek <jakub@redhat.com>
9010 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
9011 atomic-clause, allow comma in between atomic-clause and
9014 2014-04-22 Jakub Jelinek <jakub@redhat.com>
9017 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
9018 fails, don't set OM_PARALLEL_COMBINED and return NULL.
9020 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9023 * c-array-notation.c (fix_builtin_array_notation_fn): Use
9024 create_tmp_var instead build_decl for creating temps.
9025 (build_array_notation_expr): Likewise.
9026 (fix_conditional_array_notations_1): Likewise.
9027 (fix_array_notation_expr): Likewise.
9028 (fix_array_notation_call_expr): Likewise.
9030 2014-03-28 Jakub Jelinek <jakub@redhat.com>
9033 * c-tree.h (c_build_function_call_vec): New prototype.
9034 * c-typeck.c (build_function_call_vec): Don't call
9035 resolve_overloaded_builtin here.
9036 (c_build_function_call_vec): New wrapper function around
9037 build_function_call_vec. Call resolve_overloaded_builtin here.
9038 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
9039 Call c_build_function_call_vec instead of build_function_call_vec.
9040 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
9041 * c-decl.c (finish_decl): Likewise.
9043 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
9046 * c-typeck.c: Use correct format string in cast-qual warning
9048 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
9050 * c-decl.c (c_decl_attributes): Use
9051 lang_hooks.types.omp_mappable_type.
9052 * c-typeck.c (c_finish_omp_clauses): Likewise.
9054 2014-03-06 Marek Polacek <polacek@redhat.com>
9057 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
9058 of checking tree code.
9060 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
9062 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
9063 (c_parser_parameter_declaration): Likewise.
9065 2014-02-19 Marek Polacek <polacek@redhat.com>
9068 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
9069 Call mark_exp_read on exp.value.
9070 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
9071 TREE_ADDRESSABLE on old instead of val.
9072 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
9074 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
9076 * c-parser.c (c_parser_get_builtin_args): Replace calls to
9077 C_EXPR_APPEND by vec_safe_push.
9078 * c-tree.h (C_EXPR_APPEND): Remove.
9080 2014-01-31 Marek Polacek <polacek@redhat.com>
9083 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
9084 build_function_call_vec.
9085 (build_function_call): Likewise.
9086 (build_atomic_assign): Likewise.
9087 (build_function_call_vec): Add arg_loc parameter. Use it.
9088 (convert_arguments): Likewise.
9089 (convert_for_assignment): Rename rhs_loc to expr_loc.
9090 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
9091 (c_parser_objc_keywordexpr): Likewise.
9092 (c_parser_postfix_expression_after_primary): Call
9093 build_function_call_vec with expr_loc rather than op_loc.
9094 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
9095 build_function_call_vec.
9096 (c_parser_expr_list): Add locations parameter. Fill it with locations
9097 of function arguments.
9098 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
9100 2014-01-30 Marek Polacek <polacek@redhat.com>
9103 * c-typeck.c (build_function_call_vec): Use loc parameter.
9104 (convert_arguments): Add location parameter. Use it.
9105 (ep_convert_and_check): Likewise.
9106 (build_atomic_assign): Adjust convert_for_assignment call.
9107 (build_modify_expr): Likewise.
9108 (digest_init): Likewise.
9109 (c_finish_return): Likewise.
9110 (build_conditional_expr): Adjust ep_convert_and_check calls.
9111 (convert_for_assignment): Add rhs_loc parameter. Use it.
9112 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
9115 2014-01-30 Richard Biener <rguenther@suse.de>
9118 * c-typeck.c (build_function_call_vec): Do not replace calls
9119 to a function via an incompatible type with a runtime abort.
9121 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
9123 * c-parser.c (c_parser_declaration_or_fndef): Replaced
9124 flag_enable_cilkplus with flag_cilkplus.
9125 (c_parser_direct_declarator_inner): Likewise.
9126 (c_parser_attribute_any_word): Likewise.
9127 (c_parser_attributes): Likewise.
9128 (c_parser_compound_statement): Likewise.
9129 (c_parser_statement_after_labels): Likewise.
9130 (c_parser_if_statement): Likewise.
9131 (c_parser_switch_statement): Likewise.
9132 (c_parser_do_statement): Likewise.
9133 (c_parser_for_statement): Likewise.
9134 (c_parser_unary_expression): Likewise.
9135 (c_parser_postfix_expression): Likewise.
9136 (c_parser_postfix_expression_after_primary): Likewise.
9137 (c_parser_postfix_expression_after_primary): Likewise.
9138 (c_parser_omp_clause_name): Likewise.
9139 (c_finish_omp_declare_simd): Likewise.
9140 (c_parser_cilk_verify_simd): Likewise.
9141 * c-typeck.c (build_array_ref): Likewise.
9142 (build_function_call_vec): Likewise.
9143 (convert_arguments): Likewise.
9144 (build_compound_expr): Likewise.
9145 (c_finish_return): Likewise.
9146 (c_finish_if_stmt): Likewise.
9147 (c_finish_loop): Likewise.
9148 (build_binary_op): Likewise.
9150 2014-01-23 Marek Polacek <polacek@redhat.com>
9153 * c-typeck.c (parser_build_binary_op): Use location instead of
9155 (build_binary_op): Pass location to shorten_compare.
9157 2014-01-23 Marek Polacek <polacek@redhat.com>
9160 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
9163 2014-01-23 Marek Polacek <polacek@redhat.com>
9166 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
9167 of a comma expression.
9168 (emit_side_effect_warnings): Likewise.
9170 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9173 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
9174 function to use walk_tree and moved a lot of its functionality to
9175 expand_array_notations.
9176 (expand_array_notations): New function.
9178 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
9180 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
9181 attribute an attribute without value.
9183 2014-01-23 Jakub Jelinek <jakub@redhat.com>
9186 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
9187 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
9189 2014-01-22 Marek Polacek <polacek@redhat.com>
9192 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
9193 of remove_c_maybe_const_expr on op1 and op2.
9195 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9198 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
9199 effects, preevaluate rhs using SAVE_EXPR first.
9201 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
9204 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
9205 statements with if-elseif statements.
9207 2014-01-06 Marek Polacek <polacek@redhat.com>
9210 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
9211 defined bit-field types only in ISO C.
9213 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9215 Update copyright years
9217 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9219 * c-array-notation.c: Use the standard form for the copyright notice.
9221 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9223 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
9224 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
9225 field in parser is not empty. If not-empty, call the function
9226 c_parser_finish_omp_declare_simd.
9227 (c_parser_cilk_clause_vectorlength): Modified function to be shared
9228 between SIMD-enabled functions and #pragma simd. Added new parameter.
9229 (c_parser_cilk_all_clauses): Modified the usage of the function
9230 c_parser_cilk_clause_vectorlength as mentioned above.
9231 (c_parser_cilk_simd_fn_vector_attrs): New function.
9232 (c_finish_cilk_simd_fn_tokens): Likewise.
9233 (is_cilkplus_vector_p): Likewise.
9234 (c_parser_omp_clause_name): Added checking for "vectorlength,"
9235 "nomask," and "mask" strings in clause name.
9236 (c_parser_omp_all_clauses): Added 3 new case statements:
9237 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
9238 PRAGMA_CILK_CLAUSE_NOMASK.
9239 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
9240 check for vector attribute and if so call the function
9241 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
9242 called the function c_finish_cilk_simd_fn_tokens.
9243 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
9244 parser field is non-empty. If so, parse them as you would parse
9245 the omp declare simd pragma.
9246 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
9247 Added a check when step is a parameter and flag it as error.
9248 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
9249 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
9252 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
9254 * c-parser.c (c_parser_omp_parallel): Fix description.
9256 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9258 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
9259 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9260 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
9261 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
9263 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9266 * c-parser.c (c_parser_alignas_specifier): Use
9267 c_sizeof_or_alignof_type instead of c_alignof.
9268 (c_parser_alignof_expression): Likewise, with min_alignof
9269 parameter depending on alignof spelling used.
9271 2013-12-04 Marek Polacek <polacek@redhat.com>
9274 * c-decl.c (start_function): Don't warn for missing prototype for
9277 2013-12-03 Marek Polacek <polacek@redhat.com>
9280 * c-decl.c (build_compound_literal): Allow compound literals with
9281 empty initial value.
9283 2013-12-02 Joseph Myers <joseph@codesourcery.com>
9286 * c-typeck.c (build_modify_expr): Diagnose assignment to
9287 expression with array type.
9289 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9292 * c-typeck.c (process_init_element): Do not treat a string as
9293 initializing a whole array when used with a designator for an
9296 2013-11-29 Joseph Myers <joseph@codesourcery.com>
9299 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
9300 an inline function following a static declaration.
9302 2013-11-28 Jakub Jelinek <jakub@redhat.com>
9305 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
9306 to p_name before calling c_parser_omp_teams instead of after.
9307 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
9308 argument. Remove unused p_name variable.
9310 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
9311 Jakub Jelinek <jakub@redhat.com>
9313 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
9314 external_scope is NULL.
9316 2013-11-27 Tom de Vries <tom@codesourcery.com>
9317 Marc Glisse <marc.glisse@inria.fr>
9320 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
9322 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9324 * c-typeck.c: Add required include files from gimple.h.
9326 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9328 * c-decl.c (define_label, shadow_tag_warned)
9329 (check_bitfield_type_and_width, grokdeclarator, grokparms,
9330 store_parm_decls_newstyle, store_parm_decls_oldstyle)
9331 (declspecs_add_type): Remove use of in_system_header macro.
9332 * c-parser.c (c_parser_unary_expression): Likewise.
9333 * c-typeck.c (store_init_value, process_init_element)
9334 (c_start_case): Likewise.
9336 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
9339 * c-parser.c (c_parser_set_source_position_from_token): Remove
9340 reference to in_system_header from comment.
9342 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9344 * c-decl.c (grokdeclarator): Update comment to refer to
9345 tree_to_[su]hwi rather than tree_low_cst.
9347 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9349 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
9350 tree_to_uhwi throughout.
9352 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9354 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
9357 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9359 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
9362 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9364 * c-parser.c (c_parser_cilk_simd): New.
9365 (c_parser_cilk_verify_simd): New.
9366 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
9367 (c_parser_omp_for_loop): Add case for NE_EXPR.
9368 Set c_break_label for CILK_SIMD.
9369 (c_parser_cilk_clause_vectorlength): New.
9370 (c_parser_cilk_clause_linear): New.
9371 (c_parser_cilk_clause_name): New.
9372 (c_parser_cilk_all_clauses): New.
9373 * c-typeck.c (build_unary_op): Pass location argument to
9375 (build_modify_expr): Same.
9376 (build_asm_expr): Same.
9377 (c_finish_bc_stmt): Error on break/continue in loops.
9379 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
9381 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
9383 2013-11-14 Diego Novillo <dnovillo@google.com>
9385 * c-decl.c: Include print-tree.h.
9386 Include stor-layout.h.
9389 Include stringpool.h.
9390 * c-lang.c: Include fold-const.h.
9391 * c-parser.c: Include stringpool.h.
9393 Include stor-layout.h.
9395 Include trans-mem.h.
9396 * c-typeck.c: Include stor-layout.h.
9397 Include trans-mem.h.
9401 2013-11-13 Joseph Myers <joseph@codesourcery.com>
9403 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
9404 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
9406 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
9407 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
9409 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
9410 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
9411 (c_parser_declarator, c_parser_direct_declarator_inner)
9412 (c_parser_parameter_declaration, c_parser_type_name): All callers
9414 (c_parser_declaration_or_fndef): Handle declarations with type
9415 determined from the initializer.
9417 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9419 * c-typeck.c: Include gimplify.h.
9421 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9423 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
9424 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
9426 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
9427 or _Thread_local as appropriate in diagnostics.
9428 (build_null_declspecs): Initialize ret->thread_gnu_p.
9429 (declspecs_add_scspec): Handle either __thread or _Thread_local
9430 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
9431 pedantic. Do not disallow _Thread_local extern and _Thread_local
9434 2013-11-07 Joseph Myers <joseph@codesourcery.com>
9435 Andrew MacLeod <amacleod@redhat.com>
9437 * c-aux-info.c (gen_type): Handle atomic qualifier.
9438 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
9439 qualifiers when compating types.
9440 (shadow_tag_warned): Handle atomic_p in declspecs.
9441 (quals_from_declspecs): Likewise.
9442 (start_decl): Use c_type_promotes_to when promoting argument
9444 (grokdeclarator): Handle _Atomic.
9445 (get_parm_info): Diagnose any qualifier on "void" as only
9447 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
9448 comparing types. Use c_type_promotes_to when promoting argument
9450 (finish_function): Use c_type_promotes_to when promoting argument
9452 (build_null_declspecs): Handle atomic_p in declspecs.
9453 (declspecs_add_qual): Handle RID_ATOMIC.
9454 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
9455 (c_token_starts_declspecs): Handle RID_ATOMIC.
9456 (c_parser_declspecs): Handle atomic type specifiers and
9458 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
9459 from types of expressions with atomic type.
9460 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
9461 (c_parser_attribute_any_word): Handle RID_ATOMIC.
9462 (c_parser_initializer, c_parser_initelt, c_parser_initval)
9463 (c_parser_statement_after_labels, c_parser_switch_statement)
9464 (c_parser_for_statement, c_parser_expr_no_commas)
9465 (c_parser_conditional_expression, c_parser_binary_expression)
9466 (c_parser_cast_expression, c_parser_unary_expression)
9467 (c_parser_postfix_expression)
9468 (c_parser_postfix_expression_after_primary, c_parser_expression):
9469 Use convert_lvalue_to_rvalue.
9470 (c_parser_expression_conv, c_parser_expr_list): Document
9471 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
9472 (c_parser_objc_synchronized_statement): Use
9473 convert_lvalue_to_rvalue.
9474 (c_parser_objc_selector): Handle RID_ATOMIC.
9475 (c_parser_objc_receiver, c_parser_array_notation): Use
9476 convert_lvalue_to_rvalue.
9477 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
9478 _Atomic (type-name).
9479 (struct c_declspecs): Add atomic_p field.
9480 (convert_lvalue_to_rvalue): Declare.
9481 * c-typeck.c (c_type_promotes_to): Promote atomic types to
9482 corresponding atomic types.
9483 (qualify_type): Don't add _Atomic qualifiers from second argument.
9484 (comp_target_types): Do not allow _Atomic mismatches.
9485 (type_lists_compatible_p): Do not remove atomic qualifiers when
9487 (really_atomic_lvalue, convert_lvalue_to_rvalue)
9488 (build_atomic_assign): New functions.
9489 (build_unary_op): Use build_atomic_assign for atomic increment and
9491 (build_conditional_expr): Do not treat _Atomic void as a qualified
9493 (build_modify_expr): Use build_atomic_assign for atomic LHS.
9494 (find_anonymous_field_with_type, convert_to_anonymous_field)
9495 (convert_for_assignment): Do not remove atomic qualifiers when
9497 (digest_init): Do not accept initialization of arrays of atomic
9498 elements by string constants.
9499 (build_asm_expr): Use convert_lvalue_to_rvalue.
9500 (build_binary_op): Do not treat _Atomic void as a qualified
9503 2013-11-06 DJ Delorie <dj@redhat.com>
9505 * c-decl.c (locate_old_decl): If a previous conflicting decl is
9506 both explicit and builtin, print the location of the explicit one.
9508 2013-11-05 Tobias Burnus <burnus@net-b.de>
9510 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
9511 c_parser_omp_distribute, c_parser_omp_teams,
9512 c_parser_omp_target, c_parser_omp_declare): Handle
9515 2013-11-03 Marek Polacek <polacek@redhat.com>
9517 * c-decl.c (grokdeclarator): Add VLA instrumentation.
9519 2013-11-01 Jakub Jelinek <jakub@redhat.com>
9521 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
9522 check_dup_generic at the end, unless remove is true.
9523 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
9525 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
9527 2013-10-31 Jakub Jelinek <jakub@redhat.com>
9529 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
9530 with decl that is not pointer nor array.
9532 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9534 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
9535 a spawning function is found.
9536 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
9537 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
9538 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9539 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
9541 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
9542 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
9544 (c_finish_return): Added a check to reject _Cilk_spawn in return
9546 (build_cilk_spawn): New function.
9547 (build_cilk_sync): Likewise.
9548 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
9550 2013-10-27 Tobias Burnus <burnus@net-b.de>
9553 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
9554 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
9555 (c_parser_statement_after_labels): Update calls.
9557 2013-10-24 Tobias Burnus <burnus@net-b.de>
9560 * c-parser.c (c_parser_pragma, c_parser_for_statement):
9561 Handle PRAGMA_IVDEP.
9562 (c_parser_statement_after_labels): Update call.
9564 2013-10-24 Marek Polacek <polacek@redhat.com>
9566 * c-parser.c (c_parser_struct_declaration): Add a comment.
9567 (c_parser_declarator): Don't allow _Alignas here.
9569 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
9571 * c-parser.c: Include omp-low.h.
9572 * c-typeck.c: Likewise.
9574 2013-10-17 Marek Polacek <polacek@redhat.com>
9577 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
9578 Document syntax of the array-declarator.
9579 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
9581 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
9582 (c_parser_struct_declaration): Likewise.
9583 (c_parser_declarator): Likewise.
9584 (c_parser_direct_declarator_inner): Likewise.
9585 (c_parser_parameter_declaration): Likewise.
9586 (c_parser_type_name): Likewise.
9588 2013-10-11 Jakub Jelinek <jakub@redhat.com>
9590 * c-lang.h (current_omp_declare_target_attribute): New extern
9592 * c-parser.c: Include c-lang.h.
9593 (struct c_parser): Change tokens to c_token *.
9594 Add tokens_buf field. Change tokens_avail type to unsigned int.
9595 (c_parser_consume_token): If parser->tokens isn't
9596 &parser->tokens_buf[0], increment parser->tokens.
9597 (c_parser_consume_pragma): Likewise.
9598 (enum pragma_context): Add pragma_struct and pragma_param.
9599 (c_parser_external_declaration): Adjust
9600 c_parser_declaration_or_fndef caller.
9601 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
9602 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
9603 Adjust recursive call.
9604 (c_parser_struct_or_union_specifier): Use pragma_struct instead
9606 (c_parser_parameter_declaration): Use pragma_param instead of
9608 (c_parser_compound_statement_nostart, c_parser_label,
9609 c_parser_for_statement): Adjust
9610 c_parser_declaration_or_fndef callers.
9611 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
9612 it through to c_parser_conditional_expression.
9613 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
9614 pass it through to c_parser_binary_expression. Adjust recursive
9616 (c_parser_binary_expression): Remove prec argument, add
9617 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
9618 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
9619 binop matches it, use build2 instead of parser_build_binary_op.
9620 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
9621 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
9622 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
9623 Handle pragma_struct and pragma_param the same as pragma_external.
9624 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
9625 (c_parser_omp_variable_list): Parse array sections for
9626 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
9627 (c_parser_omp_clause_collapse): Fully fold collapse expression.
9628 (c_parser_omp_clause_reduction): Handle user defined reductions.
9629 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
9630 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
9631 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
9632 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
9633 c_parser_omp_clause_depend, c_parser_omp_clause_map,
9634 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
9635 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
9636 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
9637 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
9638 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
9639 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
9640 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
9641 (c_parser_omp_for_loop): Add CODE argument, pass it through
9642 to c_finish_omp_for. Change last argument to cclauses,
9643 and adjust uses to grab parallel clauses from the array of all
9644 the split clauses. Adjust c_parser_binary_expression,
9645 c_parser_declaration_or_fndef and c_finish_omp_for callers.
9646 (omp_split_clauses): New function.
9647 (c_parser_omp_simd): New function.
9648 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
9649 Allow the function to be called also when parsing combined constructs,
9650 and call c_parser_omp_simd when parsing for simd.
9651 (c_parser_omp_sections_scope): If section-sequence doesn't start with
9652 #pragma omp section, require exactly one structured-block instead of
9653 sequence of statements.
9654 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
9655 Allow the function to be called also when parsing combined constructs.
9656 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9657 Allow the function to be called also when parsing combined
9659 (c_parser_omp_taskgroup, c_parser_omp_cancel,
9660 c_parser_omp_cancellation_point, c_parser_omp_distribute,
9661 c_parser_omp_teams, c_parser_omp_target_data,
9662 c_parser_omp_target_update, c_parser_omp_target,
9663 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9664 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9665 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9666 (c_parser_omp_construct): Add p_name and mask vars. Handle
9667 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9668 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
9669 and c_parser_omp_sections callers.
9670 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9671 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9672 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9673 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
9674 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
9676 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9677 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9678 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9679 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9680 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9681 * c-typeck.c: Include tree-inline.h.
9682 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9683 handle_omp_array_sections_1, handle_omp_array_sections,
9684 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9685 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9686 user defined reductions.
9687 (c_tree_equal): New function.
9688 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9689 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9690 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9691 c_check_omp_declare_reduction_r): New prototypes.
9692 * c-decl.c (current_omp_declare_target_attribute): New variable.
9693 (c_decl_attributes): New function.
9694 (start_decl, start_function): Use it instead of decl_attributes.
9695 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9696 c_omp_reduction_decl, c_omp_reduction_lookup,
9697 c_check_omp_declare_reduction_r): New functions.
9699 2013-09-25 Tom Tromey <tromey@redhat.com>
9701 * Make-lang.in (c/gccspec.o): Remove.
9702 (CFLAGS-c/gccspec.o): New variable.
9703 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9704 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9705 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9707 2013-09-25 Tom Tromey <tromey@redhat.com>
9709 * Make-lang.in (c/gccspec.o): Don't use subshell.
9711 2013-09-18 Marek Polacek <polacek@redhat.com>
9714 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9715 Remove unnecessary check.
9717 2013-09-18 Marek Polacek <polacek@redhat.com>
9720 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9721 no_sanitize_undefined attribute.
9723 2013-09-13 Kai Tietz <ktietz@redhat.com>
9726 * c-decl.c (c_builtin_function_ext_scope): Remove
9727 wrong assumption that it is never called on prexisting
9730 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9732 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9734 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9736 * c-objc-common.c (c_tree_printer): Tidy.
9738 2013-08-30 Marek Polacek <polacek@redhat.com>
9740 * c-typeck.c (build_binary_op): Add division by zero and shift
9743 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
9744 Joseph Myers <joseph@codesourcery.com>
9747 * c-typeck.c (c_common_type): Prefer double_type_node over
9748 other REAL_TYPE types with the same precision.
9749 (convert_arguments): Likewise.
9751 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
9753 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9754 (c_initialize_diagnostics): Call a destructor for the early printer.
9756 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9758 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9759 printer initialization.
9761 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
9764 * c-array-notation.c (fix_conditional_array_notations_1): Added a
9765 check for truth values.
9766 (expand_array_notation_exprs): Added truth values case. Removed an
9767 unwanted else. Added for-loop to walk through subtrees in default
9770 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9772 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9774 2013-07-23 Joseph Myers <joseph@codesourcery.com>
9776 * c-parser.c (struct c_generic_association): Fix typo.
9778 2013-07-23 Tom Tromey <tromey@redhat.com>
9779 Joseph Myers <joseph@codesourcery.com>
9781 * c-parser.c (struct c_generic_association): New.
9782 (c_generic_association_d): New typedef.
9783 (c_parser_generic_selection): New function.
9784 (c_parser_postfix_expression): Handle RID_GENERIC.
9786 2013-07-13 Jason Merrill <jason@redhat.com>
9789 * c-decl.c (finish_struct): Check for too-large class.
9791 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
9794 * c-typeck.c (set_init_index): When folding, check for index overflow.
9796 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9798 * c-parser.c (c_parser_array_notation): Removed rejection of array
9799 notations in an array of function pointers.
9801 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9803 * c-array-notation.c (make_triplet_val_inv): New function.
9804 (create_cmp_incr): Likewise.
9805 (create_array_refs): Likewise.
9806 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9807 Also modularized common parts between functions and called the function.
9808 (build_array_notation_expr): Likewise.
9809 (fix_conditional_array_notations_1): Likewise.
9810 (fix_array_notation_expr): Likewise.
9811 (fix_array_notation_call_expr): Likewise.
9813 2013-06-18 Marek Polacek <polacek@redhat.com>
9816 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9818 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
9820 * c-array-notation.c (build_array_notation_expr): Reject array notation
9821 mismatch between LHS and RHS even inside a call_expr. Also, removed
9822 a couple while statements that were dead code.
9824 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
9826 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9827 excessive precision expressions in function parameters. Also removed
9828 couple unwanted while statements.
9830 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9832 * c-array-notation.c (expand_array_notation_exprs): Added
9833 ARRAY_NOTATION_REF case.
9835 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9837 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9838 function to c-family/array-notation-common.c.
9839 (is_cilkplus_reduce_builtin): Likewise.
9840 (find_rank): Likewise.
9841 (extract_array_notation_exprs): Likewise.
9842 (replace_array_notations): Likewise.
9843 (find_inv_trees): Likewise.
9844 (replace_inv_trees): Likewise.
9845 (contains_array_notation_expr): Likewise.
9846 (find_correct_array_notation_type): Likewise.
9847 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9848 (struct inv_list): Moved this to c-family/array-notation-common.c.
9849 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
9851 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9853 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9854 reduction functions outside the for-loop. Added a check if the fundecl
9855 is non-NULL. Finally, removed an unwanted if-statement, and made the
9858 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9860 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9861 condition of the if-statement matches the rank of else-block and then-
9862 block when array notations are used.
9863 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9864 expression after the entire function body is parsed.
9865 (c_parser_expr_no_commas): Delayed creating array notation expressions
9866 to the end of function parsing.
9867 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9868 whole if-statement instead of just the condition.
9869 (expand_array_notation_exprs): Added MODIFY_EXPR case.
9871 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9874 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9875 array to NULL_TREE if they are unused. Also added a check for the
9876 field to be NULL before its fields are used in future.
9878 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9881 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9882 (build_array_notation_expr): Likewise.
9884 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9886 * c-typeck.c (build_array_ref): Added a check to see if array's
9887 index is greater than one. If true, then emit an error.
9888 (build_function_call_vec): Exclude error reporting and checking
9889 for builtin array-notation functions.
9890 (convert_arguments): Likewise.
9891 (c_finish_return): Added a check for array notations as a return
9892 expression. If true, then emit an error.
9893 (c_finish_loop): Added a check for array notations in a loop
9894 condition. If true then emit an error.
9895 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9896 (build_binary_op): Added a check for array notation expr inside
9897 op1 and op0. If present, we call another function to find correct
9899 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9900 * c-parser.c (c_parser_compound_statement): Check if array
9901 notation code is used in tree, if so, then transform them into
9903 (c_parser_expr_no_commas): Check if array notation is used in LHS
9904 or RHS, if so, then build array notation expression instead of
9906 (c_parser_postfix_expression_after_primary): Added a check for
9907 colon(s) after square braces, if so then handle it like an array
9908 notation. Also, break up array notations in unary op if found.
9909 (c_parser_direct_declarator_inner): Added a check for array
9911 (c_parser_compound_statement): Added a check for array notation in
9912 a stmt. If one is present, then expand array notation expr.
9913 (c_parser_if_statement): Likewise.
9914 (c_parser_switch_statement): Added a check for array notations in
9915 a switch statement's condition. If true, then output an error.
9916 (c_parser_while_statement): Similarly, but for a while.
9917 (c_parser_do_statement): Similarly, but for a do-while.
9918 (c_parser_for_statement): Similarly, but for a for-loop.
9919 (c_parser_unary_expression): Check if array notation is used in a
9920 pre-increment or pre-decrement expression. If true, then expand
9922 (c_parser_array_notation): New function.
9923 * c-array-notation.c: New file.
9924 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
9926 2013-05-23 Mike Stump <mikestump@comcast.net>
9928 * c-typeck.c (convert_for_assignment): Handle references to memory
9931 2013-05-16 Jason Merrill <jason@redhat.com>
9933 * Make-lang.in (cc1$(exeext)): Use link mutex.
9935 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9937 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9938 to simply use OPT_Wpointer_arith.
9939 (build_unary_op): Likewise.
9941 2013-04-03 Jakub Jelinek <jakub@redhat.com>
9944 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9945 argument. If set, or it temporarily for parsing of the first
9946 argument into force_folding_builtin_constant_p.
9947 (c_parser_postfix_expression): Adjust callers.
9949 2013-03-21 Richard Biener <rguenther@suse.de>
9951 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9952 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9954 2013-02-12 Marek Polacek <polacek@redhat.com>
9957 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9960 2013-01-24 Jakub Jelinek <jakub@redhat.com>
9963 * c-typeck.c (set_nonincremental_init_from_string): If
9964 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9966 (process_init_element): Likewise.
9968 2012-12-20 Jakub Jelinek <jakub@redhat.com>
9971 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9972 argument, don't call default_function_array_conversion
9973 nor c_fully_fold here.
9974 (c_parser_asm_statement): Adjust callers.
9975 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9976 and outputs here, and call default_function_array_conversion
9977 on inputs that don't need to be addressable.
9979 2012-12-18 Jakub Jelinek <jakub@redhat.com>
9982 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9983 warning require that both c_common_unsigned_type as well as
9984 c_common_signed_type is the same for both mvl and mvr types.
9986 2012-11-16 Diego Novillo <dnovillo@google.com>
9988 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9990 * c-common.c: Use new vec API in vec.h.
9991 * c-common.h: Likewise.
9992 * c-gimplify.c: Likewise.
9993 * c-pragma.c: Likewise.
9994 * c-pretty-print.c: Likewise.
9995 * c-pretty-print.h: Likewise.
9996 * c-semantics.c: Likewise.
9997 * c-decl.c: Likewise.
9998 * c-parser.c: Likewise.
9999 * c-tree.h: Likewise.
10000 * c-typeck.c: Likewise.
10002 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10005 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
10007 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10010 * c-decl.c (warn_if_shadowing): Do not warn if a variable
10011 shadows a function, unless the variable is a function or a
10012 pointer-to-function.
10014 2012-10-12 Jakub Jelinek <jakub@redhat.com>
10017 * c-parser.c (struct c_tree_loc_pair): Removed.
10018 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
10019 add location_t * and tree * arguments, fill in array of 3
10020 sizeof_arg trees and corresponding locs.
10021 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
10022 c_parser_expr_list callers.
10023 (c_parser_postfix_expression_after_primary): Likewise. Pass
10024 array of 3 sizeof_arg trees and locs (corresponding to first
10025 3 arguments) to sizeof_pointer_memaccess_warning.
10027 2012-10-09 Lawrence Crowl <crowl@google.com>
10029 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
10030 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
10033 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10036 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
10039 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
10042 * c-typeck.c: Include c-common.h.
10043 (enum stv_conv): Moved to c-common.h.
10044 (scalar_to_vector): Moved to c-common.c.
10045 (build_binary_op): Adapt to scalar_to_vector's new prototype.
10046 * Make-lang.in: c-typeck.c depends on c-common.h.
10048 2012-10-04 Arnaud Charlet <charlet@adacore.com>
10050 * c-decl.c (c_write_global_declarations): Fix handling of
10053 2012-09-30 Sharad Singhai <singhai@google.com>
10055 * c-decl.c (c_write_global_declarations): Use a different method
10056 to determine if the dump has ben initialized.
10058 2012-09-14 Joseph Myers <joseph@codesourcery.com>
10061 * c-typeck.c (c_cast_expr): When casting to a type requiring
10062 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
10063 c_fully_fold first.
10065 2012-09-14 Joseph Myers <joseph@codesourcery.com>
10068 * c-typeck.c (build_unary_op): Pass original argument of
10069 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
10070 any C_MAYBE_CONST_EXPR, if it has integer operands.
10071 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
10072 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
10073 to c_objc_common_truthvalue_conversion, then remove any
10074 C_MAYBE_CONST_EXPR, if they have integer operands. Use
10075 c_objc_common_truthvalue_conversion not
10076 c_common_truthvalue_conversion.
10077 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
10078 call note_integer_operands for arguments with integer operands
10079 that are not integer constants.
10081 2012-09-13 Jakub Jelinek <jakub@redhat.com>
10084 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
10085 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
10087 2012-08-31 Jakub Jelinek <jakub@redhat.com>
10090 * c-convert.c (convert): Don't call fold_convert_loc if
10091 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
10092 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
10093 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
10095 2012-08-24 Jakub Jelinek <jakub@redhat.com>
10098 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
10099 for nested and empty_ok arguments in the call to
10100 c_parser_declaration_or_fndef.
10102 2012-08-17 Jakub Jelinek <jakub@redhat.com>
10104 * c-tree.h (c_last_sizeof_arg): Declare.
10105 * c-parser.c (struct c_tree_loc_pair): New type.
10106 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
10108 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
10109 (c_parser_postfix_expression_after_primary): Likewise. Call
10110 sizeof_pointer_memaccess_warning if needed.
10111 (sizeof_ptr_memacc_comptypes): New function.
10112 * c-typeck.c (c_last_sizeof_arg): New global variable.
10113 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
10115 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
10117 * c-lang.h (lang_decl): Add variable_size GTY option.
10119 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10121 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
10122 * Make-lang.in: Fix dependencies.
10124 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10126 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
10127 and add language Makefile hooks.
10128 * config-lang.in: New file.
10129 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
10130 add the required "normal" config-lang.in rules.
10131 * c-lang.h: Moved from gcc/ to here.
10132 * c-tree.h: Likewise.
10133 * c-objc-common.c: Likewise.
10134 * c-objc-common.h: Likewise.
10135 * c-typeck.c: Likewise.
10136 * c-convert.c: Likewise.
10137 * c-lang.c: Likewise.
10138 * c-aux-info.c: Likewise.
10139 * c-errors.c: Likewise.
10140 * gccspec.c: Likewise.
10141 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
10142 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
10144 Copyright (C) 2012-2024 Free Software Foundation, Inc.
10146 Copying and distribution of this file, with or without modification,
10147 are permitted in any medium without royalty provided the copyright
10148 notice and this notice are preserved.