1 2023-11-27 Alex Coplan <alex.coplan@arm.com>
2 Iain Sandoe <iain@sandoe.co.uk>
5 * c-lang.cc (c_family_register_lang_features): New.
6 * c-objc-common.cc (struct c_feature_info): New.
7 (c_register_features): New.
8 * c-objc-common.h (c_register_features): New.
10 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
12 * c-parser.cc (c_parser_omp_clause_num_threads,
13 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
14 c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
15 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
16 c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
17 c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
18 Add OPT_Wopenmp to warning_at.
20 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
22 * c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
23 to the destroy clause.
25 2023-11-23 Jakub Jelinek <jakub@redhat.com>
27 * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
28 * c-decl.cc (names_builtin_p): Likewise.
30 2023-11-14 Jakub Jelinek <jakub@redhat.com>
33 * c-typeck.cc (convert_arguments): Don't promote first argument
34 of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
36 2023-11-10 Martin Uecker <uecker@tugraz.at>
38 * c-typeck.cc (struct comptypes_data): Add anon_field flag.
39 (comptypes, comptypes_check_unum_int,
40 comptypes_check_different_types): Remove old cache.
41 (tagged_tu_types_compatible_p): Rewrite.
43 2023-11-09 Florian Weimer <fweimer@redhat.com>
45 * c-typeck.cc (c_finish_return): Use pedwarn with
46 OPT_Wreturn_mismatch for missing/extra return expressions.
48 2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
50 * c-decl.cc (c_decl_attributes): Add attribute for indirect
52 * c-lang.h (c_omp_declare_target_attr): Add indirect field.
53 * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
54 (c_parser_omp_clause_indirect): New.
55 (c_parser_omp_all_clauses): Handle indirect clause.
56 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
57 (c_parser_omp_declare_target): Handle indirect clause. Emit error
58 message if device_type or indirect clauses used alone. Emit error
59 if indirect clause used with device_type that is not 'any'.
60 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
61 (c_parser_omp_begin): Handle indirect clause.
62 * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
64 2023-11-07 Joseph Myers <joseph@codesourcery.com>
66 * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
67 instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics
69 * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
70 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
71 instead of C2X in comments.
72 * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
73 warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
74 instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23
75 instead of C2X in diagnostics and comments.
76 * c-tree.h: Refer to C23 instead of C2X in comments.
77 (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
78 * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
79 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
80 instead of C2X in diagnostics and comments.
82 2023-11-06 Joseph Myers <joseph@codesourcery.com>
85 * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
87 * c-typeck.cc (build_conditional_expr, convert_for_assignment):
88 Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
90 2023-11-04 Jakub Jelinek <jakub@redhat.com>
92 * c-parser.h (c_maybe_parse_omp_decl): Declare.
93 * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
94 (c_parser_std_attribute): Uncoment omp::decl handling.
95 (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
96 don't expect any arguments, instead create clause or TREE_LIST for
98 (c_maybe_parse_omp_decl): New function.
99 (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
100 first token isn't name or comma invoke c_parser_omp_var_list_parens.
101 * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
102 use *node rather than non-existing *decl.
104 2023-11-04 Jakub Jelinek <jakub@redhat.com>
106 * c-tree.def: New file.
107 * c-tree.h (struct c_tree_token_vec): Forward declare.
108 (c_tree_size): Declare.
109 * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
110 (struct c_omp_begin_assumes_data): New type.
111 (current_omp_begin_assumes): Change type from int to
112 vec<c_omp_begin_assumes_data, va_gc> *.
113 * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
114 * c-parser.h (struct c_tree_token_vec_struct): New type.
115 (C_TOKEN_VEC_TOKENS): New macro.
116 * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
117 in_omp_attribute_pragma members.
118 (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
119 parser->in_omp_attribute_pragma.
120 (c_parser_skip_to_pragma_eol): Likewise.
121 (c_parser_translation_unit): Adjust for current_omp_begin_assumes
122 being a vector rather than counter.
123 (c_parser_declaration_or_fndef): Handle omp::directive and
124 omp::sequence attributes on attribute declaration and declare simd
125 or declare variant directives in those on function declarations.
126 (c_parser_check_balanced_raw_token_sequence): Forward declare.
127 (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
129 (c_parser_std_attribute): Handle omp::directive and omp::sequence
131 (struct c_omp_attribute_data): New type.
132 (c_parser_handle_statement_omp_attributes,
133 c_parser_handle_directive_omp_attributes): New functions.
134 (c_parser_compound_statement_nostart): Handle omp::directive and
135 omp::sequence attributes on statements. Formatting fix.
136 (c_parser_all_labels): Handle omp::directive and omp::sequence
137 attributes on statements.
138 (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
139 (c_parser_omp_variable_list): Handle parser->tokens
140 != &parser->tokens_buf[0] by saving/restoring it.
141 (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
142 (c_parser_omp_section_scan): New function.
143 (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
145 (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
146 (c_parser_omp_task): Likewise.
147 (c_parser_omp_declare_simd): Handle function declaration after
149 (c_finish_omp_declare_simd): Don't assert all kinds are the same.
150 (c_parser_omp_declare_target): Also push attr_syntax flag.
151 (c_parser_omp_begin): Likewise. Adjust for current_omp_begin_assumes
153 (c_parser_omp_end): Adjust for current_omp_begin_assumes type
154 change. Diagnose mixing of attribute vs. pragma syntax on end assumes
155 or end declare target.
156 (c_parser_omp_declare_reduction): Handle parser->tokens
157 != &parser->tokens_buf[0] by saving/restoring it.
158 * c-decl.cc: Include c-parser.h.
159 (current_omp_begin_assumes): Change type from int to
160 vec<c_omp_begin_assumes_data, va_gc> *.
161 (struct c_tree_token_vec): New type. Add static assertions
162 for sizeof and offsetof.
163 (union lang_tree_node): Add c_token_vec member and adjust GTY
165 (c_tree_size): New function.
166 (c_decl_attributes): Diagnose invalid omp::directive attribute
168 * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
170 2023-11-02 Martin Uecker <uecker@tugraz.at>
173 * c-typeck.cc (convert_for_assignment): Add missing check.
175 2023-11-01 Martin Uecker <uecker@tugraz.at>
178 * c-typeck.cc (convert_for_assignment): Add warning.
180 2023-10-26 liuhongt <hongtao.liu@intel.com>
182 * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
185 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
187 * c-parser.cc (c_parser_omp_clause_name): Return
188 'PRAGMA_OACC_CLAUSE_SELF' for "self".
189 (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
190 (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
191 parameter, and instead locally determine whether we're called for
192 an OpenACC compute construct or OpenACC 'update' directive.
193 (c_parser_oacc_compute): Adjust.
195 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
197 * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
198 (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
199 parameter, add parsing of self clause when compute_p is true.
200 (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
201 (OACC_PARALLEL_CLAUSE_MASK): Likewise,
202 (OACC_SERIAL_CLAUSE_MASK): Likewise.
203 (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
204 set compute_p argument to true.
205 * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
207 2023-10-20 Florian Weimer <fweimer@redhat.com>
211 * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
212 for pointer/integer mismatch warnings.
214 2023-10-20 Florian Weimer <fweimer@redhat.com>
218 * c-typeck.cc (build_conditional_expr): Use
219 OPT_Wincompatible_pointer_types for pointer mismatches.
220 Emit location information for the operand.
222 2023-10-19 Andrew Pinski <pinskia@gmail.com>
225 * c-typeck.cc (convert_argument): After erroring out
226 about an incomplete type return error_mark_node.
228 2023-10-19 Andrew Pinski <pinskia@gmail.com>
231 * c-typeck.cc (convert_for_assignment): Check for null pointer
232 before warning about an incompatible scalar storage order.
234 2023-10-18 Andrew Pinski <pinskia@gmail.com>
237 * c-decl.cc (diagnose_arglist_conflict): Test for
238 error mark before calling of c_type_promotes_to.
240 2023-10-18 Andrew Pinski <pinskia@gmail.com>
243 * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
246 2023-10-17 Martin Uecker <uecker@tugraz.at>
249 * c-decl.cc (grokdeclarator): Add error.
251 2023-10-03 David Malcolm <dmalcolm@redhat.com>
253 * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
256 2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
258 * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
260 2023-09-20 Jakub Jelinek <jakub@redhat.com>
262 * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
263 __builtin_classify_type call with typename as argument.
265 2023-09-19 Richard Biener <rguenther@suse.de>
268 * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
270 2023-09-19 Richard Biener <rguenther@suse.de>
273 * gimple-parser.cc (c_parser_gimple_binary_expression): Add
274 return type argument.
275 (c_parser_gimple_statement): Adjust.
276 (c_parser_gimple_paren_condition): Likewise.
277 (c_parser_gimple_binary_expression): Use passed in return type,
278 add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
279 __UNORDERED and __ORDERED.
281 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
283 * c-parser.cc (struct c_omp_loc_tree): New.
284 (c_check_omp_allocate_allocator_r): New; checking moved from ...
285 (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
286 ICE with tree_to_shwi for invalid too-large value.
288 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
290 * c-parser.cc (c_parser_omp_construct): Move call to
291 c_parser_omp_allocate to ...
292 (c_parser_pragma): ... here.
293 (c_parser_omp_allocate): Avoid ICE is allocator could not be
294 parsed; set 'omp allocate' attribute for stack/automatic variables
295 and only reject static variables; add several additional
297 * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
298 * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
299 (c_mark_decl_jump_unsafe_in_current_scope): New.
300 (warn_about_goto, c_check_switch_jump_warnings): Add error for
303 2023-09-12 Martin Uecker <uecker@tugraz.at>
305 * c-typeck.cc (struct comptypes_data): Add structure.
306 (tagged_types_tu_compatible_p,
307 function_types_compatible_p, type_lists_compatible_p,
308 comptypes_internal): Add structure to interface, change
309 return type to bool, and adapt calls.
310 (comptarget_types): Change return type too bool.
311 (comptypes, comptypes_check_enum_int,
312 comptypes_check_different_types): Adapt calls.
314 2023-09-06 Jakub Jelinek <jakub@redhat.com>
317 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
318 * c-typeck.cc (c_common_type): Emit sorry for common type between
319 _Complex integer and larger _BitInt and return the _Complex integer.
321 2023-09-06 Jakub Jelinek <jakub@redhat.com>
324 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
325 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
327 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
329 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
330 for added union in *specs. Handle RID_BITINT.
331 (finish_declspecs): Handle cts_bitint. Adjust for added union
333 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
334 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
336 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
337 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
338 Add cts_bitint enumerator.
339 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
340 and add bitint_prec there as well.
341 * c-typeck.cc (c_common_type, comptypes_internal):
343 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
345 (build_array_ref, build_unary_op, build_conditional_expr,
346 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
348 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
350 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
352 2023-09-06 Jakub Jelinek <jakub@redhat.com>
354 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
355 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
358 2023-09-05 Tobias Burnus <tobias@codesourcery.com>
360 * c-parser.cc (c_parser_omp_clause_allocate): Handle
363 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
365 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
366 (struct omp_for_parse_data): New.
367 (check_omp_intervening_code): New.
368 (add_structured_block_stmt): New.
369 (c_parser_compound_statement_nostart): Recognize intervening code,
370 nested loops, and other things that need special handling in
371 OpenMP loop constructs.
372 (c_parser_while_statement): Error on loop in intervening code.
373 (c_parser_do_statement): Likewise.
374 (c_parser_for_statement): Likewise.
375 (c_parser_postfix_expression_after_primary): Error on calls to
376 the OpenMP runtime in intervening code.
377 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
378 (c_parser_omp_loop_nest): New.
379 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
380 c_parser_omp_loop_nest to do the heavy lifting.
382 2023-08-24 Richard Sandiford <richard.sandiford@arm.com>
384 * c-parser.cc (c_parser_std_attribute): Conditionally allow
385 two colons to be used in place of ::.
386 (c_parser_std_attribute_list): New function, split out from...
387 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
388 to start with __extension__. When it does, also allow two colons
389 to be used in place of ::.
391 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
393 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
396 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
399 * c-typeck.cc (build_binary_op): Warning on comparing distinct
400 pointer types only when -Wcompare-distinct-pointer-types.
402 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
403 Thomas Schwinge <thomas@codesourcery.com>
405 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
407 2023-08-11 Jakub Jelinek <jakub@redhat.com>
409 * c-parser.cc (c_parser_typeof_specifier): Handle
410 __typeof_unqual and __typeof_unqual__ as !is_std.
412 2023-08-11 Martin Uecker <uecker@tugraz.at>
415 * c-typeck.cc (build_c_cast): Add warning.
417 2023-08-05 Martin Uecker <uecker@tugraz.at>
419 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
420 warnings branches that are known not be taken during parsing.
422 2023-08-04 Tamar Christina <tamar.christina@arm.com>
424 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
425 c_parser_for_statement, c_parser_statement_after_labels,
426 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
429 2023-08-02 Eric Feng <ef2648@columbia.edu>
432 * c-parser.cc: New functions on stashing values for the
435 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
437 * c-parser.cc (pragma_lex_discard_to_eol): New function.
438 (c_init_preprocess): New function.
440 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
443 * c-decl.cc (start_decl): Handle
444 -Wmissing-variable-declarations.
446 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
448 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
449 host_data construct to have an use_device clause.
451 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
454 * c-decl.cc (finish_struct): Issue warnings for new option.
456 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
458 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
461 2023-06-29 Richard Biener <rguenther@suse.de>
464 * c-typeck.cc (convert_argument): Sink formal_prec compute
465 to where TYPE_PRECISION is valid to use.
467 2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
469 * Make-lang.in: Pass correct stage cc1 when processing
470 profile data collected while building target libraries
472 2023-06-16 David Malcolm <dmalcolm@redhat.com>
475 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
478 2023-06-12 Tobias Burnus <tobias@codesourcery.com>
480 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
481 clearness especially with 'omp target (enter/exit) data.'
483 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
484 Tobias Burnus <tobias@codesourcery.com>
486 * c-parser.cc (c_parser_omp_clause_defaultmap,
487 c_parser_omp_clause_map): Parse 'present'.
488 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
489 (c_parser_omp_clause_from_to): New; parse to/from clauses with
490 optional present modifer.
491 (c_parser_omp_all_clauses): Update call.
492 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
493 c_parser_omp_target_exit_data): Handle new map enum values
494 for 'present' mapping.
496 2023-05-30 Tobias Burnus <tobias@codesourcery.com>
499 * c-parser.cc (c_parser_oacc_all_clauses,
500 c_parser_omp_all_clauses): Improve error wording.
502 2023-05-23 Martin Uecker <uecker@tugraz.at>
505 * c-decl.cc (add_decl_expr): New function.
506 (grokdeclarator): Add decl expr for size expression in
507 types pointed to by parameters declared as arrays.
509 2023-05-23 Martin Uecker <uecker@tugraz.at>
515 * c-decl.cc (start_decl): Make sure size expression are
516 evaluated only in correct context.
517 (grokdeclarator): Size expression in fields may need a bind
518 expression, make sure DECL_EXPR is always created.
519 (grokfield, declspecs_add_type): Pass along size expressions.
520 (finish_struct): Remove unneeded DECL_EXPR.
521 (start_function): Evaluate size expressions for nested functions.
522 * c-parser.cc (c_parser_struct_declarations,
523 c_parser_struct_or_union_specifier): Pass along size expressions.
524 (c_parser_declaration_or_fndef): Evaluate size expression.
525 (c_parser_objc_at_property_declaration,
526 c_parser_objc_class_instance_variables): Adapt.
527 * c-tree.h (grokfield): Adapt declaration.
529 2023-05-19 Martin Uecker <uecker@tugraz.at>
531 * c-decl.cc (set_type_context): Remove.
532 (pop_scope, diagnose_mismatched_decls, pushdecl):
534 * c-typeck.cc (comptypes_internal): Remove dead code.
535 (same_translation_unit_p): Remove.
536 (tagged_types_tu_compatible_p): Some fixes.
538 2023-05-19 Joseph Myers <joseph@codesourcery.com>
540 * c-decl.cc (diagnose_mismatched_decls): Do not handle
541 thread-local declarations as tentative definitions for C2x.
542 (finish_decl): Do not allow thread-local definition with
543 incomplete type for C2x.
545 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
547 * c-convert.cc (c_convert): Ditto.
548 * c-decl.cc (merge_decls): Ditto.
549 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
550 (c_parser_omp_declare_reduction): Ditto.
551 * c-typeck.cc (build_component_ref): Ditto.
552 (convert_argument): Ditto.
553 (pointer_diff): Ditto.
554 (build_unary_op): Ditto.
555 (build_c_cast): Ditto.
556 (build_modify_expr): Ditto.
557 (store_init_value): Ditto.
558 (constexpr_init_fits_real_type): Ditto.
559 (check_constexpr_init): Ditto.
560 (c_finish_return): Ditto.
561 (handle_omp_array_sections_1): Ditto.
562 (c_finish_omp_clauses): Ditto.
563 * gimple-parser.cc (c_finish_gimple_return): Ditto.
565 2023-05-16 Joseph Myers <joseph@codesourcery.com>
567 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
570 2023-05-15 Joseph Myers <joseph@codesourcery.com>
572 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
575 2023-04-30 Andrew Pinski <apinski@marvell.com>
577 * c-typeck.cc (process_init_element): Print out array type
578 for excessive elements.
580 2023-04-30 Andrew Pinski <apinski@marvell.com>
583 * c-typeck.cc (process_init_element): Move the check
584 for string cst until after the error message.
586 2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
588 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
590 2023-04-27 Jakub Jelinek <jakub@redhat.com>
593 * c-parser.cc (c_parser_initializer): Move diagnostics about
594 initialization of variable sized object with non-empty initializer
595 after c_parser_expr_no_commas call and ret.set_error (); after it.
597 2023-04-27 Jakub Jelinek <jakub@redhat.com>
601 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
602 reject empty initializer as invalid.
604 2023-04-26 Richard Biener <rguenther@suse.de>
606 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
609 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
611 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
612 zero exec statements before/after 'omp scan'.
614 2023-04-20 Jakub Jelinek <jakub@redhat.com>
617 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
618 warning on acc_on_device declaration.
620 2023-03-28 David Malcolm <dmalcolm@redhat.com>
623 * c-typeck.cc (parser_build_binary_op): Update for new param of
624 check_for_xor_used_as_pow.
626 2023-03-10 Jakub Jelinek <jakub@redhat.com>
629 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
632 2023-02-28 Jakub Jelinek <jakub@redhat.com>
635 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
636 and rename to c_strict_flex_array_level_of.
637 (is_flexible_array_member_p): Adjust caller.
639 2023-02-18 Martin Uecker <uecker@tugraz.at>
642 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
643 (diagnose_mismatched_decl): Dito.
644 (warn_about_goto): Dito:
645 (c_check_switch_jump_warnings): Dito.
647 (finish_struct): Dito.
648 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
649 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
650 * c-objc-common.cc (c_var_mod_p): New function.
651 (c_var_unspec_p): Remove.
652 * c-objc-common.h: Set lang hook.
653 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
654 (c_parser_typeof_specifier): Dito.
655 (c_parser_has_attribute_expression): Dito.
656 (c_parser_generic_selection): Dito.
657 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
658 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
660 2023-02-16 Patrick Palka <ppalka@redhat.com>
662 * c-parser.h: Mechanically drop static from static inline
663 functions via s/^static inline/inline/g.
665 2023-02-10 Joseph Myers <joseph@codesourcery.com>
667 * c-convert.cc (c_convert): Allow conversion of a null pointer
668 constant to nullptr_t.
669 * c-typeck.cc (null_pointer_constant_p): Remove static.
670 (convert_for_assignment): Allow conversion of a null pointer
671 constant to nullptr_t.
672 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
673 * c-tree.h (null_pointer_constant_p): Declare.
675 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
677 * c-parser.cc (c_parser_omp_allocate): Parse align
678 clause and check for restrictions.
680 2023-02-08 Joseph Myers <joseph@codesourcery.com>
682 * c-typeck.cc (check_constexpr_init): Remove argument
683 null_pointer_constant. Only check pointer initializers for being
685 (digest_init): Update calls to check_constexpr_init.
687 2023-02-02 Joseph Myers <joseph@codesourcery.com>
689 * c-typeck.cc (build_binary_op): Allow comparisons between
690 pointers and nullptr_t values that are not null pointer constants.
692 2023-02-02 Joseph Myers <joseph@codesourcery.com>
694 * c-typeck.cc: Include "realmpfr.h".
695 (constexpr_init_fits_real_type): Do not allow signaling NaN
696 conversions to different types with the same mode. Handle
697 conversions from binary to decimal types.
698 (check_constexpr_init): Do not disallow real initializers for
699 complex types. Do not disallow binary initializers for decimal
702 2023-01-31 Marek Polacek <polacek@redhat.com>
706 * c-objc-common.cc (instantiation_dependent_expression_p): New.
708 2023-01-27 Joseph Myers <joseph@codesourcery.com>
710 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
711 around auto initializer.
713 2023-01-16 Jakub Jelinek <jakub@redhat.com>
716 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
717 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
720 2023-01-14 Jakub Jelinek <jakub@redhat.com>
723 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
726 2023-01-13 Qing Zhao <qing.zhao@oracle.com>
728 * c-decl.cc (strict_flex_array_level_of): ... here.
730 2023-01-11 Jakub Jelinek <jakub@redhat.com>
733 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
734 markers for K&R function parameter declarations of nested functions.
736 2023-01-09 Joseph Myers <joseph@codesourcery.com>
738 * c-decl.cc (build_compound_literal): Call record_inline_static.
740 2023-01-06 Joseph Myers <joseph@codesourcery.com>
742 * c-parser.cc (c_parser_postfix_expression): Handle integer
743 generic arguments to functions passed to __builtin_tgmath as
744 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
745 Do not handle integer arguments to some narrowing functions as
748 2022-12-19 Jakub Jelinek <jakub@redhat.com>
751 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
752 compound literals with function type.
754 2022-12-07 Joseph Myers <joseph@codesourcery.com>
756 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
757 auto, constexpr and a type used together.
759 2022-12-06 Qing Zhao <qing.zhao@oracle.com>
761 * c-decl.cc (is_flexible_array_member_p): Call new function
762 strict_flex_array_level_of.
764 2022-11-24 Florian Weimer <fweimer@redhat.com>
767 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
770 2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
772 * c-decl.cc (start_function): Set the result decl source
773 location to the location of the typespec.
775 2022-11-17 David Malcolm <dmalcolm@redhat.com>
778 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
779 to cpp_create_reader, rather than ident_hash, so that the new
780 reader gets its own hash table.
782 2022-11-15 David Malcolm <dmalcolm@redhat.com>
785 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
786 (class ana::c_translation_unit): New.
787 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
789 2022-11-12 Joseph Myers <joseph@codesourcery.com>
791 * c-decl.cc (start_underspecified_init)
792 (finish_underspecified_init): Handle name == NULL_TREE for
794 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
795 (shadow_tag_warned): Check for constexpr.
796 (start_decl): Add parameter do_push.
797 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
798 (grokdeclarator): Handle constexpr.
799 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
800 (declspecs_add_scspec): Handle constexpr.
801 * c-parser.cc (c_token_starts_compound_literal)
802 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
803 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
804 (c_parser_compound_literal_scspecs)
805 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
806 Update calls to start_init.
807 (c_parser_declaration_or_fndef, c_parser_initializer)
808 (c_parser_initval): Pass true for new argument of
809 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
810 constexpr compound literals.
811 (c_parser_static_assert_declaration_no_semi)
812 (c_parser_enum_specifier, c_parser_struct_declaration)
813 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
814 Call convert_lvalue_to_rvalue on expressions required to be
815 integer constant expressions.
816 (c_parser_omp_declare_reduction): Update call to start_init.
817 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
818 (C_DECL_DECLARED_CONSTEXPR): New macros.
819 (struct c_declspecs): Add constexpr_p.
820 (start_decl, convert_lvalue_to_rvalue, start_init): Update
822 * c-typeck.cc (require_constant_value, require_constant_elements):
824 (require_constexpr_value, maybe_get_constexpr_init)
825 (constexpr_init_fits_real_type, check_constexpr_init): New.
826 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
827 maybe_get_constexpr_init.
828 (store_init_value): Update call to digest_init.
829 (digest_init): Add parameters int_const_expr, arith_const_expr and
830 require_constexpr. Check constexpr initializers.
831 (constructor_top_level): Remove.
832 (struct initializer_stack): Remove top_level. Add
833 require_constexpr_value.
834 (start_init): Remove parameter top_level. Add parameters
835 init_require_constant and init_require_constexpr. Save
836 require_constexpr_value on stack.
837 (pop_init_level): Use a null pointer constant for zero initializer
838 of pointer initialized with {}.
839 (output_init_element): Update call to digest_init. Avoid passing
840 null pointer constants of pointer type through digest_init a
841 second time when initializing a constexpr object.
843 2022-11-03 Joseph Myers <joseph@codesourcery.com>
845 * c-decl.cc (in_underspecified_init, start_underspecified_init)
846 (finish_underspecified_init): New.
847 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
848 Give errors inside initializers of underspecified declarations.
849 (grokdeclarator): Handle (erroneous) case of C2X auto on a
851 (declspecs_add_type): Handle c2x_auto_p case.
852 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
854 (finish_declspecs): Handle c2x_auto_p.
855 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
856 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
857 (struct c_declspecs): Add c2x_auto_p.
858 (start_underspecified_init, finish_underspecified_init): New
860 * c-typeck.cc (build_external_ref): Give error for underspecified
861 declaration referenced in its initializer.
863 2022-10-28 Joseph Myers <joseph@codesourcery.com>
865 * c-decl.cc (grokdeclarator): Pass
866 arg_info->no_named_args_stdarg_p to build_function_type.
867 (grokparms): Check arg_info->no_named_args_stdarg_p before
868 converting () to (void).
869 (build_arg_info): Initialize no_named_args_stdarg_p.
870 (get_parm_info): Set no_named_args_stdarg_p.
871 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
873 (store_parm_decls): Count (...) functions as prototyped.
874 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
875 parenthesis to start parameter list.
876 (c_parser_parms_list_declarator): Always allow '...' with no
877 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
878 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
879 * c-typeck.cc (composite_type): Handle
880 TYPE_NO_NAMED_ARGS_STDARG_P.
881 (function_types_compatible_p): Compare
882 TYPE_NO_NAMED_ARGS_STDARG_P.
884 2022-10-28 Jakub Jelinek <jakub@redhat.com>
886 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
887 comma before the first clause.
888 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
889 c_parser_omp_flush, c_parser_omp_scan_loop_body,
890 c_parser_omp_ordered, c_finish_omp_declare_variant,
891 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
892 c_parser_omp_requires, c_parser_omp_error,
893 c_parser_omp_assumption_clauses): Likewise.
895 2022-10-28 Joseph Myers <joseph@codesourcery.com>
898 * c-convert.cc (c_convert): Handle enums with underlying boolean
900 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
901 enums with enum type specifier, but give errors for storage class
902 specifiers, qualifiers or alignment specifiers in non-definition
903 declarations of such enums.
904 (grokdeclarator): Give error for non-definition use of type
905 specifier with an enum type specifier.
906 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
907 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
908 (xref_tag): Update call to parser_xref_tag.
909 (start_enum): Add argument fixed_underlying_type. Complete enum
910 type with a fixed underlying type given in the definition. Give
911 error for defining without a fixed underlying type in the
912 definition if one was given in a prior declaration. Do not mark
913 enums with fixed underlying type as packed for -fshort-enums.
914 Store the enum type in the_enum.
915 (finish_enum): Do not adjust types of values or check their range
916 for an enum with a fixed underlying type. Set underlying type of
918 (build_enumerator): Check enumeration constants for enum with
919 fixed underlying type against that type and convert to that type.
920 Increment in the underlying integer type, with handling for bool.
921 (c_simulate_enum_decl): Update call to start_enum.
922 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
923 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
924 rather than recomputing an underlying type based on size.
925 * c-parser.cc (c_parser_declspecs)
926 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
927 Set has_enum_type_specifier for type specifiers.
928 (c_parser_enum_specifier): Handle enum type specifiers.
929 (c_parser_struct_or_union_specifier): Update call to
931 (c_parser_omp_atomic): Check for boolean increment or decrement
932 using C_BOOLEAN_TYPE_P.
933 * c-tree.h (C_BOOLEAN_TYPE_P): New.
934 (struct c_typespec): Add has_enum_type_specifier.
935 (struct c_declspecs): Add enum_type_specifier_ref_p.
936 (struct c_enum_contents): Add enum_type.
937 (start_enum, parser_xref_tag): Update prototypes.
938 * c-typeck.cc (composite_type): Allow for enumerated types
939 compatible with bool.
940 (common_type, comptypes_internal, perform_integral_promotions):
941 Use ENUM_UNDERLYING_TYPE.
942 (parser_build_binary_op, build_unary_op, convert_for_assignment)
943 (c_finish_return, c_start_switch, build_binary_op): Check for
944 boolean types using C_BOOLEAN_TYPE_P.
946 2022-10-24 Jakub Jelinek <jakub@redhat.com>
949 * c-typeck.cc (build_binary_op): Pass operands before excess precision
950 promotions to scalar_to_vector call.
952 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
954 * c-decl.cc (finish_function): Ignore hosted when deciding
955 whether to implicitly return zero, but check noreturn.
956 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
957 requirements to just MAIN_NAME_P when hosted, or `int main'
960 2022-10-20 Richard Biener <rguenther@suse.de>
964 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
965 the parsed IL and zap the body on error.
967 2022-10-18 Joseph Myers <joseph@codesourcery.com>
970 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
971 with previous declaration visible.
973 2022-10-18 Joseph Myers <joseph@codesourcery.com>
976 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
977 convert all to the type of the enumeration. pedwarn if no integer
978 type fits all enumerators and default to
979 widest_integer_literal_type_node in that case. Otherwise pedwarn
980 for type wider than intmax_t.
981 (build_enumerator): pedwarn for enumerators outside the range of
982 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
983 enumerators outside the range of int. On overflow, attempt to
984 find a wider type that can hold the value of the next enumerator.
985 Do not convert value to type determined with
986 c_common_type_for_size.
988 2022-10-14 Jakub Jelinek <jakub@redhat.com>
990 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
993 2022-10-14 Joseph Myers <joseph@codesourcery.com>
995 * c-decl.cc (build_compound_literal): Add parameter scspecs.
996 Handle storage class specifiers.
997 * c-parser.cc (c_token_starts_compound_literal)
998 (c_parser_compound_literal_scspecs): New.
999 (c_parser_postfix_expression_after_paren_type): Add parameter
1000 scspecs. Call pedwarn_c11 for use of storage class specifiers.
1001 Update call to build_compound_literal.
1002 (c_parser_cast_expression, c_parser_sizeof_expression)
1003 (c_parser_alignof_expression): Handle storage class specifiers for
1004 compound literals. Update calls to
1005 c_parser_postfix_expression_after_paren_type.
1006 (c_parser_postfix_expression): Update syntax comment.
1007 * c-tree.h (build_compound_literal): Update prototype.
1008 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
1009 register compound literal.
1011 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
1013 * c-decl.cc (flexible_array_member_type_p): New function.
1014 (one_element_array_type_p): Likewise.
1015 (zero_length_array_type_p): Likewise.
1016 (add_flexible_array_elts_to_size): Call new utility
1017 routine flexible_array_member_type_p.
1018 (is_flexible_array_member_p): New function.
1019 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
1021 2022-10-06 Joseph Myers <joseph@codesourcery.com>
1023 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
1025 (c_keyword_starts_typename, c_token_starts_declspecs)
1026 (c_parser_declspecs, c_parser_objc_selector): Handle
1028 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
1029 Distinguish typeof for C2x from __typeof__ for all standard
1030 versions and typeof before C2x.
1031 * c-typeck.cc (build_function_call_vec): Use unqualified version
1032 of non-void return type.
1033 (build_unary_op): Use unqualified type for increment and
1036 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1038 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
1039 call for holds clause on assume construct.
1041 2022-10-06 Jakub Jelinek <jakub@redhat.com>
1044 * c-parser.cc (handle_assume_attribute): New function.
1045 (c_parser_declaration_or_fndef): Handle assume attribute.
1046 (c_parser_attribute_arguments): Add assume_attr argument,
1047 if true, parse first argument as conditional expression.
1048 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
1049 c_parser_attribute_arguments callers.
1050 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
1053 2022-10-04 Jakub Jelinek <jakub@redhat.com>
1055 * c-lang.h (struct c_omp_declare_target_attr): New type.
1056 (current_omp_declare_target_attribute): Change type from
1057 int to vec<c_omp_declare_target_attr, va_gc> *.
1058 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
1059 If last pushed directive was begin declare target, use different
1060 wording and simplify format strings for easier translations.
1061 (c_parser_omp_clause_device_type): Uncomment
1062 check_no_duplicate_clause call.
1063 (c_parser_omp_declare_target): Adjust for the
1064 current_omp_declare_target_attribute type change, push { -1 }.
1065 Use error_at rather than warning_at for declare target with
1066 only device_type clauses.
1067 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
1068 (c_parser_omp_begin): Add begin declare target support.
1069 (c_parser_omp_end): Adjust for the
1070 current_omp_declare_target_attribute type change, adjust
1071 diagnostics wording and simplify format strings for easier
1073 * c-decl.cc (current_omp_declare_target_attribute): Change type from
1074 int to vec<c_omp_declare_target_attr, va_gc> *.
1075 (c_decl_attributes): Adjust for the
1076 current_omp_declare_target_attribute type change. If device_type
1077 was present on begin declare target, add "omp declare target host"
1078 and/or "omp declare target nohost" attributes.
1080 2022-09-29 Joseph Myers <joseph@codesourcery.com>
1082 * c-decl.cc (handle_std_noreturn_attribute): New function.
1083 (std_attribute_table): Add _Noreturn and noreturn.
1085 2022-09-27 Jakub Jelinek <jakub@redhat.com>
1087 * c-lang.h (current_omp_begin_assumes): Declare.
1088 * c-parser.cc: Include bitmap.h.
1089 (c_parser_omp_end_declare_target): Rename to ...
1090 (c_parser_omp_end): ... this. Handle also end assumes.
1091 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
1092 c_parser_omp_assumes, c_parser_omp_assume): New functions.
1093 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
1094 without corresponding #pragma omp end assumes.
1095 (c_parser_pragma): Use %s in may only be used at file scope
1096 diagnostics to decrease number of translatable messages. Handle
1097 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
1098 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
1099 for it rather than c_parser_omp_end_declare_target.
1100 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
1101 * c-decl.cc (current_omp_begin_assumes): Define.
1103 2022-09-24 Jakub Jelinek <jakub@redhat.com>
1106 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
1107 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
1108 t2 have different types.
1110 2022-09-22 David Malcolm <dmalcolm@redhat.com>
1113 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
1114 (c_parser_cast_expression): Likewise.
1115 (c_parser_alignof_expression): Likewise.
1116 (c_parser_postfix_expression_after_paren_type): Likewise.
1117 (c_parser_postfix_expression_after_primary): Likewise.
1118 (c_parser_expression): Likewise.
1119 (c_parser_omp_variable_list): Likewise.
1120 (c_parser_transaction_expression): Likewise.
1121 * c-tree.h (c_expr::set_error): Likewise.
1122 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
1123 (parser_build_unary_op): Likewise.
1124 (parser_build_binary_op): Likewise.
1125 (digest_init): Likewise.
1126 (pop_init_level): Likewise.
1127 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
1129 2022-09-19 Marek Polacek <polacek@redhat.com>
1132 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
1135 2022-09-15 Richard Biener <rguenther@suse.de>
1137 * c-decl.cc (build_void_list_node): Remove.
1139 2022-09-14 Julian Brown <julian@codesourcery.com>
1141 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
1144 2022-09-07 Joseph Myers <joseph@codesourcery.com>
1146 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
1147 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
1148 for C2x spellings of keywords.
1149 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
1151 2022-09-06 Jakub Jelinek <jakub@redhat.com>
1153 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
1154 in omp_cur_iteration - 1 has integer_type_node type.
1156 2022-09-03 Jakub Jelinek <jakub@redhat.com>
1158 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
1159 (c_parser_omp_clause_depend_sink): Renamed to ...
1160 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
1161 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
1162 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
1163 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
1164 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
1165 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
1166 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
1167 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
1168 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
1169 (c_parser_omp_clause_doacross): New function.
1170 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
1171 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
1172 OMP_CLAUSE_DEPEND_SOURCE.
1173 (c_parser_omp_for_loop): Don't diagnose here linear clause together
1174 with ordered with argument.
1175 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
1177 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1178 (c_parser_omp_ordered): Handle also doacross and adjust for it
1180 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
1181 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
1183 2022-09-02 David Malcolm <dmalcolm@redhat.com>
1186 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
1187 (c_parser_expr_no_commas): Likewise.
1188 (c_parser_conditional_expression): Likewise.
1189 (c_parser_binary_expression): Clear m_decimal when popping the
1191 (c_parser_unary_expression): Clear ret.m_decimal.
1192 (c_parser_has_attribute_expression): Likewise for result.
1193 (c_parser_predefined_identifier): Likewise for expr.
1194 (c_parser_postfix_expression): Likewise for expr.
1195 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
1197 * c-tree.h (c_expr::m_decimal): New bitfield.
1198 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
1199 (parser_build_binary_op): Call check_for_xor_used_as_pow.
1201 2022-09-01 Joseph Myers <joseph@codesourcery.com>
1203 * c-decl.cc (grokparms): Handle () in a function declaration the
1204 same as (void) for C2X.
1206 2022-08-31 Joseph Myers <joseph@codesourcery.com>
1208 * c-parser.cc (c_parser_label): Pass attributes to do_case.
1209 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
1212 2022-08-26 Jakub Jelinek <jakub@redhat.com>
1214 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
1216 2022-08-25 Marek Polacek <polacek@redhat.com>
1218 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
1219 Give a better diagnostic when converting to nullptr_t.
1220 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
1222 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
1223 (c_parser_postfix_expression): Handle RID_NULLPTR.
1224 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
1226 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
1227 (build_conditional_expr): Handle the case when the second/third operand
1228 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
1229 (convert_for_assignment): Handle converting an expression of type
1230 nullptr_t to pointer/bool.
1231 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
1232 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
1234 2022-08-25 Joseph Myers <joseph@codesourcery.com>
1236 * c-decl.cc (start_decl): Do not diagnose initialization of
1237 variable-sized objects here.
1238 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
1240 (c_parser_initializer): Diagnose initialization of variable-sized
1241 objects other than with braced initializer.
1242 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
1243 braces and update diagnostic text. Diagnose initialization of
1244 variable-sized objects with nonempty braces.
1245 * c-typeck.cc (digest_init): Update diagnostic for initialization
1246 of variable-sized objects.
1247 (really_start_incremental_init, set_designator)
1248 (process_init_element): Update comments.
1249 (pop_init_level): Allow scalar empty initializers.
1251 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
1252 Chung-Lin Tang <cltang@codesourcery.com>
1255 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1256 instead of removed langhook.
1257 * c-typeck.cc (c_finish_omp_clauses): Likewise.
1259 2022-08-11 Marek Polacek <polacek@redhat.com>
1261 PR middle-end/102633
1262 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
1263 Call suppress_warning.
1264 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1265 (c_parser_omp_declare_reduction): Pass omp_priv down to
1266 c_parser_initializer.
1268 2022-08-08 Tom Honermann <tom@honermann.net>
1270 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1271 of CPP_UTF8STRING when char8_t support is enabled.
1272 * c-typeck.cc (digest_init): Allow initialization of an array
1273 of character type by a string literal with type array of
1276 2022-08-01 David Malcolm <dmalcolm@redhat.com>
1278 * c-typeck.cc (build_c_cast): Quote names of address spaces in
1280 (convert_for_assignment): Add a note to address space mismatch
1281 diagnostics, specifying the expected and actual types.
1283 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
1285 PR preprocessor/97498
1286 * c-parser.cc (c_parser_pragma): Set input_location to the
1287 location of the pragma, rather than the start of the line.
1289 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
1290 Chung-Lin Tang <cltang@codesourcery.com>
1291 Thomas Schwinge <thomas@codesourcery.com>
1293 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1294 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1295 OMP_REQUIRES_TARGET_USED.
1296 (c_parser_omp_requires): Remove sorry.
1298 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
1300 * c-parser.cc (c_parser_omp_target_enter_data,
1301 c_parser_omp_target_exit_data): Accept tofrom
1302 map-type modifier but use 'to' / 'from' internally.
1304 2022-06-16 David Malcolm <dmalcolm@redhat.com>
1306 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1307 group the warning with any note.
1308 (warn_about_goto): Likewise to group error or warning with note.
1309 Bail out if the warning wasn't emitted, to avoid emitting orphan
1311 (lookup_label_for_goto): Add auto_diagnostic_group to
1312 group the error with the note.
1313 (check_earlier_gotos): Likewise.
1314 (c_check_switch_jump_warnings): Likewise for any error/warning.
1315 Conditionalize emission of the notes.
1316 (diagnose_uninitialized_cst_member): Likewise for warning,
1317 conditionalizing emission of the note.
1318 (grokdeclarator): Add auto_diagnostic_group to group the "array
1319 type has incomplete element type" error with any note.
1320 (parser_xref_tag): Add auto_diagnostic_group to group warnings
1321 with their notes. Conditionalize emission of notes.
1322 (start_struct): Add auto_diagnostic_group to group the
1323 "redefinition of" errors with any note.
1324 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1325 (check_for_loop_decls): Likewise for pre-C99 error.
1327 2022-06-07 Jakub Jelinek <jakub@redhat.com>
1329 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1330 style linear clause modifiers. Set
1331 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1332 old style modifiers are used.
1333 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1334 with val modifier on simd or for if the old style modifiers are
1337 2022-06-02 David Malcolm <dmalcolm@redhat.com>
1339 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1340 (c_get_sarif_source_language): New.
1341 * c-tree.h (c_get_sarif_source_language): New decl.
1343 2022-05-31 Jason Merrill <jason@redhat.com>
1345 * Make-lang.in (c.tags): Look at *.cc.
1347 2022-05-31 Jakub Jelinek <jakub@redhat.com>
1349 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1352 2022-05-28 Jakub Jelinek <jakub@redhat.com>
1354 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1355 seen first, use "%<to%>" or "%<enter%>" depending on
1356 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1357 "%<to%> or %<enter%>" wording.
1359 2022-05-27 Jakub Jelinek <jakub@redhat.com>
1361 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1362 (c_parser_omp_all_clauses): For to clause on declare target, use
1363 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1364 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
1365 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1366 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1367 OMP_CLAUSE_TO_DECLARE.
1368 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1369 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1370 name in diagnostics instead of
1371 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1373 2022-05-25 Jakub Jelinek <jakub@redhat.com>
1376 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1377 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
1378 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1379 diagnostic and fixit hint if DATUM has pointer type.
1380 * c-parser.cc (c_parser_postfix_expression,
1381 c_parser_omp_variable_list): Adjust build_component_ref callers.
1382 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1385 2022-05-24 Jakub Jelinek <jakub@redhat.com>
1388 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1390 2022-05-18 Marek Polacek <polacek@redhat.com>
1393 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1395 * c-tree.h (comptypes_check_enum_int): Declare.
1396 * c-typeck.cc (comptypes): No longer static.
1398 2022-05-17 Marek Polacek <polacek@redhat.com>
1400 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1403 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1405 * c-parser.cc (c_parser_omp_clause_depend): Parse
1406 inoutset depend-kind.
1407 (c_parser_omp_depobj): Likewise.
1409 2022-05-16 Martin Liska <mliska@suse.cz>
1411 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1413 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1415 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1417 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1418 in postfix expressions.
1419 (c_parser_omp_variable_list): Handle omp_all_memory in depend
1421 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1422 keyword in depend clause as null_pointer_node, diagnose invalid
1425 2022-05-09 Martin Liska <mliska@suse.cz>
1427 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1429 (c_parser_binary_expression): Likewise.
1431 2022-05-07 Marek Polacek <polacek@redhat.com>
1435 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1437 2022-04-08 Jakub Jelinek <jakub@redhat.com>
1440 * c-typeck.cc (c_build_va_arg): Reject function types.
1442 2022-03-22 Marek Polacek <polacek@redhat.com>
1446 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1447 (start_init): Set it.
1448 (finish_init): Restore constructor_designated.
1449 (push_init_level): Set constructor_designated to the value of
1450 constructor_designated in the upper constructor_stack.
1452 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1455 * c-typeck.cc (handle_omp_array_sections_1)
1456 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1457 instead of 'c_omp_map_clause_name'.
1459 2022-03-09 Joseph Myers <joseph@codesourcery.com>
1461 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1462 differently from earlier standards for unprototyped function type
1465 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1468 * c-fold.cc (c_fully_fold_internal): Don't emit
1469 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1470 * c-typeck.cc (build_binary_op): Likewise.
1472 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1474 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1477 2022-02-23 Richard Biener <rguenther@suse.de>
1479 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1480 SSA names without definition.
1481 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1483 2022-02-17 Jakub Jelinek <jakub@redhat.com>
1486 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1487 convert_lvalue_to_rvalue and build_indirect_ref instead of
1488 build_simple_mem_ref.
1490 2022-02-11 Richard Biener <rguenther@suse.de>
1492 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1495 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1497 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1499 (c_parser_omp_variable_list): Handle array sections.
1500 (c_parser_omp_clause_has_device_addr): Added.
1501 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1503 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1505 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1506 (c_finish_omp_clauses): Handle array sections.
1508 2022-02-09 Jakub Jelinek <jakub@redhat.com>
1511 * c-parser.cc (c_parser_postfix_expression)
1512 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1513 instead of build1_loc to build PAREN_EXPR.
1514 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1515 * c-fold.cc (c_fully_fold_internal): Likewise.
1517 2022-01-17 Martin Liska <mliska@suse.cz>
1519 * Make-lang.in: Rename .c names to .cc.
1520 * c-convert.cc: Likewise.
1521 * c-decl.cc (struct lang_identifier): Likewise.
1522 (pop_scope): Likewise.
1523 (finish_decl): Likewise.
1524 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1525 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1526 * c-parser.h (GCC_C_PARSER_H): Likewise.
1527 * c-tree.h (c_keyword_starts_typename): Likewise.
1528 (finish_declspecs): Likewise.
1529 (c_get_alias_set): Likewise.
1530 (enum c_oracle_request): Likewise.
1531 (tag_exists_p): Likewise.
1532 (set_c_expr_source_range): Likewise.
1533 * c-typeck.cc (c_common_type): Likewise.
1534 (c_finish_omp_clauses): Likewise.
1535 * config-lang.in: Likewise.
1537 2022-01-17 Martin Liska <mliska@suse.cz>
1539 * c-aux-info.c: Moved to...
1540 * c-aux-info.cc: ...here.
1541 * c-convert.c: Moved to...
1542 * c-convert.cc: ...here.
1543 * c-decl.c: Moved to...
1544 * c-decl.cc: ...here.
1545 * c-errors.c: Moved to...
1546 * c-errors.cc: ...here.
1547 * c-fold.c: Moved to...
1548 * c-fold.cc: ...here.
1549 * c-lang.c: Moved to...
1550 * c-lang.cc: ...here.
1551 * c-objc-common.c: Moved to...
1552 * c-objc-common.cc: ...here.
1553 * c-parser.c: Moved to...
1554 * c-parser.cc: ...here.
1555 * c-typeck.c: Moved to...
1556 * c-typeck.cc: ...here.
1557 * gccspec.c: Moved to...
1558 * gccspec.cc: ...here.
1559 * gimple-parser.c: Moved to...
1560 * gimple-parser.cc: ...here.
1562 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
1564 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1566 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1569 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1570 outer node for ARRAY_REFs.
1572 2022-01-01 Jakub Jelinek <jakub@redhat.com>
1575 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1576 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1578 2021-12-17 Marek Polacek <polacek@redhat.com>
1581 * c-decl.c (c_warn_unused_attributes): Don't warn for
1582 attribute_ignored_p.
1583 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1584 arguments when the attribute is ignored.
1586 2021-12-14 Jakub Jelinek <jakub@redhat.com>
1589 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1590 consume the pragma and silently skip to the pragma eol.
1592 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1594 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1595 * c-parser.c: Likewise.
1597 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1600 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1601 to resort_data.new_value.
1603 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1605 * c-parser.c (struct omp_dim): New struct type for use inside
1606 c_parser_omp_variable_list.
1607 (c_parser_omp_variable_list): Allow multiple levels of array and
1608 component accesses in array section base-pointer expression.
1609 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1610 c_parser_omp_var_list_parens.
1611 (c_parser_omp_clause_from): Likewise.
1612 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1613 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1615 (c_finish_omp_clauses): Extend allowed ranged of expressions
1616 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1618 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1621 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1622 call to c_parser_omp_variable_list to 'true'.
1623 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1624 array base handling.
1625 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1627 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1629 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1630 orphan loop" checking.
1632 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1633 Thomas Schwinge <thomas@codesourcery.com>
1635 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1636 OpenACC gang reductions.
1638 2021-11-30 Richard Biener <rguenther@suse.de>
1640 * gimple-parser.c (c_parser_gimple_postfix_expression):
1641 avoid unreachable code after break.
1643 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1646 * Make-lang.in: Use ETAGS variable in TAGS target.
1648 2021-11-29 Richard Biener <rguenther@suse.de>
1650 * c-typeck.c (c_tree_equal): Remove unreachable return.
1651 * c-parser.c (get_matching_symbol): Likewise.
1653 2021-11-23 Jakub Jelinek <jakub@redhat.com>
1655 * c-typeck.c (c_clone_omp_udr): Don't initialize
1656 id.transform_lang_insert_block.
1658 2021-11-19 Martin Sebor <msebor@redhat.com>
1662 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1663 code resulting from macro expansion.
1665 2021-11-19 Martin Liska <mliska@suse.cz>
1668 2021-11-19 Martin Liska <mliska@suse.cz>
1670 * c-parser.c (add_debug_begin_stmt): Use option directly.
1672 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1674 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1675 * c-parser.c (c_parser_postfix_expression): Likewise.
1677 2021-11-18 Martin Liska <mliska@suse.cz>
1679 * c-parser.c (add_debug_begin_stmt): Use option directly.
1681 2021-11-17 Martin Sebor <msebor@redhat.com>
1684 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1685 bounds before deciding if they're constant.
1687 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1689 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1690 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1692 2021-11-11 Jakub Jelinek <jakub@redhat.com>
1694 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1695 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1696 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1697 OMP_CLAUSE_NUM_TEAMS_EXPR.
1698 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1699 combined target teams even lower-bound expression.
1701 2021-11-11 Richard Biener <rguenther@suse.de>
1703 * gimple-parser.c: Shuffle bitmap.h include.
1705 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1708 * c-convert.c (c_convert): New function, based on convert.
1709 (convert): Make into wrapper of c_convert.
1710 (convert_init): New function.
1711 * c-typeck.c (enum impl_conv): Add ic_init_const.
1712 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1713 new argument to convert_and_check call.
1714 (digest_init): Pass ic_init_const to convert_for_assignment for
1715 initializers required to be constant.
1717 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1719 * c-tree.h (c_simulate_record_decl): Declare.
1720 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1721 * c-decl.c (c_simulate_record_decl): New function.
1723 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1726 * Make-lang.in: Add dummy c.install-dvi target.
1728 2021-10-15 Richard Biener <rguenther@suse.de>
1732 (c_parser_gimple_postfix_expression_after_primary): Check
1733 for a pointer do be dereferenced by ->.
1735 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1737 * c-parser.c (c_finish_omp_declare_variant): Change call from
1738 c_omp_check_context_selector to omp_check_context_selector. Change
1739 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1741 2021-10-09 Jakub Jelinek <jakub@redhat.com>
1743 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1744 (c_parser_omp_scan_loop_body): Use it.
1745 (c_parser_omp_sections_scope): Likewise.
1747 2021-10-07 Richard Biener <rguenther@suse.de>
1749 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1751 2021-10-05 Richard Biener <rguenther@suse.de>
1754 * gimple-parser.c (c_parser_gimple_postfix_expression):
1755 Accept more address _Literals.
1757 2021-10-04 Marek Polacek <polacek@redhat.com>
1760 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1762 2021-10-01 Martin Sebor <msebor@redhat.com>
1765 * c-typeck.c (maybe_warn_for_null_address): New function.
1766 (build_binary_op): Call it.
1768 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1769 Richard Biener <rguenther@suse.de>
1772 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1773 for division even for SANITIZE_SI_OVERFLOW.
1775 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1777 * c-parser.c (c_parser_omp_clause_order): Set
1778 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1780 2021-09-28 Andrew Pinski <apinski@marvell.com>
1783 * c-parser.c (c_parser_statement_after_labels): Pass
1784 the c_expr instead of the tree to c_finish_goto_ptr.
1785 * c-typeck.c (c_finish_goto_ptr): Change the second
1786 argument type to c_expr.
1787 * c-tree.h (c_finish_goto_ptr): Likewise.
1788 Error out if the expression was not of a pointer type.
1790 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1792 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1795 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1797 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1798 and reproducible modifiers.
1799 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1801 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1803 * c-parser.c (c_parser_omp_clause_default): Handle private and
1804 firstprivate arguments, adjust diagnostics on unknown argument.
1806 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1808 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1811 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1813 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1814 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1815 don't call build_conditional_expr, instead build a COND_EXPR directly.
1816 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1817 if omp_atomic_lhs even in more cases for >, < or ==.
1818 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1819 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1820 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1821 * c-typeck.c (build_binary_op): For flag_openmp only handle
1824 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1826 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1829 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1831 * c-decl.c (enum deprecated_states): Add unavailable state.
1832 (merge_decls): Copy unavailability.
1833 (quals_from_declspecs): Handle unavailable case.
1834 (start_decl): Amend the logic handling suppression of nested
1835 deprecation states to include unavailability.
1836 (smallest_type_quals_location): Amend comment.
1837 (grokdeclarator): Handle the unavailable deprecation state.
1838 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1839 * c-tree.h (struct c_declspecs): Add unavailable_p.
1840 * c-typeck.c (build_component_ref): Handle unavailability.
1841 (build_external_ref): Likewise.
1843 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1844 Joseph Myers <joseph@codesourcery.com>
1847 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1848 types of both (non-function) decls as error_mark_node, so that the
1849 middle-end can see the code is malformed.
1850 (free_attr_access_data): Don't process if the type has been set to
1853 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1855 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1856 and 'ancestor' in 'target device' clauses.
1858 2021-08-23 Jakub Jelinek <jakub@redhat.com>
1860 * c-parser.c (c_parser_omp_clause_num_tasks,
1861 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1863 2021-08-22 Martin Uecker <muecker@gwdg.de>
1866 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1867 for pointers to arrays with qualifiers.
1868 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1869 to arrays when the other pointer is a void pointer. Update warnings.
1870 (convert_for_assignment): Update warnings for C2X when converting from
1871 void* with qualifiers to a pointer to array with the same qualifiers.
1873 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1875 * c-parser.c (c_parser_omp_error): New function.
1876 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1878 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1880 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1881 comma at the end of list.
1882 (c_parser_omp_requires): Likewise.
1884 2021-08-19 Jakub Jelinek <jakub@redhat.com>
1886 * c-parser.c (c_parser_omp_requires): Don't call
1887 c_parser_peek_2nd_token and optionally consume token if current
1888 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1890 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1892 * c-parser.c (c_parser_omp_nothing): New function.
1893 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1895 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1897 * c-parser.c (c_parser_statement_after_labels): Add restart label
1898 near the start of the function. If c_parser_pragma returns false,
1900 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1901 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1902 return what c_parser_omp_declare returned. Return true instead of
1903 false after emitting errors that the directive is not allowed in
1904 pragma_stmt context.
1905 (c_parser_omp_ordered): Return true instead of
1906 false after emitting errors that the directive is not allowed in
1907 pragma_stmt context.
1908 (c_parser_omp_target_update): Likewise.
1909 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1910 Change return type from tree to bool, return false if the
1911 directive should be ignored in pragma_stmt contexts.
1912 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1913 return their result directly.
1914 (c_parser_omp_cancellation_point): Change return type from void to
1915 bool, return false if the directive should be ignored in pragma_stmt
1917 (c_parser_omp_declare): Likewise.
1919 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1921 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1922 (c_parser_omp_scope): New function.
1923 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1925 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1927 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1928 (c_parser_omp_clause_filter): New function.
1929 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1930 (OMP_MASKED_CLAUSE_MASK): Define.
1931 (c_parser_omp_masked): New function.
1932 (c_parser_omp_parallel): Handle parallel masked.
1933 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1934 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1936 2021-08-12 Martin Uecker <muecker@gwdg.de>
1940 * c-typeck.c (c_expr_sizeof_type): Evaluate
1941 size expressions for structs of variable size.
1943 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
1945 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1946 'primary' as alias for 'master'.
1948 2021-08-10 Martin Uecker <muecker@gwdg.de>
1951 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1952 size expressions for structs of variable size.
1954 2021-08-06 Tamar Christina <tamar.christina@arm.com>
1956 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1957 * c-tree.h (c_simulate_enum_decl): Likewise.
1959 2021-08-06 Martin Sebor <msebor@redhat.com>
1961 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1962 vec arguments to by-reference.
1963 (c_finish_omp_declare_simd): Same.
1964 (c_parser_compound_statement_nostart): Same.
1965 (c_parser_for_statement): Same.
1966 (c_parser_objc_methodprotolist): Same.
1967 (c_parser_oacc_routine): Same.
1968 (c_parser_omp_for_loop): Same.
1969 (c_parser_omp_declare_simd): Same.
1971 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1972 Joseph Myers <joseph@codesourcery.com>
1973 Cesar Philippidis <cesar@codesourcery.com>
1975 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1976 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1977 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1978 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1980 2021-07-20 Martin Sebor <msebor@redhat.com>
1982 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1984 * c-typeck.c (c_build_function_call_vec): Same.
1986 2021-07-15 Martin Sebor <msebor@redhat.com>
1990 * c-decl.c (get_parm_array_spec): Strip nops.
1992 2021-07-06 Martin Sebor <msebor@redhat.com>
1994 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1996 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1999 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
2000 appears before a CPP_NAME.
2002 2021-06-25 Martin Sebor <msebor@redhat.com>
2004 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
2005 warning_suppressed_p, suppress_warning, and copy_no_warning.
2006 (diagnose_mismatched_decls): Same.
2007 (duplicate_decls): Same.
2008 (grokdeclarator): Same.
2009 (finish_function): Same.
2010 (c_write_global_declarations_1): Same.
2011 * c-fold.c (c_fully_fold_internal): Same.
2012 * c-parser.c (c_parser_expr_no_commas): Same.
2013 (c_parser_postfix_expression): Same.
2014 * c-typeck.c (array_to_pointer_conversion): Same.
2015 (function_to_pointer_conversion): Same.
2016 (default_function_array_conversion): Same.
2017 (convert_lvalue_to_rvalue): Same.
2018 (default_conversion): Same.
2019 (build_indirect_ref): Same.
2020 (build_function_call_vec): Same.
2021 (build_atomic_assign): Same.
2022 (build_unary_op): Same.
2023 (c_finish_return): Same.
2024 (emit_side_effect_warnings): Same.
2025 (c_finish_stmt_expr): Same.
2026 (c_omp_clause_copy_ctor): Same.
2028 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2031 * c-parser.c (c_parser_has_attribute_expression): Set source range for
2034 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2037 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
2040 2021-06-24 Jakub Jelinek <jakub@redhat.com>
2042 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
2043 C_ORT_OMP for clauses on target construct.
2044 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
2045 (c_parser_omp_target): For non-combined target add
2046 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
2047 C_ORT_OMP_TARGET to c_finish_omp_clauses.
2048 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
2049 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
2050 never present on C_ORT_*DECLARE_SIMD.
2051 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
2052 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
2053 corresponding map clauses.
2055 2021-06-21 Jakub Jelinek <jakub@redhat.com>
2057 PR inline-asm/100785
2058 * c-typeck.c (c_mark_addressable): Diagnose trying to make
2059 bit-fields addressable.
2061 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2063 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
2066 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
2069 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
2070 var in the error case.
2072 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
2075 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
2076 spot built-in functions.
2078 2021-06-06 Jakub Jelinek <jakub@redhat.com>
2081 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
2082 even when target is combined with other constructs.
2084 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
2087 * c-decl.c (finish_struct): Fix thinko in previous change.
2088 * c-typeck.c (convert_for_assignment): Do not warn on pointer
2089 assignment and initialization for storage order purposes if the
2090 RHS is a call to a DECL_IS_MALLOC function.
2092 2021-06-04 Martin Sebor <msebor@redhat.com>
2095 * c-objc-common.c (print_type): Handle erroneous types.
2097 2021-06-03 Jakub Jelinek <jakub@redhat.com>
2100 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2101 after depend only cases.
2103 2021-05-31 Richard Biener <rguenther@suse.de>
2106 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
2107 * c-parser.c (c_parser_postfix_expression): Likewise.
2109 2021-05-28 Richard Biener <rguenther@suse.de>
2112 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
2113 invalid if conditions.
2115 2021-05-28 Jakub Jelinek <jakub@redhat.com>
2118 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
2119 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2120 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
2121 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2122 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2123 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2124 if present in map_head, map_field_head or map_firstprivate_head
2127 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
2129 * c-parser.c (c_parser_omp_clause_affinity): New.
2130 (c_parser_omp_clause_name, c_parser_omp_variable_list,
2131 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
2132 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
2133 c_finish_omp_clauses): Likewise.
2135 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
2138 * c-decl.c (finish_struct): Warn for a union containing an aggregate
2139 field with a differing scalar storage order.
2141 2021-05-21 Jakub Jelinek <jakub@redhat.com>
2144 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
2145 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
2146 if a decl is mentioned both in map clause and in such firstprivate
2147 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2149 2021-05-19 Jakub Jelinek <jakub@redhat.com>
2152 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
2153 master when combined with taskloop.
2154 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2155 parallel master when not combined with taskloop.
2157 2021-05-18 Richard Biener <rguenther@suse.de>
2160 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
2161 Diagnose calls to non-functions.
2162 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2164 2021-05-17 Richard Biener <rguenther@suse.de>
2167 * gimple-parser.c (c_parser_gimple_label): Avoid building
2168 a GIMPLE label with NULL label decl.
2170 2021-05-13 Martin Sebor <msebor@redhat.com>
2173 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2175 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
2177 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
2180 2021-05-10 Martin Liska <mliska@suse.cz>
2182 * c-aux-info.c (affix_data_type): Use startswith
2183 function instead of strncmp.
2184 * c-typeck.c (build_function_call_vec): Likewise.
2185 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2187 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
2189 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
2190 on the address of a pointer field in a record with reverse SSO.
2192 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
2194 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
2195 for || and && reductions.
2197 2021-04-29 Joseph Myers <joseph@codesourcery.com>
2199 * c-typeck.c (function_types_compatible_p): For C2X, treat
2200 unprototyped function as compatible with non-variadic prototyped
2201 function even if some argument types are changed by the default
2202 argument promotions.
2204 2021-04-15 Martin Sebor <msebor@redhat.com>
2208 * c-decl.c (pushdecl): Always propagate type attribute.
2210 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
2213 * c-typeck.c (c_common_type): Do not drop attributes that
2214 affect type identity.
2216 2021-04-10 Jakub Jelinek <jakub@redhat.com>
2219 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
2222 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2225 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
2228 2021-03-19 Jakub Jelinek <jakub@redhat.com>
2231 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
2232 with modifycode NOP_EXPR produces and mark the _Atomic var as read
2234 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
2235 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
2236 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2238 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
2241 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
2242 ensure that the varpool node is marked as offloadable.
2244 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
2247 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2249 2021-02-24 Martin Sebor <msebor@redhat.com>
2252 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2254 2021-02-18 Jakub Jelinek <jakub@redhat.com>
2257 * c-typeck.c (c_finish_return): Don't wrap retval into
2258 EXCESS_PRECISION_EXPR in functions that return void.
2260 2021-02-11 Marek Polacek <polacek@redhat.com>
2262 * c-parser.c (c_parser_if_statement): Use vec_free.
2264 2021-02-04 Martin Sebor <msebor@redhat.com>
2267 * c-decl.c (locate_old_decl): Add type to diagnostic output.
2268 (diagnose_mismatched_decls): Same.
2269 (start_function): Introduce temporaries for better readability.
2270 * c-typeck.c (comptypes_internal): Only consider complete enum
2271 types in comparisons with integers.
2273 2021-02-01 Martin Sebor <msebor@redhat.com>
2276 * c-decl.c (free_attr_access_data): New function.
2277 (c_parse_final_cleanups): Call free_attr_access_data.
2279 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2281 * c-parser.c (c_parser_omp_clause_detach): New.
2282 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2283 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2284 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2285 clause. Prevent use of detach with mergeable and overriding the
2286 data sharing mode of the event handle.
2288 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2290 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2291 unqualified element type and then call c_build_qualified_type on the
2294 2021-01-07 Richard Biener <rguenther@suse.de>
2296 * gimple-parser.c (c_parser_gimple_compound_statement): Only
2297 reallocate loop array if it is too small.
2299 2020-12-16 Martin Uecker <muecker@gwdg.de>
2302 * c-typeck.c (build_modify_expr): Drop qualifiers.
2304 2020-12-16 Martin Uecker <muecker@gwdg.de>
2307 * c-parser.c (c_parser_expression): Look into
2308 nop expression when marking expressions as read.
2310 2020-12-14 Martin Liska <mliska@suse.cz>
2313 * c-typeck.c (pointer_diff): Do not emit a top-level
2315 (build_binary_op): Likewise.
2317 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2319 * c-parser.c (c_parser_omp_allocate): New.
2320 (c_parser_omp_construct): Call it.
2322 2020-12-09 Richard Biener <rguenther@suse.de>
2325 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2328 2020-12-07 Martin Uecker <muecker@gwdg.de>
2331 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2332 that drops qualifiers to the end of the function.
2334 2020-11-26 Martin Uecker <muecker@gwdg.de>
2338 * c-parser.c (c_parser_declaration_or_fndef): Remove
2339 redundant code to drop qualifiers of _Atomic types for __auto_type.
2340 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2341 types for __typeof__.
2343 2020-11-24 Jakub Jelinek <jakub@redhat.com>
2346 * c-parser.c (c_parser_binary_expression): For omp atomic binary
2347 expressions, use make_node instead of build2 to avoid checking build2
2350 2020-11-23 Joseph Myers <joseph@codesourcery.com>
2353 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2354 for comparisons of complete and incomplete pointers.
2356 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2358 * c-aux-info.c (gen_type): Support opaque types.
2360 2020-11-20 Martin Sebor <msebor@redhat.com>
2363 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2365 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2368 * Make-lang.in (c.serial): Change from goal to a variable.
2369 (.PHONY): Drop c.serial.
2371 2020-11-20 Martin Uecker <muecker@gwdg.de>
2373 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2375 2020-11-19 Jakub Jelinek <jakub@redhat.com>
2378 * c-decl.c (get_parm_array_spec): Bail out of nelts is
2381 2020-11-18 Jakub Jelinek <jakub@redhat.com>
2383 * Make-lang.in (c.serial): New goal.
2384 (.PHONY): Add c.serial c.prev.
2385 (cc1$(exeext)): Call LINK_PROGRESS.
2387 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2389 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2391 * c-typeck.c (build_asm_expr): Remove an assert checking output
2392 absence for asm goto.
2394 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2396 * c-typeck.c (c_finish_omp_clauses): Don't clear
2397 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2399 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2402 * c-parser.c (c_parser_objc_class_definition): Pass the
2403 location of the class name to the interface declaration.
2405 2020-11-10 Strager Neds <strager.nds@gmail.com>
2407 * c-decl.c (merge_decls): Use new overload of
2408 set_decl_section_name.
2410 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2412 * c-parser.c (c_parser_omp_target_data): Add use of
2413 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2414 handled map clause kind.
2415 (c_parser_omp_target_enter_data): Likewise.
2416 (c_parser_omp_target_exit_data): Likewise.
2417 (c_parser_omp_target): Likewise.
2418 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2419 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2420 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2421 same struct field access to co-exist on OpenMP construct.
2423 2020-11-07 Martin Uecker <muecker@gwdg.de>
2425 * c-parser.c (c_parser_label): Implement mixing of labels and code.
2426 (c_parser_all_labels): Likewise.
2428 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2430 * c-parser.c (c_parser_objc_at_property_declaration):
2431 Improve parsing fidelity. Associate better location info
2432 with @property attributes. Clean up the interface to
2433 objc_add_property_declaration ().
2435 2020-11-06 Nathan Sidwell <nathan@acm.org>
2437 * c-decl.c (diagnose_mismatched_decls): Rename
2438 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2439 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2440 (collect_source_refs): Likewise.
2441 * c-typeck.c (inform_declaration, inform_for_arg)
2442 (convert_for_assignment): Likewise.
2444 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
2446 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2448 (c_parser_omp_construct): Update call.
2450 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2453 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2454 find underlying decl to clear in the aligned_head bitmap.
2456 2020-11-04 Joseph Myers <joseph@codesourcery.com>
2458 * c-decl.c (handle_nodiscard_attribute): New.
2459 (std_attribute_table): Add nodiscard.
2460 * c-parser.c (c_parser_std_attribute): Expect argument to
2461 nodiscard attribute to be a string. Do not special-case ignoring
2463 * c-typeck.c (maybe_warn_nodiscard): New.
2464 (build_compound_expr, emit_side_effect_warnings): Call
2465 maybe_warn_nodiscard.
2466 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2467 emit_side_effect_warnings if warn_unused_result.
2469 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
2471 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2473 (finish_init): Likewise.
2474 (pop_init_level): Likewise.
2476 2020-10-28 Joseph Myers <joseph@codesourcery.com>
2478 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2479 error_at for omitted parameter name.
2481 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2483 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2484 (c_parser_omp_clause_allocate): New function.
2485 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2486 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2487 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2488 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2489 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2490 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2491 PRAGMA_OMP_CLAUSE_ALLOCATE.
2492 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2494 2020-10-27 Joseph Myers <joseph@codesourcery.com>
2496 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2497 standard attributes.
2499 2020-10-23 Marek Polacek <polacek@redhat.com>
2502 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2503 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2504 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2505 * c-tree.h (char_type_p): Declare.
2506 * c-typeck.c (char_type_p): No longer static.
2508 2020-10-23 Martin Sebor <msebor@redhat.com>
2511 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2513 2020-09-19 Martin Sebor <msebor@redhat.com>
2516 * c-decl.c (lookup_last_decl): Define new function.
2517 (c_decl_attributes): Call it.
2518 (start_decl): Add argument and use it.
2519 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2520 (get_parm_array_spec): Define new function.
2521 (push_parm_decl): Call get_parm_array_spec.
2522 (start_function): Call warn_parm_array_mismatch. Build attribute
2523 access and add it to current function.
2524 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2525 in forms of array parameters.
2526 * c-tree.h (start_decl): Add argument.
2528 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2530 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2532 (in_statement): New.
2533 (start_function): Adjust for above change.
2534 (c_push_function_context, c_pop_function_context): Likewise.
2535 * c-lang.h (struct language_function): Likewise.
2536 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2537 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2539 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2540 (c_parser_switch_statement): Adjust break/switch context handling
2541 and calls to renamed functions.
2542 (c_parser_while_statement): Adjust break/switch context handling and
2544 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2545 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2546 (c_parser_omp_for_loop): Adjust break/switch context handling.
2547 * c-tree.h (c_break_label, c_cont_label): Delete.
2548 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2549 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2550 (in_statement, switch_statement_break_seen_p): Declare.
2551 (c_start_case, c_finish_case): Renamed to...
2552 (c_start_switch, c_finish_switch).
2553 (c_finish_bc_stmt): Adjust arguments.
2554 * c-typeck.c (build_function_call_vec): Don't try to print
2555 statements with %qE format.
2556 (struct c_switch): Rename switch_expr field to switch_stmt.
2557 Add break_stmt_seen_p field.
2558 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2559 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2560 (do_case): Update for changes to struct c_switch.
2561 (c_finish_case): Rename to c_finish_switch. Update for changes to
2562 struct c_switch and change of representation from SWITCH_EXPR to
2564 (c_finish_loop): Delete.
2565 (c_finish_bc_stmt): Update to reflect changes to break/continue
2566 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2567 of a GOTO_EXPR except for objc foreach loops.
2569 2020-09-01 Jakub Jelinek <jakub@redhat.com>
2572 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2575 2020-08-28 Martin Sebor <msebor@redhat.com>
2578 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2581 2020-08-27 Martin Liska <mliska@suse.cz>
2583 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2584 growth function to true.
2586 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
2589 * c-typeck.c (handle_omp_array_sections_1): Talk about
2590 array function parameter in the error message.
2592 2020-08-18 Jakub Jelinek <jakub@redhat.com>
2595 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2596 to int, holding index of the match. Call mark_exp_read on the selector
2597 expression and on expressions other than the selected one.
2599 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2602 * c-typeck.c (process_init_element): Split test for whether to
2603 recurse into a record, union or array into...
2604 (initialize_elementwise_p): ...this new function. Don't recurse
2605 into a vector type if the initialization value is also a vector.
2607 2020-07-31 Richard Biener <rguenther@suse.de>
2610 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2611 Define to c_common_finalize_early_debug.
2613 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2615 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2616 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2617 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2619 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2622 * c-decl.c (finish_decl): Call target hook
2623 lower_local_decl_alignment to lower local decl alignment.
2625 2020-07-09 Julian Brown <julian@codesourcery.com>
2626 Thomas Schwinge <thomas@codesourcery.com>
2629 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2630 for standalone attach/detach clauses.
2632 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2634 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2635 set, warn for conversion between pointers that point to incompatible
2636 scalar storage orders.
2638 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2640 * c-parser.c (c_parser_statement_after_labels): Pass correct
2641 parameters to c_parser_do_statement.
2643 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2645 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2647 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2648 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2650 * c-tree.h (c_in_omp_for): Declare.
2651 * c-typeck.c (c_in_omp_for): Define.
2652 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2653 (digest_init): Likewise.
2654 (build_binary_op): Likewise.
2656 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2658 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2659 from kind by comma rather than colon.
2661 2020-06-05 Mark Wielaard <mark@klomp.org>
2663 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2664 an undeclared builtin, then add a fixit header hint, if found.
2665 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2666 warning_at about implicit builtin declaration type mismatch.
2668 2020-06-03 Mark Wielaard <mark@klomp.org>
2670 * c-parser.c (struct c_parser): Add seen_string_literal
2672 (c_parser_consume_token): Reset seen_string_literal.
2673 (c_parser_error_richloc): Add name_hint if seen_string_literal
2674 and next token is a CPP_NAME and we have a missing header
2675 suggestion for the name.
2676 (c_parser_string_literal): Set seen_string_literal.
2678 2020-06-03 Mark Wielaard <mark@klomp.org>
2680 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2681 scope with matching_parens after CPP_OPEN_PAREN.
2683 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2685 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2687 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2689 * Make-lang.in: Remove extra slash.
2691 2020-05-19 Martin Liska <mliska@suse.cz>
2693 * c-parser.c: Fix typo.
2695 2020-05-14 Jakub Jelinek <jakub@redhat.com>
2697 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2699 2020-05-07 Richard Biener <rguenther@suse.de>
2702 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2705 2020-04-30 Jakub Jelinek <jakub@redhat.com>
2708 * c-decl.c (set_labels_context_r): In addition to context-less
2709 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2710 parent function if any.
2711 (store_parm_decls): Adjust comment.
2713 2020-04-19 Jakub Jelinek <jakub@redhat.com>
2716 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2717 two CPP_COLON tokens.
2719 2020-04-17 Jakub Jelinek <jakub@redhat.com>
2722 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2725 2020-04-15 Jakub Jelinek <jakub@redhat.com>
2728 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2729 requires directive when not at file scope.
2731 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
2734 * c-decl.c (c_check_in_current_scope): New function.
2735 * c-tree.h (c_check_in_current_scope): Declare it.
2736 * c-parser.c (c_parser_oacc_declare): Add check that variables
2737 are declared in the same scope as the directive. Fix handling
2740 2020-04-07 Jakub Jelinek <jakub@redhat.com>
2743 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2744 if c_parser_omp_master succeeded.
2746 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2748 PR gcov-profile/94029
2750 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2751 the function_start_locus location. Don't do that afterwards for the
2752 __GIMPLE body parsing.
2754 2020-03-19 Jakub Jelinek <jakub@redhat.com>
2756 PR gcov-profile/94029
2757 * c-tree.h (finish_function): Add location_t argument defaulted to
2759 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2760 set it to the locus of closing } if non-NULL.
2761 (c_parser_compound_statement_nostart): Return locus of closing }.
2762 (c_parser_parse_rtl_body): Likewise.
2763 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2765 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2766 input_location to set function_end_locus.
2768 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2771 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2772 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2773 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2774 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2776 (finish_incomplete_vars): New function, moved from finish_struct. Use
2777 relayout_decl instead of layout_decl.
2778 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2779 being TYPE_VFIELD. Use finish_incomplete_vars.
2780 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2781 finish_incomplete_vars.
2782 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2783 also on ENUMERAL_TYPEs.
2785 2020-03-16 Jakub Jelinek <jakub@redhat.com>
2788 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2790 2020-03-13 Martin Sebor <msebor@redhat.com>
2793 * c-decl.c (builtin_structptr_type_count): New constant.
2794 (match_builtin_function_types): Reject decls that are incompatible
2795 in types pointed to by pointers.
2796 (diagnose_mismatched_decls): Adjust comments.
2798 2020-03-05 Joseph Myers <joseph@codesourcery.com>
2801 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2802 empty when initialized type is error_mark_node.
2803 (set_designator, process_init_element): Ignore initializers for
2804 elements of a variable-size type or of error_mark_node.
2806 2020-03-01 Martin Sebor <msebor@redhat.com>
2809 * c-decl.c (types_close_enough_to_match): New function.
2810 (match_builtin_function_types):
2811 (diagnose_mismatched_decls): Add missing inform call to a warning.
2813 2020-03-01 Martin Sebor <msebor@redhat.com>
2816 * c-typeck.c (build_functype_attribute_variant): New function.
2817 (composite_type): Call it.
2819 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2822 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2823 Rename last argument from probablity to probability.
2825 2020-02-13 Jakub Jelinek <jakub@redhat.com>
2828 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2829 *expr if it has side effects.
2831 2020-01-30 Jeff Law <law@redhat.com>
2834 * c-parser.c (c_parser_switch_statement): Make sure to request
2835 marking the switch expr as used.
2837 2020-01-22 Joseph Myers <joseph@codesourcery.com>
2840 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2841 argument with integer operands.
2843 2020-01-16 Kerem Kat <keremkat@gmail.com>
2846 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2847 to support 4 available tokens.
2849 2020-01-15 Joseph Myers <joseph@codesourcery.com>
2852 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2853 determine whether to set DECL_CONTEXT.
2855 2020-01-13 Joseph Myers <joseph@codesourcery.com>
2858 * c-typeck.c (build_c_cast): Check for expressions with integer
2859 operands that can occur in an unevaluated part of an integer
2860 constant expression and call note_integer_operands as needed.
2862 2019-01-08 Richard Biener <rguenther@suse.de>
2865 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2868 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2870 Update copyright years.
2872 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2874 * c-decl.c (collect_source_ref_cb): Delete.
2875 (for_each_global_decl): Rename into...
2876 (collect_source_refs): ...this. Call collect_source_ref directly.
2877 (c_parse_final_cleanups): Always call collect_source_ref on the main
2880 2019-12-19 Julian Brown <julian@codesourcery.com>
2881 Cesar Philippidis <cesar@codesourcery.com>
2883 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2885 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2886 Allow deref (->) in variable lists if true.
2887 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2888 Pass to c_parser_omp_variable_list.
2889 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2890 call to c_parser_omp_variable_list.
2891 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2892 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2893 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2894 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2895 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2896 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2897 and detach. Support deref.
2898 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2899 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2900 (c_oacc_check_attachments): New function.
2901 (c_finish_omp_clauses): Check attach/detach arguments for being
2902 pointers using above. Support deref.
2904 2019-12-19 Julian Brown <julian@codesourcery.com>
2905 Maciej W. Rozycki <macro@codesourcery.com>
2906 Tobias Burnus <tobias@codesourcery.com>
2907 Thomas Schwinge <thomas@codesourcery.com>
2909 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2910 (c_parser_oacc_data_clause): Likewise.
2911 (c_parser_oacc_all_clauses): Likewise.
2912 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2913 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2914 PRAGMA_OACC_CLAUSE_NO_CREATE.
2915 * c-typeck.c (handle_omp_array_sections): Support
2918 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2920 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2921 Replace label_text ctor calls.
2923 2019-12-04 Joseph Myers <joseph@codesourcery.com>
2927 * c-typeck.c (convert_lvalue_to_rvalue): Call
2928 require_complete_type for arguments not of void types.
2929 (build_indirect_ref): Do not diagnose dereferencing pointers to
2931 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2933 2019-12-03 Joseph Myers <joseph@codesourcery.com>
2936 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2937 old-style parameter definitions.
2939 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2943 * c-decl.c (flexible_array_type_p): Move to common code.
2945 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2947 * c-decl.c (start_decl): Allow initialization of variables whose
2948 size is a POLY_INT_CST.
2949 (finish_decl): Use verify_type_context to check whether the target
2950 allows variables with a particular type to have static or thread-local
2951 storage duration. Don't raise a second error if such variables do
2952 not have a constant size.
2953 (grokdeclarator): Use verify_type_context to check whether the
2954 target allows fields or array elements to have a particular type.
2955 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2956 the target allows pointer difference for the types involved.
2957 (build_unary_op): Likewise for pointer increment and decrement.
2959 2019-11-29 Joseph Myers <joseph@codesourcery.com>
2961 * c-parser.c (struct c_parser): Add members raw_tokens and
2963 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2964 using previously-lexed raw tokens.
2965 (c_parser_peek_nth_token_raw)
2966 (c_parser_check_balanced_raw_token_sequence): New functions.
2967 (c_parser_nth_token_starts_std_attributes): Use
2968 c_parser_check_balanced_raw_token_sequence for Objective-C.
2970 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2973 * c-decl.c (finish_declspecs): Use int instead of decimal
2974 floating-point types if decimal floating-point not supported.
2976 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2978 * c-tree.h (struct c_declarator): Use a structure for id member.
2979 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2980 declarators at the start, not when handling individual declarators
2981 later. Use u.id.id instead of u.id.
2982 (grokfield): Use u.id.id instead of u.id.
2983 (build_id_declarator): Set u.id.id and u.id.attrs.
2984 (finish_declspecs): Handle postfix attributes in case of typedef
2985 name or typeof used.
2986 * c-parser.c (c_parser_direct_declarator)
2987 (c_parser_direct_declarator_inner): Place declarator for
2988 attributes inside that for function or array, not outside. Set
2989 u.id.attrs for identifiers.
2990 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2991 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2994 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2997 * c-decl.c (identifier_global_tag): Define.
2999 2019-11-20 Richard Biener <rguenther@suse.de>
3002 * c-decl.c (grokdeclarator): Prevent inlining of nested
3003 function with VLA arguments.
3005 2019-11-20 Joseph Myers <joseph@codesourcery.com>
3007 * c-decl.c (c_warn_type_attributes): New function.
3008 (groktypename, grokdeclarator, finish_declspecs): Call
3009 c_warn_type_attributes before applying attributes to types.
3010 * c-tree.h (c_warn_type_attributes): Declare.
3012 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3014 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
3015 standard attributes.
3016 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
3017 pedwarn for unknown standard attributes and return error_mark_node
3020 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
3022 * c-parser.c (c_parser_parse_rtl_body): Always call
3023 run_rtl_passes, even if startwith pass is not provided.
3025 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3027 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
3028 duplicate standard attributes.
3030 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3032 * c-decl.c (std_attribute_table): Add maybe_unused.
3034 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3036 * c-decl.c (std_attribute_table): Add fallthrough.
3037 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
3038 attribute at top level.
3040 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3042 * c-decl.c (std_attribute_table): New.
3043 (c_init_decl_processing): Register attributes from
3044 std_attribute_table.
3045 * c-parser.c (c_parser_attribute_arguments): Add arguments
3046 require_string and allow_empty_args. All callers changed.
3047 (c_parser_std_attribute): Set require_string argument for
3048 "deprecated" attribute.
3050 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3052 * c-parser.c (c_parser_postfix_expression)
3053 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
3054 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
3056 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
3058 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
3059 of build_same_sized_truth_vector_type.
3060 (build_vec_cmp): Likewise.
3062 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3064 * c-parser.c (c_parser_omp_context_selector): Don't require score
3065 argument to fit into shwi, just to be INTEGER_CST. Diagnose
3068 * c-parser.c (c_parser_omp_context_selector): Rename
3069 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
3070 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
3071 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
3072 and string literals.
3074 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3076 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
3077 ctsk_tagfirstref_attrs.
3078 (struct c_declspecs): Update description of attrs. Add
3079 postfix_attrs and non_std_attrs_seen_p. Increase size of
3080 typespec_kind bit-field.
3081 (c_warn_unused_attributes): New declaration.
3082 (parser_xref_tag): Update prototype.
3083 * c-decl.c (c_warn_unused_attributes): New function.
3084 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
3085 ctsk_tagref_attrs. Handle attribute declarations.
3086 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
3087 (grokdeclarator): Handle standard attributes.
3088 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
3089 attributes to incomplete type reference.
3090 (xref_tag): Update call to parser_xref_tag.
3091 (declspecs_add_addrspace, declspecs_add_type)
3092 (declspecs_add_scspec, declspecs_add_attrs): Set
3093 non_std_attrs_seen_p.
3094 (finish_declspecs): Apply postfix standard attributes to type.
3095 * c-parser.c (c_token_starts_declspecs)
3096 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
3097 (c_parser_next_tokens_start_declaration): Update comments.
3098 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
3099 parser->tokens[2] to parser->tokens[1].
3100 (c_parser_nth_token_starts_std_attributes)
3101 (c_parser_std_attribute_specifier_sequence): New functions.
3102 (c_parser_declaration_or_fndef): Add arguments have_attrs and
3103 attrs. All callers changed. Handle standard attributes.
3104 (c_parser_parms_declarator, c_parser_parms_list_declarator)
3105 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
3106 All callers changed.
3107 (c_parser_declspecs): Add arguments start_std_attr_ok and
3108 end_std_attr_ok. All callers changed. Handle standard
3110 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3111 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
3112 (c_parser_compound_statement_nostart, c_parser_all_labels)
3113 (c_parser_label, c_parser_statement, c_parser_for_statement):
3114 Handle standard attributes.
3115 * c-parser.h (c_parser_declspecs): Update prototype.
3116 * gimple-parser.c (c_parser_gimple_declaration): Update call to
3119 2019-11-12 Martin Liska <mliska@suse.cz>
3121 * gimple-parser.c: Do not include params.h.
3123 2019-11-12 Martin Liska <mliska@suse.cz>
3125 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
3126 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
3129 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3130 Frederik Harwath <frederik@codesourcery.com>
3133 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
3134 (c_parser_oacc_kernels_parallel): Rename function to...
3135 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
3136 (c_parser_omp_construct): Update accordingly.
3139 2019-11-11 Jakub Jelinek <jakub@redhat.com>
3141 * c-parser.c (c_parser_translation_unit): Diagnose declare target
3142 without corresponding end declare target.
3144 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3146 * c-convert.c (convert): Only handle vector conversions if one of
3147 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
3149 * c-typeck.c (build_array_ref): Only allow vector indexing if the
3150 vectors satisfy gnu_vector_type_p.
3151 (build_unary_op): Only allow unary operators to be applied to
3152 vectors if they satisfy gnu_vector_type_p.
3153 (digest_init): Only allow by-element initialization of vectors
3154 if they satisfy gnu_vector_type_p.
3155 (really_start_incremental_init): Likewise.
3156 (push_init_level): Likewise.
3157 (pop_init_level): Likewise.
3158 (process_init_element): Likewise.
3159 (build_binary_op): Only allow binary operators to be applied to
3160 vectors if they satisfy gnu_vector_type_p.
3162 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3164 * c-decl.c (grokparms): Convert () in a function definition to
3166 (store_parm_decls_oldstyle): Pedwarn for C2x.
3167 (store_parm_decls): Update comment about () not generating a
3170 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3172 * c-parser.c (c_parser_attribute_arguments): New function.
3173 Factored out of c_parser_gnu_attribute.
3174 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
3175 (c_parser_balanced_token_sequence, c_parser_std_attribute)
3176 (c_parser_std_attribute_specifier): New functions.
3177 (c_parser_transaction_attributes): Use
3178 c_parser_std_attribute_specifier.
3180 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3182 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
3183 lex_joined_string and translate_strings_p.
3184 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
3186 (c_parser_string_literal): New function.
3187 (c_parser_static_assert_declaration_no_semi): Use
3188 c_parser_string_literal. Do not set lex_untranslated_string.
3189 (c_parser_asm_string_literal): Use c_parser_string_literal.
3190 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
3191 (c_parser_gnu_attributes): Set and restore translate_strings_p
3192 instead of lex_untranslated_string.
3193 (c_parser_asm_statement): Do not set lex_untranslated_string.
3194 (c_parser_asm_operands): Likewise.
3195 (c_parser_has_attribute_expression): Set and restore
3196 translate_strings_p instead of lex_untranslated_string.
3197 (c_parser_postfix_expression): Use c_parser_string_literal.
3198 (pragma_lex): Likewise.
3199 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
3200 (c_parse_file): Set translate_strings_p.
3201 * gimple-parser.c (c_parser_gimple_postfix_expression)
3202 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
3203 * c-parser.c (c_parser_string_literal): Declare function.
3205 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3207 * c-parser.c (c_finish_omp_declare_variant): Use
3208 omp_get_context_selector instead of c_omp_get_context_selector.
3210 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3212 * c-tree.h (c_simulate_enum_decl): Declare.
3213 * c-decl.c (c_simulate_enum_decl): New function.
3214 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
3216 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3218 * c-tree.h (c_simulate_builtin_function_decl): Declare.
3219 * c-decl.c (c_simulate_builtin_function_decl): New function.
3220 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
3223 2019-10-28 Martin Sebor <msebor@redhat.com>
3226 * c-decl.c (names_builtin_p): Define a new function.
3228 2019-10-28 Richard Biener <rguenther@suse.de>
3231 * gimple-parser.c (c_parser_parse_gimple_body): Make
3232 current_bb the entry block initially to easier recover
3234 (c_parser_gimple_compound_statement): Adjust.
3236 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3238 * c-parser.c (c_finish_omp_declare_variant): Use
3239 omp_context_selector_matches instead of
3240 c_omp_context_selector_matches.
3241 * c-decl.c (c_decl_attributes): Add "omp declare target block"
3242 attribute in between declare target and end declare target
3245 2019-10-15 Joseph Myers <joseph@codesourcery.com>
3247 * c-parser.c (c_parser_attribute_any_word): Rename to
3248 c_parser_gnu_attribute_any_word. All callers changed.
3249 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
3251 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
3253 (c_parser_declaration_or_fndef, c_parser_declspecs)
3254 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3255 (c_parser_struct_declaration, c_parser_declarator)
3256 (c_parser_gnu_attribute, c_parser_compound_statement)
3257 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3258 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3259 attribute-related syntax productions.
3261 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3263 * c-objc-common.c (useful_aka_type_p): Replace with...
3264 (get_aka_type): ...this new function. Given the original type,
3265 decide which aka type to print (if any). Only look through typedefs
3266 if user_facing_original_type_p.
3267 (print_type): Update accordingly.
3269 2019-10-14 Jakub Jelinek <jakub@redhat.com>
3271 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3272 into int NESTED, if it is 2, diagnose missing commas in between
3274 (c_parser_omp_context_selector): Pass 2 as last argument to
3275 c_parser_omp_all_clauses.
3277 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3279 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3280 For simd properties, put them directly into TREE_VALUE.
3281 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3282 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3283 add "omp declare variant base" attribute rather than
3284 "omp declare variant".
3286 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3288 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3290 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3292 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3293 true, terminate processing on closing paren and don't skip to end of
3295 (c_parser_omp_declare_simd): Handle also declare variant.
3296 (omp_construct_selectors, omp_device_selectors,
3297 omp_implementation_selectors, omp_user_selectors): New variables.
3298 (c_parser_omp_context_selector,
3299 c_parser_omp_context_selector_specification,
3300 c_finish_omp_declare_variant): New functions.
3301 (c_finish_omp_declare_simd): Handle both declare simd and
3303 (c_parser_omp_declare): Handle declare variant.
3305 2019-10-02 Joseph Myers <joseph@codesourcery.com>
3307 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3310 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3312 * c-objc-common.c (useful_aka_type_p): New function.
3313 (print_type): Use it to decide whether an aka type is worth printing.
3315 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3318 * c-parser.c (c_parser_predefined_identifier): New function.
3319 (c_parser_postfix_expression): Use it.
3320 (c_parser_omp_variable_list): Parse predefined identifiers.
3321 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3322 in shared and firstprivate clauses, even when they are predetermined
3325 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3327 * c-typeck.c (build_function_call_vec): Take the original function
3328 decl as an optional final parameter. Pass all built-in calls to
3329 check_builtin_function_arguments.
3331 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
3334 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3335 of identifiers in the external scope only for variables and functions.
3337 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3340 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3342 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3345 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3346 after determining that the first token is not
3347 PRAGMA_GCC_PCH_PREPROCESS.
3349 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
3351 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3352 FUNCTION_DECL to the right value in the presence of nested declarators.
3354 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3357 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3359 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3362 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3363 of a built_in_function.
3364 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3366 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3368 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3369 (c_parser_omp_clause_device_type): New function.
3370 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3371 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3372 (c_parser_omp_declare_target): Handle device_type clauses. Remove
3373 diagnostics for declare target with clauses nested in clause-less
3374 declare target declaration-definition-seq.
3375 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3377 2019-08-09 Jakub Jelinek <jakub@redhat.com>
3379 * c-parser.c (check_no_duplicate_clause): Simplify using
3381 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3382 directive name modifiers.
3383 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3386 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3387 check_no_duplicate_clause call. Comment it out, instead emit a
3388 warning for duplicate dist_schedule clauses.
3390 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
3392 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3394 2019-08-08 Jakub Jelinek <jakub@redhat.com>
3396 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3397 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3398 instead of generic_head to track duplicates.
3400 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3402 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3403 (c_parser_omp_clause_use_device_addr): New function.
3404 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3405 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3406 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3407 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3408 map or use_device_* clauses.
3409 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3410 in OpenMP, require pointer type rather than pointer or array type.
3411 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3413 2019-07-31 Jakub Jelinek <jakub@redhat.com>
3416 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3417 even if finish is UNKNOWN_LOCATION, just use start as finish in that
3420 2019-07-25 Martin Liska <mliska@suse.cz>
3421 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
3424 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3426 2019-07-25 Martin Liska <mliska@suse.cz>
3428 * c-decl.c (merge_decls): Use new macros
3429 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3431 2019-07-23 Richard Biener <rguenther@suse.de>
3433 PR tree-optimization/83518
3434 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3435 a CFG also rebuild cgraph edges.
3437 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3439 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3440 (c_parser_omp_clause_bind): New function.
3441 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3442 (OMP_LOOP_CLAUSE_MASK): Define.
3443 (c_parser_omp_loop): New function.
3444 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3445 loop combined with parallel or teams.
3446 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3447 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3449 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3452 * c-decl.c (finish_function): Check targetm.warn_func_return
3453 before issuing a -Wreturn-type warning.
3455 2019-07-12 Alexandre Oliva <oliva@adacore.com>
3457 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3458 (c_parser_compound_statement): Call it.
3460 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3462 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3463 (c_parser_omp_clause_order): New function.
3464 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3465 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3466 PRAGMA_OMP_CLAUSE_ORDER.
3467 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3469 2019-07-10 Richard Biener <rguenther@suse.de>
3471 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3472 _Literal (int *) &x for address literals.
3474 2019-07-09 Martin Sebor <msebor@redhat.com>
3477 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3479 (field_decl_cmp): Same.
3480 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3482 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3484 2019-07-09 Martin Sebor <msebor@redhat.com>
3487 * c-decl.c: Change class-key from class to struct and vice versa
3488 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3489 * gimple-parser.c: Same.
3491 2019-07-01 Richard Biener <rguenther@suse.de>
3493 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3494 _Literal (char *) &"foo" for address literals pointing to
3497 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3499 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3500 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3501 C incompatibility if alternate "__intN__" form is used.
3503 2019-06-24 Martin Sebor <msebor@redhat.com>
3505 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3507 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3509 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3510 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3511 (c_parser_omp_scan_loop_body): New function.
3512 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3513 inscan reduction clauses.
3514 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3515 non-inscan reductions on the same construct, or inscan reductions with
3516 ordered or schedule clauses, or inscan array reductions.
3518 2019-06-05 Martin Sebor <msebor@redhat.com>
3521 * c-typeck.c (c_finish_return): Only consider functions returning
3522 pointers as candidates for -Wreturn-local-addr.
3524 2019-06-05 Martin Sebor <msebor@redhat.com>
3526 * c-decl.c (start_decl): Adjust quoting and hyphenation
3528 (finish_decl): Same.
3529 (finish_enum): Same.
3530 (start_function): Same.
3531 (declspecs_add_type): Same.
3532 * c-parser.c (warn_for_abs): Same.
3533 * c-typeck.c (build_binary_op): Same.
3535 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3538 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3539 marked with an OpenACC 'routine' directive.
3542 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3543 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3546 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3547 clauses from "omp declare target" attribute.
3549 2019-05-16 Martin Sebor <msebor@redhat.com>
3551 * c-decl.c (start_decl): Quote keywords, operators, and
3552 types in diagnostics.
3553 (finish_decl): Same.
3554 * c-parser.c (c_parser_asm_statement): Same.
3555 (c_parser_conditional_expression): Same.
3556 (c_parser_transaction_cancel): Same.
3557 * c-typeck.c (c_common_type): Same.
3558 (build_conditional_expr): Same.
3559 (digest_init): Same.
3560 (process_init_element): Same.
3561 (build_binary_op): Same.
3563 2019-05-17 Richard Biener <rguenther@suse.de>
3565 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3566 (c_parser_gimple_unary_expression): Likewise.
3567 (c_parser_gimple_parentized_ternary_expression): New function.
3569 2019-05-16 Richard Biener <rguenther@suse.de>
3571 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3572 (c_parser_gimple_unary_expression): Likewise.
3574 2019-05-15 Richard Biener <rguenther@suse.de>
3576 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3579 2019-05-14 Richard Biener <rguenther@suse.de>
3581 * gimple-parser.c (c_parser_gimple_statement): Remove
3582 questionable auto-promotion to VIEW_CONVERT_EXPR.
3583 (c_parser_gimple_typespec): Split out from __MEM parsing.
3584 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3585 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3586 as __VIEW_CONVERT with -gimple.
3588 2019-05-09 Martin Liska <mliska@suse.cz>
3590 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3592 (c_parser_gimple_unary_expression): Parse also binary expression
3594 (c_parser_gimple_parentized_binary_expression): New function.
3596 2019-05-09 Martin Liska <mliska@suse.cz>
3598 * gimple-parser.c (struct gimple_parser): Add probability.
3599 for gimple_parser_edge.
3600 (gimple_parser::push_edge): Add new argument probability.
3601 (c_parser_gimple_parse_bb_spec): Parse also probability
3603 (c_parser_parse_gimple_body): Set edge probability.
3604 (c_parser_gimple_compound_statement): Consume token
3605 before calling c_parser_gimple_goto_stmt.
3607 (c_parser_gimple_statement): Pass new argument.
3608 (c_parser_gimple_goto_stmt): Likewise.
3609 (c_parser_gimple_if_stmt): Likewise.
3610 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3611 * c-parser.c (c_parser_declaration_or_fndef): Pass
3612 hot_bb_threshold argument.
3613 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3615 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3617 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3620 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3621 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3622 (c_parser_do_statement): Likewise.
3623 (c_parser_for_statement): Likewise. Formatting fixes.
3624 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3625 emit DEBUG_BEGIN_STMTs if needed.
3627 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3630 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3631 (c_start_case): Don't clear it.
3632 (do_case): Adjust c_add_case_label caller.
3633 (c_finish_case): Adjust c_do_switch_warnings caller.
3636 * c-decl.c (merge_decls): If remove is main variant and
3637 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3638 variant that has newdecl as TYPE_NAME if any.
3640 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3643 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3644 don't try to remove it from the variant list, but instead assert
3647 2019-04-01 Richard Biener <rguenther@suse.de>
3650 * c-tree.h (c_get_alias_set): Declare.
3651 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3652 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3653 as the underlying integer type.
3655 2019-03-19 Martin Sebor <msebor@redhat.com>
3657 PR tree-optimization/89688
3658 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3659 kinds of initializers.
3661 2019-03-19 Jakub Jelinek <jakub@redhat.com>
3664 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3665 return type even if quals_used is 0. Formatting fixes.
3667 2019-03-14 Richard Biener <rguenther@suse.de>
3669 * c-tree.h (enum c_declspec_il): New.
3670 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3672 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3673 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3674 (c_parser_declspecs): Adjust.
3675 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3676 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3678 (struct gimple_parser): New.
3679 (gimple_parser::push_edge): New method.
3680 (c_parser_gimple_parse_bb_spec): New helper.
3681 (c_parser_parse_gimple_body): Get start pass and IL specification.
3682 Initialize SSA and CFG.
3683 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3684 Build a gimple_parser parsing state and pass it along.
3685 (c_parser_gimple_statement): Change intermittend __PHI internal
3686 function argument for the edge.
3687 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3688 (c_parser_gimple_goto_stmt): Record edges to build.
3689 (c_parser_gimple_if_stmt): Likewise.
3690 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3691 (c_parser_gimple_or_rtl_pass_list): Likewise.
3693 2019-03-11 Martin Liska <mliska@suse.cz>
3695 * c-decl.c (check_for_loop_decls): Wrap an option name
3696 in a string format message and fix GNU coding style.
3697 * c-parser.c (c_parser_declspecs): Likewise.
3699 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3701 PR tree-optimization/89550
3702 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3704 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3705 or warning returned true.
3707 2019-02-28 Jakub Jelinek <jakub@redhat.com>
3710 * c-typeck.c (convert_arguments): Call inform_declaration only if
3711 the previous warning_at call returned true.
3713 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3715 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3716 parameter. Adjust all users.
3717 (c_parser_oacc_simple_clause): Replace parser with loc formal
3718 parameter. Adjust all users.
3720 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
3723 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3724 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3726 2019-02-15 Jakub Jelinek <jakub@redhat.com>
3729 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3730 before c_decl_attributes rather than after it.
3732 2019-02-06 Jakub Jelinek <jakub@redhat.com>
3735 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3736 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3737 instead of 3 nested ifs.
3739 2019-02-06 Joseph Myers <joseph@codesourcery.com>
3742 * c-decl.c (finish_decl): Do not complete array types for arrays
3743 with external linkage not at file scope.
3745 2019-02-05 Richard Biener <rguenther@suse.de>
3748 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3749 all type variants when not supported.
3751 2019-01-30 Jakub Jelinek <jakub@redhat.com>
3754 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3755 * c-decl.c (decl_jump_unsafe): Return false for
3756 C_DECL_COMPOUND_LITERAL_P decls.
3757 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3759 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3762 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3766 * c-decl.c (last_fileptr_type): Remove.
3767 (last_structptr_types): New variable.
3768 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3769 {old,new}rettype instead of the types themselves. Assert
3770 last_structptr_types array has the same number of elements
3771 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3772 argument oldtype and newtype. Instead of handling
3773 just fileptr_type_node specially, handle all builtin_structptr_types
3774 pointer nodes. Formatting fix.
3776 2019-01-24 Martin Sebor <msebor@redhat.com>
3781 * c-decl.c (match_builtin_function_types): Add arguments.
3782 (diagnose_mismatched_decls): Diagnose mismatched declarations
3783 of built-ins more strictly.
3785 2019-01-24 Jakub Jelinek <jakub@redhat.com>
3788 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3789 on #pragma omp cancel with different modifiers.
3791 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3795 * c-typeck.c (convert_for_assignment): Upate the
3796 warn_for_address_or_pointer_of_packed_member call.
3798 2019-01-16 Tom Honermann <tom@honermann.net>
3799 Jason Merrill <jason@redhat.com>
3801 * c-typeck.c (digest_init): Revised the error message produced for
3802 ill-formed cases of array initialization with a string literal.
3803 (error_init): Make variadic.
3805 2019-01-12 Jakub Jelinek <jakub@redhat.com>
3807 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3809 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3812 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3813 if current_function_decl is non-NULL.
3815 2019-01-07 Joseph Myers <joseph@codesourcery.com>
3819 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3820 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3821 functions declared but never defined only for external scope, not
3824 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3827 * c-parser.c (c_parser_postfix_expression): Parse
3828 __builtin_convertvector.
3830 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3832 Update copyright years.
3834 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3837 * c-typeck.c (convert_for_assignment): Call
3838 warn_for_address_or_pointer_of_packed_member.
3840 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3842 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3843 a more specific error message (instead of just falling through).
3845 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3847 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3848 asm qualifier is first seen; use that to give nicer "duplicate asm
3849 qualifier" messages. Delete 'quals" variable, instead pass the
3850 "is_volatile_ flag to build_asm_stmt directly.
3851 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3852 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3854 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3856 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3857 "done" boolean variable.
3859 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3862 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3863 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3864 (build_binary_op): Use struct op_location_t and
3865 class binary_op_rich_location.
3867 2018-12-11 Jakub Jelinek <jakub@redhat.com>
3870 * c-convert.c (convert): Call c_fully_fold before calling
3871 ubsan_instrument_float_cast.
3873 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3875 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3878 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3880 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3881 after asm. Pass a flag for it to build_asm_expr.
3882 * c-tree.h (build_asm_expr): Update declaration.
3883 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3886 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3889 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3890 combination of volatile and goto, in any order, without repetitions.
3892 2018-12-04 James Norris <jnorris@codesourcery.com>
3893 Cesar Philippidis <cesar@codesourcery.com>
3894 Julian Brown <julian@codesourcery.com>
3896 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3899 2018-11-30 Richard Biener <rguenther@suse.de>
3901 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3902 _Literal (type) { ... } as empty aggregate or vector constructor.
3904 2018-11-29 Martin Sebor <msebor@redhat.com>
3907 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3908 (convert_arguments): Add comments. Pass additional argument to
3911 2018-11-29 Martin Sebor <msebor@redhat.com>
3915 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3917 2018-11-23 Martin Sebor <msebor@redhat.com>
3920 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3921 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3923 2018-11-20 Martin Sebor <msebor@redhat.com>
3925 * c-parser.c (c_parser_has_attribute_expression): New function.
3926 (c_parser_attribute): New function.
3927 (c_parser_attributes): Move code into c_parser_attribute.
3928 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3930 2018-11-15 Martin Sebor <msebor@redhat.com>
3933 * c-decl.c (header_for_builtin_fn): Declare.
3934 (diagnose_mismatched_decls): Diagnose declarations of built-in
3935 functions without a prototype.
3936 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3937 (convert_argument): Same.
3938 (convert_arguments): Factor code out into convert_argument.
3939 Detect mismatches between built-in formal arguments in calls
3940 to built-in without prototype.
3941 (build_conditional_expr): Same.
3942 (type_or_builtin_type): New function.
3943 (convert_for_assignment): Add argument. Conditionally issue
3944 warnings instead of errors for mismatches.
3946 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3948 * c-decl.c: Replace "source_location" with "location_t".
3949 * c-tree.h: Likewise.
3950 * c-typeck.c: Likewise.
3951 * gimple-parser.c: Likewise.
3953 2018-11-09 Jakub Jelinek <jakub@redhat.com>
3955 * c-parser.c (c_parser_omp_clause_final): Use
3956 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3957 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3958 parsing instead of c_parser_paren_condition.
3959 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3960 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3961 c_fully_fold instead of c_parser_condition.
3962 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3963 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3964 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3965 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3966 c_parser_expr_no_commas instead of c_parser_expression.
3968 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3969 reduction clause with inscan modifier.
3971 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3972 clauses other than atomic_default_mem_order.
3974 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3976 * c-parser.c: Include memmode.h.
3977 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3978 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3979 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3980 task_reduction clauses.
3981 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3982 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3983 section, or lvalue assignment expression.
3984 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3985 (c_parser_omp_clause_lastprivate): Parse optional
3986 conditional: modifier.
3987 (c_parser_omp_clause_hint): Require constant integer expression rather
3988 than just integer expression.
3989 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3991 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3992 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3993 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3995 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3996 iterators. Parse mutexinoutset and depobj kinds.
3997 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3999 (c_parser_omp_all_clauses): Likewise. Handle
4000 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
4001 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4002 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
4003 default memory order from requires directive if any. Adjust
4004 c_finish_omp_atomic caller.
4005 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
4006 (c_parser_omp_flush): Parse flush with memory-order-clause.
4007 (c_parser_omp_for_loop): Allow NE_EXPR even in
4008 OpenMP loops, adjust c_finish_omp_for caller.
4009 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
4010 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
4011 Allow to be called while parsing combined parallel master.
4012 Parse combined master taskloop{, simd}.
4013 (c_parser_omp_parallel): Parse combined
4014 parallel master{, taskloop{, simd}} constructs.
4015 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
4016 (OMP_TASKGROUP_CLAUSE_MASK): Define.
4017 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
4018 (OMP_TASKWAIT_CLAUSE_MASK): Define.
4019 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
4020 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
4021 around teams body. Use SET_EXPR_LOCATION.
4022 (c_parser_omp_target_data): Allow target data
4023 with only use_device_ptr clauses.
4024 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
4025 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
4026 (c_parser_omp_requires): New function.
4027 (c_finish_taskloop_clauses): New function.
4028 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
4029 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
4030 declaration. Disallow in_reduction clause when combined with parallel
4032 (c_parser_omp_construct): Adjust c_parser_omp_master and
4033 c_parser_omp_taskgroup callers.
4034 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
4036 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
4037 like OMP_CLAUSE_REDUCTION.
4038 (handle_omp_array_sections): Likewise. Call save_expr on array
4039 reductions before calling build_index_type. Handle depend clauses
4041 (struct c_find_omp_var_s): New type.
4042 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
4043 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
4044 with static, runtime or auto schedule kinds. Call save_expr for whole
4045 array reduction sizes. Diagnose reductions with zero sized elements
4046 or variable length structures. Diagnose nogroup clause used with
4047 reduction clause(s). Handle depend clause with
4048 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
4049 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
4050 some different type for other kinds. Use build_unary_op with
4051 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
4052 Handle depend clauses with iterators. Remove no longer needed special
4053 case that predetermined const qualified vars may be specified in
4054 firstprivate clause. Complain if const qualified vars are mentioned
4055 in data-sharing clauses other than firstprivate or shared. Use
4056 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
4057 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
4058 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
4059 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
4061 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4063 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
4064 logic for change to name_hint::operator bool.
4065 (undeclared_variable): Likewise.
4066 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4067 (c_parser_parameter_declaration): Likewise.
4069 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4071 * c-errors.c (pedwarn_c11): New function.
4072 * c-parser.c (disable_extension_diagnostics): Save
4073 warn_c11_c2x_compat and set it to 0.
4074 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
4075 (c_parser_static_assert_declaration_no_semi): Handle
4076 _Static_assert without string constant.
4077 * c-tree.h (pedwarn_c11): New prototype.
4079 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4081 * Make-lang.in (selftest-c): New.
4082 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4083 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
4084 from gcc/Makefile.in.
4086 2018-10-02 Richard Biener <rguenther@suse.de>
4088 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4090 2018-09-26 Joseph Myers <joseph@codesourcery.com>
4093 * c-typeck.c (build_binary_op): Use excess precision for
4094 comparisons of integers and floating-point for C11 and later.
4096 2018-09-26 Martin Jambor <mjambor@suse.cz>
4099 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
4102 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4104 * c-objc-common.c (range_label_for_type_mismatch::get_text):
4105 Update for new param.
4106 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
4109 2018-09-17 Martin Jambor <mjambor@suse.cz>
4112 * c-parser.c: (warn_for_abs): New function.
4113 (c_parser_postfix_expression_after_primary): Call it.
4115 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4117 * c-typeck.c (digest_init): Shorten overlength strings.
4119 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4121 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
4123 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4125 * c-decl.c (finish_decl): Call braced_list_to_string here ...
4126 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
4128 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
4130 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4131 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
4133 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4136 * c-decl.c (implicitly_declare): Update call to
4137 maybe_add_include_fixit to suggest overriding the location, as it
4139 * c-objc-common.c (c_tree_printer): Update for conversion of
4140 show_caret_p to a tri-state.
4142 2018-08-27 Martin Liska <mliska@suse.cz>
4144 * c-decl.c (locate_old_decl): Use new function
4145 fndecl_built_in_p and remove check for FUNCTION_DECL if
4147 (diagnose_mismatched_decls): Likewise.
4148 (merge_decls): Likewise.
4149 (warn_if_shadowing): Likewise.
4150 (pushdecl): Likewise.
4151 (implicitly_declare): Likewise.
4152 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4153 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
4154 * c-typeck.c (build_function_call_vec): Likewise.
4155 (convert_arguments): Likewise.
4157 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4160 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
4161 (diagnose_mismatched_decls): Likewise, in various places.
4162 (warn_if_shadowing): Likewise.
4163 (implicit_decl_warning): Likewise.
4164 (implicitly_declare): Likewise.
4165 (undeclared_variable): Likewise.
4166 (declare_label): Likewise.
4167 (grokdeclarator): Likewise.
4168 (start_function): Likewise.
4169 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4170 (c_parser_parameter_declaration): Likewise.
4171 (c_parser_binary_expression): Likewise.
4172 * c-typeck.c (c_expr_sizeof_expr): Likewise.
4173 (parser_build_binary_op): Likewise.
4174 (build_unary_op): Likewise.
4175 (error_init): Likewise.
4176 (pedwarn_init): Likewise.
4177 (warning_init): Likewise.
4178 (convert_for_assignment): Likewise.
4180 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4182 * c-objc-common.c: Include "gcc-rich-location.h".
4183 (c_tree_printer): Move implemenation of '%T' to...
4184 (print_type): ...this new function.
4185 (range_label_for_type_mismatch::get_text): New function.
4186 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
4187 range for the various ic_argpass cases.
4188 (class maybe_range_label_for_tree_type_mismatch): New class.
4189 (build_binary_op): Use it when calling binary_op_error.
4191 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4193 * c-decl.c (start_decl): Do not warn if variables is named as main
4194 and is a local variable.
4196 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4199 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
4200 objects of unknown size.
4202 2018-08-13 Martin Sebor <msebor@redhat.com>
4204 PR tree-optimization/71625
4205 * c-parser.c (c_parser_declaration_or_fndef): Call
4206 braced_list_to_string.
4208 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
4211 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
4214 2018-08-01 Martin Sebor <msebor@redhat.com>
4216 PR tree-optimization/86650
4217 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
4218 and TREE_BLOCK (t) from within percent_K_format to this callsite.
4220 2018-08-01 Jakub Jelinek <jakub@redhat.com>
4223 * c-typeck.c (init_field_decl_cmp): New function.
4224 (output_pending_init_elements): Use it for field comparisons
4225 instead of pure bit_position comparisons.
4227 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4229 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
4230 type here, instead add "omp declare target implicit" attribute.
4231 (finish_decl): Diagnose vars without mappable type here.
4233 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4234 Thomas Schwinge <thomas@codesourcery.com>
4235 Cesar Philippidis <cesar@codesourcery.com>
4237 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
4238 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
4239 to their non-present_or_* counterparts. Make 'self' an alias to
4240 PRAGMA_OACC_CLAUSE_HOST.
4241 (c_parser_oacc_data_clause): Update GOMP mappings for
4242 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
4243 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
4244 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4245 Remove support for present_or_* clauses.
4246 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4247 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4248 (OACC_DECLARE_CLAUSE_MASK): Likewise.
4249 (OACC_DATA_CLAUSE_MASK): Likewise.
4250 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4251 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4252 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4253 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4254 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4256 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4258 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4259 * gimple-parser.c (c_parser_gimple_statement): Likewise.
4260 (c_parser_gimple_unary_expression): Likewise.
4262 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4265 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4266 before doing POINTER_DIFF_EXPR.
4268 2018-06-07 Marek Polacek <polacek@redhat.com>
4271 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4272 for loop initial declarations.
4274 2018-05-30 David Pagan <dave.pagan@oracle.com>
4277 * c-decl.c (grokdeclarator): Update check for return type warnings.
4278 (start_function): Likewise.
4279 (finish_function): Likewise.
4280 * c-typeck.c (c_finish_return): Update check for return type warnings.
4281 Pass OPT_Wreturn_type to pedwarn when appropriate.
4283 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
4285 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4288 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4290 * gimple-parser.c: Include internal-fn.h.
4291 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4292 (c_parser_gimple_call_internal): New function.
4293 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4294 Fix typos in comment.
4296 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4299 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4300 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4302 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4303 fold_offsetof_1, pass argtype as TYPE to it and drop the
4306 2018-05-02 David Pagan <dave.pagan@oracle.com>
4309 * c-decl.c (old_style_parameter_scope): New function.
4310 * c-parser.c (c_parser_postfix_expression): Check for statement
4311 expressions in old-style function parameter list declarations.
4312 * c-parser.h (old_style_parameter_scope): New extern declaration.
4314 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4317 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4318 it is not TREE_STATIC.
4319 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4320 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4321 its COMPOUND_LITERAL_EXPR_DECL.
4323 2018-03-21 Joseph Myers <joseph@codesourcery.com>
4325 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4326 where all functions return the same _FloatN or _FloatNx type,
4327 treat integer types as _Float64 instead of double.
4329 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4332 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4333 building vector comparison, diagnose it and return error_mark_node.
4335 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4338 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4339 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4340 INTEGER_TYPE element type.
4342 2018-03-13 David Pagan <dave.pagan@oracle.com>
4345 * c-typeck.c (output_init_element): Ensure field initializer
4346 expression is always evaluated if there are side effects.
4348 2018-03-06 Jakub Jelinek <jakub@redhat.com>
4351 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4352 !building_stmt_list_p ().
4354 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
4357 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4358 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4359 and include the BIND_EXPR in the list of things that need to be
4362 2018-02-09 Nathan Sidwell <nathan@acm.org>
4365 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4366 to strict_aliasing_warning.
4368 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4370 * c-typeck.c (really_start_incremental_init, push_init_level,
4371 set_nonincremental_init, output_init_element, process_init_element):
4372 Use DECL_UNNAMED_BIT_FIELD.
4374 2018-01-31 Marek Polacek <polacek@redhat.com>
4377 * c-parser.c (c_parser_compound_statement_nostart): Call
4378 expansion_point_location_if_in_system_header.
4380 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4383 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4386 2018-01-13 Jakub Jelinek <jakub@redhat.com>
4389 * c-tree.h (decl_constant_value_1): Add a bool argument.
4390 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4391 returning a CONSTRUCTOR if it is true. Use error_operand_p.
4392 (decl_constant_value): Adjust caller.
4393 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4394 decl_constant_value_1 as IN_INIT. Otherwise, punt if
4395 decl_constant_value returns initializer that has BLKmode or
4397 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4400 Alan Hayward <alan.hayward@arm.com>
4401 David Sherwood <david.sherwood@arm.com>
4403 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4404 TYPE_VECTOR_SUBPARTS.
4406 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4408 Update copyright years.
4410 2018-01-01 Jakub Jelinek <jakub@redhat.com>
4413 * c-parser.c (c_parser_braced_init, c_parser_initelt,
4414 c_parser_conditional_expression, c_parser_cast_expression,
4415 c_parser_sizeof_expression, c_parser_alignof_expression,
4416 c_parser_postfix_expression, c_parser_omp_declare_reduction,
4417 c_parser_transaction_expression): Use set_error () method instead
4418 of setting value member to error_mark_node.
4420 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
4422 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4423 and _Float<N>X built-in functions.
4425 2017-12-22 Jakub Jelinek <jakub@redhat.com>
4428 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4429 TYPE_STUB_DECL and call rest_of_type_compilation before processing
4430 incomplete vars rather than after it.
4433 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4434 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4435 and consider empty ones if there are no other stmts. For
4436 -Wunused-value walk all statements before the one only followed by
4439 2017-12-22 Mike Stump <mikestump@comcast.net>
4440 Eric Botcazou <ebotcazou@adacore.com>
4442 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4443 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4444 (c_parser_do_statement): Likewise.
4445 (c_parser_for_statement): Likewise.
4446 (c_parser_statement_after_labels): Adjust calls to above.
4447 (c_parse_pragma_ivdep): New static function.
4448 (c_parser_pragma_unroll): Likewise.
4449 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4450 <PRAGMA_UNROLL>: New case.
4452 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4454 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4455 perform_integral_promotions, digest_init): Replace Yoda conditions
4456 with typical order conditions.
4457 * c-decl.c (check_bitfield_type_and_width): Likewise.
4459 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4461 * c-typeck.c (c_safe_arg_type_equiv_p,
4462 c_safe_function_type_cast_p): New function.
4463 (build_c_cast): Implement -Wcast-function-type.
4465 2017-12-14 Richard Biener <rguenther@suse.de>
4468 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4469 like REALPART_EXPR for the behavior of whether its operand
4472 2017-12-12 Marek Polacek <polacek@redhat.com>
4475 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4477 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4479 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4480 * c-parser.c (add_debug_begin_stmt): New.
4481 (c_parser_declaration_or_fndef): Call it.
4482 (c_parser_compound_statement_nostart): Likewise.
4483 (c_parser_statement_after_labels): Likewise.
4484 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4486 2017-12-07 Joseph Myers <joseph@codesourcery.com>
4488 * c-decl.c (build_compound_literal): Add parameter alignas_align
4489 and set alignment of decl if nonzero.
4490 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4491 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4493 (c_parser_struct_declaration): Update syntax comment.
4494 (c_parser_type_name): Add alignas_ok argument and pass it to
4496 (c_parser_cast_expression): Pass true to c_parser_type_name and
4497 give error if a cast used an _Alignas specifier.
4498 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4499 give error if sizeof (type-name) used an _Alignas specifier.
4500 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4501 give error if _Alignof (type-name) used an _Alignas specifier.
4502 (c_parser_postfix_expression_after_paren_type): Check specified
4503 alignment for a compound literal and pass it to
4504 build_compound_literal.
4505 * c-parser.h (c_parser_type_name): Update prototype.
4506 * c-tree.h (build_compound_literal): Update prototype.
4508 2017-12-07 Martin Sebor <msebor@redhat.com>
4511 * c-decl.c (c_decl_attributes): Look up existing declaration and
4512 pass it to decl_attributes.
4514 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4517 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4518 reserved for use by the implementation.
4520 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4522 * c-decl.c: Include "c-family/c-spellcheck.h".
4524 2017-12-05 Martin Liska <mliska@suse.cz>
4525 Jakub Jelinek <jakub@redhat.com>
4527 * c-typeck.c (pointer_diff): Add new argument and instrument
4528 pointer subtraction.
4529 (build_binary_op): Similar for pointer comparison.
4531 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4534 * c-parser.c: Include tree-iterator.h.
4535 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4536 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4540 * c-tree.h (decl_constant_value_1): Declare.
4541 * c-typeck.c (decl_constant_value_1): New function.
4542 (decl_constant_value): Use it.
4543 * c-fold.c (c_fully_fold_internal): If in_init, use
4544 decl_constant_value_1 instead of decl_constant_value.
4546 2017-11-30 Jakub Jelinek <jakub@redhat.com>
4548 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4550 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4553 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4554 c_switch_covers_all_cases_p returns true.
4556 2017-11-28 Julia Koval <julia.koval@intel.com>
4557 Sebastian Peryt <sebastian.peryt@intel.com>
4559 * Make-lang.in (c/c-array-notation.o): Remove.
4560 * c-array-notation.c: Delete.
4561 * c-decl.c: Remove cilkplus condition.
4562 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4563 c_parser_cilk_verify_simd, c_parser_array_notation,
4564 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4565 c_parser_cilk_simd_fn_vector_attrs,
4566 c_finish_cilk_simd_fn_tokens): Delete.
4567 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4568 (c_parser_direct_declarator_inner): Ditto.
4569 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4570 (c_parser_attributes, c_parser_compound_statement,
4571 c_parser_statement_after_labels, c_parser_if_statement,
4572 c_parser_switch_statement, c_parser_while_statement,
4573 c_parser_do_statement, c_parser_for_statement,
4574 c_parser_unary_expression, c_parser_postfix_expression,
4575 c_parser_postfix_expression_after_primary,
4576 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4577 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4579 * c-typeck.c (build_array_ref, build_function_call_vec,
4581 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4582 c_finish_loop, build_binary_op): Remove cilkplus support.
4584 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4586 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4589 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
4591 * Make-lang.in (c.install-plugin): Install backend import library.
4593 2017-11-23 Jakub Jelinek <jakub@redhat.com>
4595 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4596 pragma_stmt context.
4598 2017-11-23 Mike Stump <mikestump@comcast.net>
4599 Eric Botcazou <ebotcazou@adacore.com>
4601 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4603 (c_parser_do_statement): Likewise.
4604 (c_parser_for_statement): Likewise.
4606 2017-11-22 David Malcolm <dmalcolm@redhat.com>
4609 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4610 bool to bool *. Within '%T' handling, if showing an "aka", use
4611 "quoted" param to add appropriate quoting.
4613 2017-11-22 Marek Polacek <polacek@redhat.com>
4618 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4620 2017-11-21 David Malcolm <dmalcolm@redhat.com>
4623 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4624 earlier failed lookups.
4626 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4628 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4629 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4631 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4634 * c-decl.c: Include "c-family/known-headers.h".
4635 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4636 to known-headers.cc.
4637 (class suggest_missing_header): Move to known-header.h.
4638 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4639 than get_c_name_hint.
4641 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4643 * c-decl.c (get_c_name_hint): New function.
4644 (class suggest_missing_header): New class.
4645 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4646 suggest missing headers to the user.
4648 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4650 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4651 Include "c-family/name-hint.h"
4652 (implicit_decl_warning): Convert "hint" from
4653 const char * to name_hint. Pass location to
4654 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4655 warning was not printed.
4656 (undeclared_variable): Likewise for "guessed_id".
4657 (lookup_name_fuzzy): Convert return type from const char *
4658 to name_hint. Add location_t param.
4659 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4660 Include "c-family/name-hint.h"
4661 (c_parser_declaration_or_fndef): Convert "hint" from
4662 const char * to name_hint. Pass location to lookup_name_fuzzy.
4663 (c_parser_parameter_declaration): Likewise.
4665 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4669 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4671 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4672 handle_omp_array_sections): Likewise.
4673 (digest_init): Don't call decl_constant_value_for_optimization.
4674 * c-tree.h (decl_constant_value_for_optimization): Removed.
4675 * c-fold.c (c_fold_array_ref): New function.
4676 (c_fully_fold_internal): Add LVAL argument, propagate it through
4677 recursive calls. For VAR_P call decl_constant_value and
4678 unshare if not LVAL and either optimizing or IN_INIT. Remove
4679 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4680 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4681 (c_fully_fold): Add LVAL argument, pass it through to
4682 c_fully_fold_internal.
4683 (decl_constant_value_for_optimization): Removed.
4685 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4688 * c-parser.c (check_tgmath_function): New function.
4689 (enum tgmath_parm_kind): New enum.
4690 (c_parser_postfix_expression): Handle __builtin_tgmath.
4692 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4694 * c-decl.c (implicit_decl_warning): Update for renaming of
4695 pedwarn_at_rich_loc and warning_at_rich_loc.
4696 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4697 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4698 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4699 (c_parser_struct_or_union_specifier): Likewise for renaming of
4700 pedwarn_at_rich_loc.
4701 (c_parser_parameter_declaration): Likewise for renaming of
4703 * c-typeck.c (build_component_ref): Likewise.
4704 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4705 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4706 (set_init_label): Likewise for renaming of error_at_rich_loc.
4708 2017-10-30 Richard Biener <rguenther@suse.de>
4710 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4713 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4715 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4716 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4718 2017-10-25 David Malcolm <dmalcolm@redhat.com>
4721 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4724 2017-10-25 Jakub Jelinek <jakub@redhat.com>
4727 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4728 newdecl to corresponding __builtin_ if any.
4730 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4733 * c-decl.c (diagnose_mismatched_decls): Use
4734 OPT_Wbuiltin_declaration_mismatch.
4736 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4738 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4739 use it to guard calls to maybe_suggest_missing_token_insertion.
4740 (c_parser_parms_list_declarator): Override default value of new
4741 "type_is_unique" param to c_parser_require.
4742 (c_parser_asm_statement): Likewise.
4743 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4746 2017-10-11 Nathan Sidwell <nathan@acm.org>
4748 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4750 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4752 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4753 operating on trees as wide_ints.
4754 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4755 (c_tree_equal): Likewise.
4757 2017-10-04 David Malcolm <dmalcolm@redhat.com>
4759 * c-decl.c (push_parm_decl): Store c_parm's location into the
4761 (build_c_parm): Add "loc" param and store it within the c_parm.
4762 * c-parser.c (struct c_parser): Add "last_token_location" field.
4763 (c_parser_consume_token): Store location of the token into the
4765 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4766 when handling a FUNCTION_DECL, if it doesn't already have them.
4767 (c_parser_parameter_declaration): Generate a location for the
4768 parameter, and pass it to the call to build_c_parm.
4769 * c-tree.h (struct c_parm): Add field "loc".
4770 (build_c_parm): Add location_t param.
4771 * c-typeck.c (get_fndecl_argument_location): New function.
4772 (inform_for_arg): New function.
4773 (convert_for_assignment): Use inform_for_arg when dealing with
4776 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4778 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4780 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4781 don't SET_DECL_C_BIT_FIELD here.
4784 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4785 instead of trying to set just TREE_READONLY manually.
4787 2017-09-16 Tom de Vries <tom@codesourcery.com>
4790 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4793 2017-09-15 Joseph Myers <joseph@codesourcery.com>
4796 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4798 (build_conditional_expr): For C11, generate result with excess
4799 precision when one argument is an integer and the other is of a
4800 type using excess precision.
4802 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4804 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4806 2017-09-13 Marek Polacek <polacek@redhat.com>
4809 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4810 than expr.original_type.
4812 2017-09-12 Nathan Sidwell <nathan@acm.org>
4814 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4815 resort_sorted_fields): Moved from c-family/c-common.c.
4816 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4818 2017-09-01 Joseph Myers <joseph@codesourcery.com>
4821 * c-typeck.c (build_atomic_assign): Handle argument with excess
4822 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4823 argument passed to build_binary_op and convert_for_assignment but
4824 not for call to c_fully_fold.
4825 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4826 Ensure build_binary_op is called with argument with original
4827 semantic type. Avoid calling c_fully_fold with an
4828 EXCESS_PRECISION_EXPR from build_binary_op.
4830 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4833 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4835 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4836 Alan Hayward <alan.hayward@arm.com>
4837 David Sherwood <david.sherwood@arm.com>
4839 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4840 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4841 m1 and m2 to the signed equivalent of a fixed-point
4844 2017-08-24 David Malcolm <dmalcolm@redhat.com>
4846 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4847 than CAN_HAVE_LOCATION_P when determining whether to use the
4848 location_t value within "value".
4850 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4852 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4853 rather than peeking the location of the first token.
4854 * c-tree.h (c_expr::get_location): New method.
4856 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4858 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4859 to check_function_arguments.
4861 2017-08-18 Marek Polacek <polacek@redhat.com>
4863 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4866 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4869 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4870 (check_bitfield_type_and_width): Don't allow bit-field with
4871 warn_if_not_aligned type.
4873 2017-08-14 Martin Sebor <msebor@redhat.com>
4876 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4878 2017-08-11 Marek Polacek <polacek@redhat.com>
4881 * c-decl.c (pushtag): Only print inform if the warning was printed.
4882 (grokdeclarator): Likewise.
4884 2017-08-10 David Malcolm <dmalcolm@redhat.com>
4886 * c-parser.c (c_parser_error): Rename to...
4887 (c_parser_error_richloc): ...this, making static, and adding
4888 "richloc" parameter, passing it to the c_parse_error call,
4889 rather than calling c_parser_set_source_position_from_token.
4890 (c_parser_error): Reintroduce, reimplementing in terms of the
4891 above, converting return type from void to bool.
4892 (class token_pair): New class.
4893 (struct matching_paren_traits): New struct.
4894 (matching_parens): New typedef.
4895 (struct matching_brace_traits): New struct.
4896 (matching_braces): New typedef.
4897 (get_matching_symbol): New function.
4898 (c_parser_require): Add param MATCHING_LOCATION, using it to
4899 highlight matching "opening" tokens for missing "closing" tokens.
4900 (c_parser_skip_until_found): Likewise.
4901 (c_parser_static_assert_declaration_no_semi): Convert explicit
4902 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4903 class matching_parens, so that the pertinent open parenthesis is
4904 highlighted when there are problems locating the close
4906 (c_parser_struct_or_union_specifier): Likewise.
4907 (c_parser_typeof_specifier): Likewise.
4908 (c_parser_alignas_specifier): Likewise.
4909 (c_parser_simple_asm_expr): Likewise.
4910 (c_parser_braced_init): Likewise, for matching_braces.
4911 (c_parser_paren_condition): Likewise, for matching_parens.
4912 (c_parser_switch_statement): Likewise.
4913 (c_parser_for_statement): Likewise.
4914 (c_parser_asm_statement): Likewise.
4915 (c_parser_asm_operands): Likewise.
4916 (c_parser_cast_expression): Likewise.
4917 (c_parser_sizeof_expression): Likewise.
4918 (c_parser_alignof_expression): Likewise.
4919 (c_parser_generic_selection): Likewise.
4920 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4921 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4922 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4923 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4924 c_parser_skip_until_found call.
4925 (c_parser_objc_class_definition): Use class matching_parens as
4927 (c_parser_objc_method_decl): Likewise.
4928 (c_parser_objc_try_catch_finally_statement): Likewise.
4929 (c_parser_objc_synchronized_statement): Likewise.
4930 (c_parser_objc_at_property_declaration): Likewise.
4931 (c_parser_oacc_wait_list): Likewise.
4932 (c_parser_omp_var_list_parens): Likewise.
4933 (c_parser_omp_clause_collapse): Likewise.
4934 (c_parser_omp_clause_default): Likewise.
4935 (c_parser_omp_clause_if): Likewise.
4936 (c_parser_omp_clause_num_threads): Likewise.
4937 (c_parser_omp_clause_num_tasks): Likewise.
4938 (c_parser_omp_clause_grainsize): Likewise.
4939 (c_parser_omp_clause_priority): Likewise.
4940 (c_parser_omp_clause_hint): Likewise.
4941 (c_parser_omp_clause_defaultmap): Likewise.
4942 (c_parser_oacc_single_int_clause): Likewise.
4943 (c_parser_omp_clause_ordered): Likewise.
4944 (c_parser_omp_clause_reduction): Likewise.
4945 (c_parser_omp_clause_schedule): Likewise.
4946 (c_parser_omp_clause_num_teams): Likewise.
4947 (c_parser_omp_clause_thread_limit): Likewise.
4948 (c_parser_omp_clause_aligned): Likewise.
4949 (c_parser_omp_clause_linear): Likewise.
4950 (c_parser_omp_clause_safelen): Likewise.
4951 (c_parser_omp_clause_simdlen): Likewise.
4952 (c_parser_omp_clause_depend): Likewise.
4953 (c_parser_omp_clause_map): Likewise.
4954 (c_parser_omp_clause_device): Likewise.
4955 (c_parser_omp_clause_dist_schedule): Likewise.
4956 (c_parser_omp_clause_proc_bind): Likewise.
4957 (c_parser_omp_clause_uniform): Likewise.
4958 (c_parser_omp_for_loop): Likewise.
4959 (c_parser_cilk_clause_vectorlength): Likewise.
4960 (c_parser_cilk_clause_linear): Likewise.
4961 (c_parser_transaction_expression): Likewise.
4962 * c-parser.h (c_parser_require): Add param matching_location with
4963 default UNKNOWN_LOCATION.
4964 (c_parser_error): Convert return type from void to bool.
4965 (c_parser_skip_until_found): Add param matching_location with
4966 default UNKNOWN_LOCATION.
4968 2017-08-09 Marek Polacek <polacek@redhat.com>
4970 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4971 * c-tree.h (build_external_ref): Update declaration.
4972 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4973 (build_external_ref): Change the type of a parameter to bool.
4974 (parser_build_binary_op): Use true/false instead of 1/0.
4975 (pointer_diff): Likewise.
4976 (build_modify_expr): Likewise.
4977 (set_designator): Change the type of a parameter to bool.
4978 (set_init_index): Use true/false instead of 1/0.
4979 (set_init_label): Likewise.
4980 (output_init_element): Change the type of a parameter to bool.
4981 (output_pending_init_elements): Use true/false instead of 1/0.
4982 (process_init_element): Likewise.
4983 (build_binary_op): Change the type of a parameter to bool.
4985 2017-08-09 Marek Polacek <polacek@redhat.com>
4988 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4989 Call emit_diagnostic_valist instead of pedwarn.
4990 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4991 Print the relevant types in diagnostics.
4993 2017-08-09 Marek Polacek <polacek@redhat.com>
4996 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
4997 build_conditional_expr.
4998 * c-parser.c (c_parser_conditional_expression): Create locations for
4999 EXP1 and EXP2 from their source ranges. Pass the locations down to
5000 build_conditional_expr.
5001 * c-tree.h (build_conditional_expr): Update declaration.
5002 * c-typeck.c (build_conditional_expr): Add location_t parameters.
5003 For -Wsign-compare, also print the types.
5005 2017-08-08 Martin Liska <mliska@suse.cz>
5007 * c-convert.c: Include header files.
5008 * c-typeck.c: Likewise.
5010 2017-08-07 Martin Liska <mliska@suse.cz>
5012 * c-parser.c (c_parser_attributes): Canonicalize name of an
5015 2017-08-02 Marek Polacek <polacek@redhat.com>
5018 * c-parser.c (c_parser_unary_expression): Use set_error.
5022 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
5023 warnings. Avoid walking MACRO_MAP_LOCATIONS.
5025 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
5026 Martin Liska <mliska@suse.cz>
5028 * c-typeck.c (c_finish_goto_label): Build gimple predict
5031 2017-07-31 Martin Liska <mliska@suse.cz>
5034 * c-convert.c (convert): Guard condition with flag_sanitize_p
5035 also with current_function_decl non-null equality.
5036 * c-decl.c (grokdeclarator): Likewise.
5037 * c-typeck.c (build_binary_op): Likewise.
5039 2017-07-25 Marek Polacek <polacek@redhat.com>
5041 * c-decl.c (grokfield): Remove local variable.
5043 2017-07-25 Marek Polacek <polacek@redhat.com>
5046 * c-parser.c (c_parser_else_body): Don't warn about multistatement
5047 macro expansion if the body is in { }.
5048 (c_parser_while_statement): Likewise.
5049 (c_parser_for_statement): Likewise.
5051 2017-07-18 Nathan Sidwell <nathan@acm.org>
5053 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
5055 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5057 * c-decl.c (implicitly_declare): When suggesting a missing
5058 #include, provide a fix-it hint.
5060 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5062 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
5063 and call that instead.
5064 * c-tree.h (selftest::run_c_tests): New decl.
5066 2017-06-26 Marek Polacek <polacek@redhat.com>
5069 * c-parser.c (c_parser_if_body): Set the location of the
5070 body of the conditional after parsing all the labels. Call
5071 warn_for_multistatement_macros.
5072 (c_parser_else_body): Likewise.
5073 (c_parser_switch_statement): Likewise.
5074 (c_parser_while_statement): Likewise.
5075 (c_parser_for_statement): Likewise.
5076 (c_parser_statement): Add a default argument. Save the location
5077 after labels have been parsed.
5078 (c_parser_c99_block_statement): Likewise.
5080 2017-06-19 Richard Biener <rguenther@suse.de>
5082 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5083 negated _Literals to parse _Literal (int) -1.
5085 2017-06-13 Martin Liska <mliska@suse.cz>
5088 * c-convert.c (convert): Use sanitize_flags_p.
5089 * c-decl.c (grokdeclarator): Likewise.
5090 * c-typeck.c (convert_for_assignment): Likewise.
5091 (c_finish_return): Likewise.
5092 (build_binary_op): Likewise.
5094 2017-06-08 Jakub Jelinek <jakub@redhat.com>
5097 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
5098 to sizetype before size_binop.
5100 2017-06-07 Jakub Jelinek <jakub@redhat.com>
5102 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
5105 2017-06-06 Marek Polacek <polacek@redhat.com>
5108 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
5110 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
5112 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5114 * c-parser.c (c_parser_binary_expression): Implement the
5115 -Wsizeof_pointer_div warning.
5116 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
5117 from a parenthesized expression.
5118 (c_parser_expr_list): Use c_last_sizeof_loc.
5119 * c-tree.h (c_last_sizeof_loc): New external.
5120 * c-typeck.c (c_last_sizeof_loc): New variable.
5121 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
5123 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
5126 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5128 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5130 * c-objc-common.c (c_tree_printer): Gain bool and const char **
5133 2017-05-24 Martin Sebor <msebor@redhat.com>
5136 * c-fold.c (c_fully_fold_internal): Adjust.
5137 * c-typeck.c (parser_build_unary_op): Adjust.
5139 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
5141 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
5142 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
5145 2017-05-23 Marek Polacek <polacek@redhat.com>
5147 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
5150 2017-05-22 Jakub Jelinek <jakub@redhat.com>
5152 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
5153 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
5154 it returned invariant. Call tree_invariant_p unconditionally
5155 afterwards to decide whether to return expr or op0.
5157 2017-05-22 Nathan Sidwell <nathan@acm.org>
5159 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
5161 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
5163 * c-parser.c (c_parser_omp_clause_default): Handle
5164 "OMP_CLAUSE_DEFAULT_PRESENT".
5166 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5168 * config-lang.in (gtfiles): Add c-family/c-format.c.
5170 2017-05-18 Nathan Sidwell <nathan@acm.org>
5172 * c-decl.c (pushdecl_top_level): Delete unused function.
5174 2017-05-18 Marek Polacek <polacek@redhat.com>
5176 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
5177 (check_earlier_gotos): Likewise.
5178 (define_label): Likewise.
5179 (pending_xref_error): Likewise.
5180 (smallest_type_quals_location): Likewise.
5181 (grokdeclarator): Likewise.
5182 (grokparms): Likewise.
5183 (identifier_global_value): Likewise.
5184 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
5185 (find_init_member): Likewise.
5187 2017-05-18 Marek Polacek <polacek@redhat.com>
5189 * c-decl.c (start_decl): Use false/true instead of 0/1.
5190 (grokdeclarator): Likewise.
5191 (finish_struct): Likewise.
5192 (start_function): Change the return type to bool. Use false/true
5194 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
5195 * c-tree.h (start_function): Update.
5196 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
5197 (set_designator): Change the return type to bool. Use false/true
5200 2017-05-17 Marek Polacek <polacek@redhat.com>
5202 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
5203 * c-typeck.c: Likewise.
5205 2017-05-17 Marek Polacek <polacek@redhat.com>
5208 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5209 DECL_IGNORED_P even for non-static compound literals.
5211 2017-05-17 Martin Liska <mliska@suse.cz>
5213 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
5214 use it instead of int type.
5216 2017-05-17 Marek Polacek <polacek@redhat.com>
5218 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
5220 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
5221 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
5222 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
5223 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
5225 (c_parser_conditional_expression): Likewise.
5226 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
5227 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
5228 (process_init_element): Likewise.
5229 (build_binary_op): Likewise.
5230 (handle_omp_array_sections_1): Likewise.
5232 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
5234 * c-parser.c (c_parser_omp_clause_num_gangs)
5235 (c_parser_omp_clause_num_workers)
5236 (c_parser_omp_clause_vector_length): Merge functions into...
5237 (c_parser_oacc_single_int_clause): ... this new function. Adjust
5240 2017-05-11 Nathan Sidwell <nathan@acm.org>
5242 * gimple-parser.c: Don't #include tree-dump.h.
5244 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5247 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5249 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5252 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5253 incorrect __MEM syntax.
5255 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5258 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5261 2017-05-09 Nathan Sidwell <nathan@acm.org>
5263 * c-tree.h (pushdecl): Declare.
5265 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5267 * c-decl.c (warn_defaults_to): Replace report_diagnostic
5268 with diagnostic_report_diagnostic.
5269 * c-errors.c (pedwarn_c99): Likewise.
5270 (pedwarn_c90): Likewise.
5272 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5275 * c-gimplify.c (c_gimplify_expr): Remove calls to
5276 cilk_gimplifY_call_params_in_spawned_fn.
5278 2017-04-25 David Malcolm <dmalcolm@redhat.com>
5280 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5281 hint for removing extra semicolon.
5283 2017-04-21 Jakub Jelinek <jakub@redhat.com>
5286 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5287 enabled, set specs->type to integer_type_node.
5289 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5291 * c-array-notation.c: Fix typo in comment.
5293 2017-03-29 Marek Polacek <polacek@redhat.com>
5296 * c-decl.c (finish_decl): Check VAR_P.
5298 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5301 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5302 * c-typeck.c (c_mark_addressable): Likewise. Look through
5303 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5305 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5307 2017-03-23 Marek Polacek <polacek@redhat.com>
5309 * c-tree.h: Remove a C_RID_YYCODE reference.
5311 2017-03-21 Jakub Jelinek <jakub@redhat.com>
5314 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5315 optional COMPOUND_EXPR with ubsan instrumentation.
5317 2017-03-17 Marek Polacek <polacek@redhat.com>
5319 * c-parser.c: Add C11 references.
5321 2017-03-15 Marek Polacek <polacek@redhat.com>
5323 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5325 2017-03-11 Marek Polacek <polacek@redhat.com>
5327 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
5329 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5331 PR translation/79848
5332 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5334 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5336 2017-03-09 Marek Polacek <polacek@redhat.com>
5339 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5340 parameter declarations with initializers.
5342 2017-03-09 Jakub Jelinek <jakub@redhat.com>
5345 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5348 2017-03-07 Jakub Jelinek <jakub@redhat.com>
5351 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5352 for "may only be used in compound statements" diagnostics, change it
5353 such that the same translatable string is used for all pragmas. For
5354 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5356 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5357 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5358 "may only be used in compound statements" diagnostics, such that the
5359 same translatable string is used for all pragmas.
5361 2017-03-04 Marek Polacek <polacek@redhat.com>
5364 * c-decl.c (implicit_decl_warning): Add missing space.
5366 2017-03-03 Marek Polacek <polacek@redhat.com>
5369 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5370 current_function_prototype_arg_types is error_mark_node. Fix
5371 formatting. Use TREE_VALUE instead of TREE_TYPE.
5373 2017-03-03 Jakub Jelinek <jakub@redhat.com>
5376 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5377 %<min%> or %<max%> in the diagnostics, instead mention identifier.
5378 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5382 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5383 instead of %<_Generic>.
5384 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5385 (c_parser_omp_target_exit_data): Use %<release%> instead of
5388 2017-02-28 Jakub Jelinek <jakub@redhat.com>
5390 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5391 instead of just cond ? "..." : "...".
5392 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5393 for "enter"/"exit" keyword.
5394 (c_finish_oacc_routine): Don't use %s to supply portions of the
5397 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5400 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5401 handle -Wrestrict here.
5402 * c-typeck.c (build_function_call_vec): Adjust
5403 check_function_arguments caller.
5405 2017-02-23 Richard Biener <rguenther@suse.de>
5408 * gimple-parser.c (c_parser_gimple_statement): Use set_error
5409 to initialize c_exprs to return.
5410 (c_parser_gimple_binary_expression): Likewise.
5411 (c_parser_gimple_unary_expression): Likewise.
5412 (c_parser_gimple_postfix_expression): Likewise.
5414 2017-02-22 Marek Polacek <polacek@redhat.com>
5417 * c-typeck.c (convert_arguments): Handle error_mark_node.
5419 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5421 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5422 value of c_parser_parse_ssa_name against error_mark_node and emit
5423 error if ssa name is anonymous and written as default definition.
5425 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5427 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5430 2017-02-16 Jakub Jelinek <jakub@redhat.com>
5433 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5434 ignore #pragma omp target even when not followed by identifier.
5436 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5438 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5439 (c_parser_gimple_unary_expression): Likewise.
5441 2017-02-13 Jakub Jelinek <jakub@redhat.com>
5443 * c-parser.c (c_parser_oacc_declare): Add missing space in
5446 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5449 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5450 set_c_expr_source_range when parsing ssa-name.
5452 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
5453 Richard Biener <rguenther@suse.de>
5455 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5456 building IL when arguments are error_mark_node.
5457 (c_parser_gimple_unary_expression): Likewise.
5458 (c_parser_gimple_if_stmt): Likewise.
5459 (c_parser_gimple_switch_stmt): Likewise.
5460 (c_parser_gimple_return_stmt): Likewise.
5461 (c_parser_parse_ssa_name): When name lookup fails do not build
5462 an SSA name. Use undeclared rather than not declared in error
5465 2017-02-09 Marek Polacek <polacek@redhat.com>
5468 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5469 instead of c_parser_skip_until_found.
5471 2017-02-09 Jakub Jelinek <jakub@redhat.com>
5474 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5475 symtab_node::get on automatic variables.
5477 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5478 Chung-Lin Tang <cltang@codesourcery.com>
5480 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5481 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5483 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5485 2017-02-07 Richard Biener <rguenther@suse.de>
5487 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5488 (c_parser_gimple_postfix_expression_after_primary):
5489 Do not use c_build_function_call_vec to avoid folding and promotion.
5492 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5495 * c-decl.c (pop_scope): Pass main_input_filename to
5496 build_translation_unit_decl.
5498 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5500 * c-parser.c: Include "read-rtl-function.h" and
5502 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5503 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5504 production. Update for renaming of field "gimple_pass" to
5505 "gimple_or_rtl_pass". If __RTL was seen, call
5506 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5507 to an auto_timevar, to cope with early exit.
5508 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5509 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5510 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5512 (c_parser_parse_rtl_body): New function.
5513 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5514 (struct c_declspecs): Rename field "gimple_pass" to
5515 "gimple_or_rtl_pass". Add field "rtl_p".
5516 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5517 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5518 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5519 (c_parser_gimple_or_rtl_pass_list): ...this.
5521 2017-01-20 Marek Polacek <polacek@redhat.com>
5524 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5526 2017-01-13 Richard Biener <rguenther@suse.de>
5528 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5531 2017-01-13 Richard Biener <rguenther@suse.de>
5533 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5534 _Literal ( type-name ) number.
5536 2017-01-12 Richard Biener <rguenther@suse.de>
5538 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5541 2017-01-11 Jakub Jelinek <jakub@redhat.com>
5544 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5547 2017-01-11 Richard Biener <rguenther@suse.de>
5550 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5551 returns on parse errors.
5553 2017-01-04 Marek Polacek <polacek@redhat.com>
5556 * c-parser.c (c_parser_postfix_expression): Mark zero character
5557 constants by setting original_type in c_expr.
5558 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5559 with a zero character constant.
5560 (char_type_p): New function.
5562 2017-01-04 David Malcolm <dmalcolm@redhat.com>
5564 * c-parser.c (c_parser_declaration_or_fndef): Create a
5565 rich_location at init_loc and parse it to start_init.
5566 (last_init_list_comma): New global.
5567 (c_parser_braced_init): Update last_init_list_comma when parsing
5568 commas. Pass it to pop_init_level. Pass location of closing
5569 brace to pop_init_level.
5570 (c_parser_postfix_expression_after_paren_type): Create a
5571 rich_location at type_loc and parse it to start_init.
5572 (c_parser_omp_declare_reduction): Likewise for loc.
5573 * c-tree.h (start_init): Add rich_location * param.
5574 (pop_init_level): Add location_t param.
5575 * c-typeck.c (struct initializer_stack): Add field
5576 "missing_brace_richloc".
5577 (start_init): Add richloc param, use it to initialize
5578 the stack node's missing_brace_richloc.
5579 (last_init_list_comma): New decl.
5580 (finish_implicit_inits): Pass last_init_list_comma to
5582 (push_init_level): When finding missing open braces, add fix-it
5583 hints to the richloc.
5584 (pop_init_level): Add "insert_before" param and pass it
5585 when calling pop_init_level. Add fixits about missing
5586 close braces to any richloc. Use the richloc for the
5587 -Wmissing-braces warning.
5588 (set_designator): Pass last_init_list_comma to pop_init_level.
5589 (process_init_element): Likewise.
5591 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5593 Update copyright years.
5595 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5598 * c-typeck.c (build_function_call_vec): If check_function_arguments
5599 returns true, set TREE_NO_WARNING on CALL_EXPR.
5602 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5603 to *expr instead of overwriting it.
5605 2016-12-20 Richard Biener <rguenther@suse.de>
5607 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5609 (c_parser_gimple_statement): Only build assigns for non-error
5611 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5613 2016-12-14 Martin Jambor <mjambor@suse.cz>
5615 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5617 (c_finish_oacc_routine): Adjusted call to
5618 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5619 to use their new names.
5620 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5622 (c_parser_oacc_update): Likewise.
5623 (c_parser_omp_simd): Likewise.
5624 (c_parser_omp_target_update): Likewise.
5625 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5626 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5628 (c_finish_omp_cancellation_point): Likewise.
5629 * gimple-parser.c: Do not include omp-low.h
5631 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5632 James Norris <jnorris@codesourcery.com>
5634 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5635 EXIT_DATA,WAIT} are not used in compound statements.
5636 (c_parser_oacc_enter_exit_data): Update diagnostics.
5638 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5641 * c-decl.c (diagnose_mismatched_decls): Use
5642 OPT_Wbuiltin_declaration_mismatch here too.
5644 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
5645 Alan Hayward <alan.hayward@arm.com>
5646 David Sherwood <david.sherwood@arm.com>
5648 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5649 (make_label, finish_struct): Likewise.
5651 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5652 Richard Biener <rguenther@suse.de>
5654 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5655 * config-lang.in (gtfiles): Add c/c-parser.h.
5656 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5657 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5658 * c-parser.c (enum c_id_kind, struct c_token,
5659 c_parser_next_token_is, c_parser_next_token_is_not,
5660 c_parser_next_token_is_keyword,
5661 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5663 * c-parser.h: ... new header.
5664 * c-parser.c: Include c-parser.h and gimple-parser.h.
5665 (c_parser_peek_token, c_parser_peek_2nd_token,
5666 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5667 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5668 c_parser_error, c_parser_require, c_parser_skip_until_found,
5669 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5670 c_parser_type_name): Export.
5671 (c_parser_tokens_buf): New function.
5672 (c_parser_error): Likewise.
5673 (c_parser_set_error): Likewise.
5674 (c_parser_declspecs): Handle RID_GIMPLE.
5675 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5676 via c_parser_parse_gimple_body.
5677 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5678 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5679 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5680 c_parser_error, c_parser_require, c_parser_skip_until_found,
5681 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5682 c_parser_type_name): Declare.
5683 (struct c_parser): Declare forward.
5684 (c_parser_tokens_buf): Declare.
5685 (c_parser_error): Likewise.
5686 (c_parser_set_error): Likewise.
5687 * gimple-parser.c: New file.
5688 * gimple-parser.h: Likewise.
5690 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5693 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5696 2016-09-11 Le-Chun Wu <lcwu@google.com>
5697 Mark Wielaard <mjw@redhat.com>
5699 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5700 to the given -Wshadow= variant.
5702 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5704 * c-typeck.c: Include memmodel.h.
5706 2016-10-13 Jakub Jelinek <jakub@redhat.com>
5709 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5710 instead of lhd_return_null_tree_v.
5712 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5715 * c-decl.c (smallest_type_quals_location): New static function.
5716 (grokdeclarator): Try to find the correct location for an ignored
5719 2016-09-26 Marek Polacek <polacek@redhat.com>
5722 * c-decl.c (pop_scope): Add gcc_fallthrough.
5724 2016-09-26 Marek Polacek <polacek@redhat.com>
5727 * c-parser.c (struct c_token): Add flags field.
5728 (c_lex_one_token): Pass it to c_lex_with_flags.
5729 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5730 into IFN_FALLTHROUGH.
5731 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5732 attribute fallthrough after a case label or default label.
5733 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5735 2016-09-24 Marek Polacek <polacek@redhat.com>
5738 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5739 have boolean value. Warn about ++/-- on booleans.
5741 2016-09-23 Jakub Jelinek <jakub@redhat.com>
5743 * c-parser.c (incomplete_record_decls): Remove unnecessary
5744 = vNULL initialization of file scope vec.
5746 2016-09-16 Marek Polacek <polacek@redhat.com>
5748 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5750 2016-09-14 Marek Polacek <polacek@redhat.com>
5752 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5753 (fix_array_notation_expr): Likewise.
5754 * c-decl.c (finish_decl): Likewise.
5755 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5756 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5757 (function_to_pointer_conversion): Use false instead of 0.
5758 (convert_lvalue_to_rvalue): Likewise.
5759 (parser_build_unary_op): Likewise.
5760 (build_atomic_assign): Likewise.
5761 (build_unary_op): Change nonconvert parameter type to bool, use
5762 true/false instead of 1/0.
5763 (build_binary_op): Use true instead of 1.
5765 2016-09-13 David Malcolm <dmalcolm@redhat.com>
5767 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5768 of add_fixit_insert to add_fixit_insert_before.
5770 2016-09-13 Marek Polacek <polacek@redhat.com>
5772 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5775 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5778 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5779 COMPOUND_EXPR to warn_for_omitted_condop.
5781 2016-09-07 David Malcolm <dmalcolm@redhat.com>
5783 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5784 c_get_substring_location for this new langhook.
5786 2016-09-02 Jakub Jelinek <jakub@redhat.com>
5789 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5791 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5792 instead of mark_exp_read on low_bound/length expression.
5793 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5794 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5795 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5796 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5797 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5798 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5799 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5800 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5801 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5802 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5803 instead of mark_expr_read.
5804 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5805 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5806 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5807 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5808 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5809 array section bases outside of depend clause, for depend clause
5810 use convert_lvalue_to_rvalue on the base.
5811 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5812 linear, aligned, map, to and from clauses.
5813 (c_omp_clause_copy_ctor): New function.
5815 2016-09-01 Marek Polacek <polacek@redhat.com>
5818 * c-typeck.c (composite_type): Add FALLTHRU comment.
5820 2016-08-31 David Malcolm <dmalcolm@redhat.com>
5822 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5823 to the insertion fixits for "struct", "union", and "enum".
5825 2016-08-30 David Malcolm <dmalcolm@redhat.com>
5827 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5828 rather than add_fixit_misspelled_id.
5829 (undeclared_variable): Likewise.
5830 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5831 now-redundant "here" params from add_fixit_insert method calls.
5832 (c_parser_parameter_declaration): Likewise.
5833 * c-typeck.c (build_component_ref): Remove now-redundant range
5834 param from add_fixit_replace method calls.
5836 2016-08-25 Marek Polacek <polacek@redhat.com>
5838 * c-typeck.c (parser_build_binary_op): Pass LHS to
5839 warn_logical_not_parentheses.
5841 2016-08-25 Marek Polacek <polacek@redhat.com>
5844 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5845 or _FloatN or _FloatNx is not supported.
5846 (finish_declspecs): Set type to integer_type_node when _FloatN or
5847 _FloatNx is not supported.
5849 2016-08-19 Joseph Myers <joseph@codesourcery.com>
5852 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5853 (struct c_declspecs): Add field floatn_nx_idx.
5854 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5855 and _FloatNx type specifiers.
5856 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5857 (c_parser_declspecs, c_parser_attribute_any_word)
5858 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5859 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5860 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5861 narrower than double.
5863 2016-08-12 Jakub Jelinek <jakub@redhat.com>
5864 Martin Liska <mliska@suse.cz>
5867 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5868 % to determine val element to change. Assert that
5869 wchar_bytes * charwidth fits into val array.
5871 2016-08-12 Marek Polacek <polacek@redhat.com>
5874 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5875 (c_parser_postfix_expression): Likewise.
5876 * c-typeck.c (build_unary_op): Adjust fall through comment.
5877 (c_mark_addressable): Likewise.
5879 2016-08-11 Jakub Jelinek <jakub@redhat.com>
5882 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5883 array member through typedef, for orig_qual_indirect == 0 clear
5886 2016-08-08 David Malcolm <dmalcolm@redhat.com>
5889 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5890 this up to selftest::run_c_tests.
5891 (selftest::run_c_tests): New function.
5893 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5895 * c-parser.c (struct oacc_routine_data): Add error_seen and
5896 fndecl_seen members.
5897 (c_finish_oacc_routine): Use these.
5898 (c_parser_declaration_or_fndef): Adjust.
5899 (c_parser_oacc_routine): Likewise. Support more C language
5900 constructs, and improve diagnostics. Move pragma context
5902 (c_parser_pragma): ... here.
5904 * c-parser.c (struct oacc_routine_data): New.
5905 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5907 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5908 declare target" attribute.
5910 2016-08-01 Jan Beulich <jbeulich@suse.com>
5912 * c-fold.c (c_fully_fold_internal): Also emit shift count
5913 warnings for vector types.
5914 * c-typeck.c (build_binary_op): Likewise.
5916 2016-07-29 Marek Polacek <polacek@redhat.com>
5919 * c-decl.c (finish_struct): Rephrase an error message.
5922 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5923 to error node for invalid code.
5926 * c-decl.c (implicitly_declare): Return decl early not only for
5927 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5929 2016-07-29 Jakub Jelinek <jakub@redhat.com>
5932 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5933 on GNU extern inline functions.
5935 2016-07-29 Marek Polacek <polacek@redhat.com>
5938 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5941 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
5943 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5945 2016-07-20 David Malcolm <dmalcolm@redhat.com>
5947 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5949 (best_macro_match): Likewise, converting from a typedef to a
5951 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5952 (lookup_name_fuzzy): Update for change of best_macro_match to a
5953 subclass with a ctor that calls cpp_forall_identifiers.
5955 2016-07-20 David Malcolm <dmalcolm@redhat.com>
5957 * c-decl.c (implicit_decl_warning): Update for conversion of
5958 return type of lookup_name_fuzzy to const char *.
5959 (undeclared_variable): Likewise.
5960 (lookup_name_fuzzy): Convert return type from tree to
5962 * c-parser.c (c_parser_declaration_or_fndef): Update for
5963 conversion of return type of lookup_name_fuzzy to const char *.
5964 (c_parser_parameter_declaration): Likewise.
5966 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5968 * c-parser.c (c_parser_oacc_declare): Don't scan for
5970 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5971 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5972 zero-length subarrays.
5974 2016-07-15 Jakub Jelinek <jakub@redhat.com>
5977 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5978 instead of FUZZY_LOOKUP_NAME.
5979 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5980 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5982 2016-07-14 Jakub Jelinek <jakub@redhat.com>
5985 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5987 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5989 * c-parser.c (c_parser_generic_selection): Make type of variable
5991 (c_parser_omp_declare_simd): Likewise.
5993 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5995 * c-decl.c (struct c_struct_parse_info): Change member types
5996 from vec to auto_vec.
5997 (start_struct): Adjust.
5998 (finish_struct): Likewise.
6000 2016-07-02 Jakub Jelinek <jakub@redhat.com>
6003 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
6005 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
6007 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
6008 Move pragma context checking into...
6009 (c_parser_omp_cancellation_point): ... here, and improve
6010 diagnostic messages.
6011 * c-typeck.c (c_finish_omp_cancel)
6012 (c_finish_omp_cancellation_point): Improve diagnostic messages.
6014 2016-06-29 Jakub Jelinek <jakub@redhat.com>
6017 * c-typeck.c (c_build_qualified_type): Don't clear
6018 C_TYPE_INCOMPLETE_VARS for the main variant.
6020 2016-06-28 Martin Sebor <msebor@redhat.com>
6023 * c-typeck.c (output_init_element): Diagnose incompatible types
6024 before non-constant initializers.
6026 2016-06-28 Jakub Jelinek <jakub@redhat.com>
6028 * Make-lang.in: Don't cat ../stage_current if it does not exist.
6030 2016-06-23 Andi Kleen <ak@linux.intel.com>
6032 * Make-lang.in: Add support for autofdo.
6034 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6037 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
6038 (implicit_decl_warning): When issuing warnings for implicit
6039 declarations, attempt to provide a suggestion via
6041 (undeclared_variable): Likewise when issuing errors.
6042 (lookup_name_in_scope): Likewise.
6043 (struct edit_distance_traits<cpp_hashnode *>): New struct.
6044 (best_macro_match): New typedef.
6045 (find_closest_macro_cpp_cb): New function.
6046 (lookup_name_fuzzy): New function.
6047 * c-parser.c: Include gcc-rich-location.h.
6048 (c_token_starts_typename): Split out case CPP_KEYWORD into...
6049 (c_keyword_starts_typename): ...this new function.
6050 (c_parser_declaration_or_fndef): When issuing errors about
6051 missing "struct" etc, add a fixit. For other kinds of errors,
6052 attempt to provide a suggestion via lookup_name_fuzzy.
6053 (c_parser_parms_declarator): When looking ahead to detect typos in
6054 type names, also reject CPP_KEYWORD.
6055 (c_parser_parameter_declaration): When issuing errors about
6056 unknown type names, attempt to provide a suggestion via
6058 * c-tree.h (c_keyword_starts_typename): New prototype.
6060 2016-06-20 Joseph Myers <joseph@codesourcery.com>
6063 * c-typeck.c (build_conditional_expr): Return error_mark_node if
6064 c_common_type returns error_mark_node.
6066 2016-06-19 Martin Sebor <msebor@redhat.com>
6069 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
6070 __alignof__ (expression).
6072 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6074 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
6076 2016-06-14 David Malcolm <dmalcolm@redhat.com>
6078 * c-typeck.c (build_component_ref): Simplify fixit code by
6079 using gcc_rich_location::add_fixit_misspelled_id.
6080 (set_init_label): Likewise.
6082 2016-06-13 David Malcolm <dmalcolm@redhat.com>
6084 * c-parser.c (c_parser_initelt): Provide location of name for new
6085 location_t param of set_init_label.
6086 * c-tree.h (set_init_label): Add location_t param.
6087 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
6088 param and use it when issuing error messages about unrecognized
6089 field names. Attempt to provide a fixit hint if appropriate,
6090 otherwise update the error message to provide the type name.
6092 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
6095 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
6098 2016-06-08 Martin Sebor <msebor@redhat.com>
6099 Jakub Jelinek <jakub@redhat.com>
6103 * c-typeck.c (convert_arguments): Don't promote last argument
6104 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6106 2016-06-08 Marek Polacek <polacek@redhat.com>
6109 * c-decl.c (grokdeclarator): Check TYPE_P.
6112 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
6115 2016-06-07 David Malcolm <dmalcolm@redhat.com>
6117 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
6118 and structure element reference, capture the location of the
6119 element name token and pass it to build_component_ref.
6120 (c_parser_postfix_expression_after_primary): Likewise for
6121 structure element dereference.
6122 (c_parser_omp_variable_list): Likewise for
6123 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
6124 * c-tree.h (build_component_ref): Add location_t param.
6125 * c-typeck.c (build_component_ref): Add location_t param
6126 COMPONENT_LOC. Use it, if available, when issuing hints about
6127 mispelled member names to provide a fixit replacement hint.
6129 2016-06-06 Marek Polacek <polacek@redhat.com>
6132 * c-parser.c (c_parser_direct_declarator): Set location.
6134 2016-06-06 Marek Polacek <polacek@redhat.com>
6136 * c-typeck.c (comptypes_internal): Handle comparisons of
6137 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
6138 TYPE_REF_CAN_ALIAS_ALL.
6140 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
6142 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
6143 arguments as addressable when async clause exists.
6145 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6148 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
6149 when combined with target construct.
6151 2016-05-26 Jakub Jelinek <jakub@redhat.com>
6153 * c-parser.c (c_parser_omp_clause_schedule): Warn if
6154 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6156 2016-05-25 Marek Polacek <polacek@redhat.com>
6159 * c-decl.c (c_make_fname_decl): Don't check seen_error.
6162 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
6164 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
6166 * c-parser.c (c_parser_oacc_declare): Add support for
6167 GOMP_MAP_FIRSTPRIVATE_POINTER.
6168 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
6169 argument with enum c_omp_region_type ort.
6170 (handle_omp_array_sections): Likewise. Update call to
6171 handle_omp_array_sections_1.
6172 (c_finish_omp_clauses): Add specific errors and warning messages for
6173 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
6174 call to handle_omp_array_sections.
6176 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
6178 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
6180 2016-05-24 Richard Biener <rguenther@suse.de>
6184 * c-typeck.c (build_array_ref): Do not complain about indexing
6185 non-lvalue vectors. Adjust for function name change.
6187 2016-05-20 Martin Sebor <msebor@redhat.com>
6190 * c-typeck.c (error_init): Use
6191 expansion_point_location_if_in_system_header.
6192 (warning_init): Same.
6194 2016-05-19 David Malcolm <dmalcolm@redhat.com>
6197 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
6199 (c_parser_postfix_expression): Likewise.
6200 * c-tree.h (c_expr::set_error): New method.
6201 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
6202 that result's range is initialized.
6204 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6206 * c-typeck.c (parser_build_unary_op): Fix formatting.
6208 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
6210 * c-decl.c (grokdeclarator): Remove errmsg and use of
6211 targetm.invalid_return_type.
6212 (grokparms): Remove errmsg and use of
6213 targetm.invalid_parameter_type.
6215 2016-05-13 Joseph Myers <joseph@codesourcery.com>
6217 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
6218 function return type.
6220 2016-05-12 Marek Polacek <polacek@redhat.com>
6223 * c-decl.c (build_compound_literal): Pass LOC down to
6224 c_incomplete_type_error.
6225 * c-tree.h (require_complete_type): Adjust declaration.
6226 (c_incomplete_type_error): Likewise.
6227 * c-typeck.c (require_complete_type): Add location parameter, pass it
6228 down to c_incomplete_type_error.
6229 (c_incomplete_type_error): Add location parameter, pass it down to
6231 (build_component_ref): Pass location down to c_incomplete_type_error.
6232 (default_conversion): Pass location down to require_complete_type.
6233 (build_array_ref): Likewise.
6234 (build_function_call_vec): Likewise.
6235 (convert_arguments): Likewise.
6236 (build_unary_op): Likewise.
6237 (build_c_cast): Likewise.
6238 (build_modify_expr): Likewise.
6239 (convert_for_assignment): Likewise.
6240 (c_finish_omp_clauses): Likewise.
6242 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6245 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6247 * c-errors.c (pedwarn_c90): Return true if warned.
6248 * c-tree.h (pedwarn_c90): Change return type to bool.
6249 (enum c_declspec_word): Add new enumerator cdw_atomic.
6251 2016-05-11 Marek Polacek <polacek@redhat.com>
6254 * c-decl.c (diagnose_mismatched_decls): Factor out code to
6255 diagnose_mismatched_attributes and call it.
6257 2016-05-10 Marek Polacek <polacek@redhat.com>
6260 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6261 on a declaration following the definition.
6263 2016-05-05 Jakub Jelinek <jakub@redhat.com>
6265 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6266 parse it through to c_parser_c99_block_statement.
6267 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6270 2016-05-04 Marek Polacek <polacek@redhat.com>
6272 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6275 2016-05-04 Marek Polacek <polacek@redhat.com>
6278 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6279 for macro expansions.
6281 2016-05-03 Marek Polacek <polacek@redhat.com>
6284 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6285 check_builtin_function_arguments.
6287 2016-05-03 Richard Biener <rguenther@suse.de>
6289 * Make-lang.in (cc1-checksum.c): For stage-final re-use
6290 the checksum from the previous stage.
6292 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6294 * c-parser.c (c_parser_oacc_all_clauses): Update call to
6295 c_finish_omp_clauses.
6296 (c_parser_omp_all_clauses): Likewise.
6297 (c_parser_oacc_cache): Likewise.
6298 (c_parser_oacc_loop): Likewise.
6299 (omp_split_clauses): Likewise.
6300 (c_parser_omp_declare_target): Likewise.
6301 (c_parser_cilk_all_clauses): Likewise.
6302 (c_parser_cilk_for): Likewise.
6303 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6304 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6306 2016-05-02 Marek Polacek <polacek@redhat.com>
6309 * c-decl.c (grokdeclarator): Diagnose when array's size has an
6312 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6315 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6316 OACC_LOOP_CLAUSE_MASK.
6317 (c_parser_oacc_kernels_parallel): Update call to
6318 c_oacc_split_loop_clauses.
6320 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
6322 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6323 argument to build_modify_expr in two cases.
6325 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6327 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6328 warn_for_memset instead of warning directly here.
6330 2016-04-26 Marek Polacek <polacek@redhat.com>
6333 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6335 (c_parser_for_statement): ... here.
6336 (c_parser_if_statement): Use it.
6337 (c_parser_switch_statement): Use it.
6338 (c_parser_while_statement): Use it.
6341 * c-decl.c (pushdecl): Pass LOCUS down to warning.
6343 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6346 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6347 instead of c_finish_cilk_clauses.
6348 * c-tree.h (c_finish_omp_clauses): Add new default argument.
6349 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
6350 floating-point variables in the linear clause for Cilk Plus.
6352 2016-04-18 Michael Matz <matz@suse.de>
6354 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6355 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6357 2016-04-15 Marek Polacek <polacek@redhat.com>
6360 * c-typeck.c (build_unary_op): Pass location down to error and
6363 2016-04-15 Jakub Jelinek <jakub@redhat.com>
6366 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6368 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6369 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6370 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6371 Adjust c_parser_pragma callers.
6372 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
6374 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6376 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6377 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6378 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6379 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6380 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6381 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6382 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6383 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6385 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
6386 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6389 2016-04-13 Marek Polacek <polacek@redhat.com>
6392 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6394 (c_parser_statement): Likewise.
6395 (c_parser_c99_block_statement): Likewise.
6396 (c_parser_while_statement): Likewise.
6397 (c_parser_for_statement): Likewise.
6398 (c_parser_if_body): Don't set IF_P here.
6399 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
6400 about dangling else here.
6401 * c-tree.h (c_finish_if_stmt): Adjust declaration.
6402 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
6403 warn about dangling else here.
6405 2016-04-04 Marek Polacek <polacek@redhat.com>
6408 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6410 2016-03-31 Marek Polacek <polacek@redhat.com>
6413 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6415 2016-03-18 David Malcolm <dmalcolm@redhat.com>
6418 * c-parser.c (c_parser_postfix_expression): Set the source range
6419 for uses of "__builtin_types_compatible_p".
6421 2016-03-17 Jakub Jelinek <jakub@redhat.com>
6424 * c-typeck.c (composite_type): Don't count void_list_node
6425 into len, if the list is terminated by void_list_node, start
6426 with void_list_node instead of NULL for newargs. Stop
6429 2016-03-16 Marek Polacek <polacek@redhat.com>
6432 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6433 nested functions returning VM types.
6435 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6437 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6438 when calling c_finish_omp_clauses.
6440 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6443 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6446 2016-03-04 Marek Polacek <polacek@redhat.com>
6449 * c-parser.c (c_parser_postfix_expression): Call
6450 c_parser_cast_expression rather than c_parser_postfix_expression.
6452 2016-03-01 Jakub Jelinek <jakub@redhat.com>
6456 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6457 of incomplete decls to error_mark_node.
6459 2016-02-24 Marek Polacek <polacek@redhat.com>
6462 * c-decl.c (finish_decl): Don't update the copy of the type of a
6463 different decl type.
6465 2016-02-23 Jakub Jelinek <jakub@redhat.com>
6468 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6469 in id_kind reclassification.
6471 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6474 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6476 2016-02-16 James Norris <jnorris@codesourcery.com>
6479 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6481 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6483 * c-decl.c (build_null_declspecs): Zero the entire struct.
6486 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6487 callers changed. If nested_p is true, use it to call
6488 finish_implicit_inits.
6489 * c-tree.h (finish_implicit_inits): Declare.
6490 * c-typeck.c (finish_implicit_inits): New function. Move code
6492 (push_init_level): ... here.
6493 (set_designator, process_init_element): Call finish_implicit_inits.
6495 2016-02-11 Jakub Jelinek <jakub@redhat.com>
6498 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6499 arguments for -Waddress warning.
6501 2016-02-04 Jakub Jelinek <jakub@redhat.com>
6504 * c-decl.c (finish_enum): When honoring mode attribute,
6505 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6507 2016-01-29 Jakub Jelinek <jakub@redhat.com>
6510 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6511 all type variants, not just TYPE_MAIN_VARIANT.
6513 2016-01-27 Jakub Jelinek <jakub@redhat.com>
6516 * c-decl.c (c_write_global_declarations_1): Warn with
6517 warn_unused_function if static prototype without definition
6520 2016-01-27 Marek Polacek <polacek@redhat.com>
6523 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6524 to unsigned, if needed. Add -Wsign-compare warning.
6526 2016-01-26 Jakub Jelinek <jakub@redhat.com>
6528 PR tree-optimization/69483
6529 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6531 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6534 * c-tree.h (incomplete_record_decls): Declare.
6535 * c-parser.c (incomplete_record_decls): Define.
6536 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6537 report error if any decl has zero size.
6538 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6539 or enum type to incomplete_record_decls.
6541 2016-01-14 Tom de Vries <tom@codesourcery.com>
6543 PR tree-optimization/68773
6544 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6547 2016-01-14 Marek Polacek <polacek@redhat.com>
6550 * c-decl.c (grokdeclarator): Provide more information for invalid
6553 2016-01-06 David Malcolm <dmalcolm@redhat.com>
6555 * c-parser.c (c_parser_unary_expression): For dereferences, build
6556 a combined location before calling build_indirect_ref, so that
6557 error reports cover the full range, manually updating the c_expr
6560 2016-01-06 Marek Polacek <polacek@redhat.com>
6563 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6564 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6567 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6569 Update copyright years.
6571 2016-01-04 Marek Polacek <polacek@redhat.com>
6574 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6575 optimization to use __atomic_fetch_* built-in if possible.
6577 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6579 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6581 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6584 2015-12-22 Marek Polacek <polacek@redhat.com>
6587 * c-typeck.c (build_component_ref): Warn when acessing elements of
6588 atomic structures or unions.
6590 2015-12-21 David Malcolm <dmalcolm@redhat.com>
6592 * c-typeck.c: Include "gcc-rich-location.h".
6593 (build_binary_op): In the two places that call binary_op_error,
6594 create a gcc_rich_location and populate it with the location of
6595 the binary op and its two operands.
6597 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6599 * c-parser.c (c_parser_statement_after_labels): When calling
6600 c_finish_return, Use the return expression's location if it has
6601 one, falling back to the location of the first token within it.
6602 * c-typeck.c (c_finish_return): When issuing warnings about
6603 the incorrect presence/absence of a return value, issue a note
6604 showing the declaration of the function.
6606 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6608 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6610 (c_parser_peek_nth_token): New function.
6611 (c_parser_peek_conflict_marker): New function.
6612 (c_parser_error): Detect conflict markers and report them as such.
6614 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6616 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6617 to preserve range information for the primary expression
6618 in the call to c_parser_postfix_expression_after_primary.
6620 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6622 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6623 expression location, falling back on the first token location,
6624 rather than always using the latter.
6626 2015-12-16 Marek Polacek <polacek@redhat.com>
6629 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6632 2015-12-15 Marek Polacek <polacek@redhat.com>
6635 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6638 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6640 * c-parser.c (c_parser_alignof_expression): Capture location of
6641 closing parenthesis (if any), or of end of unary expression, and
6642 use it to build a src_range for the expression.
6644 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6647 * c-parser.c (c_parser_get_builtin_args): Add
6648 "out_close_paren_loc" param, and write back to it.
6649 (c_parser_postfix_expression): Capture the closing
6650 parenthesis location for RID_CHOOSE_EXPR,
6651 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6652 RID_BUILTIN_SHUFFLE and use it to set the source range
6653 for such expressions; within RID_BUILTIN_COMPLEX set
6654 the underlying location.
6656 2015-12-07 Marek Polacek <polacek@redhat.com>
6659 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6660 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6662 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6664 * c-tree.h (c_build_va_arg): Adjust prototype.
6665 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6666 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6667 parameter, adjust throughout and issue an error if EXPR is a component
6668 with reverse storage order.
6670 2015-12-02 Jason Merrill <jason@redhat.com>
6672 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6673 (c_fully_fold_internal, decl_constant_value_for_optimization):
6674 Move from c-common.c.
6675 * c-tree.h: Declare decl_constant_value_for_optimization.
6676 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6678 2015-12-02 Joseph Myers <joseph@codesourcery.com>
6681 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6682 following link from declarator to next declarator. Track original
6683 qualified type and pass it to c_build_qualified_type.
6684 * c-typeck.c (c_build_qualified_type): Add arguments
6685 orig_qual_type and orig_qual_indirect.
6687 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6689 * c-parser.c (c_parser_omp_clause_name)
6690 (c_parser_oacc_all_clauses): Alphabetical sorting.
6692 2015-12-02 Jakub Jelinek <jakub@redhat.com>
6695 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6698 2015-12-01 Julian Brown <julian@codesourcery.com>
6699 Cesar Philippidis <cesar@codesourcery.com>
6700 James Norris <James_Norris@mentor.com>
6702 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6703 (c_parser_oacc_clause_use_device): New function.
6704 (c_parser_oacc_all_clauses): Add use_device support.
6705 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6706 (c_parser_oacc_host_data): New function.
6707 (c_parser_omp_construct): Add host_data support.
6708 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6709 * c-typeck.c (c_finish_oacc_host_data): New function.
6710 (c_finish_omp_clauses): Add use_device support.
6712 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
6715 * c-decl.c: Set TYPE_PACKED in variants.
6717 2015-11-27 Martin Liska <mliska@suse.cz>
6720 * c-array-notation.c (fix_builtin_array_notation_fn):
6721 Use release_vec_vec instead of vec::release.
6722 (build_array_notation_expr): Likewise.
6723 (fix_conditional_array_notations_1): Likewise.
6724 (fix_array_notation_expr): Likewise.
6725 (fix_array_notation_call_expr): Likewise.
6727 2015-11-27 Jakub Jelinek <jakub@redhat.com>
6730 * c-parser.c (c_parser_compound_statement_nostart): If
6731 last_label is true, use pragma_stmt instead of pragma_compound
6732 as second c_parser_pragma argument.
6733 (c_parser_omp_ordered, c_parser_omp_target_update,
6734 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6735 false as second argument to c_parser_skip_to_pragma_eol after
6736 diagnosing standalone directives used in pragma_stmt context.
6738 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6740 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6741 with "if (ENABLE_OFFLOADING)".
6743 2015-11-23 David Malcolm <dmalcolm@redhat.com>
6746 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6747 for various Objective-C constructs: Class.name syntax,
6748 @selector(), @protocol(), @encode(), and [] message syntax.
6750 2015-11-20 David Malcolm <dmalcolm@redhat.com>
6753 * c-typeck.c (should_suggest_deref_p): New function.
6754 (build_component_ref): Special-case POINTER_TYPE when
6755 generating a "not a structure of union" error message, and
6756 suggest a "->" rather than a ".", providing a fix-it hint.
6758 2015-11-19 David Malcolm <dmalcolm@redhat.com>
6760 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6761 candidate into a new function, find_closest_identifier.
6763 2015-11-19 Marek Polacek <polacek@redhat.com>
6766 * c-typeck.c (parser_build_binary_op): Properly handle
6767 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6769 2015-11-17 David Malcolm <dmalcolm@redhat.com>
6771 * c-parser.c (set_c_expr_source_range): Bulletproof both
6772 overloaded implementations against NULL expr->value.
6773 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6775 (c_parser_unary_expression): Likewise when handling addresses of
6777 (c_parser_postfix_expression): Likewise for statement expressions,
6778 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6779 __builtin_va_arg, and for __builtin_offset_of.
6780 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6781 src_range using the range of the braced initializer.
6782 (c_parser_transaction_expression): Set src_range for "ret" to a
6783 sane pair of values.
6785 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6787 * c-parser.c (c_finish_omp_declare_simd): Look for
6788 "simd" attribute as well. Update error message.
6790 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6792 * c-parser.c (c_parser_omp_declare_target): Adjust.
6794 2015-11-14 Jakub Jelinek <jakub@redhat.com>
6796 * c-typeck.c (c_finish_omp_clauses): Don't mark
6797 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6799 2015-11-14 Marek Polacek <polacek@redhat.com>
6801 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6802 * c-typeck.c: Likewise.
6804 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6806 * c-decl.c (warn_defaults_to): Pass line_table to
6808 * c-errors.c (pedwarn_c99): Likewise.
6809 (pedwarn_c90): Likewise.
6810 * c-parser.c (set_c_expr_source_range): New functions.
6811 (c_token::get_range): New method.
6812 (c_token::get_finish): New method.
6813 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6814 based on the range from the start of the LHS to the end of the
6816 (c_parser_conditional_expression): Likewise, based on the range
6817 from the start of the cond.value to the end of exp2.value.
6818 (c_parser_binary_expression): Call set_c_expr_source_range on
6819 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6820 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6821 based on the cast_loc through to the end of the expr.
6822 (c_parser_unary_expression): Likewise, based on the
6823 op_loc through to the end of op.
6824 (c_parser_sizeof_expression) Likewise, based on the start of the
6825 sizeof token through to either the closing paren or the end of
6827 (c_parser_postfix_expression): Likewise, using the token range,
6828 or from the open paren through to the close paren for
6829 parenthesized expressions.
6830 (c_parser_postfix_expression_after_primary): Likewise, for
6831 various kinds of expression.
6832 * c-tree.h (struct c_expr): Add field "src_range".
6833 (c_expr::get_start): New method.
6834 (c_expr::get_finish): New method.
6835 (set_c_expr_source_range): New decls.
6836 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6837 on ret for prefix unary ops.
6838 (parser_build_binary_op): Likewise, running from the start of
6839 arg1.value through to the end of arg2.value.
6841 2015-11-13 Marek Polacek <polacek@redhat.com>
6844 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6846 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6848 * c-typeck.c: Include spellcheck.h.
6849 (lookup_field_fuzzy_find_candidates): New function.
6850 (lookup_field_fuzzy): New function.
6851 (build_component_ref): If the field was not found, try using
6852 lookup_field_fuzzy and potentially offer a suggestion.
6854 2015-11-12 James Norris <jnorris@codesourcery.com>
6855 Joseph Myers <joseph@codesourcery.com>
6857 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6858 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6859 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6860 and PRAGMA_OMP_CLAUSE_LINK.
6861 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6862 and PRAGMA_OACC_CLAUSE_LINK.
6863 (OACC_DECLARE_CLAUSE_MASK): New definition.
6864 (c_parser_oacc_declare): New function.
6866 2015-11-12 Marek Polacek <polacek@redhat.com>
6869 * c-parser.c (c_parser_for_statement): Reclassify the token in
6872 2015-11-11 Marek Polacek <polacek@redhat.com>
6876 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6877 checking the size of an array.
6879 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
6881 * c-array-notation.c: Remove unused header files.
6882 * c-aux-info.c: Likewise.
6883 * c-convert.c: Likewise.
6884 * c-decl.c: Likewise.
6885 * c-errors.c: Likewise.
6886 * c-lang.c: Likewise.
6887 * c-objc-common.c: Likewise.
6888 * c-parser.c: Likewise.
6889 * c-typeck.c: Likewise.
6890 * gccspec.c: Likewise.
6892 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6893 Cesar Philippidis <cesar@codesourcery.com>
6894 James Norris <jnorris@codesourcery.com>
6895 Julian Brown <julian@codesourcery.com>
6896 Nathan Sidwell <nathan@codesourcery.com>
6898 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6900 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6901 (c_parser_pragma): Parse 'acc routine'.
6902 (OACC_ROUTINE_CLAUSE_MARK): Define.
6903 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6905 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6908 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6909 location of the backward-goto to the start of the loop body.
6911 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6914 * c-parser.c (c_parser_while_statement): Finish the loop before
6915 parsing ahead for misleading indentation.
6916 (c_parser_for_statement): Likewise.
6918 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6920 * c-decl.c (finish_struct): If the structure has reverse storage
6921 order, rewrite the type of array fields with scalar component. Call
6922 maybe_apply_pragma_scalar_storage_order on entry.
6923 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6924 errors on bit-fields and reverse SSO here and not...
6925 (c_mark_addressable): ...here.
6926 (output_init_element): Adjust call to initializer_constant_valid_p.
6927 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6929 2015-11-06 David Malcolm <dmalcolm@redhat.com>
6931 * c-decl.c (warn_defaults_to): Update for change in signature
6932 of diagnostic_set_info.
6933 * c-errors.c (pedwarn_c99): Likewise.
6934 (pedwarn_c90): Likewise.
6935 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6936 for textinfo::set_location.
6938 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6939 Thomas Schwinge <thomas@codesourcery.com>
6940 James Norris <jnorris@codesourcery.com>
6942 * c-parser.c (c_parser_omp_clause_name): Add support for
6943 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6944 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6945 default(none) in OpenACC.
6946 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6948 (c_parser_oacc_clause_tile): New function.
6949 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6950 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6951 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6953 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6954 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6956 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6957 (c_parser_oacc_update): Update the error message for missing clauses.
6958 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6959 and OMP_CLAUSE_INDEPENDENT.
6961 2015-11-05 Marek Polacek <polacek@redhat.com>
6964 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6965 deal with pre-evaluation on invalid types.
6967 2015-11-05 Jakub Jelinek <jakub@redhat.com>
6968 Ilya Verbin <ilya.verbin@intel.com>
6970 * c-parser.c: Include context.h and gimple-expr.h.
6971 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6972 monotonic together with nonmonotonic.
6973 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6974 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6975 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6976 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6977 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6978 expressions on combined target teams before the target.
6979 (c_parser_omp_declare_target): If decl has "omp declare target" or
6980 "omp declare target link" attribute, and cgraph or varpool node already
6981 exists, then set corresponding flags. Call c_finish_omp_clauses
6982 in the parenthesized extended-list syntax case.
6983 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6985 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6986 on OMP_CLAUSE_REDUCTION array sections.
6987 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6988 into the constant offset, or for variable low-bound using
6989 POINTER_PLUS_EXPR. For structure element based array sections use
6990 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6991 (c_finish_omp_clauses): Drop generic_field_head, structure
6992 elements are now always mapped even as array section bases,
6993 diagnose same var in data sharing and mapping clauses. Diagnose if
6994 linear step on declare simd is neither a constant nor a uniform
6995 parameter. Look through POINTER_PLUS_EXPR for array section
6996 reductions. Diagnose the same var or function appearing multiple
6997 times on the same directive. Fix up wording for the to clause if t
6998 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6999 modifier on kinds other than dynamic or guided or nonmonotonic
7000 modifier together with ordered clause.
7002 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7003 Chung-Lin Tang <cltang@codesourcery.com>
7005 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
7007 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7009 * c-array-notation.c: Reorder #include's and remove duplicates.
7010 * c-aux-info.c: Likewise.
7011 * c-convert.c: Likewise.
7012 * c-decl.c: Likewise.
7013 * c-errors.c: Likewise.
7014 * c-lang.c: Likewise.
7015 * c-objc-common.c: Likewise.
7016 * c-parser.c: Likewise.
7017 * c-typeck.c: Likewise.
7019 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
7022 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
7023 after calling build_qualified_type.
7025 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
7026 Thomas Schwinge <thomas@codesourcery.com>
7027 James Norris <jnorris@codesourcery.com>
7028 Joseph Myers <joseph@codesourcery.com>
7029 Julian Brown <julian@codesourcery.com>
7030 Bernd Schmidt <bschmidt@redhat.com>
7032 * c-parser.c (c_parser_oacc_shape_clause): New.
7033 (c_parser_oacc_simple_clause): New.
7034 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
7035 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
7037 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7038 James Norris <jnorris@codesourcery.com>
7039 Cesar Philippidis <cesar@codesourcery.com>
7043 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
7044 parameters, and handle these. Adjust all users.
7045 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
7047 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
7049 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
7051 (c_finish_omp_construct): Declare function.
7052 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
7053 Merge functions into...
7054 (c_finish_omp_construct): ... this new function.
7056 2015-10-22 Richard Biener <rguenther@suse.de>
7058 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
7059 before folding a MINUS_EXPR.
7061 2015-10-21 Marek Polacek <polacek@redhat.com>
7064 * c-decl.c (start_function): Warn about vararg functions without
7067 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
7069 * c-typeck.c (build_conditional_expr): Use boolean vector
7070 type for vector comparison.
7071 (build_vec_cmp): New.
7072 (build_binary_op): Use build_vec_cmp for comparison.
7074 2015-10-20 Marek Polacek <polacek@redhat.com>
7076 * c-parser.c (is_cilkplus_vector_p): Don't define here.
7078 2015-10-20 Marek Polacek <polacek@redhat.com>
7081 * c-parser.c (c_parser_attributes): Break out of the loop if the
7082 token after an attribute isn't a comma.
7084 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7085 Aldy Hernandez <aldyh@redhat.com>
7087 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
7088 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
7089 (c_parser_omp_variable_list): Handle structure elements for
7090 map, to and from clauses. Handle array sections in reduction
7091 clause. Formatting fixes.
7092 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
7093 if clause modifiers.
7094 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7095 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7096 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
7097 c_parser_omp_clause_is_device_ptr): New functions.
7098 (c_parser_omp_clause_ordered): Parse optional parameter.
7099 (c_parser_omp_clause_reduction): Handle array reductions.
7100 (c_parser_omp_clause_schedule): Parse optional simd modifier.
7101 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
7103 (c_parser_omp_clause_linear): Parse linear clause modifiers.
7104 (c_parser_omp_clause_depend_sink): New function.
7105 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
7106 (c_parser_omp_clause_map): Parse release/delete map kinds and
7107 optional always modifier.
7108 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
7109 and c_finish_omp_clauses callers.
7110 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
7111 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
7112 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
7113 (OMP_CRITICAL_CLAUSE_MASK): Define.
7114 (c_parser_omp_critical): Parse critical clauses.
7115 (c_parser_omp_for_loop): Handle doacross loops, adjust
7116 c_finish_omp_for and c_finish_omp_clauses callers.
7117 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
7118 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
7119 (OMP_FOR_CLAUSE_MASK): Add linear clause.
7120 (c_parser_omp_for): Disallow ordered clause when combined with
7121 distribute. Disallow linear clause when combined with distribute
7122 and not combined with simd.
7123 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
7124 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
7125 parse clauses and if depend clause is found, don't parse a body.
7126 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
7127 Allow target parallel without for after it.
7128 (OMP_TASK_CLAUSE_MASK): Add priority clause.
7129 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
7130 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
7132 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
7133 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
7134 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
7135 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
7137 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
7138 defaultmap and is_device_ptr clauses.
7139 (c_parser_omp_target): Parse target parallel and target simd. Set
7140 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
7141 and target exit data. Diagnose invalid map kinds.
7142 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
7143 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
7145 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
7147 (OMP_TASKLOOP_CLAUSE_MASK): Define.
7148 (c_parser_omp_taskloop): New function.
7149 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
7150 handle PRAGMA_OMP_TASKLOOP.
7151 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
7152 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
7153 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
7154 Add IS_OMP argument, handle structure element bases, diagnose
7155 bitfields, pass IS_OMP recursively, diagnose known zero length
7156 array sections in depend clauses, handle array sections in reduction
7157 clause, diagnose negative length even for pointers.
7158 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
7159 types, pass IS_OMP down to handle_omp_array_sections_1, handle
7160 array sections in reduction clause, set
7161 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
7162 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
7163 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
7164 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
7166 2015-10-06 Marek Polacek <polacek@redhat.com>
7168 * c-parser.c (c_parser_statement_after_labels): Use
7169 protected_set_expr_location.
7170 (c_parser_omp_clause_num_gangs): Likewise.
7171 (c_parser_omp_clause_num_threads): Likewise.
7172 (c_parser_omp_clause_num_workers): Likewise.
7173 (c_parser_omp_clause_vector_length): Likewise.
7174 (c_parser_omp_clause_num_teams): Likewise.
7175 (c_parser_omp_clause_thread_limit): Likewise.
7176 * c-typeck.c (build_c_cast): Likewise.
7177 (c_cast_expr): Likewise.
7179 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7181 * c-typeck.c (c_tree_equal): Use real_equal instead of
7184 2015-10-04 Jason Merrill <jason@redhat.com>
7186 * c-parser.c (c_lex_one_token): Handle @synchronized.
7187 * c-decl.c (match_builtin_function_types): A declaration of a built-in
7188 can change whether the function is transaction_safe.
7190 2015-10-02 Marek Polacek <polacek@redhat.com>
7193 * c-typeck.c (convert_for_assignment): Use the expansion point
7194 location throughout.
7196 2015-10-02 Marek Polacek <polacek@redhat.com>
7199 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
7200 and pass it down to c_parser_if_statement.
7201 (c_parser_else_body): Add CHAIN parameter and pass it down to
7202 c_parser_statement_after_labels.
7203 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
7204 duplicated if-else-if conditions.
7206 2015-10-01 Marek Polacek <polacek@redhat.com>
7208 * c-typeck.c (convert_for_assignment): Improve commentary.
7210 2015-09-30 Marek Polacek <polacek@redhat.com>
7213 * c-typeck.c (c_finish_return): Use the expansion point location for
7214 certain "return with value" warnings.
7216 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7218 * c-parser.c (pragma_lex): Add loc argument.
7220 2015-09-15 Marek Polacek <polacek@redhat.com>
7223 * c-decl.c (tag_exists_p): New function.
7224 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
7225 struct/union/enum keywords are missing.
7226 * c-tree.h (tag_exists_p): Declare.
7228 2015-09-15 Marek Polacek <polacek@redhat.com>
7230 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
7231 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
7232 Return NULL_TREE instead of 0.
7233 (lookup_name): Return NULL_TREE instead of 0.
7234 (lookup_name_in_scope): Likewise.
7235 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
7236 (parser_xref_tag): Use false instead of 0.
7237 (start_struct): Use true instead of 1.
7238 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
7240 2015-09-14 Marek Polacek <polacek@redhat.com>
7242 * c-typeck.c (set_nonincremental_init_from_string): Use
7243 HOST_WIDE_INT_M1U when shifting a negative value.
7245 2015-09-09 Mark Wielaard <mjw@redhat.com>
7247 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7250 2015-09-10 Jakub Jelinek <jakub@redhat.com>
7253 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7254 into OMP_FOR_PRE_BODY rather than before the loop.
7256 2015-09-09 Jakub Jelinek <jakub@redhat.com>
7259 * c-parser.c (c_parser_oacc_all_clauses,
7260 c_parser_omp_all_clauses): Remove invalid clause from
7261 list of clauses even if parser->error is set.
7264 * c-parser.c (c_parser_omp_clause_aligned,
7265 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7267 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7271 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7272 instead of c_parser_unary_expression. If the result is !lvalue_p,
7273 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7275 2015-09-04 Marek Polacek <polacek@redhat.com>
7278 * c-typeck.c (build_binary_op): Don't instrument static initializers.
7280 2015-09-03 Martin Sebor <msebor@redhat.com>
7283 * c-typeck.c (convert_arguments, parser_build_unary_op,
7284 build_conditional_expr, c_cast_expr, convert_for_assignment,
7285 build_binary_op, _objc_common_truthvalue_conversion): Call
7287 (c_decl_implicit): Define.
7289 2015-09-02 Marek Polacek <polacek@redhat.com>
7292 * c-parser.c (c_parser_enum_specifier): Give a better error for
7295 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7297 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7299 2015-08-12 Marek Polacek <polacek@redhat.com>
7301 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7304 2015-08-03 Marek Polacek <polacek@redhat.com>
7307 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7309 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7311 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7313 * c-parser.c (c_parser_if_body): Take token_indent_info
7314 argument. Call warn_for_misleading_indentation even when the
7315 body is a semicolon. Extract token_indent_infos corresponding
7316 to the guard, body and next tokens. Adjust call to
7317 warn_for_misleading_indentation accordingly.
7318 (c_parser_else_body): Likewise.
7319 (c_parser_if_statement): Likewise.
7320 (c_parser_while_statement): Likewise.
7321 (c_parser_for_statement): Likewise.
7323 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
7324 Manuel López-Ibáñez <manu@gcc.gnu.org>
7326 * c-decl.c (get_parm_info): Remove static var. Update warning
7329 2015-07-27 Marek Polacek <polacek@redhat.com>
7333 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7335 2015-07-20 Marek Polacek <polacek@redhat.com>
7338 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7339 (build_binary_op): Warn about left shift overflows.
7341 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7343 * c-array-notation.c: Adjust includes for flags.h changes.
7344 * c-objc-common.c: Likewise.
7346 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7348 * c-array-notation.c: Adjust includes.
7349 * c-aux-info.c: Likewise.
7350 * c-convert.c: Likewise.
7351 * c-decl.c: Likewise.
7352 * c-errors.c: Likewise.
7353 * c-lang.c: Likewise.
7354 * c-objc-common.c: Likewise.
7355 * c-parser.c: Likewise.
7356 * c-typeck.c: Likewise.
7358 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7361 * c-decl.c (finish_function): Call do_warn_unused_parameter.
7363 2015-06-29 Marek Polacek <polacek@redhat.com>
7366 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7367 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
7368 about -Wswitch-bool here.
7369 (do_case): Update c_add_case_label call.
7370 (c_finish_case): Update c_do_switch_warnings call.
7372 2015-06-27 Marek Polacek <polacek@redhat.com>
7374 * c-typeck.c: Use VECTOR_TYPE_P throughout.
7376 2015-06-26 Marek Polacek <polacek@redhat.com>
7378 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7380 * c-typeck.c (array_to_pointer_conversion): Likewise.
7381 (build_unary_op): Likewise.
7382 (c_finish_return): Likewise.
7384 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7386 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7387 * c-parser.c: Likewise.
7389 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7391 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7392 instead of pointer_hash.
7393 (detect_field_duplicates): Likewise.
7395 2015-06-25 Marek Polacek <polacek@redhat.com>
7397 * c-array-notation.c: Use VAR_P throughout.
7398 * c-decl.c: Likewise.
7399 * c-objc-common.c: Likewise.
7400 * c-parser.c: Likewise.
7401 * c-typeck.c: Likewise.
7403 2015-06-25 Marek Polacek <polacek@redhat.com>
7405 * c-decl.c: Use is_global_var throughout.
7406 * c-parser.c: Likewise.
7407 * c-typeck.c: Likewise.
7409 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7411 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7412 * c-aux-info.c: Likewise.
7413 * c-convert.c: Likewise.
7414 * c-decl.c: Likewise.
7415 * c-errors.c: Likewise.
7416 * c-lang.c: Likewise.
7417 * c-objc-common.c: Likewise.
7418 * c-parser.c: Likewise.
7419 * c-typeck.c: Likewise.
7421 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
7424 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7427 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
7429 * c-decl.c (pop_scope): Register the main translation unit
7430 through the new debug hook.
7432 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7434 * c-array-notation.c : Adjust include files.
7435 * c-aux-info.c : Likewise.
7436 * c-convert.c : Likewise.
7437 * c-decl.c : Likewise.
7438 * c-errors.c : Likewise.
7439 * c-lang.c : Likewise.
7440 * c-lang.h : Likewise.
7441 * c-objc-common.c : Likewise.
7442 * c-parser.c : Likewise.
7443 * c-typeck.c : Likewise.
7445 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7447 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7448 immediately clobber it.
7449 (c_write_global_declarations_1): Remove call to
7450 check_global_declaration_1.
7451 (c_write_global_declarations_2): Remove.
7452 (c_write_final_cleanups): Rename from c_write_global_declarations.
7453 Remove call to finalize_compilation_unit.
7454 Remove calls to debugging hooks.
7455 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7456 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7457 * c-tree.h: Remove c_write_global_declarations.
7459 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7461 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7462 * c-aux-info.c: Likewise.
7463 * c-convert.c: Likewise.
7464 * c-decl.c: Likewise.
7465 * c-errors.c: Likewise.
7466 * c-lang.c: Likewise.
7467 * c-objc-common.c: Likewise.
7468 * c-parser.c: Likewise.
7469 * c-typeck.c: Likewise.
7471 2015-06-04 Marek Polacek <polacek@redhat.com>
7474 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7477 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7479 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7480 Warn for empty struct.
7481 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7483 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7485 * c-decl.c (start_function): Call plugin before parsing.
7486 (finish_function): Call plugin after parsing.
7488 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7491 * c-decl.c (merge_decls): Merge DECL_COMMON.
7493 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
7495 * Make-lang.in (check_gcc_pallelize): Define.
7497 2015-05-22 Marek Polacek <polacek@redhat.com>
7500 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7503 2015-05-21 Marek Polacek <polacek@redhat.com>
7505 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7508 2015-05-20 Marek Polacek <polacek@redhat.com>
7510 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7511 * c-typeck.c: Likewise.
7513 2015-05-19 Marek Polacek <polacek@redhat.com>
7515 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7517 2015-05-19 Jakub Jelinek <jakub@redhat.com>
7520 * c-parser.c (c_parser_omp_for_loop): Don't add
7521 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7522 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7523 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7526 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7528 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
7531 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7534 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7537 2015-05-14 Marek Polacek <polacek@redhat.com>
7541 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7544 2015-05-12 David Malcolm <dmalcolm@redhat.com>
7546 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7547 to add a call to warn_for_misleading_indentation.
7548 (c_parser_else_body): Likewise, adding param "else_loc".
7549 (c_parser_if_statement): Check for misleading indentation.
7550 (c_parser_while_statement): Likewise.
7551 (c_parser_for_statement): Likewise.
7553 2015-05-08 Marek Polacek <polacek@redhat.com>
7556 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7557 (output_init_element): Likewise.
7559 2015-05-07 Marek Polacek <polacek@redhat.com>
7562 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7565 2015-04-30 Marek Polacek <polacek@redhat.com>
7567 * c-typeck.c (set_init_label): Call error_at instead of error and
7570 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7573 * c-typeck.c (c_build_va_arg): Clarify the error message.
7575 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7577 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7578 OMP_STANDALONE_CLAUSES.
7580 2015-04-28 Marek Polacek <polacek@redhat.com>
7582 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7584 2015-04-28 Marek Polacek <polacek@redhat.com>
7587 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7589 2015-04-25 Marek Polacek <polacek@redhat.com>
7592 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7595 2015-04-23 Marek Polacek <polacek@redhat.com>
7598 * c-decl.c (set_labels_context_r): New function.
7599 (store_parm_decls): Call it via walk_tree_without_duplicates.
7600 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7601 instead of create_tmp_var. Build TARGET_EXPR instead of
7603 (build_atomic_assign): Use create_tmp_var_raw instead of
7604 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7606 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7608 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7609 (c_parser_omp_target_update): Add missed %> to error_at ().
7611 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7614 * c-decl.c (c_default_pointer_mode): Remove definition.
7615 * c-tree.h (c_default_pointer_mode): Remove declaration.
7617 2015-03-27 Tobias Burnus <burnus@net-b.de>
7620 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7622 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7623 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7624 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7626 2015-03-19 Jakub Jelinek <jakub@redhat.com>
7628 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7629 attribute for DECL_EXTERNAL VAR_DECLs.
7631 2015-03-11 Jakub Jelinek <jakub@redhat.com>
7633 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7636 2015-03-10 Jakub Jelinek <jakub@redhat.com>
7639 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7640 before preparing arguments to warn_logical_not_parentheses.
7642 2015-03-09 Jakub Jelinek <jakub@redhat.com>
7645 * c-typeck.c (parser_build_binary_op): Don't warn for
7646 !!x == y or !b == y where b is _Bool.
7648 2015-03-09 Marek Polacek <polacek@redhat.com>
7650 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7651 * c-decl.c (grokdeclarator): Likewise.
7652 * c-typeck.c (build_binary_op): Likewise.
7654 2015-02-27 Marek Polacek <polacek@redhat.com>
7657 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7659 2015-02-14 Marek Polacek <polacek@redhat.com>
7662 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7663 declared through a typedef name.
7665 2015-02-13 Marek Polacek <polacek@redhat.com>
7668 * c-decl.c (grokdeclarator): Print also the type when giving
7669 the error message about array's incomplete element type.
7671 2015-02-11 Jakub Jelinek <jakub@redhat.com>
7674 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7675 check in the POP macro.
7677 2015-02-09 Marek Polacek <polacek@redhat.com>
7680 * c-typeck.c (process_init_element): Don't always wrap
7681 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7682 initializing a range of elements.
7684 2015-02-04 Jakub Jelinek <jakub@redhat.com>
7688 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7690 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
7692 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7693 processing enum declaration.
7695 2015-01-29 Marek Polacek <polacek@redhat.com>
7698 * c-typeck.c (pop_init_level): If constructor_elements has
7699 exactly one element with integer_zerop value, set constructor_zeroinit
7700 to 1. Remove braces around warning_init call.
7702 2015-01-27 Jakub Jelinek <jakub@redhat.com>
7705 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7706 of FUNCTION_DECLs with error_mark_node.
7708 2015-01-26 Jakub Jelinek <jakub@redhat.com>
7711 * c-typeck.c (convert_arguments): Return -1 if there are
7712 error_args, even if we've diagnosed too many arguments.
7714 2015-01-21 Richard Biener <rguenther@suse.de>
7717 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7718 for builtins the user declared correctly.
7720 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7721 Bernd Schmidt <bernds@codesourcery.com>
7722 Cesar Philippidis <cesar@codesourcery.com>
7723 James Norris <jnorris@codesourcery.com>
7724 Jakub Jelinek <jakub@redhat.com>
7725 Ilmir Usmanov <i.usmanov@samsung.com>
7727 * c-parser.c: Include "gomp-constants.h".
7728 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7729 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7730 Use OMP_CLAUSE_SET_MAP_KIND.
7731 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7732 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7733 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7734 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7735 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7736 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7737 "copyout", "create", "delete", "deviceptr", "gang", "host",
7738 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7739 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7740 "present_or_create", "pcreate", "seq", "self", "vector",
7741 "vector_length", "wait", "worker".
7742 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7743 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7744 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7745 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7746 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7747 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7748 (c_parser_oacc_data_clause_deviceptr)
7749 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7750 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7751 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7752 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7753 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7754 (c_parser_oacc_parallel, c_parser_oacc_update)
7755 (c_parser_oacc_wait): New functions.
7756 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7757 (c_finish_oacc_data): New prototypes.
7758 * c-typeck.c: Include "gomp-constants.h".
7759 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7760 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7761 OMP_CLAUSE_SET_MAP_KIND.
7762 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7763 (c_finish_oacc_data): New functions.
7764 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7765 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7766 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7767 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7768 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7769 GOMP_MAP_FORCE_DEVICEPTR.
7771 2015-01-09 Michael Collison <michael.collison@linaro.org>
7773 * c-array-notation.c: Include hash-set.h, machmode.h,
7774 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7775 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7776 * c-aux-info.c: Ditto.
7777 * c-convert.c: Ditto.
7779 * c-errors.c: Ditto.
7780 * c-lang.c: Dittoxs.
7781 * c-objc-common.c: Ditto.
7782 * c-parser.c: Ditto.
7783 * c-typeck.c: Include hash-set.h, machmode.h,
7784 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7785 fold-const.h, wide-int.h, inchash.h, real.h and
7786 fixed-value.h due to flattening of tree.h.
7788 2015-01-07 Marek Polacek <polacek@redhat.com>
7791 * c-typeck.c (process_init_element): Disallow initialization of
7792 a flexible array member with a string constant if the structure
7795 2015-01-05 Jakub Jelinek <jakub@redhat.com>
7798 * c-typeck.c (convert_for_assignment, c_finish_return): For
7799 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7800 types also set in_late_binary_op around convert call.
7801 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7802 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7803 result on expr as last argument to ubsan_instrument_float_cast,
7804 if in_late_binary_op, don't use c_save_expr but save_expr.
7806 Update copyright years.
7808 2015-01-05 Marek Polacek <polacek@redhat.com>
7811 * c-typeck.c (build_array_ref): Pass loc down to
7812 warn_array_subscript_with_type_char.
7814 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
7816 * c-typeck.c: New behavious for pointers to arrays with qualifiers
7817 (common-pointer-type): For pointers to arrays take qualifiers from
7819 (build_conditional_expr): Add warnings for lost qualifiers.
7820 (comp-target-types): Allow pointers to arrays with different qualifiers.
7821 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
7822 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
7823 to PEDWARN_FOR_QUALIFIERS.
7825 2014-12-17 Jakub Jelinek <jakub@redhat.com>
7828 * c-convert.c: Include ubsan.h.
7829 (convert): For real -> integral casts and
7830 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7831 instead instrument the float cast directly.
7833 2014-11-29 Jakub Jelinek <jakub@redhat.com>
7835 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7836 c_finish_stmt_expr): Remove NULL last argument from
7837 create_tmp_var_raw and create_tmp_var calls.
7838 * c-array-notation.c (fix_builtin_array_notation_fn,
7839 build_array_notation_expr, fix_conditional_array_notations_1,
7840 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7842 2014-11-28 Marek Polacek <polacek@redhat.com>
7845 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7846 convert the right operand to integer type.
7848 2014-11-25 Marek Polacek <polacek@redhat.com>
7851 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7852 for inline functions.
7854 2014-11-21 Jakub Jelinek <jakub@redhat.com>
7857 * c-typeck.c (build_array_ref): Adjust
7858 convert_vector_to_pointer_for_subscript caller. If it returns true,
7859 call non_lvalue_loc on the result.
7861 2014-11-11 Richard Biener <rguenther@suse.de>
7863 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7866 2014-11-10 Andi Kleen <ak@linux.intel.com>
7869 * c-parser.c (c_parser_statement_after_labels): Call
7871 (c_parser_if_statement): Dito.
7872 (c_parser_switch_statement): Dito.
7873 (c_parser_while_statement): Dito.
7874 (c_parser_do_statement): Dito.
7875 (c_parser_for_statement): Dito.
7876 * c-typeck.c (c_finish_loop): Dito.
7878 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7880 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7881 OPT_Wshift_count_overflow in the warnings.
7883 2014-10-30 Marek Polacek <polacek@redhat.com>
7885 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7886 print the stripped version as well, if they're not the same.
7888 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7890 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7893 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
7895 * c-decl.c: Adjust include files.
7896 * c-parser.c: Ditto.
7898 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7899 Tom Tromey <tromey@redhat.com>
7901 * c-tree.h (enum c_oracle_request): New.
7902 (c_binding_oracle_function): New typedef.
7903 (c_binding_oracle, c_pushtag, c_bind): Declare.
7904 * c-decl.c (c_binding_oracle): New global.
7905 (I_SYMBOL_CHECKED): New macro.
7906 (i_symbol_binding): New function.
7907 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7908 (I_TAG_CHECKED): New macro.
7909 (i_tag_binding): New function.
7910 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7911 (I_LABEL_CHECKED): New macro.
7912 (i_label_binding): New function.
7913 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7914 (c_print_identifier): Save and restore c_binding_oracle.
7915 (c_pushtag, c_bind): New functions.
7917 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
7919 * c-typeck.c: Adjust include files.
7921 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7924 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7925 initialization here...
7926 (c_initialize_diagnostics): ... but here. Set defaults after
7927 building pretty-printer.
7929 2014-10-23 Marek Polacek <polacek@redhat.com>
7932 * c-decl.c (pop_scope): Don't print warning in external_scope.
7934 2014-10-19 Marek Polacek <polacek@redhat.com>
7937 * c-typeck.c (output_init_element): Allow initializing objects with
7938 static storage duration with compound literals even in C99 and add
7941 2014-10-17 Marek Polacek <polacek@redhat.com>
7944 * c-typeck.c (digest_init): Allow initializing objects with static
7945 storage duration with compound literals even in C99 and add pedwarn
7948 2014-10-17 Marek Polacek <polacek@redhat.com>
7951 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7952 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7953 error multiple times. Print the type.
7955 2014-10-17 Marek Polacek <polacek@redhat.com>
7958 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7961 2014-10-17 Marek Polacek <polacek@redhat.com>
7963 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7964 (start_function): Use OPT_Wimplicit_int instead of 0.
7965 (store_parm_decls_oldstyle): Likewise.
7967 2014-10-17 Alan Modra <amodra@gmail.com>
7970 * c-decl.c (merge_decls): Don't merge section name or tls model
7971 to newdecl symtab node, instead merge to olddecl. Override
7972 existing olddecl section name. Set tls_model for all thread-local
7973 vars, not just OMP thread-private ones. Remove incorrect comment.
7975 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
7977 * c-decl.c: Adjust include files.
7979 2014-10-14 DJ Delorie <dj@redhat.com>
7981 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7982 (c_token_starts_typename): Check all __intN, not just __int128.
7983 (c_token_starts_declspecs): Likewise.
7984 (c_parser_declspecs): Likewise.
7985 (c_parser_attribute_any_word): Likewise.
7986 (c_parser_objc_selector): Likewise.
7987 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7988 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7990 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7992 (finish_declspecs): Likewise.
7994 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7996 * c-parser.c (c_parser_all_labels): New function to replace
7998 (c_parser_statement): Call the new function.
8000 2014-10-09 Marek Polacek <polacek@redhat.com>
8003 * c-typeck.c (pop_init_level): Don't warn about initializing
8006 2014-10-07 Marek Polacek <polacek@redhat.com>
8009 * c-decl.c (header_for_builtin_fn): New function.
8010 (implicitly_declare): Suggest which header to include.
8012 2014-10-07 Marek Polacek <polacek@redhat.com>
8014 * c-convert.c (convert): Use error_operand_p.
8015 * c-typeck.c (require_complete_type): Likewise.
8016 (really_atomic_lvalue): Likewise.
8017 (digest_init): Likewise.
8018 (handle_omp_array_sections_1): Likewise.
8020 2014-10-03 Marek Polacek <polacek@redhat.com>
8023 * c-decl.c (pop_scope): Don't warn about "inline function declared
8024 but never defined" for functions marked with gnu_inline attribute.
8026 2014-09-25 Jakub Jelinek <jakub@redhat.com>
8029 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
8030 on low_bound and length.
8032 2014-09-24 Marek Polacek <polacek@redhat.com>
8036 * c-parser.c: Don't define CPP_KEYWORD.
8037 (c_parser_switch_statement): Pass original type to c_finish_case.
8038 * c-tree.h (c_finish_case): Update declaration.
8039 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
8040 conditionally to c_do_switch_warnings.
8042 2014-09-03 Marek Polacek <polacek@redhat.com>
8045 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
8048 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8049 Balaji V. Iyer <balaji.v.iyer@intel.com>
8050 Igor Zamyatin <igor.zamyatin@intel.com>
8052 * c-parser.c (c_parser_cilk_for): New function.
8053 (c_parser_cilk_grainsize): Likewise.
8054 (c_get_temp_regvar): Likewise.
8055 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
8056 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
8057 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
8058 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
8061 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
8063 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
8064 with using HOST_WIDE_INT without truncation to 'int'
8066 2014-08-22 Marek Polacek <polacek@redhat.com>
8069 * c-typeck.c (parser_build_binary_op): Adjust call to
8070 warn_logical_not_parentheses.
8072 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
8075 * c-parser.c (c_parser_array_notation): Check for correct
8076 type of an array added.
8078 2014-08-19 Marek Polacek <polacek@redhat.com>
8081 * c-typeck.c (build_binary_op): If either operand of a comparison
8082 is a boolean expression, call maybe_warn_bool_compare.
8084 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
8087 * c-typeck.c (build_c_cast): Do a conversion even when the
8088 TYPE_MAIN_VARIANTs are the same.
8090 2014-08-19 Marek Polacek <polacek@redhat.com>
8092 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
8093 pedwarn_c99 instead of pedwarn.
8094 (grokfield): Likewise.
8095 (warn_defaults_to): New function.
8096 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
8097 Unconditionally call pedwarn_c99 instead of pedwarn.
8098 (start_function): Call warn_defaults_to instead of pedwarn_c99.
8099 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
8100 check flag_isoc11 before.
8101 * c-errors.c (pedwarn_c99): Change the return type to bool.
8102 Handle -Wc99-c11-compat.
8103 * c-parser.c (disable_extension_diagnostics): Handle
8104 warn_c99_c11_compat.
8105 (restore_extension_diagnostics): Likewise.
8106 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
8107 instead of pedwarn, don't check flag_isoc11 before.
8108 (c_parser_declspecs): Likewise.
8109 (c_parser_alignas_specifier): Likewise.
8110 (c_parser_alignof_expression): Likewise.
8111 (c_parser_generic_selection): Likewise.
8112 * c-tree.h (pedwarn_c99): Update declaration.
8113 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
8116 2014-08-19 Marek Polacek <polacek@redhat.com>
8118 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
8120 * c-errors.c: Include "opts.h".
8121 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
8122 * c-parser.c (disable_extension_diagnostics): Handle negative value
8123 of warn_c90_c99_compat, too.
8124 (restore_extension_diagnostics): Likewise.
8125 (c_parser_compound_statement_nostart): Pass
8126 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
8128 2014-08-12 Marek Polacek <polacek@redhat.com>
8130 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
8132 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
8134 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
8136 2014-08-10 Marek Polacek <polacek@redhat.com>
8139 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
8140 Call pedwarn_c90 instead of pedwarn.
8141 (check_bitfield_type_and_width): Likewise.
8142 (declspecs_add_qual): Likewise.
8143 (declspecs_add_type): Likewise.
8144 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
8145 Adjust to only call pedwarn_c90.
8146 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
8147 pedwarn_c90 instead of pedwarn.
8148 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
8149 * c-parser.c (disable_extension_diagnostics): Handle
8150 warn_c90_c99_compat.
8151 (restore_extension_diagnostics): Likewise.
8152 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
8153 pedwarn_c90 instead of pedwarn.
8154 (c_parser_initelt): Likewise.
8155 (c_parser_postfix_expression): Likewise.
8156 (c_parser_postfix_expression_after_paren_type): Likewise.
8157 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
8158 * c-tree.h: Fix formatting.
8159 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
8160 pedwarn_c90 instead of pedwarn.
8162 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8164 * c-typeck.c: Remove include of pointer-set.h.
8166 2014-08-07 Marek Polacek <polacek@redhat.com>
8168 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
8170 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8172 * c-typeck.c: Use hash_map instead of pointer_map.
8174 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8176 * c-decl.c: Use hash_set instead of pointer_set.
8178 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8181 * c-array-notation.c (expand_array_notations): Handling
8184 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
8187 * c-typeck.c (c_finish_return): Return 0 instead of the address of
8190 2014-07-30 Tom Tromey <tromey@redhat.com>
8192 * c-typeck.c (struct constructor_stack) <designator_depth>: New
8194 (really_start_incremental_init, push_init_level): Initialize
8196 (pop_init_level): Set global designator_depth.
8197 (process_init_element): Check for designated_init attribute.
8199 2014-07-20 Marek Polacek <polacek@redhat.com>
8202 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
8203 (implicitly_declare): Pass location to implicit_decl_warning.
8205 2014-07-14 Jakub Jelinek <jakub@redhat.com>
8208 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
8209 If non-NULL, call c_parser_check_literal_zero.
8210 (c_parser_check_literal_zero): New function.
8211 (c_parser_postfix_expression_after_primary): Adjust
8212 c_parser_expr_list caller, handle -Wmemset-transposed-args.
8214 2014-07-06 Marek Polacek <polacek@redhat.com>
8217 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
8218 * c-tree.h (C_ARRAY_PARAMETER): Define.
8219 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
8222 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
8223 Chen Gang <gang.chen.5i5j@gmail.com>
8225 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
8228 2014-07-01 Marek Polacek <polacek@redhat.com>
8230 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
8231 instead of 0 to WARN_FOR_ASSIGNMENT.
8233 2014-07-01 Marek Polacek <polacek@redhat.com>
8236 * c-typeck.c (convert_for_assignment): Pass
8237 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
8239 2014-06-30 Marek Polacek <polacek@redhat.com>
8241 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
8242 has no_sanitize_undefined attribute.
8244 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
8247 * c-array-notation.c (fix_builtin_array_notation_fn):
8248 Check for 0 arguments in builtin call. Check that bultin argument is
8250 * c-parser.c (c_parser_array_notation): Check for incorrect initial
8253 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
8255 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8256 qualifiers in __auto_type for atomic types.
8257 (c_parser_typeof_specifier): Discard all type qualifiers in
8258 __typeof__ for atomic types.
8260 2014-06-25 Marek Polacek <polacek@redhat.com>
8263 * c-parser.c (c_parser_statement_after_labels): Pass the location of
8264 the return expression to c_finish_return.
8266 2014-06-25 Jakub Jelinek <jakub@redhat.com>
8268 * c-typeck.c (c_finish_omp_clauses): Make sure
8269 OMP_CLAUSE_LINEAR_STEP has correct type.
8271 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
8275 2014-06-24 Jakub Jelinek <jakub@redhat.com>
8277 * c-parser.c (c_parser_omp_for_loop): For
8278 #pragma omp parallel for simd move lastprivate clause from parallel
8279 to for rather than simd.
8281 2014-06-23 Marek Polacek <polacek@redhat.com>
8283 * c-typeck.c (parser_build_binary_op): Don't call
8284 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8286 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8288 * c-parser.c (c_parser_omp_threadprivate): Likewise.
8289 * c-decl.c (merge_decls): Likewise.
8291 2014-06-09 Marek Polacek <polacek@redhat.com>
8294 * c-typeck.c (error_init): Call inform instead of error_at.
8295 (pedwarn_init): Call inform instead of pedwarn.
8296 (warning_init): Call inform instead of warning_at.
8298 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
8300 * c-decl.c (merge_decls): Use set_decl_section_name.
8301 (duplicate_decls): Remove node if it exists.
8303 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
8306 * c-typeck.c (push_init_level, process_init_element,
8307 pop_init_level): Correct check for zero initialization, move
8308 missing brace warning to respect zero initialization.
8310 2014-06-05 Marek Polacek <polacek@redhat.com>
8313 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8315 2014-06-05 Marek Polacek <polacek@redhat.com>
8318 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
8319 on the left hand side operand of a comparison.
8321 2014-06-05 Marek Polacek <polacek@redhat.com>
8324 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8325 Print note only if the warning was printed.
8327 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
8330 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8333 2014-06-03 Marek Polacek <polacek@redhat.com>
8336 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8338 * c-tree.h (c_start_case): Update.
8339 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
8340 switch condition has boolean value.
8342 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
8344 * c-decl.c: Include builtins.h.
8345 * c-parser.c: Likewise.
8347 2014-05-27 Marek Polacek <polacek@redhat.com>
8350 * c-typeck.c (convert_arguments): Get location of a parameter. Change
8351 error and warning calls to error_at and warning_at. Pass location of
8352 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
8353 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8354 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
8356 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
8359 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8360 function parameters.
8362 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
8364 * c-decl.c (merge_decls): Preserve symtab node pointers.
8365 (duplicate_decls): Free new decl.
8367 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
8369 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8372 * c-parser.c (c_parser_omp_target): Return bool values.
8374 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8376 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8377 num_teams_loc variable to num_thread_limit_loc.
8379 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8381 * c-array-notation.c (expand_array_notations): Use void_node
8382 instead of void_zero_node.
8384 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8386 * c-decl.c (finish_struct): Adjust.
8387 (finish_enum): Likewise.
8389 (record_inline_static): Likewise.
8390 (push_scope): Likewise.
8391 (make_label): Likewise.
8392 (lookup_label_for_goto): Likewise.
8393 (finish_struct): Likewise.
8394 (finish_enum): Likewise.
8395 (store_parm_decls): Likewise.
8396 (c_push_function_context): Likewise.
8397 * c-lang.h: Remove usage of variable_size gty attribute.
8398 * c-parser.c (c_parse_init): Adjust.
8399 (c_parse_file): Likewise.
8401 2014-05-13 Marek Polacek <polacek@redhat.com>
8404 * c-typeck.c (convert_for_assignment): Pass location to
8405 WARN_FOR_ASSIGNMENT instead of input_location.
8407 2014-05-10 Marek Polacek <polacek@redhat.com>
8409 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8410 maybe_warn_string_init.
8411 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8412 maybe_warn_string_init.
8413 * c-tree.h (maybe_warn_string_init): Update declaration.
8414 * c-typeck.c (maybe_warn_string_init): Add location parameter.
8415 Call pedwarn_init with loc instead of with input_location.
8416 (digest_init): Pass init_loc to maybe_warn_string_init.
8417 (pop_init_level): Call pedwarn_init with loc instead of with
8419 (set_init_index): Likewise.
8420 (process_init_element): Likewise.
8422 2014-05-09 Marek Polacek <polacek@redhat.com>
8425 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8426 (c_parser_initelt): Pass location to set_init_label. Pass array index
8427 location to set_init_index.
8428 * c-tree.h (push_init_level): Update declaration.
8429 (pop_init_level): Likewise.
8430 (set_init_index): Likewise.
8431 (set_init_label): Likewise.
8432 * c-typeck.c (error_init): Add location parameter. Call error_at
8434 (digest_init): Pass init_loc to error_init.
8435 (really_start_incremental_init):
8436 (push_init_level): Add location parameter. Pass loc to pop_init_level
8438 (pop_init_level): Likewise.
8439 (set_designator): Add location parameter. Pass loc to pop_init_level,
8440 push_init_level, and error_init.
8441 (set_init_index): Add location parameter. Pass loc to error_init and
8443 (set_init_label): Likewise.
8444 (output_init_element): Pass loc to error_init.
8445 (process_init_element): Pass loc to error_init, pop_init_level,
8446 pedwarn_init, and push_init_level.
8448 2014-05-09 Marek Polacek <polacek@redhat.com>
8451 * c-parser.c (c_parser_attributes): Parse the arguments as an
8452 expression-list if the attribute takes identifier.
8454 2014-05-08 Marek Polacek <polacek@redhat.com>
8457 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8460 2014-05-08 Marek Polacek <polacek@redhat.com>
8463 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8466 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8467 Mike Stump <mikestump@comcast.net>
8468 Richard Sandiford <rdsandiford@googlemail.com>
8470 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8471 (finish_enum): Use wide-int interfaces.
8472 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8473 * c-typeck.c (build_c_cast): Likewise.
8474 (set_nonincremental_init_from_string): Likewise.
8475 (c_tree_equal): Likewise.
8477 2014-05-02 Marek Polacek <polacek@redhat.com>
8480 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8481 Return size_one_node when the type is not complete.
8482 (pointer_diff): Remove comment.
8483 (build_unary_op): Improve error messages.
8485 2014-05-02 Marek Polacek <polacek@redhat.com>
8487 * c-typeck.c (c_finish_return): Separate warning_at calls.
8489 2014-05-02 Marek Polacek <polacek@redhat.com>
8491 * c-tree.h (error_init): Remove declaration.
8492 (pedwarn_init): Likewise.
8493 * c-typeck.c (error_init): Make static and move above.
8494 (pedwarn_init): Likewise.
8495 (warning_init): Move above.
8496 (maybe_warn_string_init): Likewise.
8498 2014-05-01 Jeff Law <law@redhat.com>
8502 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8503 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8506 2014-05-02 Marek Polacek <polacek@redhat.com>
8509 * c-typeck.c (push_init_level): Set constructor_designated to
8510 p->designated for structures.
8512 2014-05-01 Marek Polacek <polacek@redhat.com>
8515 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8516 function-definition has an attribute after the declarator.
8518 2014-05-01 Marek Polacek <polacek@redhat.com>
8521 * c-typeck.c (warning_init): Add location_t parameter. Call
8522 warning_at instead of warning.
8523 (push_init_level): Pass input_location to warning_init.
8524 (add_pending_init): Add location_t parameter. Pass loc to
8526 (set_nonincremental_init): Pass input_location to add_pending_init.
8527 (set_nonincremental_init_from_string): Likewise.
8528 (output_init_element): Pass loc to warning_init and to
8531 2014-05-01 Marek Polacek <polacek@redhat.com>
8534 * c-typeck.c (c_finish_return): Distinguish between label and variable
8535 when warning about returning local address.
8537 2014-05-01 Marek Polacek <polacek@redhat.com>
8540 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8543 2014-05-01 Marek Polacek <polacek@redhat.com>
8546 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8547 instead of 0 to WARN_FOR_QUALIFIERS.
8549 2014-05-01 Marek Polacek <polacek@redhat.com>
8552 * c-typeck.c (default_conversion): Use better location for
8555 2014-04-30 Marek Polacek <polacek@redhat.com>
8557 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8558 also when SANITIZE_FLOAT_DIVIDE is on.
8560 2014-04-30 Marek Polacek <polacek@redhat.com>
8563 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8564 and pedwarn_init. Use loc insted of input_location.
8566 2014-04-30 Marek Polacek <polacek@redhat.com>
8569 * c-typeck.c (build_binary_op): Use location when warning about
8572 2014-04-25 Marek Polacek <polacek@redhat.com>
8575 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8576 always_inline/noinline and hot/cold attributes.
8578 2014-04-25 Marek Polacek <polacek@redhat.com>
8581 * c-parser.c (c_parser_initelt): Pass input_location to
8582 process_init_element.
8583 (c_parser_initval): Pass loc to process_init_element.
8584 * c-tree.h (process_init_element): Adjust declaration.
8585 * c-typeck.c (push_init_level): Pass input_location to
8586 process_init_element.
8587 (pop_init_level): Likewise.
8588 (set_designator): Likewise.
8589 (output_init_element): Add location_t parameter. Pass loc to
8591 (output_pending_init_elements): Pass input_location to
8592 output_init_element.
8593 (process_init_element): Add location_t parameter. Pass loc to
8594 output_init_element.
8596 2014-04-24 Jakub Jelinek <jakub@redhat.com>
8598 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8599 atomic-clause, allow comma in between atomic-clause and
8602 2014-04-22 Jakub Jelinek <jakub@redhat.com>
8605 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8606 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8608 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8611 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8612 create_tmp_var instead build_decl for creating temps.
8613 (build_array_notation_expr): Likewise.
8614 (fix_conditional_array_notations_1): Likewise.
8615 (fix_array_notation_expr): Likewise.
8616 (fix_array_notation_call_expr): Likewise.
8618 2014-03-28 Jakub Jelinek <jakub@redhat.com>
8621 * c-tree.h (c_build_function_call_vec): New prototype.
8622 * c-typeck.c (build_function_call_vec): Don't call
8623 resolve_overloaded_builtin here.
8624 (c_build_function_call_vec): New wrapper function around
8625 build_function_call_vec. Call resolve_overloaded_builtin here.
8626 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8627 Call c_build_function_call_vec instead of build_function_call_vec.
8628 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8629 * c-decl.c (finish_decl): Likewise.
8631 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8634 * c-typeck.c: Use correct format string in cast-qual warning
8636 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8638 * c-decl.c (c_decl_attributes): Use
8639 lang_hooks.types.omp_mappable_type.
8640 * c-typeck.c (c_finish_omp_clauses): Likewise.
8642 2014-03-06 Marek Polacek <polacek@redhat.com>
8645 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8646 of checking tree code.
8648 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8650 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8651 (c_parser_parameter_declaration): Likewise.
8653 2014-02-19 Marek Polacek <polacek@redhat.com>
8656 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8657 Call mark_exp_read on exp.value.
8658 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8659 TREE_ADDRESSABLE on old instead of val.
8660 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8662 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8664 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8665 C_EXPR_APPEND by vec_safe_push.
8666 * c-tree.h (C_EXPR_APPEND): Remove.
8668 2014-01-31 Marek Polacek <polacek@redhat.com>
8671 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8672 build_function_call_vec.
8673 (build_function_call): Likewise.
8674 (build_atomic_assign): Likewise.
8675 (build_function_call_vec): Add arg_loc parameter. Use it.
8676 (convert_arguments): Likewise.
8677 (convert_for_assignment): Rename rhs_loc to expr_loc.
8678 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8679 (c_parser_objc_keywordexpr): Likewise.
8680 (c_parser_postfix_expression_after_primary): Call
8681 build_function_call_vec with expr_loc rather than op_loc.
8682 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8683 build_function_call_vec.
8684 (c_parser_expr_list): Add locations parameter. Fill it with locations
8685 of function arguments.
8686 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8688 2014-01-30 Marek Polacek <polacek@redhat.com>
8691 * c-typeck.c (build_function_call_vec): Use loc parameter.
8692 (convert_arguments): Add location parameter. Use it.
8693 (ep_convert_and_check): Likewise.
8694 (build_atomic_assign): Adjust convert_for_assignment call.
8695 (build_modify_expr): Likewise.
8696 (digest_init): Likewise.
8697 (c_finish_return): Likewise.
8698 (build_conditional_expr): Adjust ep_convert_and_check calls.
8699 (convert_for_assignment): Add rhs_loc parameter. Use it.
8700 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8703 2014-01-30 Richard Biener <rguenther@suse.de>
8706 * c-typeck.c (build_function_call_vec): Do not replace calls
8707 to a function via an incompatible type with a runtime abort.
8709 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8711 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8712 flag_enable_cilkplus with flag_cilkplus.
8713 (c_parser_direct_declarator_inner): Likewise.
8714 (c_parser_attribute_any_word): Likewise.
8715 (c_parser_attributes): Likewise.
8716 (c_parser_compound_statement): Likewise.
8717 (c_parser_statement_after_labels): Likewise.
8718 (c_parser_if_statement): Likewise.
8719 (c_parser_switch_statement): Likewise.
8720 (c_parser_do_statement): Likewise.
8721 (c_parser_for_statement): Likewise.
8722 (c_parser_unary_expression): Likewise.
8723 (c_parser_postfix_expression): Likewise.
8724 (c_parser_postfix_expression_after_primary): Likewise.
8725 (c_parser_postfix_expression_after_primary): Likewise.
8726 (c_parser_omp_clause_name): Likewise.
8727 (c_finish_omp_declare_simd): Likewise.
8728 (c_parser_cilk_verify_simd): Likewise.
8729 * c-typeck.c (build_array_ref): Likewise.
8730 (build_function_call_vec): Likewise.
8731 (convert_arguments): Likewise.
8732 (build_compound_expr): Likewise.
8733 (c_finish_return): Likewise.
8734 (c_finish_if_stmt): Likewise.
8735 (c_finish_loop): Likewise.
8736 (build_binary_op): Likewise.
8738 2014-01-23 Marek Polacek <polacek@redhat.com>
8741 * c-typeck.c (parser_build_binary_op): Use location instead of
8743 (build_binary_op): Pass location to shorten_compare.
8745 2014-01-23 Marek Polacek <polacek@redhat.com>
8748 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8751 2014-01-23 Marek Polacek <polacek@redhat.com>
8754 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8755 of a comma expression.
8756 (emit_side_effect_warnings): Likewise.
8758 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8761 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8762 function to use walk_tree and moved a lot of its functionality to
8763 expand_array_notations.
8764 (expand_array_notations): New function.
8766 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8768 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8769 attribute an attribute without value.
8771 2014-01-23 Jakub Jelinek <jakub@redhat.com>
8774 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8775 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8777 2014-01-22 Marek Polacek <polacek@redhat.com>
8780 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8781 of remove_c_maybe_const_expr on op1 and op2.
8783 2014-01-15 Jakub Jelinek <jakub@redhat.com>
8786 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8787 effects, preevaluate rhs using SAVE_EXPR first.
8789 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8792 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8793 statements with if-elseif statements.
8795 2014-01-06 Marek Polacek <polacek@redhat.com>
8798 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8799 defined bit-field types only in ISO C.
8801 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8803 Update copyright years
8805 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8807 * c-array-notation.c: Use the standard form for the copyright notice.
8809 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8811 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8812 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8813 field in parser is not empty. If not-empty, call the function
8814 c_parser_finish_omp_declare_simd.
8815 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8816 between SIMD-enabled functions and #pragma simd. Added new parameter.
8817 (c_parser_cilk_all_clauses): Modified the usage of the function
8818 c_parser_cilk_clause_vectorlength as mentioned above.
8819 (c_parser_cilk_simd_fn_vector_attrs): New function.
8820 (c_finish_cilk_simd_fn_tokens): Likewise.
8821 (is_cilkplus_vector_p): Likewise.
8822 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8823 "nomask," and "mask" strings in clause name.
8824 (c_parser_omp_all_clauses): Added 3 new case statements:
8825 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8826 PRAGMA_CILK_CLAUSE_NOMASK.
8827 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8828 check for vector attribute and if so call the function
8829 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8830 called the function c_finish_cilk_simd_fn_tokens.
8831 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8832 parser field is non-empty. If so, parse them as you would parse
8833 the omp declare simd pragma.
8834 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8835 Added a check when step is a parameter and flag it as error.
8836 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8837 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8840 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8842 * c-parser.c (c_parser_omp_parallel): Fix description.
8844 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8846 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8847 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8848 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8849 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8851 2013-12-04 Joseph Myers <joseph@codesourcery.com>
8854 * c-parser.c (c_parser_alignas_specifier): Use
8855 c_sizeof_or_alignof_type instead of c_alignof.
8856 (c_parser_alignof_expression): Likewise, with min_alignof
8857 parameter depending on alignof spelling used.
8859 2013-12-04 Marek Polacek <polacek@redhat.com>
8862 * c-decl.c (start_function): Don't warn for missing prototype for
8865 2013-12-03 Marek Polacek <polacek@redhat.com>
8868 * c-decl.c (build_compound_literal): Allow compound literals with
8869 empty initial value.
8871 2013-12-02 Joseph Myers <joseph@codesourcery.com>
8874 * c-typeck.c (build_modify_expr): Diagnose assignment to
8875 expression with array type.
8877 2013-11-29 Joseph Myers <joseph@codesourcery.com>
8880 * c-typeck.c (process_init_element): Do not treat a string as
8881 initializing a whole array when used with a designator for an
8884 2013-11-29 Joseph Myers <joseph@codesourcery.com>
8887 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8888 an inline function following a static declaration.
8890 2013-11-28 Jakub Jelinek <jakub@redhat.com>
8893 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8894 to p_name before calling c_parser_omp_teams instead of after.
8895 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8896 argument. Remove unused p_name variable.
8898 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
8899 Jakub Jelinek <jakub@redhat.com>
8901 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8902 external_scope is NULL.
8904 2013-11-27 Tom de Vries <tom@codesourcery.com>
8905 Marc Glisse <marc.glisse@inria.fr>
8908 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8910 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
8912 * c-typeck.c: Add required include files from gimple.h.
8914 2013-11-22 David Malcolm <dmalcolm@redhat.com>
8916 * c-decl.c (define_label, shadow_tag_warned)
8917 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8918 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8919 (declspecs_add_type): Remove use of in_system_header macro.
8920 * c-parser.c (c_parser_unary_expression): Likewise.
8921 * c-typeck.c (store_init_value, process_init_element)
8922 (c_start_case): Likewise.
8924 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8927 * c-parser.c (c_parser_set_source_position_from_token): Remove
8928 reference to in_system_header from comment.
8930 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8932 * c-decl.c (grokdeclarator): Update comment to refer to
8933 tree_to_[su]hwi rather than tree_low_cst.
8935 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8937 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8938 tree_to_uhwi throughout.
8940 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8942 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8945 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8947 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8950 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
8952 * c-parser.c (c_parser_cilk_simd): New.
8953 (c_parser_cilk_verify_simd): New.
8954 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8955 (c_parser_omp_for_loop): Add case for NE_EXPR.
8956 Set c_break_label for CILK_SIMD.
8957 (c_parser_cilk_clause_vectorlength): New.
8958 (c_parser_cilk_clause_linear): New.
8959 (c_parser_cilk_clause_name): New.
8960 (c_parser_cilk_all_clauses): New.
8961 * c-typeck.c (build_unary_op): Pass location argument to
8963 (build_modify_expr): Same.
8964 (build_asm_expr): Same.
8965 (c_finish_bc_stmt): Error on break/continue in loops.
8967 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
8969 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8971 2013-11-14 Diego Novillo <dnovillo@google.com>
8973 * c-decl.c: Include print-tree.h.
8974 Include stor-layout.h.
8977 Include stringpool.h.
8978 * c-lang.c: Include fold-const.h.
8979 * c-parser.c: Include stringpool.h.
8981 Include stor-layout.h.
8983 Include trans-mem.h.
8984 * c-typeck.c: Include stor-layout.h.
8985 Include trans-mem.h.
8989 2013-11-13 Joseph Myers <joseph@codesourcery.com>
8991 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8992 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8994 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8995 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8997 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8998 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8999 (c_parser_declarator, c_parser_direct_declarator_inner)
9000 (c_parser_parameter_declaration, c_parser_type_name): All callers
9002 (c_parser_declaration_or_fndef): Handle declarations with type
9003 determined from the initializer.
9005 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9007 * c-typeck.c: Include gimplify.h.
9009 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9011 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
9012 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
9014 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
9015 or _Thread_local as appropriate in diagnostics.
9016 (build_null_declspecs): Initialize ret->thread_gnu_p.
9017 (declspecs_add_scspec): Handle either __thread or _Thread_local
9018 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
9019 pedantic. Do not disallow _Thread_local extern and _Thread_local
9022 2013-11-07 Joseph Myers <joseph@codesourcery.com>
9023 Andrew MacLeod <amacleod@redhat.com>
9025 * c-aux-info.c (gen_type): Handle atomic qualifier.
9026 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
9027 qualifiers when compating types.
9028 (shadow_tag_warned): Handle atomic_p in declspecs.
9029 (quals_from_declspecs): Likewise.
9030 (start_decl): Use c_type_promotes_to when promoting argument
9032 (grokdeclarator): Handle _Atomic.
9033 (get_parm_info): Diagnose any qualifier on "void" as only
9035 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
9036 comparing types. Use c_type_promotes_to when promoting argument
9038 (finish_function): Use c_type_promotes_to when promoting argument
9040 (build_null_declspecs): Handle atomic_p in declspecs.
9041 (declspecs_add_qual): Handle RID_ATOMIC.
9042 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
9043 (c_token_starts_declspecs): Handle RID_ATOMIC.
9044 (c_parser_declspecs): Handle atomic type specifiers and
9046 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
9047 from types of expressions with atomic type.
9048 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
9049 (c_parser_attribute_any_word): Handle RID_ATOMIC.
9050 (c_parser_initializer, c_parser_initelt, c_parser_initval)
9051 (c_parser_statement_after_labels, c_parser_switch_statement)
9052 (c_parser_for_statement, c_parser_expr_no_commas)
9053 (c_parser_conditional_expression, c_parser_binary_expression)
9054 (c_parser_cast_expression, c_parser_unary_expression)
9055 (c_parser_postfix_expression)
9056 (c_parser_postfix_expression_after_primary, c_parser_expression):
9057 Use convert_lvalue_to_rvalue.
9058 (c_parser_expression_conv, c_parser_expr_list): Document
9059 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
9060 (c_parser_objc_synchronized_statement): Use
9061 convert_lvalue_to_rvalue.
9062 (c_parser_objc_selector): Handle RID_ATOMIC.
9063 (c_parser_objc_receiver, c_parser_array_notation): Use
9064 convert_lvalue_to_rvalue.
9065 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
9066 _Atomic (type-name).
9067 (struct c_declspecs): Add atomic_p field.
9068 (convert_lvalue_to_rvalue): Declare.
9069 * c-typeck.c (c_type_promotes_to): Promote atomic types to
9070 corresponding atomic types.
9071 (qualify_type): Don't add _Atomic qualifiers from second argument.
9072 (comp_target_types): Do not allow _Atomic mismatches.
9073 (type_lists_compatible_p): Do not remove atomic qualifiers when
9075 (really_atomic_lvalue, convert_lvalue_to_rvalue)
9076 (build_atomic_assign): New functions.
9077 (build_unary_op): Use build_atomic_assign for atomic increment and
9079 (build_conditional_expr): Do not treat _Atomic void as a qualified
9081 (build_modify_expr): Use build_atomic_assign for atomic LHS.
9082 (find_anonymous_field_with_type, convert_to_anonymous_field)
9083 (convert_for_assignment): Do not remove atomic qualifiers when
9085 (digest_init): Do not accept initialization of arrays of atomic
9086 elements by string constants.
9087 (build_asm_expr): Use convert_lvalue_to_rvalue.
9088 (build_binary_op): Do not treat _Atomic void as a qualified
9091 2013-11-06 DJ Delorie <dj@redhat.com>
9093 * c-decl.c (locate_old_decl): If a previous conflicting decl is
9094 both explicit and builtin, print the location of the explicit one.
9096 2013-11-05 Tobias Burnus <burnus@net-b.de>
9098 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
9099 c_parser_omp_distribute, c_parser_omp_teams,
9100 c_parser_omp_target, c_parser_omp_declare): Handle
9103 2013-11-03 Marek Polacek <polacek@redhat.com>
9105 * c-decl.c (grokdeclarator): Add VLA instrumentation.
9107 2013-11-01 Jakub Jelinek <jakub@redhat.com>
9109 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
9110 check_dup_generic at the end, unless remove is true.
9111 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
9113 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
9115 2013-10-31 Jakub Jelinek <jakub@redhat.com>
9117 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
9118 with decl that is not pointer nor array.
9120 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9122 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
9123 a spawning function is found.
9124 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
9125 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
9126 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9127 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
9129 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
9130 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
9132 (c_finish_return): Added a check to reject _Cilk_spawn in return
9134 (build_cilk_spawn): New function.
9135 (build_cilk_sync): Likewise.
9136 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
9138 2013-10-27 Tobias Burnus <burnus@net-b.de>
9141 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
9142 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
9143 (c_parser_statement_after_labels): Update calls.
9145 2013-10-24 Tobias Burnus <burnus@net-b.de>
9148 * c-parser.c (c_parser_pragma, c_parser_for_statement):
9149 Handle PRAGMA_IVDEP.
9150 (c_parser_statement_after_labels): Update call.
9152 2013-10-24 Marek Polacek <polacek@redhat.com>
9154 * c-parser.c (c_parser_struct_declaration): Add a comment.
9155 (c_parser_declarator): Don't allow _Alignas here.
9157 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
9159 * c-parser.c: Include omp-low.h.
9160 * c-typeck.c: Likewise.
9162 2013-10-17 Marek Polacek <polacek@redhat.com>
9165 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
9166 Document syntax of the array-declarator.
9167 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
9169 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
9170 (c_parser_struct_declaration): Likewise.
9171 (c_parser_declarator): Likewise.
9172 (c_parser_direct_declarator_inner): Likewise.
9173 (c_parser_parameter_declaration): Likewise.
9174 (c_parser_type_name): Likewise.
9176 2013-10-11 Jakub Jelinek <jakub@redhat.com>
9178 * c-lang.h (current_omp_declare_target_attribute): New extern
9180 * c-parser.c: Include c-lang.h.
9181 (struct c_parser): Change tokens to c_token *.
9182 Add tokens_buf field. Change tokens_avail type to unsigned int.
9183 (c_parser_consume_token): If parser->tokens isn't
9184 &parser->tokens_buf[0], increment parser->tokens.
9185 (c_parser_consume_pragma): Likewise.
9186 (enum pragma_context): Add pragma_struct and pragma_param.
9187 (c_parser_external_declaration): Adjust
9188 c_parser_declaration_or_fndef caller.
9189 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
9190 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
9191 Adjust recursive call.
9192 (c_parser_struct_or_union_specifier): Use pragma_struct instead
9194 (c_parser_parameter_declaration): Use pragma_param instead of
9196 (c_parser_compound_statement_nostart, c_parser_label,
9197 c_parser_for_statement): Adjust
9198 c_parser_declaration_or_fndef callers.
9199 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
9200 it through to c_parser_conditional_expression.
9201 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
9202 pass it through to c_parser_binary_expression. Adjust recursive
9204 (c_parser_binary_expression): Remove prec argument, add
9205 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
9206 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
9207 binop matches it, use build2 instead of parser_build_binary_op.
9208 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
9209 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
9210 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
9211 Handle pragma_struct and pragma_param the same as pragma_external.
9212 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
9213 (c_parser_omp_variable_list): Parse array sections for
9214 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
9215 (c_parser_omp_clause_collapse): Fully fold collapse expression.
9216 (c_parser_omp_clause_reduction): Handle user defined reductions.
9217 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
9218 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
9219 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
9220 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
9221 c_parser_omp_clause_depend, c_parser_omp_clause_map,
9222 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
9223 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
9224 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
9225 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
9226 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
9227 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
9228 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
9229 (c_parser_omp_for_loop): Add CODE argument, pass it through
9230 to c_finish_omp_for. Change last argument to cclauses,
9231 and adjust uses to grab parallel clauses from the array of all
9232 the split clauses. Adjust c_parser_binary_expression,
9233 c_parser_declaration_or_fndef and c_finish_omp_for callers.
9234 (omp_split_clauses): New function.
9235 (c_parser_omp_simd): New function.
9236 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
9237 Allow the function to be called also when parsing combined constructs,
9238 and call c_parser_omp_simd when parsing for simd.
9239 (c_parser_omp_sections_scope): If section-sequence doesn't start with
9240 #pragma omp section, require exactly one structured-block instead of
9241 sequence of statements.
9242 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
9243 Allow the function to be called also when parsing combined constructs.
9244 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9245 Allow the function to be called also when parsing combined
9247 (c_parser_omp_taskgroup, c_parser_omp_cancel,
9248 c_parser_omp_cancellation_point, c_parser_omp_distribute,
9249 c_parser_omp_teams, c_parser_omp_target_data,
9250 c_parser_omp_target_update, c_parser_omp_target,
9251 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9252 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9253 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9254 (c_parser_omp_construct): Add p_name and mask vars. Handle
9255 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9256 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
9257 and c_parser_omp_sections callers.
9258 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9259 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9260 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9261 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
9262 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
9264 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9265 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9266 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9267 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9268 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9269 * c-typeck.c: Include tree-inline.h.
9270 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9271 handle_omp_array_sections_1, handle_omp_array_sections,
9272 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9273 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9274 user defined reductions.
9275 (c_tree_equal): New function.
9276 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9277 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9278 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9279 c_check_omp_declare_reduction_r): New prototypes.
9280 * c-decl.c (current_omp_declare_target_attribute): New variable.
9281 (c_decl_attributes): New function.
9282 (start_decl, start_function): Use it instead of decl_attributes.
9283 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9284 c_omp_reduction_decl, c_omp_reduction_lookup,
9285 c_check_omp_declare_reduction_r): New functions.
9287 2013-09-25 Tom Tromey <tromey@redhat.com>
9289 * Make-lang.in (c/gccspec.o): Remove.
9290 (CFLAGS-c/gccspec.o): New variable.
9291 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9292 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9293 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9295 2013-09-25 Tom Tromey <tromey@redhat.com>
9297 * Make-lang.in (c/gccspec.o): Don't use subshell.
9299 2013-09-18 Marek Polacek <polacek@redhat.com>
9302 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9303 Remove unnecessary check.
9305 2013-09-18 Marek Polacek <polacek@redhat.com>
9308 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9309 no_sanitize_undefined attribute.
9311 2013-09-13 Kai Tietz <ktietz@redhat.com>
9314 * c-decl.c (c_builtin_function_ext_scope): Remove
9315 wrong assumption that it is never called on prexisting
9318 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9320 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9322 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9324 * c-objc-common.c (c_tree_printer): Tidy.
9326 2013-08-30 Marek Polacek <polacek@redhat.com>
9328 * c-typeck.c (build_binary_op): Add division by zero and shift
9331 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
9332 Joseph Myers <joseph@codesourcery.com>
9335 * c-typeck.c (c_common_type): Prefer double_type_node over
9336 other REAL_TYPE types with the same precision.
9337 (convert_arguments): Likewise.
9339 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
9341 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9342 (c_initialize_diagnostics): Call a destructor for the early printer.
9344 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9346 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9347 printer initialization.
9349 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
9352 * c-array-notation.c (fix_conditional_array_notations_1): Added a
9353 check for truth values.
9354 (expand_array_notation_exprs): Added truth values case. Removed an
9355 unwanted else. Added for-loop to walk through subtrees in default
9358 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9360 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9362 2013-07-23 Joseph Myers <joseph@codesourcery.com>
9364 * c-parser.c (struct c_generic_association): Fix typo.
9366 2013-07-23 Tom Tromey <tromey@redhat.com>
9367 Joseph Myers <joseph@codesourcery.com>
9369 * c-parser.c (struct c_generic_association): New.
9370 (c_generic_association_d): New typedef.
9371 (c_parser_generic_selection): New function.
9372 (c_parser_postfix_expression): Handle RID_GENERIC.
9374 2013-07-13 Jason Merrill <jason@redhat.com>
9377 * c-decl.c (finish_struct): Check for too-large class.
9379 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
9382 * c-typeck.c (set_init_index): When folding, check for index overflow.
9384 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9386 * c-parser.c (c_parser_array_notation): Removed rejection of array
9387 notations in an array of function pointers.
9389 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9391 * c-array-notation.c (make_triplet_val_inv): New function.
9392 (create_cmp_incr): Likewise.
9393 (create_array_refs): Likewise.
9394 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9395 Also modularized common parts between functions and called the function.
9396 (build_array_notation_expr): Likewise.
9397 (fix_conditional_array_notations_1): Likewise.
9398 (fix_array_notation_expr): Likewise.
9399 (fix_array_notation_call_expr): Likewise.
9401 2013-06-18 Marek Polacek <polacek@redhat.com>
9404 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9406 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
9408 * c-array-notation.c (build_array_notation_expr): Reject array notation
9409 mismatch between LHS and RHS even inside a call_expr. Also, removed
9410 a couple while statements that were dead code.
9412 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
9414 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9415 excessive precision expressions in function parameters. Also removed
9416 couple unwanted while statements.
9418 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9420 * c-array-notation.c (expand_array_notation_exprs): Added
9421 ARRAY_NOTATION_REF case.
9423 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9425 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9426 function to c-family/array-notation-common.c.
9427 (is_cilkplus_reduce_builtin): Likewise.
9428 (find_rank): Likewise.
9429 (extract_array_notation_exprs): Likewise.
9430 (replace_array_notations): Likewise.
9431 (find_inv_trees): Likewise.
9432 (replace_inv_trees): Likewise.
9433 (contains_array_notation_expr): Likewise.
9434 (find_correct_array_notation_type): Likewise.
9435 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9436 (struct inv_list): Moved this to c-family/array-notation-common.c.
9437 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
9439 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9441 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9442 reduction functions outside the for-loop. Added a check if the fundecl
9443 is non-NULL. Finally, removed an unwanted if-statement, and made the
9446 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9448 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9449 condition of the if-statement matches the rank of else-block and then-
9450 block when array notations are used.
9451 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9452 expression after the entire function body is parsed.
9453 (c_parser_expr_no_commas): Delayed creating array notation expressions
9454 to the end of function parsing.
9455 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9456 whole if-statement instead of just the condition.
9457 (expand_array_notation_exprs): Added MODIFY_EXPR case.
9459 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9462 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9463 array to NULL_TREE if they are unused. Also added a check for the
9464 field to be NULL before its fields are used in future.
9466 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9469 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9470 (build_array_notation_expr): Likewise.
9472 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9474 * c-typeck.c (build_array_ref): Added a check to see if array's
9475 index is greater than one. If true, then emit an error.
9476 (build_function_call_vec): Exclude error reporting and checking
9477 for builtin array-notation functions.
9478 (convert_arguments): Likewise.
9479 (c_finish_return): Added a check for array notations as a return
9480 expression. If true, then emit an error.
9481 (c_finish_loop): Added a check for array notations in a loop
9482 condition. If true then emit an error.
9483 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9484 (build_binary_op): Added a check for array notation expr inside
9485 op1 and op0. If present, we call another function to find correct
9487 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9488 * c-parser.c (c_parser_compound_statement): Check if array
9489 notation code is used in tree, if so, then transform them into
9491 (c_parser_expr_no_commas): Check if array notation is used in LHS
9492 or RHS, if so, then build array notation expression instead of
9494 (c_parser_postfix_expression_after_primary): Added a check for
9495 colon(s) after square braces, if so then handle it like an array
9496 notation. Also, break up array notations in unary op if found.
9497 (c_parser_direct_declarator_inner): Added a check for array
9499 (c_parser_compound_statement): Added a check for array notation in
9500 a stmt. If one is present, then expand array notation expr.
9501 (c_parser_if_statement): Likewise.
9502 (c_parser_switch_statement): Added a check for array notations in
9503 a switch statement's condition. If true, then output an error.
9504 (c_parser_while_statement): Similarly, but for a while.
9505 (c_parser_do_statement): Similarly, but for a do-while.
9506 (c_parser_for_statement): Similarly, but for a for-loop.
9507 (c_parser_unary_expression): Check if array notation is used in a
9508 pre-increment or pre-decrement expression. If true, then expand
9510 (c_parser_array_notation): New function.
9511 * c-array-notation.c: New file.
9512 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
9514 2013-05-23 Mike Stump <mikestump@comcast.net>
9516 * c-typeck.c (convert_for_assignment): Handle references to memory
9519 2013-05-16 Jason Merrill <jason@redhat.com>
9521 * Make-lang.in (cc1$(exeext)): Use link mutex.
9523 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9525 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9526 to simply use OPT_Wpointer_arith.
9527 (build_unary_op): Likewise.
9529 2013-04-03 Jakub Jelinek <jakub@redhat.com>
9532 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9533 argument. If set, or it temporarily for parsing of the first
9534 argument into force_folding_builtin_constant_p.
9535 (c_parser_postfix_expression): Adjust callers.
9537 2013-03-21 Richard Biener <rguenther@suse.de>
9539 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9540 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9542 2013-02-12 Marek Polacek <polacek@redhat.com>
9545 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9548 2013-01-24 Jakub Jelinek <jakub@redhat.com>
9551 * c-typeck.c (set_nonincremental_init_from_string): If
9552 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9554 (process_init_element): Likewise.
9556 2012-12-20 Jakub Jelinek <jakub@redhat.com>
9559 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9560 argument, don't call default_function_array_conversion
9561 nor c_fully_fold here.
9562 (c_parser_asm_statement): Adjust callers.
9563 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9564 and outputs here, and call default_function_array_conversion
9565 on inputs that don't need to be addressable.
9567 2012-12-18 Jakub Jelinek <jakub@redhat.com>
9570 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9571 warning require that both c_common_unsigned_type as well as
9572 c_common_signed_type is the same for both mvl and mvr types.
9574 2012-11-16 Diego Novillo <dnovillo@google.com>
9576 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9578 * c-common.c: Use new vec API in vec.h.
9579 * c-common.h: Likewise.
9580 * c-gimplify.c: Likewise.
9581 * c-pragma.c: Likewise.
9582 * c-pretty-print.c: Likewise.
9583 * c-pretty-print.h: Likewise.
9584 * c-semantics.c: Likewise.
9585 * c-decl.c: Likewise.
9586 * c-parser.c: Likewise.
9587 * c-tree.h: Likewise.
9588 * c-typeck.c: Likewise.
9590 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9593 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9595 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9598 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9599 shadows a function, unless the variable is a function or a
9600 pointer-to-function.
9602 2012-10-12 Jakub Jelinek <jakub@redhat.com>
9605 * c-parser.c (struct c_tree_loc_pair): Removed.
9606 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9607 add location_t * and tree * arguments, fill in array of 3
9608 sizeof_arg trees and corresponding locs.
9609 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9610 c_parser_expr_list callers.
9611 (c_parser_postfix_expression_after_primary): Likewise. Pass
9612 array of 3 sizeof_arg trees and locs (corresponding to first
9613 3 arguments) to sizeof_pointer_memaccess_warning.
9615 2012-10-09 Lawrence Crowl <crowl@google.com>
9617 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9618 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9621 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9624 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9627 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
9630 * c-typeck.c: Include c-common.h.
9631 (enum stv_conv): Moved to c-common.h.
9632 (scalar_to_vector): Moved to c-common.c.
9633 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9634 * Make-lang.in: c-typeck.c depends on c-common.h.
9636 2012-10-04 Arnaud Charlet <charlet@adacore.com>
9638 * c-decl.c (c_write_global_declarations): Fix handling of
9641 2012-09-30 Sharad Singhai <singhai@google.com>
9643 * c-decl.c (c_write_global_declarations): Use a different method
9644 to determine if the dump has ben initialized.
9646 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9649 * c-typeck.c (c_cast_expr): When casting to a type requiring
9650 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9653 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9656 * c-typeck.c (build_unary_op): Pass original argument of
9657 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9658 any C_MAYBE_CONST_EXPR, if it has integer operands.
9659 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9660 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9661 to c_objc_common_truthvalue_conversion, then remove any
9662 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9663 c_objc_common_truthvalue_conversion not
9664 c_common_truthvalue_conversion.
9665 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9666 call note_integer_operands for arguments with integer operands
9667 that are not integer constants.
9669 2012-09-13 Jakub Jelinek <jakub@redhat.com>
9672 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9673 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9675 2012-08-31 Jakub Jelinek <jakub@redhat.com>
9678 * c-convert.c (convert): Don't call fold_convert_loc if
9679 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9680 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9681 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9683 2012-08-24 Jakub Jelinek <jakub@redhat.com>
9686 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9687 for nested and empty_ok arguments in the call to
9688 c_parser_declaration_or_fndef.
9690 2012-08-17 Jakub Jelinek <jakub@redhat.com>
9692 * c-tree.h (c_last_sizeof_arg): Declare.
9693 * c-parser.c (struct c_tree_loc_pair): New type.
9694 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9696 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9697 (c_parser_postfix_expression_after_primary): Likewise. Call
9698 sizeof_pointer_memaccess_warning if needed.
9699 (sizeof_ptr_memacc_comptypes): New function.
9700 * c-typeck.c (c_last_sizeof_arg): New global variable.
9701 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9703 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
9705 * c-lang.h (lang_decl): Add variable_size GTY option.
9707 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9709 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9710 * Make-lang.in: Fix dependencies.
9712 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9714 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9715 and add language Makefile hooks.
9716 * config-lang.in: New file.
9717 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9718 add the required "normal" config-lang.in rules.
9719 * c-lang.h: Moved from gcc/ to here.
9720 * c-tree.h: Likewise.
9721 * c-objc-common.c: Likewise.
9722 * c-objc-common.h: Likewise.
9723 * c-typeck.c: Likewise.
9724 * c-convert.c: Likewise.
9725 * c-lang.c: Likewise.
9726 * c-aux-info.c: Likewise.
9727 * c-errors.c: Likewise.
9728 * gccspec.c: Likewise.
9729 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9730 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9732 Copyright (C) 2012-2023 Free Software Foundation, Inc.
9734 Copying and distribution of this file, with or without modification,
9735 are permitted in any medium without royalty provided the copyright
9736 notice and this notice are preserved.