1 2022-11-15 David Malcolm <dmalcolm@redhat.com>
4 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
5 (class ana::c_translation_unit): New.
6 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
8 2022-11-12 Joseph Myers <joseph@codesourcery.com>
10 * c-decl.cc (start_underspecified_init)
11 (finish_underspecified_init): Handle name == NULL_TREE for
13 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
14 (shadow_tag_warned): Check for constexpr.
15 (start_decl): Add parameter do_push.
16 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
17 (grokdeclarator): Handle constexpr.
18 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
19 (declspecs_add_scspec): Handle constexpr.
20 * c-parser.cc (c_token_starts_compound_literal)
21 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
22 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
23 (c_parser_compound_literal_scspecs)
24 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
25 Update calls to start_init.
26 (c_parser_declaration_or_fndef, c_parser_initializer)
27 (c_parser_initval): Pass true for new argument of
28 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
29 constexpr compound literals.
30 (c_parser_static_assert_declaration_no_semi)
31 (c_parser_enum_specifier, c_parser_struct_declaration)
32 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
33 Call convert_lvalue_to_rvalue on expressions required to be
34 integer constant expressions.
35 (c_parser_omp_declare_reduction): Update call to start_init.
36 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
37 (C_DECL_DECLARED_CONSTEXPR): New macros.
38 (struct c_declspecs): Add constexpr_p.
39 (start_decl, convert_lvalue_to_rvalue, start_init): Update
41 * c-typeck.cc (require_constant_value, require_constant_elements):
43 (require_constexpr_value, maybe_get_constexpr_init)
44 (constexpr_init_fits_real_type, check_constexpr_init): New.
45 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
46 maybe_get_constexpr_init.
47 (store_init_value): Update call to digest_init.
48 (digest_init): Add parameters int_const_expr, arith_const_expr and
49 require_constexpr. Check constexpr initializers.
50 (constructor_top_level): Remove.
51 (struct initializer_stack): Remove top_level. Add
52 require_constexpr_value.
53 (start_init): Remove parameter top_level. Add parameters
54 init_require_constant and init_require_constexpr. Save
55 require_constexpr_value on stack.
56 (pop_init_level): Use a null pointer constant for zero initializer
57 of pointer initialized with {}.
58 (output_init_element): Update call to digest_init. Avoid passing
59 null pointer constants of pointer type through digest_init a
60 second time when initializing a constexpr object.
62 2022-11-03 Joseph Myers <joseph@codesourcery.com>
64 * c-decl.cc (in_underspecified_init, start_underspecified_init)
65 (finish_underspecified_init): New.
66 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
67 Give errors inside initializers of underspecified declarations.
68 (grokdeclarator): Handle (erroneous) case of C2X auto on a
70 (declspecs_add_type): Handle c2x_auto_p case.
71 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
73 (finish_declspecs): Handle c2x_auto_p.
74 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
75 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
76 (struct c_declspecs): Add c2x_auto_p.
77 (start_underspecified_init, finish_underspecified_init): New
79 * c-typeck.cc (build_external_ref): Give error for underspecified
80 declaration referenced in its initializer.
82 2022-10-28 Joseph Myers <joseph@codesourcery.com>
84 * c-decl.cc (grokdeclarator): Pass
85 arg_info->no_named_args_stdarg_p to build_function_type.
86 (grokparms): Check arg_info->no_named_args_stdarg_p before
87 converting () to (void).
88 (build_arg_info): Initialize no_named_args_stdarg_p.
89 (get_parm_info): Set no_named_args_stdarg_p.
90 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
92 (store_parm_decls): Count (...) functions as prototyped.
93 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
94 parenthesis to start parameter list.
95 (c_parser_parms_list_declarator): Always allow '...' with no
96 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
97 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
98 * c-typeck.cc (composite_type): Handle
99 TYPE_NO_NAMED_ARGS_STDARG_P.
100 (function_types_compatible_p): Compare
101 TYPE_NO_NAMED_ARGS_STDARG_P.
103 2022-10-28 Jakub Jelinek <jakub@redhat.com>
105 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
106 comma before the first clause.
107 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
108 c_parser_omp_flush, c_parser_omp_scan_loop_body,
109 c_parser_omp_ordered, c_finish_omp_declare_variant,
110 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
111 c_parser_omp_requires, c_parser_omp_error,
112 c_parser_omp_assumption_clauses): Likewise.
114 2022-10-28 Joseph Myers <joseph@codesourcery.com>
117 * c-convert.cc (c_convert): Handle enums with underlying boolean
119 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
120 enums with enum type specifier, but give errors for storage class
121 specifiers, qualifiers or alignment specifiers in non-definition
122 declarations of such enums.
123 (grokdeclarator): Give error for non-definition use of type
124 specifier with an enum type specifier.
125 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
126 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
127 (xref_tag): Update call to parser_xref_tag.
128 (start_enum): Add argument fixed_underlying_type. Complete enum
129 type with a fixed underlying type given in the definition. Give
130 error for defining without a fixed underlying type in the
131 definition if one was given in a prior declaration. Do not mark
132 enums with fixed underlying type as packed for -fshort-enums.
133 Store the enum type in the_enum.
134 (finish_enum): Do not adjust types of values or check their range
135 for an enum with a fixed underlying type. Set underlying type of
137 (build_enumerator): Check enumeration constants for enum with
138 fixed underlying type against that type and convert to that type.
139 Increment in the underlying integer type, with handling for bool.
140 (c_simulate_enum_decl): Update call to start_enum.
141 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
142 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
143 rather than recomputing an underlying type based on size.
144 * c-parser.cc (c_parser_declspecs)
145 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
146 Set has_enum_type_specifier for type specifiers.
147 (c_parser_enum_specifier): Handle enum type specifiers.
148 (c_parser_struct_or_union_specifier): Update call to
150 (c_parser_omp_atomic): Check for boolean increment or decrement
151 using C_BOOLEAN_TYPE_P.
152 * c-tree.h (C_BOOLEAN_TYPE_P): New.
153 (struct c_typespec): Add has_enum_type_specifier.
154 (struct c_declspecs): Add enum_type_specifier_ref_p.
155 (struct c_enum_contents): Add enum_type.
156 (start_enum, parser_xref_tag): Update prototypes.
157 * c-typeck.cc (composite_type): Allow for enumerated types
158 compatible with bool.
159 (common_type, comptypes_internal, perform_integral_promotions):
160 Use ENUM_UNDERLYING_TYPE.
161 (parser_build_binary_op, build_unary_op, convert_for_assignment)
162 (c_finish_return, c_start_switch, build_binary_op): Check for
163 boolean types using C_BOOLEAN_TYPE_P.
165 2022-10-24 Jakub Jelinek <jakub@redhat.com>
168 * c-typeck.cc (build_binary_op): Pass operands before excess precision
169 promotions to scalar_to_vector call.
171 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
173 * c-decl.cc (finish_function): Ignore hosted when deciding
174 whether to implicitly return zero, but check noreturn.
175 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
176 requirements to just MAIN_NAME_P when hosted, or `int main'
179 2022-10-20 Richard Biener <rguenther@suse.de>
183 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
184 the parsed IL and zap the body on error.
186 2022-10-18 Joseph Myers <joseph@codesourcery.com>
189 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
190 with previous declaration visible.
192 2022-10-18 Joseph Myers <joseph@codesourcery.com>
195 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
196 convert all to the type of the enumeration. pedwarn if no integer
197 type fits all enumerators and default to
198 widest_integer_literal_type_node in that case. Otherwise pedwarn
199 for type wider than intmax_t.
200 (build_enumerator): pedwarn for enumerators outside the range of
201 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
202 enumerators outside the range of int. On overflow, attempt to
203 find a wider type that can hold the value of the next enumerator.
204 Do not convert value to type determined with
205 c_common_type_for_size.
207 2022-10-14 Jakub Jelinek <jakub@redhat.com>
209 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
212 2022-10-14 Joseph Myers <joseph@codesourcery.com>
214 * c-decl.cc (build_compound_literal): Add parameter scspecs.
215 Handle storage class specifiers.
216 * c-parser.cc (c_token_starts_compound_literal)
217 (c_parser_compound_literal_scspecs): New.
218 (c_parser_postfix_expression_after_paren_type): Add parameter
219 scspecs. Call pedwarn_c11 for use of storage class specifiers.
220 Update call to build_compound_literal.
221 (c_parser_cast_expression, c_parser_sizeof_expression)
222 (c_parser_alignof_expression): Handle storage class specifiers for
223 compound literals. Update calls to
224 c_parser_postfix_expression_after_paren_type.
225 (c_parser_postfix_expression): Update syntax comment.
226 * c-tree.h (build_compound_literal): Update prototype.
227 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
228 register compound literal.
230 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
232 * c-decl.cc (flexible_array_member_type_p): New function.
233 (one_element_array_type_p): Likewise.
234 (zero_length_array_type_p): Likewise.
235 (add_flexible_array_elts_to_size): Call new utility
236 routine flexible_array_member_type_p.
237 (is_flexible_array_member_p): New function.
238 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
240 2022-10-06 Joseph Myers <joseph@codesourcery.com>
242 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
244 (c_keyword_starts_typename, c_token_starts_declspecs)
245 (c_parser_declspecs, c_parser_objc_selector): Handle
247 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
248 Distinguish typeof for C2x from __typeof__ for all standard
249 versions and typeof before C2x.
250 * c-typeck.cc (build_function_call_vec): Use unqualified version
251 of non-void return type.
252 (build_unary_op): Use unqualified type for increment and
255 2022-10-06 Jakub Jelinek <jakub@redhat.com>
257 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
258 call for holds clause on assume construct.
260 2022-10-06 Jakub Jelinek <jakub@redhat.com>
263 * c-parser.cc (handle_assume_attribute): New function.
264 (c_parser_declaration_or_fndef): Handle assume attribute.
265 (c_parser_attribute_arguments): Add assume_attr argument,
266 if true, parse first argument as conditional expression.
267 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
268 c_parser_attribute_arguments callers.
269 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
272 2022-10-04 Jakub Jelinek <jakub@redhat.com>
274 * c-lang.h (struct c_omp_declare_target_attr): New type.
275 (current_omp_declare_target_attribute): Change type from
276 int to vec<c_omp_declare_target_attr, va_gc> *.
277 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
278 If last pushed directive was begin declare target, use different
279 wording and simplify format strings for easier translations.
280 (c_parser_omp_clause_device_type): Uncomment
281 check_no_duplicate_clause call.
282 (c_parser_omp_declare_target): Adjust for the
283 current_omp_declare_target_attribute type change, push { -1 }.
284 Use error_at rather than warning_at for declare target with
285 only device_type clauses.
286 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
287 (c_parser_omp_begin): Add begin declare target support.
288 (c_parser_omp_end): Adjust for the
289 current_omp_declare_target_attribute type change, adjust
290 diagnostics wording and simplify format strings for easier
292 * c-decl.cc (current_omp_declare_target_attribute): Change type from
293 int to vec<c_omp_declare_target_attr, va_gc> *.
294 (c_decl_attributes): Adjust for the
295 current_omp_declare_target_attribute type change. If device_type
296 was present on begin declare target, add "omp declare target host"
297 and/or "omp declare target nohost" attributes.
299 2022-09-29 Joseph Myers <joseph@codesourcery.com>
301 * c-decl.cc (handle_std_noreturn_attribute): New function.
302 (std_attribute_table): Add _Noreturn and noreturn.
304 2022-09-27 Jakub Jelinek <jakub@redhat.com>
306 * c-lang.h (current_omp_begin_assumes): Declare.
307 * c-parser.cc: Include bitmap.h.
308 (c_parser_omp_end_declare_target): Rename to ...
309 (c_parser_omp_end): ... this. Handle also end assumes.
310 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
311 c_parser_omp_assumes, c_parser_omp_assume): New functions.
312 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
313 without corresponding #pragma omp end assumes.
314 (c_parser_pragma): Use %s in may only be used at file scope
315 diagnostics to decrease number of translatable messages. Handle
316 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
317 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
318 for it rather than c_parser_omp_end_declare_target.
319 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
320 * c-decl.cc (current_omp_begin_assumes): Define.
322 2022-09-24 Jakub Jelinek <jakub@redhat.com>
325 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
326 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
327 t2 have different types.
329 2022-09-22 David Malcolm <dmalcolm@redhat.com>
332 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
333 (c_parser_cast_expression): Likewise.
334 (c_parser_alignof_expression): Likewise.
335 (c_parser_postfix_expression_after_paren_type): Likewise.
336 (c_parser_postfix_expression_after_primary): Likewise.
337 (c_parser_expression): Likewise.
338 (c_parser_omp_variable_list): Likewise.
339 (c_parser_transaction_expression): Likewise.
340 * c-tree.h (c_expr::set_error): Likewise.
341 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
342 (parser_build_unary_op): Likewise.
343 (parser_build_binary_op): Likewise.
344 (digest_init): Likewise.
345 (pop_init_level): Likewise.
346 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
348 2022-09-19 Marek Polacek <polacek@redhat.com>
351 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
354 2022-09-15 Richard Biener <rguenther@suse.de>
356 * c-decl.cc (build_void_list_node): Remove.
358 2022-09-14 Julian Brown <julian@codesourcery.com>
360 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
363 2022-09-07 Joseph Myers <joseph@codesourcery.com>
365 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
366 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
367 for C2x spellings of keywords.
368 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
370 2022-09-06 Jakub Jelinek <jakub@redhat.com>
372 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
373 in omp_cur_iteration - 1 has integer_type_node type.
375 2022-09-03 Jakub Jelinek <jakub@redhat.com>
377 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
378 (c_parser_omp_clause_depend_sink): Renamed to ...
379 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
380 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
381 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
382 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
383 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
384 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
385 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
386 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
387 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
388 (c_parser_omp_clause_doacross): New function.
389 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
390 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
391 OMP_CLAUSE_DEPEND_SOURCE.
392 (c_parser_omp_for_loop): Don't diagnose here linear clause together
393 with ordered with argument.
394 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
396 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
397 (c_parser_omp_ordered): Handle also doacross and adjust for it
399 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
400 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
402 2022-09-02 David Malcolm <dmalcolm@redhat.com>
405 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
406 (c_parser_expr_no_commas): Likewise.
407 (c_parser_conditional_expression): Likewise.
408 (c_parser_binary_expression): Clear m_decimal when popping the
410 (c_parser_unary_expression): Clear ret.m_decimal.
411 (c_parser_has_attribute_expression): Likewise for result.
412 (c_parser_predefined_identifier): Likewise for expr.
413 (c_parser_postfix_expression): Likewise for expr.
414 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
416 * c-tree.h (c_expr::m_decimal): New bitfield.
417 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
418 (parser_build_binary_op): Call check_for_xor_used_as_pow.
420 2022-09-01 Joseph Myers <joseph@codesourcery.com>
422 * c-decl.cc (grokparms): Handle () in a function declaration the
423 same as (void) for C2X.
425 2022-08-31 Joseph Myers <joseph@codesourcery.com>
427 * c-parser.cc (c_parser_label): Pass attributes to do_case.
428 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
431 2022-08-26 Jakub Jelinek <jakub@redhat.com>
433 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
435 2022-08-25 Marek Polacek <polacek@redhat.com>
437 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
438 Give a better diagnostic when converting to nullptr_t.
439 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
441 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
442 (c_parser_postfix_expression): Handle RID_NULLPTR.
443 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
445 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
446 (build_conditional_expr): Handle the case when the second/third operand
447 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
448 (convert_for_assignment): Handle converting an expression of type
449 nullptr_t to pointer/bool.
450 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
451 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
453 2022-08-25 Joseph Myers <joseph@codesourcery.com>
455 * c-decl.cc (start_decl): Do not diagnose initialization of
456 variable-sized objects here.
457 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
459 (c_parser_initializer): Diagnose initialization of variable-sized
460 objects other than with braced initializer.
461 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
462 braces and update diagnostic text. Diagnose initialization of
463 variable-sized objects with nonempty braces.
464 * c-typeck.cc (digest_init): Update diagnostic for initialization
465 of variable-sized objects.
466 (really_start_incremental_init, set_designator)
467 (process_init_element): Update comments.
468 (pop_init_level): Allow scalar empty initializers.
470 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
471 Chung-Lin Tang <cltang@codesourcery.com>
474 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
475 instead of removed langhook.
476 * c-typeck.cc (c_finish_omp_clauses): Likewise.
478 2022-08-11 Marek Polacek <polacek@redhat.com>
481 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
482 Call suppress_warning.
483 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
484 (c_parser_omp_declare_reduction): Pass omp_priv down to
485 c_parser_initializer.
487 2022-08-08 Tom Honermann <tom@honermann.net>
489 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
490 of CPP_UTF8STRING when char8_t support is enabled.
491 * c-typeck.cc (digest_init): Allow initialization of an array
492 of character type by a string literal with type array of
495 2022-08-01 David Malcolm <dmalcolm@redhat.com>
497 * c-typeck.cc (build_c_cast): Quote names of address spaces in
499 (convert_for_assignment): Add a note to address space mismatch
500 diagnostics, specifying the expected and actual types.
502 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
504 PR preprocessor/97498
505 * c-parser.cc (c_parser_pragma): Set input_location to the
506 location of the pragma, rather than the start of the line.
508 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
509 Chung-Lin Tang <cltang@codesourcery.com>
510 Thomas Schwinge <thomas@codesourcery.com>
512 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
513 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
514 OMP_REQUIRES_TARGET_USED.
515 (c_parser_omp_requires): Remove sorry.
517 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
519 * c-parser.cc (c_parser_omp_target_enter_data,
520 c_parser_omp_target_exit_data): Accept tofrom
521 map-type modifier but use 'to' / 'from' internally.
523 2022-06-16 David Malcolm <dmalcolm@redhat.com>
525 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
526 group the warning with any note.
527 (warn_about_goto): Likewise to group error or warning with note.
528 Bail out if the warning wasn't emitted, to avoid emitting orphan
530 (lookup_label_for_goto): Add auto_diagnostic_group to
531 group the error with the note.
532 (check_earlier_gotos): Likewise.
533 (c_check_switch_jump_warnings): Likewise for any error/warning.
534 Conditionalize emission of the notes.
535 (diagnose_uninitialized_cst_member): Likewise for warning,
536 conditionalizing emission of the note.
537 (grokdeclarator): Add auto_diagnostic_group to group the "array
538 type has incomplete element type" error with any note.
539 (parser_xref_tag): Add auto_diagnostic_group to group warnings
540 with their notes. Conditionalize emission of notes.
541 (start_struct): Add auto_diagnostic_group to group the
542 "redefinition of" errors with any note.
543 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
544 (check_for_loop_decls): Likewise for pre-C99 error.
546 2022-06-07 Jakub Jelinek <jakub@redhat.com>
548 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
549 style linear clause modifiers. Set
550 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
551 old style modifiers are used.
552 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
553 with val modifier on simd or for if the old style modifiers are
556 2022-06-02 David Malcolm <dmalcolm@redhat.com>
558 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
559 (c_get_sarif_source_language): New.
560 * c-tree.h (c_get_sarif_source_language): New decl.
562 2022-05-31 Jason Merrill <jason@redhat.com>
564 * Make-lang.in (c.tags): Look at *.cc.
566 2022-05-31 Jakub Jelinek <jakub@redhat.com>
568 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
571 2022-05-28 Jakub Jelinek <jakub@redhat.com>
573 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
574 seen first, use "%<to%>" or "%<enter%>" depending on
575 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
576 "%<to%> or %<enter%>" wording.
578 2022-05-27 Jakub Jelinek <jakub@redhat.com>
580 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
581 (c_parser_omp_all_clauses): For to clause on declare target, use
582 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
583 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
584 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
585 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
586 OMP_CLAUSE_TO_DECLARE.
587 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
588 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
589 name in diagnostics instead of
590 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
592 2022-05-25 Jakub Jelinek <jakub@redhat.com>
595 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
596 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
597 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
598 diagnostic and fixit hint if DATUM has pointer type.
599 * c-parser.cc (c_parser_postfix_expression,
600 c_parser_omp_variable_list): Adjust build_component_ref callers.
601 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
604 2022-05-24 Jakub Jelinek <jakub@redhat.com>
607 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
609 2022-05-18 Marek Polacek <polacek@redhat.com>
612 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
614 * c-tree.h (comptypes_check_enum_int): Declare.
615 * c-typeck.cc (comptypes): No longer static.
617 2022-05-17 Marek Polacek <polacek@redhat.com>
619 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
622 2022-05-17 Jakub Jelinek <jakub@redhat.com>
624 * c-parser.cc (c_parser_omp_clause_depend): Parse
625 inoutset depend-kind.
626 (c_parser_omp_depobj): Likewise.
628 2022-05-16 Martin Liska <mliska@suse.cz>
630 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
632 2022-05-12 Jakub Jelinek <jakub@redhat.com>
634 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
636 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
637 in postfix expressions.
638 (c_parser_omp_variable_list): Handle omp_all_memory in depend
640 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
641 keyword in depend clause as null_pointer_node, diagnose invalid
644 2022-05-09 Martin Liska <mliska@suse.cz>
646 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
648 (c_parser_binary_expression): Likewise.
650 2022-05-07 Marek Polacek <polacek@redhat.com>
654 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
656 2022-04-08 Jakub Jelinek <jakub@redhat.com>
659 * c-typeck.cc (c_build_va_arg): Reject function types.
661 2022-03-22 Marek Polacek <polacek@redhat.com>
665 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
666 (start_init): Set it.
667 (finish_init): Restore constructor_designated.
668 (push_init_level): Set constructor_designated to the value of
669 constructor_designated in the upper constructor_stack.
671 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
674 * c-typeck.cc (handle_omp_array_sections_1)
675 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
676 instead of 'c_omp_map_clause_name'.
678 2022-03-09 Joseph Myers <joseph@codesourcery.com>
680 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
681 differently from earlier standards for unprototyped function type
684 2022-03-09 Jakub Jelinek <jakub@redhat.com>
687 * c-fold.cc (c_fully_fold_internal): Don't emit
688 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
689 * c-typeck.cc (build_binary_op): Likewise.
691 2022-03-07 Jakub Jelinek <jakub@redhat.com>
693 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
696 2022-02-23 Richard Biener <rguenther@suse.de>
698 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
699 SSA names without definition.
700 (c_parser_gimple_declaration): Handle pointer typed SSA names.
702 2022-02-17 Jakub Jelinek <jakub@redhat.com>
705 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
706 convert_lvalue_to_rvalue and build_indirect_ref instead of
707 build_simple_mem_ref.
709 2022-02-11 Richard Biener <rguenther@suse.de>
711 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
714 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
716 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
718 (c_parser_omp_variable_list): Handle array sections.
719 (c_parser_omp_clause_has_device_addr): Added.
720 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
722 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
724 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
725 (c_finish_omp_clauses): Handle array sections.
727 2022-02-09 Jakub Jelinek <jakub@redhat.com>
730 * c-parser.cc (c_parser_postfix_expression)
731 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
732 instead of build1_loc to build PAREN_EXPR.
733 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
734 * c-fold.cc (c_fully_fold_internal): Likewise.
736 2022-01-17 Martin Liska <mliska@suse.cz>
738 * Make-lang.in: Rename .c names to .cc.
739 * c-convert.cc: Likewise.
740 * c-decl.cc (struct lang_identifier): Likewise.
741 (pop_scope): Likewise.
742 (finish_decl): Likewise.
743 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
744 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
745 * c-parser.h (GCC_C_PARSER_H): Likewise.
746 * c-tree.h (c_keyword_starts_typename): Likewise.
747 (finish_declspecs): Likewise.
748 (c_get_alias_set): Likewise.
749 (enum c_oracle_request): Likewise.
750 (tag_exists_p): Likewise.
751 (set_c_expr_source_range): Likewise.
752 * c-typeck.cc (c_common_type): Likewise.
753 (c_finish_omp_clauses): Likewise.
754 * config-lang.in: Likewise.
756 2022-01-17 Martin Liska <mliska@suse.cz>
758 * c-aux-info.c: Moved to...
759 * c-aux-info.cc: ...here.
760 * c-convert.c: Moved to...
761 * c-convert.cc: ...here.
762 * c-decl.c: Moved to...
763 * c-decl.cc: ...here.
764 * c-errors.c: Moved to...
765 * c-errors.cc: ...here.
766 * c-fold.c: Moved to...
767 * c-fold.cc: ...here.
768 * c-lang.c: Moved to...
769 * c-lang.cc: ...here.
770 * c-objc-common.c: Moved to...
771 * c-objc-common.cc: ...here.
772 * c-parser.c: Moved to...
773 * c-parser.cc: ...here.
774 * c-typeck.c: Moved to...
775 * c-typeck.cc: ...here.
776 * gccspec.c: Moved to...
777 * gccspec.cc: ...here.
778 * gimple-parser.c: Moved to...
779 * gimple-parser.cc: ...here.
781 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
783 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
785 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
788 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
789 outer node for ARRAY_REFs.
791 2022-01-01 Jakub Jelinek <jakub@redhat.com>
794 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
795 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
797 2021-12-17 Marek Polacek <polacek@redhat.com>
800 * c-decl.c (c_warn_unused_attributes): Don't warn for
802 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
803 arguments when the attribute is ignored.
805 2021-12-14 Jakub Jelinek <jakub@redhat.com>
808 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
809 consume the pragma and silently skip to the pragma eol.
811 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
813 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
814 * c-parser.c: Likewise.
816 2021-12-09 Jakub Jelinek <jakub@redhat.com>
819 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
820 to resort_data.new_value.
822 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
824 * c-parser.c (struct omp_dim): New struct type for use inside
825 c_parser_omp_variable_list.
826 (c_parser_omp_variable_list): Allow multiple levels of array and
827 component accesses in array section base-pointer expression.
828 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
829 c_parser_omp_var_list_parens.
830 (c_parser_omp_clause_from): Likewise.
831 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
832 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
834 (c_finish_omp_clauses): Extend allowed ranged of expressions
835 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
837 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
840 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
841 call to c_parser_omp_variable_list to 'true'.
842 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
844 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
846 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
848 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
849 orphan loop" checking.
851 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
852 Thomas Schwinge <thomas@codesourcery.com>
854 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
855 OpenACC gang reductions.
857 2021-11-30 Richard Biener <rguenther@suse.de>
859 * gimple-parser.c (c_parser_gimple_postfix_expression):
860 avoid unreachable code after break.
862 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
865 * Make-lang.in: Use ETAGS variable in TAGS target.
867 2021-11-29 Richard Biener <rguenther@suse.de>
869 * c-typeck.c (c_tree_equal): Remove unreachable return.
870 * c-parser.c (get_matching_symbol): Likewise.
872 2021-11-23 Jakub Jelinek <jakub@redhat.com>
874 * c-typeck.c (c_clone_omp_udr): Don't initialize
875 id.transform_lang_insert_block.
877 2021-11-19 Martin Sebor <msebor@redhat.com>
881 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
882 code resulting from macro expansion.
884 2021-11-19 Martin Liska <mliska@suse.cz>
887 2021-11-19 Martin Liska <mliska@suse.cz>
889 * c-parser.c (add_debug_begin_stmt): Use option directly.
891 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
893 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
894 * c-parser.c (c_parser_postfix_expression): Likewise.
896 2021-11-18 Martin Liska <mliska@suse.cz>
898 * c-parser.c (add_debug_begin_stmt): Use option directly.
900 2021-11-17 Martin Sebor <msebor@redhat.com>
903 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
904 bounds before deciding if they're constant.
906 2021-11-15 Jakub Jelinek <jakub@redhat.com>
908 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
909 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
911 2021-11-11 Jakub Jelinek <jakub@redhat.com>
913 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
914 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
915 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
916 OMP_CLAUSE_NUM_TEAMS_EXPR.
917 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
918 combined target teams even lower-bound expression.
920 2021-11-11 Richard Biener <rguenther@suse.de>
922 * gimple-parser.c: Shuffle bitmap.h include.
924 2021-11-03 Joseph Myers <joseph@codesourcery.com>
927 * c-convert.c (c_convert): New function, based on convert.
928 (convert): Make into wrapper of c_convert.
929 (convert_init): New function.
930 * c-typeck.c (enum impl_conv): Add ic_init_const.
931 (convert_for_assignment): Handle ic_init_const like ic_init. Add
932 new argument to convert_and_check call.
933 (digest_init): Pass ic_init_const to convert_for_assignment for
934 initializers required to be constant.
936 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
938 * c-tree.h (c_simulate_record_decl): Declare.
939 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
940 * c-decl.c (c_simulate_record_decl): New function.
942 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
945 * Make-lang.in: Add dummy c.install-dvi target.
947 2021-10-15 Richard Biener <rguenther@suse.de>
951 (c_parser_gimple_postfix_expression_after_primary): Check
952 for a pointer do be dereferenced by ->.
954 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
956 * c-parser.c (c_finish_omp_declare_variant): Change call from
957 c_omp_check_context_selector to omp_check_context_selector. Change
958 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
960 2021-10-09 Jakub Jelinek <jakub@redhat.com>
962 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
963 (c_parser_omp_scan_loop_body): Use it.
964 (c_parser_omp_sections_scope): Likewise.
966 2021-10-07 Richard Biener <rguenther@suse.de>
968 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
970 2021-10-05 Richard Biener <rguenther@suse.de>
973 * gimple-parser.c (c_parser_gimple_postfix_expression):
974 Accept more address _Literals.
976 2021-10-04 Marek Polacek <polacek@redhat.com>
979 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
981 2021-10-01 Martin Sebor <msebor@redhat.com>
984 * c-typeck.c (maybe_warn_for_null_address): New function.
985 (build_binary_op): Call it.
987 2021-10-01 Jakub Jelinek <jakub@redhat.com>
988 Richard Biener <rguenther@suse.de>
991 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
992 for division even for SANITIZE_SI_OVERFLOW.
994 2021-10-01 Jakub Jelinek <jakub@redhat.com>
996 * c-parser.c (c_parser_omp_clause_order): Set
997 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
999 2021-09-28 Andrew Pinski <apinski@marvell.com>
1002 * c-parser.c (c_parser_statement_after_labels): Pass
1003 the c_expr instead of the tree to c_finish_goto_ptr.
1004 * c-typeck.c (c_finish_goto_ptr): Change the second
1005 argument type to c_expr.
1006 * c-tree.h (c_finish_goto_ptr): Likewise.
1007 Error out if the expression was not of a pointer type.
1009 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1011 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1014 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1016 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1017 and reproducible modifiers.
1018 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1020 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1022 * c-parser.c (c_parser_omp_clause_default): Handle private and
1023 firstprivate arguments, adjust diagnostics on unknown argument.
1025 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1027 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1030 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1032 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1033 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1034 don't call build_conditional_expr, instead build a COND_EXPR directly.
1035 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1036 if omp_atomic_lhs even in more cases for >, < or ==.
1037 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1038 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1039 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1040 * c-typeck.c (build_binary_op): For flag_openmp only handle
1043 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1045 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1048 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1050 * c-decl.c (enum deprecated_states): Add unavailable state.
1051 (merge_decls): Copy unavailability.
1052 (quals_from_declspecs): Handle unavailable case.
1053 (start_decl): Amend the logic handling suppression of nested
1054 deprecation states to include unavailability.
1055 (smallest_type_quals_location): Amend comment.
1056 (grokdeclarator): Handle the unavailable deprecation state.
1057 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1058 * c-tree.h (struct c_declspecs): Add unavailable_p.
1059 * c-typeck.c (build_component_ref): Handle unavailability.
1060 (build_external_ref): Likewise.
1062 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1063 Joseph Myers <joseph@codesourcery.com>
1066 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1067 types of both (non-function) decls as error_mark_node, so that the
1068 middle-end can see the code is malformed.
1069 (free_attr_access_data): Don't process if the type has been set to
1072 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1074 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1075 and 'ancestor' in 'target device' clauses.
1077 2021-08-23 Jakub Jelinek <jakub@redhat.com>
1079 * c-parser.c (c_parser_omp_clause_num_tasks,
1080 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1082 2021-08-22 Martin Uecker <muecker@gwdg.de>
1085 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1086 for pointers to arrays with qualifiers.
1087 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1088 to arrays when the other pointer is a void pointer. Update warnings.
1089 (convert_for_assignment): Update warnings for C2X when converting from
1090 void* with qualifiers to a pointer to array with the same qualifiers.
1092 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1094 * c-parser.c (c_parser_omp_error): New function.
1095 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1097 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1099 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1100 comma at the end of list.
1101 (c_parser_omp_requires): Likewise.
1103 2021-08-19 Jakub Jelinek <jakub@redhat.com>
1105 * c-parser.c (c_parser_omp_requires): Don't call
1106 c_parser_peek_2nd_token and optionally consume token if current
1107 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1109 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1111 * c-parser.c (c_parser_omp_nothing): New function.
1112 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1114 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1116 * c-parser.c (c_parser_statement_after_labels): Add restart label
1117 near the start of the function. If c_parser_pragma returns false,
1119 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1120 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1121 return what c_parser_omp_declare returned. Return true instead of
1122 false after emitting errors that the directive is not allowed in
1123 pragma_stmt context.
1124 (c_parser_omp_ordered): Return true instead of
1125 false after emitting errors that the directive is not allowed in
1126 pragma_stmt context.
1127 (c_parser_omp_target_update): Likewise.
1128 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1129 Change return type from tree to bool, return false if the
1130 directive should be ignored in pragma_stmt contexts.
1131 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1132 return their result directly.
1133 (c_parser_omp_cancellation_point): Change return type from void to
1134 bool, return false if the directive should be ignored in pragma_stmt
1136 (c_parser_omp_declare): Likewise.
1138 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1140 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1141 (c_parser_omp_scope): New function.
1142 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1144 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1146 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1147 (c_parser_omp_clause_filter): New function.
1148 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1149 (OMP_MASKED_CLAUSE_MASK): Define.
1150 (c_parser_omp_masked): New function.
1151 (c_parser_omp_parallel): Handle parallel masked.
1152 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1153 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1155 2021-08-12 Martin Uecker <muecker@gwdg.de>
1159 * c-typeck.c (c_expr_sizeof_type): Evaluate
1160 size expressions for structs of variable size.
1162 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
1164 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1165 'primary' as alias for 'master'.
1167 2021-08-10 Martin Uecker <muecker@gwdg.de>
1170 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1171 size expressions for structs of variable size.
1173 2021-08-06 Tamar Christina <tamar.christina@arm.com>
1175 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1176 * c-tree.h (c_simulate_enum_decl): Likewise.
1178 2021-08-06 Martin Sebor <msebor@redhat.com>
1180 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1181 vec arguments to by-reference.
1182 (c_finish_omp_declare_simd): Same.
1183 (c_parser_compound_statement_nostart): Same.
1184 (c_parser_for_statement): Same.
1185 (c_parser_objc_methodprotolist): Same.
1186 (c_parser_oacc_routine): Same.
1187 (c_parser_omp_for_loop): Same.
1188 (c_parser_omp_declare_simd): Same.
1190 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1191 Joseph Myers <joseph@codesourcery.com>
1192 Cesar Philippidis <cesar@codesourcery.com>
1194 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1195 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1196 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1197 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1199 2021-07-20 Martin Sebor <msebor@redhat.com>
1201 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1203 * c-typeck.c (c_build_function_call_vec): Same.
1205 2021-07-15 Martin Sebor <msebor@redhat.com>
1209 * c-decl.c (get_parm_array_spec): Strip nops.
1211 2021-07-06 Martin Sebor <msebor@redhat.com>
1213 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1215 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1218 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1219 appears before a CPP_NAME.
1221 2021-06-25 Martin Sebor <msebor@redhat.com>
1223 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1224 warning_suppressed_p, suppress_warning, and copy_no_warning.
1225 (diagnose_mismatched_decls): Same.
1226 (duplicate_decls): Same.
1227 (grokdeclarator): Same.
1228 (finish_function): Same.
1229 (c_write_global_declarations_1): Same.
1230 * c-fold.c (c_fully_fold_internal): Same.
1231 * c-parser.c (c_parser_expr_no_commas): Same.
1232 (c_parser_postfix_expression): Same.
1233 * c-typeck.c (array_to_pointer_conversion): Same.
1234 (function_to_pointer_conversion): Same.
1235 (default_function_array_conversion): Same.
1236 (convert_lvalue_to_rvalue): Same.
1237 (default_conversion): Same.
1238 (build_indirect_ref): Same.
1239 (build_function_call_vec): Same.
1240 (build_atomic_assign): Same.
1241 (build_unary_op): Same.
1242 (c_finish_return): Same.
1243 (emit_side_effect_warnings): Same.
1244 (c_finish_stmt_expr): Same.
1245 (c_omp_clause_copy_ctor): Same.
1247 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1250 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1253 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1256 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1259 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1261 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1262 C_ORT_OMP for clauses on target construct.
1263 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1264 (c_parser_omp_target): For non-combined target add
1265 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1266 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1267 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1268 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1269 never present on C_ORT_*DECLARE_SIMD.
1270 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1271 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1272 corresponding map clauses.
1274 2021-06-21 Jakub Jelinek <jakub@redhat.com>
1276 PR inline-asm/100785
1277 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1278 bit-fields addressable.
1280 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1282 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1285 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
1288 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1289 var in the error case.
1291 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1294 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1295 spot built-in functions.
1297 2021-06-06 Jakub Jelinek <jakub@redhat.com>
1300 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1301 even when target is combined with other constructs.
1303 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1306 * c-decl.c (finish_struct): Fix thinko in previous change.
1307 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1308 assignment and initialization for storage order purposes if the
1309 RHS is a call to a DECL_IS_MALLOC function.
1311 2021-06-04 Martin Sebor <msebor@redhat.com>
1314 * c-objc-common.c (print_type): Handle erroneous types.
1316 2021-06-03 Jakub Jelinek <jakub@redhat.com>
1319 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1320 after depend only cases.
1322 2021-05-31 Richard Biener <rguenther@suse.de>
1325 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1326 * c-parser.c (c_parser_postfix_expression): Likewise.
1328 2021-05-28 Richard Biener <rguenther@suse.de>
1331 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1332 invalid if conditions.
1334 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1337 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1338 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1339 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1340 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1341 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1342 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1343 if present in map_head, map_field_head or map_firstprivate_head
1346 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1348 * c-parser.c (c_parser_omp_clause_affinity): New.
1349 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1350 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1351 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1352 c_finish_omp_clauses): Likewise.
1354 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1357 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1358 field with a differing scalar storage order.
1360 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1363 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1364 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1365 if a decl is mentioned both in map clause and in such firstprivate
1366 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1368 2021-05-19 Jakub Jelinek <jakub@redhat.com>
1371 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1372 master when combined with taskloop.
1373 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1374 parallel master when not combined with taskloop.
1376 2021-05-18 Richard Biener <rguenther@suse.de>
1379 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1380 Diagnose calls to non-functions.
1381 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1383 2021-05-17 Richard Biener <rguenther@suse.de>
1386 * gimple-parser.c (c_parser_gimple_label): Avoid building
1387 a GIMPLE label with NULL label decl.
1389 2021-05-13 Martin Sebor <msebor@redhat.com>
1392 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1394 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1396 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1399 2021-05-10 Martin Liska <mliska@suse.cz>
1401 * c-aux-info.c (affix_data_type): Use startswith
1402 function instead of strncmp.
1403 * c-typeck.c (build_function_call_vec): Likewise.
1404 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1406 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1408 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1409 on the address of a pointer field in a record with reverse SSO.
1411 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1413 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1414 for || and && reductions.
1416 2021-04-29 Joseph Myers <joseph@codesourcery.com>
1418 * c-typeck.c (function_types_compatible_p): For C2X, treat
1419 unprototyped function as compatible with non-variadic prototyped
1420 function even if some argument types are changed by the default
1421 argument promotions.
1423 2021-04-15 Martin Sebor <msebor@redhat.com>
1427 * c-decl.c (pushdecl): Always propagate type attribute.
1429 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1432 * c-typeck.c (c_common_type): Do not drop attributes that
1433 affect type identity.
1435 2021-04-10 Jakub Jelinek <jakub@redhat.com>
1438 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1441 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1444 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1447 2021-03-19 Jakub Jelinek <jakub@redhat.com>
1450 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1451 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1453 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1454 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1455 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1457 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
1460 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1461 ensure that the varpool node is marked as offloadable.
1463 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1466 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1468 2021-02-24 Martin Sebor <msebor@redhat.com>
1471 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1473 2021-02-18 Jakub Jelinek <jakub@redhat.com>
1476 * c-typeck.c (c_finish_return): Don't wrap retval into
1477 EXCESS_PRECISION_EXPR in functions that return void.
1479 2021-02-11 Marek Polacek <polacek@redhat.com>
1481 * c-parser.c (c_parser_if_statement): Use vec_free.
1483 2021-02-04 Martin Sebor <msebor@redhat.com>
1486 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1487 (diagnose_mismatched_decls): Same.
1488 (start_function): Introduce temporaries for better readability.
1489 * c-typeck.c (comptypes_internal): Only consider complete enum
1490 types in comparisons with integers.
1492 2021-02-01 Martin Sebor <msebor@redhat.com>
1495 * c-decl.c (free_attr_access_data): New function.
1496 (c_parse_final_cleanups): Call free_attr_access_data.
1498 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1500 * c-parser.c (c_parser_omp_clause_detach): New.
1501 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1502 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1503 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1504 clause. Prevent use of detach with mergeable and overriding the
1505 data sharing mode of the event handle.
1507 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1509 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1510 unqualified element type and then call c_build_qualified_type on the
1513 2021-01-07 Richard Biener <rguenther@suse.de>
1515 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1516 reallocate loop array if it is too small.
1518 2020-12-16 Martin Uecker <muecker@gwdg.de>
1521 * c-typeck.c (build_modify_expr): Drop qualifiers.
1523 2020-12-16 Martin Uecker <muecker@gwdg.de>
1526 * c-parser.c (c_parser_expression): Look into
1527 nop expression when marking expressions as read.
1529 2020-12-14 Martin Liska <mliska@suse.cz>
1532 * c-typeck.c (pointer_diff): Do not emit a top-level
1534 (build_binary_op): Likewise.
1536 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1538 * c-parser.c (c_parser_omp_allocate): New.
1539 (c_parser_omp_construct): Call it.
1541 2020-12-09 Richard Biener <rguenther@suse.de>
1544 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1547 2020-12-07 Martin Uecker <muecker@gwdg.de>
1550 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1551 that drops qualifiers to the end of the function.
1553 2020-11-26 Martin Uecker <muecker@gwdg.de>
1557 * c-parser.c (c_parser_declaration_or_fndef): Remove
1558 redundant code to drop qualifiers of _Atomic types for __auto_type.
1559 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1560 types for __typeof__.
1562 2020-11-24 Jakub Jelinek <jakub@redhat.com>
1565 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1566 expressions, use make_node instead of build2 to avoid checking build2
1569 2020-11-23 Joseph Myers <joseph@codesourcery.com>
1572 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1573 for comparisons of complete and incomplete pointers.
1575 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1577 * c-aux-info.c (gen_type): Support opaque types.
1579 2020-11-20 Martin Sebor <msebor@redhat.com>
1582 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1584 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1587 * Make-lang.in (c.serial): Change from goal to a variable.
1588 (.PHONY): Drop c.serial.
1590 2020-11-20 Martin Uecker <muecker@gwdg.de>
1592 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1594 2020-11-19 Jakub Jelinek <jakub@redhat.com>
1597 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1600 2020-11-18 Jakub Jelinek <jakub@redhat.com>
1602 * Make-lang.in (c.serial): New goal.
1603 (.PHONY): Add c.serial c.prev.
1604 (cc1$(exeext)): Call LINK_PROGRESS.
1606 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1608 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1610 * c-typeck.c (build_asm_expr): Remove an assert checking output
1611 absence for asm goto.
1613 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1615 * c-typeck.c (c_finish_omp_clauses): Don't clear
1616 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1618 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1621 * c-parser.c (c_parser_objc_class_definition): Pass the
1622 location of the class name to the interface declaration.
1624 2020-11-10 Strager Neds <strager.nds@gmail.com>
1626 * c-decl.c (merge_decls): Use new overload of
1627 set_decl_section_name.
1629 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1631 * c-parser.c (c_parser_omp_target_data): Add use of
1632 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1633 handled map clause kind.
1634 (c_parser_omp_target_enter_data): Likewise.
1635 (c_parser_omp_target_exit_data): Likewise.
1636 (c_parser_omp_target): Likewise.
1637 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1638 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1639 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1640 same struct field access to co-exist on OpenMP construct.
1642 2020-11-07 Martin Uecker <muecker@gwdg.de>
1644 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1645 (c_parser_all_labels): Likewise.
1647 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1649 * c-parser.c (c_parser_objc_at_property_declaration):
1650 Improve parsing fidelity. Associate better location info
1651 with @property attributes. Clean up the interface to
1652 objc_add_property_declaration ().
1654 2020-11-06 Nathan Sidwell <nathan@acm.org>
1656 * c-decl.c (diagnose_mismatched_decls): Rename
1657 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1658 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1659 (collect_source_refs): Likewise.
1660 * c-typeck.c (inform_declaration, inform_for_arg)
1661 (convert_for_assignment): Likewise.
1663 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
1665 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1667 (c_parser_omp_construct): Update call.
1669 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1672 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1673 find underlying decl to clear in the aligned_head bitmap.
1675 2020-11-04 Joseph Myers <joseph@codesourcery.com>
1677 * c-decl.c (handle_nodiscard_attribute): New.
1678 (std_attribute_table): Add nodiscard.
1679 * c-parser.c (c_parser_std_attribute): Expect argument to
1680 nodiscard attribute to be a string. Do not special-case ignoring
1682 * c-typeck.c (maybe_warn_nodiscard): New.
1683 (build_compound_expr, emit_side_effect_warnings): Call
1684 maybe_warn_nodiscard.
1685 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1686 emit_side_effect_warnings if warn_unused_result.
1688 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
1690 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1692 (finish_init): Likewise.
1693 (pop_init_level): Likewise.
1695 2020-10-28 Joseph Myers <joseph@codesourcery.com>
1697 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1698 error_at for omitted parameter name.
1700 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1702 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1703 (c_parser_omp_clause_allocate): New function.
1704 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1705 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1706 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1707 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1708 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1709 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1710 PRAGMA_OMP_CLAUSE_ALLOCATE.
1711 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1713 2020-10-27 Joseph Myers <joseph@codesourcery.com>
1715 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1716 standard attributes.
1718 2020-10-23 Marek Polacek <polacek@redhat.com>
1721 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1722 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1723 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1724 * c-tree.h (char_type_p): Declare.
1725 * c-typeck.c (char_type_p): No longer static.
1727 2020-10-23 Martin Sebor <msebor@redhat.com>
1730 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1732 2020-09-19 Martin Sebor <msebor@redhat.com>
1735 * c-decl.c (lookup_last_decl): Define new function.
1736 (c_decl_attributes): Call it.
1737 (start_decl): Add argument and use it.
1738 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1739 (get_parm_array_spec): Define new function.
1740 (push_parm_decl): Call get_parm_array_spec.
1741 (start_function): Call warn_parm_array_mismatch. Build attribute
1742 access and add it to current function.
1743 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1744 in forms of array parameters.
1745 * c-tree.h (start_decl): Add argument.
1747 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1749 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1751 (in_statement): New.
1752 (start_function): Adjust for above change.
1753 (c_push_function_context, c_pop_function_context): Likewise.
1754 * c-lang.h (struct language_function): Likewise.
1755 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1756 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1758 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1759 (c_parser_switch_statement): Adjust break/switch context handling
1760 and calls to renamed functions.
1761 (c_parser_while_statement): Adjust break/switch context handling and
1763 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1764 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1765 (c_parser_omp_for_loop): Adjust break/switch context handling.
1766 * c-tree.h (c_break_label, c_cont_label): Delete.
1767 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1768 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1769 (in_statement, switch_statement_break_seen_p): Declare.
1770 (c_start_case, c_finish_case): Renamed to...
1771 (c_start_switch, c_finish_switch).
1772 (c_finish_bc_stmt): Adjust arguments.
1773 * c-typeck.c (build_function_call_vec): Don't try to print
1774 statements with %qE format.
1775 (struct c_switch): Rename switch_expr field to switch_stmt.
1776 Add break_stmt_seen_p field.
1777 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1778 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1779 (do_case): Update for changes to struct c_switch.
1780 (c_finish_case): Rename to c_finish_switch. Update for changes to
1781 struct c_switch and change of representation from SWITCH_EXPR to
1783 (c_finish_loop): Delete.
1784 (c_finish_bc_stmt): Update to reflect changes to break/continue
1785 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1786 of a GOTO_EXPR except for objc foreach loops.
1788 2020-09-01 Jakub Jelinek <jakub@redhat.com>
1791 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1794 2020-08-28 Martin Sebor <msebor@redhat.com>
1797 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1800 2020-08-27 Martin Liska <mliska@suse.cz>
1802 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1803 growth function to true.
1805 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
1808 * c-typeck.c (handle_omp_array_sections_1): Talk about
1809 array function parameter in the error message.
1811 2020-08-18 Jakub Jelinek <jakub@redhat.com>
1814 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1815 to int, holding index of the match. Call mark_exp_read on the selector
1816 expression and on expressions other than the selected one.
1818 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1821 * c-typeck.c (process_init_element): Split test for whether to
1822 recurse into a record, union or array into...
1823 (initialize_elementwise_p): ...this new function. Don't recurse
1824 into a vector type if the initialization value is also a vector.
1826 2020-07-31 Richard Biener <rguenther@suse.de>
1829 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1830 Define to c_common_finalize_early_debug.
1832 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1834 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1835 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1836 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1838 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1841 * c-decl.c (finish_decl): Call target hook
1842 lower_local_decl_alignment to lower local decl alignment.
1844 2020-07-09 Julian Brown <julian@codesourcery.com>
1845 Thomas Schwinge <thomas@codesourcery.com>
1848 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1849 for standalone attach/detach clauses.
1851 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1853 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1854 set, warn for conversion between pointers that point to incompatible
1855 scalar storage orders.
1857 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1859 * c-parser.c (c_parser_statement_after_labels): Pass correct
1860 parameters to c_parser_do_statement.
1862 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1864 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1866 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1867 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1869 * c-tree.h (c_in_omp_for): Declare.
1870 * c-typeck.c (c_in_omp_for): Define.
1871 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1872 (digest_init): Likewise.
1873 (build_binary_op): Likewise.
1875 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1877 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1878 from kind by comma rather than colon.
1880 2020-06-05 Mark Wielaard <mark@klomp.org>
1882 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1883 an undeclared builtin, then add a fixit header hint, if found.
1884 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1885 warning_at about implicit builtin declaration type mismatch.
1887 2020-06-03 Mark Wielaard <mark@klomp.org>
1889 * c-parser.c (struct c_parser): Add seen_string_literal
1891 (c_parser_consume_token): Reset seen_string_literal.
1892 (c_parser_error_richloc): Add name_hint if seen_string_literal
1893 and next token is a CPP_NAME and we have a missing header
1894 suggestion for the name.
1895 (c_parser_string_literal): Set seen_string_literal.
1897 2020-06-03 Mark Wielaard <mark@klomp.org>
1899 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1900 scope with matching_parens after CPP_OPEN_PAREN.
1902 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1904 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1906 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1908 * Make-lang.in: Remove extra slash.
1910 2020-05-19 Martin Liska <mliska@suse.cz>
1912 * c-parser.c: Fix typo.
1914 2020-05-14 Jakub Jelinek <jakub@redhat.com>
1916 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1918 2020-05-07 Richard Biener <rguenther@suse.de>
1921 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1924 2020-04-30 Jakub Jelinek <jakub@redhat.com>
1927 * c-decl.c (set_labels_context_r): In addition to context-less
1928 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1929 parent function if any.
1930 (store_parm_decls): Adjust comment.
1932 2020-04-19 Jakub Jelinek <jakub@redhat.com>
1935 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1936 two CPP_COLON tokens.
1938 2020-04-17 Jakub Jelinek <jakub@redhat.com>
1941 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1944 2020-04-15 Jakub Jelinek <jakub@redhat.com>
1947 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1948 requires directive when not at file scope.
1950 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
1953 * c-decl.c (c_check_in_current_scope): New function.
1954 * c-tree.h (c_check_in_current_scope): Declare it.
1955 * c-parser.c (c_parser_oacc_declare): Add check that variables
1956 are declared in the same scope as the directive. Fix handling
1959 2020-04-07 Jakub Jelinek <jakub@redhat.com>
1962 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1963 if c_parser_omp_master succeeded.
1965 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1967 PR gcov-profile/94029
1969 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1970 the function_start_locus location. Don't do that afterwards for the
1971 __GIMPLE body parsing.
1973 2020-03-19 Jakub Jelinek <jakub@redhat.com>
1975 PR gcov-profile/94029
1976 * c-tree.h (finish_function): Add location_t argument defaulted to
1978 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1979 set it to the locus of closing } if non-NULL.
1980 (c_parser_compound_statement_nostart): Return locus of closing }.
1981 (c_parser_parse_rtl_body): Likewise.
1982 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1984 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1985 input_location to set function_end_locus.
1987 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1990 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1991 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1992 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1993 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1995 (finish_incomplete_vars): New function, moved from finish_struct. Use
1996 relayout_decl instead of layout_decl.
1997 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1998 being TYPE_VFIELD. Use finish_incomplete_vars.
1999 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2000 finish_incomplete_vars.
2001 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2002 also on ENUMERAL_TYPEs.
2004 2020-03-16 Jakub Jelinek <jakub@redhat.com>
2007 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2009 2020-03-13 Martin Sebor <msebor@redhat.com>
2012 * c-decl.c (builtin_structptr_type_count): New constant.
2013 (match_builtin_function_types): Reject decls that are incompatible
2014 in types pointed to by pointers.
2015 (diagnose_mismatched_decls): Adjust comments.
2017 2020-03-05 Joseph Myers <joseph@codesourcery.com>
2020 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2021 empty when initialized type is error_mark_node.
2022 (set_designator, process_init_element): Ignore initializers for
2023 elements of a variable-size type or of error_mark_node.
2025 2020-03-01 Martin Sebor <msebor@redhat.com>
2028 * c-decl.c (types_close_enough_to_match): New function.
2029 (match_builtin_function_types):
2030 (diagnose_mismatched_decls): Add missing inform call to a warning.
2032 2020-03-01 Martin Sebor <msebor@redhat.com>
2035 * c-typeck.c (build_functype_attribute_variant): New function.
2036 (composite_type): Call it.
2038 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2041 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2042 Rename last argument from probablity to probability.
2044 2020-02-13 Jakub Jelinek <jakub@redhat.com>
2047 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2048 *expr if it has side effects.
2050 2020-01-30 Jeff Law <law@redhat.com>
2053 * c-parser.c (c_parser_switch_statement): Make sure to request
2054 marking the switch expr as used.
2056 2020-01-22 Joseph Myers <joseph@codesourcery.com>
2059 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2060 argument with integer operands.
2062 2020-01-16 Kerem Kat <keremkat@gmail.com>
2065 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2066 to support 4 available tokens.
2068 2020-01-15 Joseph Myers <joseph@codesourcery.com>
2071 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2072 determine whether to set DECL_CONTEXT.
2074 2020-01-13 Joseph Myers <joseph@codesourcery.com>
2077 * c-typeck.c (build_c_cast): Check for expressions with integer
2078 operands that can occur in an unevaluated part of an integer
2079 constant expression and call note_integer_operands as needed.
2081 2019-01-08 Richard Biener <rguenther@suse.de>
2084 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2087 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2089 Update copyright years.
2091 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2093 * c-decl.c (collect_source_ref_cb): Delete.
2094 (for_each_global_decl): Rename into...
2095 (collect_source_refs): ...this. Call collect_source_ref directly.
2096 (c_parse_final_cleanups): Always call collect_source_ref on the main
2099 2019-12-19 Julian Brown <julian@codesourcery.com>
2100 Cesar Philippidis <cesar@codesourcery.com>
2102 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2104 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2105 Allow deref (->) in variable lists if true.
2106 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2107 Pass to c_parser_omp_variable_list.
2108 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2109 call to c_parser_omp_variable_list.
2110 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2111 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2112 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2113 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2114 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2115 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2116 and detach. Support deref.
2117 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2118 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2119 (c_oacc_check_attachments): New function.
2120 (c_finish_omp_clauses): Check attach/detach arguments for being
2121 pointers using above. Support deref.
2123 2019-12-19 Julian Brown <julian@codesourcery.com>
2124 Maciej W. Rozycki <macro@codesourcery.com>
2125 Tobias Burnus <tobias@codesourcery.com>
2126 Thomas Schwinge <thomas@codesourcery.com>
2128 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2129 (c_parser_oacc_data_clause): Likewise.
2130 (c_parser_oacc_all_clauses): Likewise.
2131 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2132 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2133 PRAGMA_OACC_CLAUSE_NO_CREATE.
2134 * c-typeck.c (handle_omp_array_sections): Support
2137 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2139 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2140 Replace label_text ctor calls.
2142 2019-12-04 Joseph Myers <joseph@codesourcery.com>
2146 * c-typeck.c (convert_lvalue_to_rvalue): Call
2147 require_complete_type for arguments not of void types.
2148 (build_indirect_ref): Do not diagnose dereferencing pointers to
2150 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2152 2019-12-03 Joseph Myers <joseph@codesourcery.com>
2155 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2156 old-style parameter definitions.
2158 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2162 * c-decl.c (flexible_array_type_p): Move to common code.
2164 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2166 * c-decl.c (start_decl): Allow initialization of variables whose
2167 size is a POLY_INT_CST.
2168 (finish_decl): Use verify_type_context to check whether the target
2169 allows variables with a particular type to have static or thread-local
2170 storage duration. Don't raise a second error if such variables do
2171 not have a constant size.
2172 (grokdeclarator): Use verify_type_context to check whether the
2173 target allows fields or array elements to have a particular type.
2174 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2175 the target allows pointer difference for the types involved.
2176 (build_unary_op): Likewise for pointer increment and decrement.
2178 2019-11-29 Joseph Myers <joseph@codesourcery.com>
2180 * c-parser.c (struct c_parser): Add members raw_tokens and
2182 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2183 using previously-lexed raw tokens.
2184 (c_parser_peek_nth_token_raw)
2185 (c_parser_check_balanced_raw_token_sequence): New functions.
2186 (c_parser_nth_token_starts_std_attributes): Use
2187 c_parser_check_balanced_raw_token_sequence for Objective-C.
2189 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2192 * c-decl.c (finish_declspecs): Use int instead of decimal
2193 floating-point types if decimal floating-point not supported.
2195 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2197 * c-tree.h (struct c_declarator): Use a structure for id member.
2198 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2199 declarators at the start, not when handling individual declarators
2200 later. Use u.id.id instead of u.id.
2201 (grokfield): Use u.id.id instead of u.id.
2202 (build_id_declarator): Set u.id.id and u.id.attrs.
2203 (finish_declspecs): Handle postfix attributes in case of typedef
2204 name or typeof used.
2205 * c-parser.c (c_parser_direct_declarator)
2206 (c_parser_direct_declarator_inner): Place declarator for
2207 attributes inside that for function or array, not outside. Set
2208 u.id.attrs for identifiers.
2209 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2210 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2213 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2216 * c-decl.c (identifier_global_tag): Define.
2218 2019-11-20 Richard Biener <rguenther@suse.de>
2221 * c-decl.c (grokdeclarator): Prevent inlining of nested
2222 function with VLA arguments.
2224 2019-11-20 Joseph Myers <joseph@codesourcery.com>
2226 * c-decl.c (c_warn_type_attributes): New function.
2227 (groktypename, grokdeclarator, finish_declspecs): Call
2228 c_warn_type_attributes before applying attributes to types.
2229 * c-tree.h (c_warn_type_attributes): Declare.
2231 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2233 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2234 standard attributes.
2235 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2236 pedwarn for unknown standard attributes and return error_mark_node
2239 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2241 * c-parser.c (c_parser_parse_rtl_body): Always call
2242 run_rtl_passes, even if startwith pass is not provided.
2244 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2246 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2247 duplicate standard attributes.
2249 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2251 * c-decl.c (std_attribute_table): Add maybe_unused.
2253 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2255 * c-decl.c (std_attribute_table): Add fallthrough.
2256 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2257 attribute at top level.
2259 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2261 * c-decl.c (std_attribute_table): New.
2262 (c_init_decl_processing): Register attributes from
2263 std_attribute_table.
2264 * c-parser.c (c_parser_attribute_arguments): Add arguments
2265 require_string and allow_empty_args. All callers changed.
2266 (c_parser_std_attribute): Set require_string argument for
2267 "deprecated" attribute.
2269 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2271 * c-parser.c (c_parser_postfix_expression)
2272 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2273 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2275 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2277 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2278 of build_same_sized_truth_vector_type.
2279 (build_vec_cmp): Likewise.
2281 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2283 * c-parser.c (c_parser_omp_context_selector): Don't require score
2284 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2287 * c-parser.c (c_parser_omp_context_selector): Rename
2288 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2289 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2290 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2291 and string literals.
2293 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2295 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2296 ctsk_tagfirstref_attrs.
2297 (struct c_declspecs): Update description of attrs. Add
2298 postfix_attrs and non_std_attrs_seen_p. Increase size of
2299 typespec_kind bit-field.
2300 (c_warn_unused_attributes): New declaration.
2301 (parser_xref_tag): Update prototype.
2302 * c-decl.c (c_warn_unused_attributes): New function.
2303 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2304 ctsk_tagref_attrs. Handle attribute declarations.
2305 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2306 (grokdeclarator): Handle standard attributes.
2307 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2308 attributes to incomplete type reference.
2309 (xref_tag): Update call to parser_xref_tag.
2310 (declspecs_add_addrspace, declspecs_add_type)
2311 (declspecs_add_scspec, declspecs_add_attrs): Set
2312 non_std_attrs_seen_p.
2313 (finish_declspecs): Apply postfix standard attributes to type.
2314 * c-parser.c (c_token_starts_declspecs)
2315 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2316 (c_parser_next_tokens_start_declaration): Update comments.
2317 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2318 parser->tokens[2] to parser->tokens[1].
2319 (c_parser_nth_token_starts_std_attributes)
2320 (c_parser_std_attribute_specifier_sequence): New functions.
2321 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2322 attrs. All callers changed. Handle standard attributes.
2323 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2324 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2325 All callers changed.
2326 (c_parser_declspecs): Add arguments start_std_attr_ok and
2327 end_std_attr_ok. All callers changed. Handle standard
2329 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2330 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2331 (c_parser_compound_statement_nostart, c_parser_all_labels)
2332 (c_parser_label, c_parser_statement, c_parser_for_statement):
2333 Handle standard attributes.
2334 * c-parser.h (c_parser_declspecs): Update prototype.
2335 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2338 2019-11-12 Martin Liska <mliska@suse.cz>
2340 * gimple-parser.c: Do not include params.h.
2342 2019-11-12 Martin Liska <mliska@suse.cz>
2344 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2345 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2348 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2349 Frederik Harwath <frederik@codesourcery.com>
2352 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2353 (c_parser_oacc_kernels_parallel): Rename function to...
2354 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2355 (c_parser_omp_construct): Update accordingly.
2358 2019-11-11 Jakub Jelinek <jakub@redhat.com>
2360 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2361 without corresponding end declare target.
2363 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2365 * c-convert.c (convert): Only handle vector conversions if one of
2366 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2368 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2369 vectors satisfy gnu_vector_type_p.
2370 (build_unary_op): Only allow unary operators to be applied to
2371 vectors if they satisfy gnu_vector_type_p.
2372 (digest_init): Only allow by-element initialization of vectors
2373 if they satisfy gnu_vector_type_p.
2374 (really_start_incremental_init): Likewise.
2375 (push_init_level): Likewise.
2376 (pop_init_level): Likewise.
2377 (process_init_element): Likewise.
2378 (build_binary_op): Only allow binary operators to be applied to
2379 vectors if they satisfy gnu_vector_type_p.
2381 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2383 * c-decl.c (grokparms): Convert () in a function definition to
2385 (store_parm_decls_oldstyle): Pedwarn for C2x.
2386 (store_parm_decls): Update comment about () not generating a
2389 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2391 * c-parser.c (c_parser_attribute_arguments): New function.
2392 Factored out of c_parser_gnu_attribute.
2393 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2394 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2395 (c_parser_std_attribute_specifier): New functions.
2396 (c_parser_transaction_attributes): Use
2397 c_parser_std_attribute_specifier.
2399 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2401 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2402 lex_joined_string and translate_strings_p.
2403 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2405 (c_parser_string_literal): New function.
2406 (c_parser_static_assert_declaration_no_semi): Use
2407 c_parser_string_literal. Do not set lex_untranslated_string.
2408 (c_parser_asm_string_literal): Use c_parser_string_literal.
2409 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2410 (c_parser_gnu_attributes): Set and restore translate_strings_p
2411 instead of lex_untranslated_string.
2412 (c_parser_asm_statement): Do not set lex_untranslated_string.
2413 (c_parser_asm_operands): Likewise.
2414 (c_parser_has_attribute_expression): Set and restore
2415 translate_strings_p instead of lex_untranslated_string.
2416 (c_parser_postfix_expression): Use c_parser_string_literal.
2417 (pragma_lex): Likewise.
2418 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2419 (c_parse_file): Set translate_strings_p.
2420 * gimple-parser.c (c_parser_gimple_postfix_expression)
2421 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2422 * c-parser.c (c_parser_string_literal): Declare function.
2424 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2426 * c-parser.c (c_finish_omp_declare_variant): Use
2427 omp_get_context_selector instead of c_omp_get_context_selector.
2429 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2431 * c-tree.h (c_simulate_enum_decl): Declare.
2432 * c-decl.c (c_simulate_enum_decl): New function.
2433 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2435 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2437 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2438 * c-decl.c (c_simulate_builtin_function_decl): New function.
2439 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2442 2019-10-28 Martin Sebor <msebor@redhat.com>
2445 * c-decl.c (names_builtin_p): Define a new function.
2447 2019-10-28 Richard Biener <rguenther@suse.de>
2450 * gimple-parser.c (c_parser_parse_gimple_body): Make
2451 current_bb the entry block initially to easier recover
2453 (c_parser_gimple_compound_statement): Adjust.
2455 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2457 * c-parser.c (c_finish_omp_declare_variant): Use
2458 omp_context_selector_matches instead of
2459 c_omp_context_selector_matches.
2460 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2461 attribute in between declare target and end declare target
2464 2019-10-15 Joseph Myers <joseph@codesourcery.com>
2466 * c-parser.c (c_parser_attribute_any_word): Rename to
2467 c_parser_gnu_attribute_any_word. All callers changed.
2468 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2470 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2472 (c_parser_declaration_or_fndef, c_parser_declspecs)
2473 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2474 (c_parser_struct_declaration, c_parser_declarator)
2475 (c_parser_gnu_attribute, c_parser_compound_statement)
2476 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2477 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2478 attribute-related syntax productions.
2480 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2482 * c-objc-common.c (useful_aka_type_p): Replace with...
2483 (get_aka_type): ...this new function. Given the original type,
2484 decide which aka type to print (if any). Only look through typedefs
2485 if user_facing_original_type_p.
2486 (print_type): Update accordingly.
2488 2019-10-14 Jakub Jelinek <jakub@redhat.com>
2490 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2491 into int NESTED, if it is 2, diagnose missing commas in between
2493 (c_parser_omp_context_selector): Pass 2 as last argument to
2494 c_parser_omp_all_clauses.
2496 2019-10-12 Jakub Jelinek <jakub@redhat.com>
2498 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2499 For simd properties, put them directly into TREE_VALUE.
2500 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2501 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2502 add "omp declare variant base" attribute rather than
2503 "omp declare variant".
2505 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2507 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2509 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2511 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2512 true, terminate processing on closing paren and don't skip to end of
2514 (c_parser_omp_declare_simd): Handle also declare variant.
2515 (omp_construct_selectors, omp_device_selectors,
2516 omp_implementation_selectors, omp_user_selectors): New variables.
2517 (c_parser_omp_context_selector,
2518 c_parser_omp_context_selector_specification,
2519 c_finish_omp_declare_variant): New functions.
2520 (c_finish_omp_declare_simd): Handle both declare simd and
2522 (c_parser_omp_declare): Handle declare variant.
2524 2019-10-02 Joseph Myers <joseph@codesourcery.com>
2526 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2529 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2531 * c-objc-common.c (useful_aka_type_p): New function.
2532 (print_type): Use it to decide whether an aka type is worth printing.
2534 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2537 * c-parser.c (c_parser_predefined_identifier): New function.
2538 (c_parser_postfix_expression): Use it.
2539 (c_parser_omp_variable_list): Parse predefined identifiers.
2540 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2541 in shared and firstprivate clauses, even when they are predetermined
2544 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2546 * c-typeck.c (build_function_call_vec): Take the original function
2547 decl as an optional final parameter. Pass all built-in calls to
2548 check_builtin_function_arguments.
2550 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2553 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2554 of identifiers in the external scope only for variables and functions.
2556 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2559 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2561 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2564 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2565 after determining that the first token is not
2566 PRAGMA_GCC_PCH_PREPROCESS.
2568 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2570 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2571 FUNCTION_DECL to the right value in the presence of nested declarators.
2573 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2576 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2578 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2581 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2582 of a built_in_function.
2583 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2585 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2587 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2588 (c_parser_omp_clause_device_type): New function.
2589 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2590 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2591 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2592 diagnostics for declare target with clauses nested in clause-less
2593 declare target declaration-definition-seq.
2594 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2596 2019-08-09 Jakub Jelinek <jakub@redhat.com>
2598 * c-parser.c (check_no_duplicate_clause): Simplify using
2600 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2601 directive name modifiers.
2602 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2605 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2606 check_no_duplicate_clause call. Comment it out, instead emit a
2607 warning for duplicate dist_schedule clauses.
2609 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2611 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2613 2019-08-08 Jakub Jelinek <jakub@redhat.com>
2615 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2616 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2617 instead of generic_head to track duplicates.
2619 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2621 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2622 (c_parser_omp_clause_use_device_addr): New function.
2623 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2624 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2625 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2626 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2627 map or use_device_* clauses.
2628 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2629 in OpenMP, require pointer type rather than pointer or array type.
2630 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2632 2019-07-31 Jakub Jelinek <jakub@redhat.com>
2635 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2636 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2639 2019-07-25 Martin Liska <mliska@suse.cz>
2640 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2643 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2645 2019-07-25 Martin Liska <mliska@suse.cz>
2647 * c-decl.c (merge_decls): Use new macros
2648 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2650 2019-07-23 Richard Biener <rguenther@suse.de>
2652 PR tree-optimization/83518
2653 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2654 a CFG also rebuild cgraph edges.
2656 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2658 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2659 (c_parser_omp_clause_bind): New function.
2660 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2661 (OMP_LOOP_CLAUSE_MASK): Define.
2662 (c_parser_omp_loop): New function.
2663 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2664 loop combined with parallel or teams.
2665 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2666 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2668 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2671 * c-decl.c (finish_function): Check targetm.warn_func_return
2672 before issuing a -Wreturn-type warning.
2674 2019-07-12 Alexandre Oliva <oliva@adacore.com>
2676 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2677 (c_parser_compound_statement): Call it.
2679 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2681 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2682 (c_parser_omp_clause_order): New function.
2683 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2684 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2685 PRAGMA_OMP_CLAUSE_ORDER.
2686 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2688 2019-07-10 Richard Biener <rguenther@suse.de>
2690 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2691 _Literal (int *) &x for address literals.
2693 2019-07-09 Martin Sebor <msebor@redhat.com>
2696 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2698 (field_decl_cmp): Same.
2699 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2701 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2703 2019-07-09 Martin Sebor <msebor@redhat.com>
2706 * c-decl.c: Change class-key from class to struct and vice versa
2707 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2708 * gimple-parser.c: Same.
2710 2019-07-01 Richard Biener <rguenther@suse.de>
2712 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2713 _Literal (char *) &"foo" for address literals pointing to
2716 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2718 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2719 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2720 C incompatibility if alternate "__intN__" form is used.
2722 2019-06-24 Martin Sebor <msebor@redhat.com>
2724 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2726 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2728 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2729 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2730 (c_parser_omp_scan_loop_body): New function.
2731 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2732 inscan reduction clauses.
2733 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2734 non-inscan reductions on the same construct, or inscan reductions with
2735 ordered or schedule clauses, or inscan array reductions.
2737 2019-06-05 Martin Sebor <msebor@redhat.com>
2740 * c-typeck.c (c_finish_return): Only consider functions returning
2741 pointers as candidates for -Wreturn-local-addr.
2743 2019-06-05 Martin Sebor <msebor@redhat.com>
2745 * c-decl.c (start_decl): Adjust quoting and hyphenation
2747 (finish_decl): Same.
2748 (finish_enum): Same.
2749 (start_function): Same.
2750 (declspecs_add_type): Same.
2751 * c-parser.c (warn_for_abs): Same.
2752 * c-typeck.c (build_binary_op): Same.
2754 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2757 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2758 marked with an OpenACC 'routine' directive.
2761 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2762 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2765 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2766 clauses from "omp declare target" attribute.
2768 2019-05-16 Martin Sebor <msebor@redhat.com>
2770 * c-decl.c (start_decl): Quote keywords, operators, and
2771 types in diagnostics.
2772 (finish_decl): Same.
2773 * c-parser.c (c_parser_asm_statement): Same.
2774 (c_parser_conditional_expression): Same.
2775 (c_parser_transaction_cancel): Same.
2776 * c-typeck.c (c_common_type): Same.
2777 (build_conditional_expr): Same.
2778 (digest_init): Same.
2779 (process_init_element): Same.
2780 (build_binary_op): Same.
2782 2019-05-17 Richard Biener <rguenther@suse.de>
2784 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2785 (c_parser_gimple_unary_expression): Likewise.
2786 (c_parser_gimple_parentized_ternary_expression): New function.
2788 2019-05-16 Richard Biener <rguenther@suse.de>
2790 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2791 (c_parser_gimple_unary_expression): Likewise.
2793 2019-05-15 Richard Biener <rguenther@suse.de>
2795 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2798 2019-05-14 Richard Biener <rguenther@suse.de>
2800 * gimple-parser.c (c_parser_gimple_statement): Remove
2801 questionable auto-promotion to VIEW_CONVERT_EXPR.
2802 (c_parser_gimple_typespec): Split out from __MEM parsing.
2803 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2804 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2805 as __VIEW_CONVERT with -gimple.
2807 2019-05-09 Martin Liska <mliska@suse.cz>
2809 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2811 (c_parser_gimple_unary_expression): Parse also binary expression
2813 (c_parser_gimple_parentized_binary_expression): New function.
2815 2019-05-09 Martin Liska <mliska@suse.cz>
2817 * gimple-parser.c (struct gimple_parser): Add probability.
2818 for gimple_parser_edge.
2819 (gimple_parser::push_edge): Add new argument probability.
2820 (c_parser_gimple_parse_bb_spec): Parse also probability
2822 (c_parser_parse_gimple_body): Set edge probability.
2823 (c_parser_gimple_compound_statement): Consume token
2824 before calling c_parser_gimple_goto_stmt.
2826 (c_parser_gimple_statement): Pass new argument.
2827 (c_parser_gimple_goto_stmt): Likewise.
2828 (c_parser_gimple_if_stmt): Likewise.
2829 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2830 * c-parser.c (c_parser_declaration_or_fndef): Pass
2831 hot_bb_threshold argument.
2832 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2834 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2836 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2839 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2840 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2841 (c_parser_do_statement): Likewise.
2842 (c_parser_for_statement): Likewise. Formatting fixes.
2843 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2844 emit DEBUG_BEGIN_STMTs if needed.
2846 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2849 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2850 (c_start_case): Don't clear it.
2851 (do_case): Adjust c_add_case_label caller.
2852 (c_finish_case): Adjust c_do_switch_warnings caller.
2855 * c-decl.c (merge_decls): If remove is main variant and
2856 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2857 variant that has newdecl as TYPE_NAME if any.
2859 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2862 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2863 don't try to remove it from the variant list, but instead assert
2866 2019-04-01 Richard Biener <rguenther@suse.de>
2869 * c-tree.h (c_get_alias_set): Declare.
2870 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2871 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2872 as the underlying integer type.
2874 2019-03-19 Martin Sebor <msebor@redhat.com>
2876 PR tree-optimization/89688
2877 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2878 kinds of initializers.
2880 2019-03-19 Jakub Jelinek <jakub@redhat.com>
2883 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2884 return type even if quals_used is 0. Formatting fixes.
2886 2019-03-14 Richard Biener <rguenther@suse.de>
2888 * c-tree.h (enum c_declspec_il): New.
2889 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2891 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2892 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2893 (c_parser_declspecs): Adjust.
2894 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2895 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2897 (struct gimple_parser): New.
2898 (gimple_parser::push_edge): New method.
2899 (c_parser_gimple_parse_bb_spec): New helper.
2900 (c_parser_parse_gimple_body): Get start pass and IL specification.
2901 Initialize SSA and CFG.
2902 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2903 Build a gimple_parser parsing state and pass it along.
2904 (c_parser_gimple_statement): Change intermittend __PHI internal
2905 function argument for the edge.
2906 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2907 (c_parser_gimple_goto_stmt): Record edges to build.
2908 (c_parser_gimple_if_stmt): Likewise.
2909 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2910 (c_parser_gimple_or_rtl_pass_list): Likewise.
2912 2019-03-11 Martin Liska <mliska@suse.cz>
2914 * c-decl.c (check_for_loop_decls): Wrap an option name
2915 in a string format message and fix GNU coding style.
2916 * c-parser.c (c_parser_declspecs): Likewise.
2918 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2920 PR tree-optimization/89550
2921 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2923 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2924 or warning returned true.
2926 2019-02-28 Jakub Jelinek <jakub@redhat.com>
2929 * c-typeck.c (convert_arguments): Call inform_declaration only if
2930 the previous warning_at call returned true.
2932 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2934 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2935 parameter. Adjust all users.
2936 (c_parser_oacc_simple_clause): Replace parser with loc formal
2937 parameter. Adjust all users.
2939 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
2942 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2943 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2945 2019-02-15 Jakub Jelinek <jakub@redhat.com>
2948 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2949 before c_decl_attributes rather than after it.
2951 2019-02-06 Jakub Jelinek <jakub@redhat.com>
2954 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2955 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2956 instead of 3 nested ifs.
2958 2019-02-06 Joseph Myers <joseph@codesourcery.com>
2961 * c-decl.c (finish_decl): Do not complete array types for arrays
2962 with external linkage not at file scope.
2964 2019-02-05 Richard Biener <rguenther@suse.de>
2967 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2968 all type variants when not supported.
2970 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2973 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2974 * c-decl.c (decl_jump_unsafe): Return false for
2975 C_DECL_COMPOUND_LITERAL_P decls.
2976 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2978 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2981 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2985 * c-decl.c (last_fileptr_type): Remove.
2986 (last_structptr_types): New variable.
2987 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2988 {old,new}rettype instead of the types themselves. Assert
2989 last_structptr_types array has the same number of elements
2990 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2991 argument oldtype and newtype. Instead of handling
2992 just fileptr_type_node specially, handle all builtin_structptr_types
2993 pointer nodes. Formatting fix.
2995 2019-01-24 Martin Sebor <msebor@redhat.com>
3000 * c-decl.c (match_builtin_function_types): Add arguments.
3001 (diagnose_mismatched_decls): Diagnose mismatched declarations
3002 of built-ins more strictly.
3004 2019-01-24 Jakub Jelinek <jakub@redhat.com>
3007 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3008 on #pragma omp cancel with different modifiers.
3010 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3014 * c-typeck.c (convert_for_assignment): Upate the
3015 warn_for_address_or_pointer_of_packed_member call.
3017 2019-01-16 Tom Honermann <tom@honermann.net>
3018 Jason Merrill <jason@redhat.com>
3020 * c-typeck.c (digest_init): Revised the error message produced for
3021 ill-formed cases of array initialization with a string literal.
3022 (error_init): Make variadic.
3024 2019-01-12 Jakub Jelinek <jakub@redhat.com>
3026 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3028 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3031 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3032 if current_function_decl is non-NULL.
3034 2019-01-07 Joseph Myers <joseph@codesourcery.com>
3038 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3039 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3040 functions declared but never defined only for external scope, not
3043 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3046 * c-parser.c (c_parser_postfix_expression): Parse
3047 __builtin_convertvector.
3049 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3051 Update copyright years.
3053 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3056 * c-typeck.c (convert_for_assignment): Call
3057 warn_for_address_or_pointer_of_packed_member.
3059 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3061 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3062 a more specific error message (instead of just falling through).
3064 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3066 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3067 asm qualifier is first seen; use that to give nicer "duplicate asm
3068 qualifier" messages. Delete 'quals" variable, instead pass the
3069 "is_volatile_ flag to build_asm_stmt directly.
3070 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3071 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3073 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3075 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3076 "done" boolean variable.
3078 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3081 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3082 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3083 (build_binary_op): Use struct op_location_t and
3084 class binary_op_rich_location.
3086 2018-12-11 Jakub Jelinek <jakub@redhat.com>
3089 * c-convert.c (convert): Call c_fully_fold before calling
3090 ubsan_instrument_float_cast.
3092 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3094 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3097 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3099 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3100 after asm. Pass a flag for it to build_asm_expr.
3101 * c-tree.h (build_asm_expr): Update declaration.
3102 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3105 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3108 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3109 combination of volatile and goto, in any order, without repetitions.
3111 2018-12-04 James Norris <jnorris@codesourcery.com>
3112 Cesar Philippidis <cesar@codesourcery.com>
3113 Julian Brown <julian@codesourcery.com>
3115 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3118 2018-11-30 Richard Biener <rguenther@suse.de>
3120 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3121 _Literal (type) { ... } as empty aggregate or vector constructor.
3123 2018-11-29 Martin Sebor <msebor@redhat.com>
3126 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3127 (convert_arguments): Add comments. Pass additional argument to
3130 2018-11-29 Martin Sebor <msebor@redhat.com>
3134 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3136 2018-11-23 Martin Sebor <msebor@redhat.com>
3139 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3140 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3142 2018-11-20 Martin Sebor <msebor@redhat.com>
3144 * c-parser.c (c_parser_has_attribute_expression): New function.
3145 (c_parser_attribute): New function.
3146 (c_parser_attributes): Move code into c_parser_attribute.
3147 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3149 2018-11-15 Martin Sebor <msebor@redhat.com>
3152 * c-decl.c (header_for_builtin_fn): Declare.
3153 (diagnose_mismatched_decls): Diagnose declarations of built-in
3154 functions without a prototype.
3155 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3156 (convert_argument): Same.
3157 (convert_arguments): Factor code out into convert_argument.
3158 Detect mismatches between built-in formal arguments in calls
3159 to built-in without prototype.
3160 (build_conditional_expr): Same.
3161 (type_or_builtin_type): New function.
3162 (convert_for_assignment): Add argument. Conditionally issue
3163 warnings instead of errors for mismatches.
3165 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3167 * c-decl.c: Replace "source_location" with "location_t".
3168 * c-tree.h: Likewise.
3169 * c-typeck.c: Likewise.
3170 * gimple-parser.c: Likewise.
3172 2018-11-09 Jakub Jelinek <jakub@redhat.com>
3174 * c-parser.c (c_parser_omp_clause_final): Use
3175 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3176 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3177 parsing instead of c_parser_paren_condition.
3178 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3179 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3180 c_fully_fold instead of c_parser_condition.
3181 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3182 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3183 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3184 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3185 c_parser_expr_no_commas instead of c_parser_expression.
3187 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3188 reduction clause with inscan modifier.
3190 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3191 clauses other than atomic_default_mem_order.
3193 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3195 * c-parser.c: Include memmode.h.
3196 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3197 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3198 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3199 task_reduction clauses.
3200 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3201 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3202 section, or lvalue assignment expression.
3203 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3204 (c_parser_omp_clause_lastprivate): Parse optional
3205 conditional: modifier.
3206 (c_parser_omp_clause_hint): Require constant integer expression rather
3207 than just integer expression.
3208 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3210 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3211 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3212 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3214 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3215 iterators. Parse mutexinoutset and depobj kinds.
3216 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3218 (c_parser_omp_all_clauses): Likewise. Handle
3219 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3220 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3221 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3222 default memory order from requires directive if any. Adjust
3223 c_finish_omp_atomic caller.
3224 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3225 (c_parser_omp_flush): Parse flush with memory-order-clause.
3226 (c_parser_omp_for_loop): Allow NE_EXPR even in
3227 OpenMP loops, adjust c_finish_omp_for caller.
3228 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3229 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3230 Allow to be called while parsing combined parallel master.
3231 Parse combined master taskloop{, simd}.
3232 (c_parser_omp_parallel): Parse combined
3233 parallel master{, taskloop{, simd}} constructs.
3234 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3235 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3236 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3237 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3238 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3239 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3240 around teams body. Use SET_EXPR_LOCATION.
3241 (c_parser_omp_target_data): Allow target data
3242 with only use_device_ptr clauses.
3243 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3244 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3245 (c_parser_omp_requires): New function.
3246 (c_finish_taskloop_clauses): New function.
3247 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3248 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3249 declaration. Disallow in_reduction clause when combined with parallel
3251 (c_parser_omp_construct): Adjust c_parser_omp_master and
3252 c_parser_omp_taskgroup callers.
3253 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3255 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3256 like OMP_CLAUSE_REDUCTION.
3257 (handle_omp_array_sections): Likewise. Call save_expr on array
3258 reductions before calling build_index_type. Handle depend clauses
3260 (struct c_find_omp_var_s): New type.
3261 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3262 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3263 with static, runtime or auto schedule kinds. Call save_expr for whole
3264 array reduction sizes. Diagnose reductions with zero sized elements
3265 or variable length structures. Diagnose nogroup clause used with
3266 reduction clause(s). Handle depend clause with
3267 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3268 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3269 some different type for other kinds. Use build_unary_op with
3270 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3271 Handle depend clauses with iterators. Remove no longer needed special
3272 case that predetermined const qualified vars may be specified in
3273 firstprivate clause. Complain if const qualified vars are mentioned
3274 in data-sharing clauses other than firstprivate or shared. Use
3275 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3276 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3277 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3278 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3280 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3282 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3283 logic for change to name_hint::operator bool.
3284 (undeclared_variable): Likewise.
3285 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3286 (c_parser_parameter_declaration): Likewise.
3288 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3290 * c-errors.c (pedwarn_c11): New function.
3291 * c-parser.c (disable_extension_diagnostics): Save
3292 warn_c11_c2x_compat and set it to 0.
3293 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3294 (c_parser_static_assert_declaration_no_semi): Handle
3295 _Static_assert without string constant.
3296 * c-tree.h (pedwarn_c11): New prototype.
3298 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3300 * Make-lang.in (selftest-c): New.
3301 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3302 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3303 from gcc/Makefile.in.
3305 2018-10-02 Richard Biener <rguenther@suse.de>
3307 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3309 2018-09-26 Joseph Myers <joseph@codesourcery.com>
3312 * c-typeck.c (build_binary_op): Use excess precision for
3313 comparisons of integers and floating-point for C11 and later.
3315 2018-09-26 Martin Jambor <mjambor@suse.cz>
3318 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
3321 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3323 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3324 Update for new param.
3325 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3328 2018-09-17 Martin Jambor <mjambor@suse.cz>
3331 * c-parser.c: (warn_for_abs): New function.
3332 (c_parser_postfix_expression_after_primary): Call it.
3334 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3336 * c-typeck.c (digest_init): Shorten overlength strings.
3338 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3340 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3342 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3344 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3345 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3347 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
3349 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3350 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3352 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3355 * c-decl.c (implicitly_declare): Update call to
3356 maybe_add_include_fixit to suggest overriding the location, as it
3358 * c-objc-common.c (c_tree_printer): Update for conversion of
3359 show_caret_p to a tri-state.
3361 2018-08-27 Martin Liska <mliska@suse.cz>
3363 * c-decl.c (locate_old_decl): Use new function
3364 fndecl_built_in_p and remove check for FUNCTION_DECL if
3366 (diagnose_mismatched_decls): Likewise.
3367 (merge_decls): Likewise.
3368 (warn_if_shadowing): Likewise.
3369 (pushdecl): Likewise.
3370 (implicitly_declare): Likewise.
3371 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3372 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3373 * c-typeck.c (build_function_call_vec): Likewise.
3374 (convert_arguments): Likewise.
3376 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3379 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3380 (diagnose_mismatched_decls): Likewise, in various places.
3381 (warn_if_shadowing): Likewise.
3382 (implicit_decl_warning): Likewise.
3383 (implicitly_declare): Likewise.
3384 (undeclared_variable): Likewise.
3385 (declare_label): Likewise.
3386 (grokdeclarator): Likewise.
3387 (start_function): Likewise.
3388 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3389 (c_parser_parameter_declaration): Likewise.
3390 (c_parser_binary_expression): Likewise.
3391 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3392 (parser_build_binary_op): Likewise.
3393 (build_unary_op): Likewise.
3394 (error_init): Likewise.
3395 (pedwarn_init): Likewise.
3396 (warning_init): Likewise.
3397 (convert_for_assignment): Likewise.
3399 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3401 * c-objc-common.c: Include "gcc-rich-location.h".
3402 (c_tree_printer): Move implemenation of '%T' to...
3403 (print_type): ...this new function.
3404 (range_label_for_type_mismatch::get_text): New function.
3405 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3406 range for the various ic_argpass cases.
3407 (class maybe_range_label_for_tree_type_mismatch): New class.
3408 (build_binary_op): Use it when calling binary_op_error.
3410 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3412 * c-decl.c (start_decl): Do not warn if variables is named as main
3413 and is a local variable.
3415 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3418 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3419 objects of unknown size.
3421 2018-08-13 Martin Sebor <msebor@redhat.com>
3423 PR tree-optimization/71625
3424 * c-parser.c (c_parser_declaration_or_fndef): Call
3425 braced_list_to_string.
3427 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3430 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3433 2018-08-01 Martin Sebor <msebor@redhat.com>
3435 PR tree-optimization/86650
3436 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3437 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3439 2018-08-01 Jakub Jelinek <jakub@redhat.com>
3442 * c-typeck.c (init_field_decl_cmp): New function.
3443 (output_pending_init_elements): Use it for field comparisons
3444 instead of pure bit_position comparisons.
3446 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3448 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3449 type here, instead add "omp declare target implicit" attribute.
3450 (finish_decl): Diagnose vars without mappable type here.
3452 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3453 Thomas Schwinge <thomas@codesourcery.com>
3454 Cesar Philippidis <cesar@codesourcery.com>
3456 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3457 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3458 to their non-present_or_* counterparts. Make 'self' an alias to
3459 PRAGMA_OACC_CLAUSE_HOST.
3460 (c_parser_oacc_data_clause): Update GOMP mappings for
3461 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3462 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3463 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3464 Remove support for present_or_* clauses.
3465 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3466 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3467 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3468 (OACC_DATA_CLAUSE_MASK): Likewise.
3469 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3470 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3471 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3472 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3473 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3475 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3477 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3478 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3479 (c_parser_gimple_unary_expression): Likewise.
3481 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3484 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3485 before doing POINTER_DIFF_EXPR.
3487 2018-06-07 Marek Polacek <polacek@redhat.com>
3490 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3491 for loop initial declarations.
3493 2018-05-30 David Pagan <dave.pagan@oracle.com>
3496 * c-decl.c (grokdeclarator): Update check for return type warnings.
3497 (start_function): Likewise.
3498 (finish_function): Likewise.
3499 * c-typeck.c (c_finish_return): Update check for return type warnings.
3500 Pass OPT_Wreturn_type to pedwarn when appropriate.
3502 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3504 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3507 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3509 * gimple-parser.c: Include internal-fn.h.
3510 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3511 (c_parser_gimple_call_internal): New function.
3512 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3513 Fix typos in comment.
3515 2018-05-10 Jakub Jelinek <jakub@redhat.com>
3518 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3519 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3521 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3522 fold_offsetof_1, pass argtype as TYPE to it and drop the
3525 2018-05-02 David Pagan <dave.pagan@oracle.com>
3528 * c-decl.c (old_style_parameter_scope): New function.
3529 * c-parser.c (c_parser_postfix_expression): Check for statement
3530 expressions in old-style function parameter list declarations.
3531 * c-parser.h (old_style_parameter_scope): New extern declaration.
3533 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3536 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3537 it is not TREE_STATIC.
3538 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3539 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3540 its COMPOUND_LITERAL_EXPR_DECL.
3542 2018-03-21 Joseph Myers <joseph@codesourcery.com>
3544 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3545 where all functions return the same _FloatN or _FloatNx type,
3546 treat integer types as _Float64 instead of double.
3548 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3551 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3552 building vector comparison, diagnose it and return error_mark_node.
3554 2018-03-15 Jakub Jelinek <jakub@redhat.com>
3557 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3558 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3559 INTEGER_TYPE element type.
3561 2018-03-13 David Pagan <dave.pagan@oracle.com>
3564 * c-typeck.c (output_init_element): Ensure field initializer
3565 expression is always evaluated if there are side effects.
3567 2018-03-06 Jakub Jelinek <jakub@redhat.com>
3570 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3571 !building_stmt_list_p ().
3573 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3576 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3577 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3578 and include the BIND_EXPR in the list of things that need to be
3581 2018-02-09 Nathan Sidwell <nathan@acm.org>
3584 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3585 to strict_aliasing_warning.
3587 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3589 * c-typeck.c (really_start_incremental_init, push_init_level,
3590 set_nonincremental_init, output_init_element, process_init_element):
3591 Use DECL_UNNAMED_BIT_FIELD.
3593 2018-01-31 Marek Polacek <polacek@redhat.com>
3596 * c-parser.c (c_parser_compound_statement_nostart): Call
3597 expansion_point_location_if_in_system_header.
3599 2018-01-17 David Malcolm <dmalcolm@redhat.com>
3602 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3605 2018-01-13 Jakub Jelinek <jakub@redhat.com>
3608 * c-tree.h (decl_constant_value_1): Add a bool argument.
3609 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3610 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3611 (decl_constant_value): Adjust caller.
3612 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3613 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3614 decl_constant_value returns initializer that has BLKmode or
3616 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3619 Alan Hayward <alan.hayward@arm.com>
3620 David Sherwood <david.sherwood@arm.com>
3622 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3623 TYPE_VECTOR_SUBPARTS.
3625 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3627 Update copyright years.
3629 2018-01-01 Jakub Jelinek <jakub@redhat.com>
3632 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3633 c_parser_conditional_expression, c_parser_cast_expression,
3634 c_parser_sizeof_expression, c_parser_alignof_expression,
3635 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3636 c_parser_transaction_expression): Use set_error () method instead
3637 of setting value member to error_mark_node.
3639 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3641 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3642 and _Float<N>X built-in functions.
3644 2017-12-22 Jakub Jelinek <jakub@redhat.com>
3647 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3648 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3649 incomplete vars rather than after it.
3652 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3653 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3654 and consider empty ones if there are no other stmts. For
3655 -Wunused-value walk all statements before the one only followed by
3658 2017-12-22 Mike Stump <mikestump@comcast.net>
3659 Eric Botcazou <ebotcazou@adacore.com>
3661 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3662 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3663 (c_parser_do_statement): Likewise.
3664 (c_parser_for_statement): Likewise.
3665 (c_parser_statement_after_labels): Adjust calls to above.
3666 (c_parse_pragma_ivdep): New static function.
3667 (c_parser_pragma_unroll): Likewise.
3668 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3669 <PRAGMA_UNROLL>: New case.
3671 2017-12-19 Jakub Jelinek <jakub@redhat.com>
3673 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3674 perform_integral_promotions, digest_init): Replace Yoda conditions
3675 with typical order conditions.
3676 * c-decl.c (check_bitfield_type_and_width): Likewise.
3678 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3680 * c-typeck.c (c_safe_arg_type_equiv_p,
3681 c_safe_function_type_cast_p): New function.
3682 (build_c_cast): Implement -Wcast-function-type.
3684 2017-12-14 Richard Biener <rguenther@suse.de>
3687 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3688 like REALPART_EXPR for the behavior of whether its operand
3691 2017-12-12 Marek Polacek <polacek@redhat.com>
3694 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3696 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
3698 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3699 * c-parser.c (add_debug_begin_stmt): New.
3700 (c_parser_declaration_or_fndef): Call it.
3701 (c_parser_compound_statement_nostart): Likewise.
3702 (c_parser_statement_after_labels): Likewise.
3703 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3705 2017-12-07 Joseph Myers <joseph@codesourcery.com>
3707 * c-decl.c (build_compound_literal): Add parameter alignas_align
3708 and set alignment of decl if nonzero.
3709 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3710 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3712 (c_parser_struct_declaration): Update syntax comment.
3713 (c_parser_type_name): Add alignas_ok argument and pass it to
3715 (c_parser_cast_expression): Pass true to c_parser_type_name and
3716 give error if a cast used an _Alignas specifier.
3717 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3718 give error if sizeof (type-name) used an _Alignas specifier.
3719 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3720 give error if _Alignof (type-name) used an _Alignas specifier.
3721 (c_parser_postfix_expression_after_paren_type): Check specified
3722 alignment for a compound literal and pass it to
3723 build_compound_literal.
3724 * c-parser.h (c_parser_type_name): Update prototype.
3725 * c-tree.h (build_compound_literal): Update prototype.
3727 2017-12-07 Martin Sebor <msebor@redhat.com>
3730 * c-decl.c (c_decl_attributes): Look up existing declaration and
3731 pass it to decl_attributes.
3733 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3736 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3737 reserved for use by the implementation.
3739 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3741 * c-decl.c: Include "c-family/c-spellcheck.h".
3743 2017-12-05 Martin Liska <mliska@suse.cz>
3744 Jakub Jelinek <jakub@redhat.com>
3746 * c-typeck.c (pointer_diff): Add new argument and instrument
3747 pointer subtraction.
3748 (build_binary_op): Similar for pointer comparison.
3750 2017-12-01 Jakub Jelinek <jakub@redhat.com>
3753 * c-parser.c: Include tree-iterator.h.
3754 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3755 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3759 * c-tree.h (decl_constant_value_1): Declare.
3760 * c-typeck.c (decl_constant_value_1): New function.
3761 (decl_constant_value): Use it.
3762 * c-fold.c (c_fully_fold_internal): If in_init, use
3763 decl_constant_value_1 instead of decl_constant_value.
3765 2017-11-30 Jakub Jelinek <jakub@redhat.com>
3767 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3769 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3772 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3773 c_switch_covers_all_cases_p returns true.
3775 2017-11-28 Julia Koval <julia.koval@intel.com>
3776 Sebastian Peryt <sebastian.peryt@intel.com>
3778 * Make-lang.in (c/c-array-notation.o): Remove.
3779 * c-array-notation.c: Delete.
3780 * c-decl.c: Remove cilkplus condition.
3781 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3782 c_parser_cilk_verify_simd, c_parser_array_notation,
3783 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3784 c_parser_cilk_simd_fn_vector_attrs,
3785 c_finish_cilk_simd_fn_tokens): Delete.
3786 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3787 (c_parser_direct_declarator_inner): Ditto.
3788 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3789 (c_parser_attributes, c_parser_compound_statement,
3790 c_parser_statement_after_labels, c_parser_if_statement,
3791 c_parser_switch_statement, c_parser_while_statement,
3792 c_parser_do_statement, c_parser_for_statement,
3793 c_parser_unary_expression, c_parser_postfix_expression,
3794 c_parser_postfix_expression_after_primary,
3795 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3796 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3798 * c-typeck.c (build_array_ref, build_function_call_vec,
3800 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3801 c_finish_loop, build_binary_op): Remove cilkplus support.
3803 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3805 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3808 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
3810 * Make-lang.in (c.install-plugin): Install backend import library.
3812 2017-11-23 Jakub Jelinek <jakub@redhat.com>
3814 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3815 pragma_stmt context.
3817 2017-11-23 Mike Stump <mikestump@comcast.net>
3818 Eric Botcazou <ebotcazou@adacore.com>
3820 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3822 (c_parser_do_statement): Likewise.
3823 (c_parser_for_statement): Likewise.
3825 2017-11-22 David Malcolm <dmalcolm@redhat.com>
3828 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3829 bool to bool *. Within '%T' handling, if showing an "aka", use
3830 "quoted" param to add appropriate quoting.
3832 2017-11-22 Marek Polacek <polacek@redhat.com>
3837 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3839 2017-11-21 David Malcolm <dmalcolm@redhat.com>
3842 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3843 earlier failed lookups.
3845 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
3847 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3848 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3850 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3853 * c-decl.c: Include "c-family/known-headers.h".
3854 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3855 to known-headers.cc.
3856 (class suggest_missing_header): Move to known-header.h.
3857 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3858 than get_c_name_hint.
3860 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3862 * c-decl.c (get_c_name_hint): New function.
3863 (class suggest_missing_header): New class.
3864 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3865 suggest missing headers to the user.
3867 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3869 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3870 Include "c-family/name-hint.h"
3871 (implicit_decl_warning): Convert "hint" from
3872 const char * to name_hint. Pass location to
3873 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3874 warning was not printed.
3875 (undeclared_variable): Likewise for "guessed_id".
3876 (lookup_name_fuzzy): Convert return type from const char *
3877 to name_hint. Add location_t param.
3878 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3879 Include "c-family/name-hint.h"
3880 (c_parser_declaration_or_fndef): Convert "hint" from
3881 const char * to name_hint. Pass location to lookup_name_fuzzy.
3882 (c_parser_parameter_declaration): Likewise.
3884 2017-11-19 Jakub Jelinek <jakub@redhat.com>
3888 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3890 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3891 handle_omp_array_sections): Likewise.
3892 (digest_init): Don't call decl_constant_value_for_optimization.
3893 * c-tree.h (decl_constant_value_for_optimization): Removed.
3894 * c-fold.c (c_fold_array_ref): New function.
3895 (c_fully_fold_internal): Add LVAL argument, propagate it through
3896 recursive calls. For VAR_P call decl_constant_value and
3897 unshare if not LVAL and either optimizing or IN_INIT. Remove
3898 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3899 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3900 (c_fully_fold): Add LVAL argument, pass it through to
3901 c_fully_fold_internal.
3902 (decl_constant_value_for_optimization): Removed.
3904 2017-11-15 Joseph Myers <joseph@codesourcery.com>
3907 * c-parser.c (check_tgmath_function): New function.
3908 (enum tgmath_parm_kind): New enum.
3909 (c_parser_postfix_expression): Handle __builtin_tgmath.
3911 2017-10-31 David Malcolm <dmalcolm@redhat.com>
3913 * c-decl.c (implicit_decl_warning): Update for renaming of
3914 pedwarn_at_rich_loc and warning_at_rich_loc.
3915 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3916 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3917 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3918 (c_parser_struct_or_union_specifier): Likewise for renaming of
3919 pedwarn_at_rich_loc.
3920 (c_parser_parameter_declaration): Likewise for renaming of
3922 * c-typeck.c (build_component_ref): Likewise.
3923 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3924 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3925 (set_init_label): Likewise for renaming of error_at_rich_loc.
3927 2017-10-30 Richard Biener <rguenther@suse.de>
3929 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3932 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3934 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3935 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3937 2017-10-25 David Malcolm <dmalcolm@redhat.com>
3940 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3943 2017-10-25 Jakub Jelinek <jakub@redhat.com>
3946 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3947 newdecl to corresponding __builtin_ if any.
3949 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3952 * c-decl.c (diagnose_mismatched_decls): Use
3953 OPT_Wbuiltin_declaration_mismatch.
3955 2017-10-12 David Malcolm <dmalcolm@redhat.com>
3957 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3958 use it to guard calls to maybe_suggest_missing_token_insertion.
3959 (c_parser_parms_list_declarator): Override default value of new
3960 "type_is_unique" param to c_parser_require.
3961 (c_parser_asm_statement): Likewise.
3962 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3965 2017-10-11 Nathan Sidwell <nathan@acm.org>
3967 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3969 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3971 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3972 operating on trees as wide_ints.
3973 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3974 (c_tree_equal): Likewise.
3976 2017-10-04 David Malcolm <dmalcolm@redhat.com>
3978 * c-decl.c (push_parm_decl): Store c_parm's location into the
3980 (build_c_parm): Add "loc" param and store it within the c_parm.
3981 * c-parser.c (struct c_parser): Add "last_token_location" field.
3982 (c_parser_consume_token): Store location of the token into the
3984 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3985 when handling a FUNCTION_DECL, if it doesn't already have them.
3986 (c_parser_parameter_declaration): Generate a location for the
3987 parameter, and pass it to the call to build_c_parm.
3988 * c-tree.h (struct c_parm): Add field "loc".
3989 (build_c_parm): Add location_t param.
3990 * c-typeck.c (get_fndecl_argument_location): New function.
3991 (inform_for_arg): New function.
3992 (convert_for_assignment): Use inform_for_arg when dealing with
3995 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3997 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3999 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4000 don't SET_DECL_C_BIT_FIELD here.
4003 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4004 instead of trying to set just TREE_READONLY manually.
4006 2017-09-16 Tom de Vries <tom@codesourcery.com>
4009 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4012 2017-09-15 Joseph Myers <joseph@codesourcery.com>
4015 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4017 (build_conditional_expr): For C11, generate result with excess
4018 precision when one argument is an integer and the other is of a
4019 type using excess precision.
4021 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4023 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4025 2017-09-13 Marek Polacek <polacek@redhat.com>
4028 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4029 than expr.original_type.
4031 2017-09-12 Nathan Sidwell <nathan@acm.org>
4033 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4034 resort_sorted_fields): Moved from c-family/c-common.c.
4035 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4037 2017-09-01 Joseph Myers <joseph@codesourcery.com>
4040 * c-typeck.c (build_atomic_assign): Handle argument with excess
4041 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4042 argument passed to build_binary_op and convert_for_assignment but
4043 not for call to c_fully_fold.
4044 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4045 Ensure build_binary_op is called with argument with original
4046 semantic type. Avoid calling c_fully_fold with an
4047 EXCESS_PRECISION_EXPR from build_binary_op.
4049 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4052 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4054 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4055 Alan Hayward <alan.hayward@arm.com>
4056 David Sherwood <david.sherwood@arm.com>
4058 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4059 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4060 m1 and m2 to the signed equivalent of a fixed-point
4063 2017-08-24 David Malcolm <dmalcolm@redhat.com>
4065 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4066 than CAN_HAVE_LOCATION_P when determining whether to use the
4067 location_t value within "value".
4069 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4071 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4072 rather than peeking the location of the first token.
4073 * c-tree.h (c_expr::get_location): New method.
4075 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4077 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4078 to check_function_arguments.
4080 2017-08-18 Marek Polacek <polacek@redhat.com>
4082 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4085 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4088 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4089 (check_bitfield_type_and_width): Don't allow bit-field with
4090 warn_if_not_aligned type.
4092 2017-08-14 Martin Sebor <msebor@redhat.com>
4095 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4097 2017-08-11 Marek Polacek <polacek@redhat.com>
4100 * c-decl.c (pushtag): Only print inform if the warning was printed.
4101 (grokdeclarator): Likewise.
4103 2017-08-10 David Malcolm <dmalcolm@redhat.com>
4105 * c-parser.c (c_parser_error): Rename to...
4106 (c_parser_error_richloc): ...this, making static, and adding
4107 "richloc" parameter, passing it to the c_parse_error call,
4108 rather than calling c_parser_set_source_position_from_token.
4109 (c_parser_error): Reintroduce, reimplementing in terms of the
4110 above, converting return type from void to bool.
4111 (class token_pair): New class.
4112 (struct matching_paren_traits): New struct.
4113 (matching_parens): New typedef.
4114 (struct matching_brace_traits): New struct.
4115 (matching_braces): New typedef.
4116 (get_matching_symbol): New function.
4117 (c_parser_require): Add param MATCHING_LOCATION, using it to
4118 highlight matching "opening" tokens for missing "closing" tokens.
4119 (c_parser_skip_until_found): Likewise.
4120 (c_parser_static_assert_declaration_no_semi): Convert explicit
4121 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4122 class matching_parens, so that the pertinent open parenthesis is
4123 highlighted when there are problems locating the close
4125 (c_parser_struct_or_union_specifier): Likewise.
4126 (c_parser_typeof_specifier): Likewise.
4127 (c_parser_alignas_specifier): Likewise.
4128 (c_parser_simple_asm_expr): Likewise.
4129 (c_parser_braced_init): Likewise, for matching_braces.
4130 (c_parser_paren_condition): Likewise, for matching_parens.
4131 (c_parser_switch_statement): Likewise.
4132 (c_parser_for_statement): Likewise.
4133 (c_parser_asm_statement): Likewise.
4134 (c_parser_asm_operands): Likewise.
4135 (c_parser_cast_expression): Likewise.
4136 (c_parser_sizeof_expression): Likewise.
4137 (c_parser_alignof_expression): Likewise.
4138 (c_parser_generic_selection): Likewise.
4139 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4140 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4141 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4142 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4143 c_parser_skip_until_found call.
4144 (c_parser_objc_class_definition): Use class matching_parens as
4146 (c_parser_objc_method_decl): Likewise.
4147 (c_parser_objc_try_catch_finally_statement): Likewise.
4148 (c_parser_objc_synchronized_statement): Likewise.
4149 (c_parser_objc_at_property_declaration): Likewise.
4150 (c_parser_oacc_wait_list): Likewise.
4151 (c_parser_omp_var_list_parens): Likewise.
4152 (c_parser_omp_clause_collapse): Likewise.
4153 (c_parser_omp_clause_default): Likewise.
4154 (c_parser_omp_clause_if): Likewise.
4155 (c_parser_omp_clause_num_threads): Likewise.
4156 (c_parser_omp_clause_num_tasks): Likewise.
4157 (c_parser_omp_clause_grainsize): Likewise.
4158 (c_parser_omp_clause_priority): Likewise.
4159 (c_parser_omp_clause_hint): Likewise.
4160 (c_parser_omp_clause_defaultmap): Likewise.
4161 (c_parser_oacc_single_int_clause): Likewise.
4162 (c_parser_omp_clause_ordered): Likewise.
4163 (c_parser_omp_clause_reduction): Likewise.
4164 (c_parser_omp_clause_schedule): Likewise.
4165 (c_parser_omp_clause_num_teams): Likewise.
4166 (c_parser_omp_clause_thread_limit): Likewise.
4167 (c_parser_omp_clause_aligned): Likewise.
4168 (c_parser_omp_clause_linear): Likewise.
4169 (c_parser_omp_clause_safelen): Likewise.
4170 (c_parser_omp_clause_simdlen): Likewise.
4171 (c_parser_omp_clause_depend): Likewise.
4172 (c_parser_omp_clause_map): Likewise.
4173 (c_parser_omp_clause_device): Likewise.
4174 (c_parser_omp_clause_dist_schedule): Likewise.
4175 (c_parser_omp_clause_proc_bind): Likewise.
4176 (c_parser_omp_clause_uniform): Likewise.
4177 (c_parser_omp_for_loop): Likewise.
4178 (c_parser_cilk_clause_vectorlength): Likewise.
4179 (c_parser_cilk_clause_linear): Likewise.
4180 (c_parser_transaction_expression): Likewise.
4181 * c-parser.h (c_parser_require): Add param matching_location with
4182 default UNKNOWN_LOCATION.
4183 (c_parser_error): Convert return type from void to bool.
4184 (c_parser_skip_until_found): Add param matching_location with
4185 default UNKNOWN_LOCATION.
4187 2017-08-09 Marek Polacek <polacek@redhat.com>
4189 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4190 * c-tree.h (build_external_ref): Update declaration.
4191 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4192 (build_external_ref): Change the type of a parameter to bool.
4193 (parser_build_binary_op): Use true/false instead of 1/0.
4194 (pointer_diff): Likewise.
4195 (build_modify_expr): Likewise.
4196 (set_designator): Change the type of a parameter to bool.
4197 (set_init_index): Use true/false instead of 1/0.
4198 (set_init_label): Likewise.
4199 (output_init_element): Change the type of a parameter to bool.
4200 (output_pending_init_elements): Use true/false instead of 1/0.
4201 (process_init_element): Likewise.
4202 (build_binary_op): Change the type of a parameter to bool.
4204 2017-08-09 Marek Polacek <polacek@redhat.com>
4207 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4208 Call emit_diagnostic_valist instead of pedwarn.
4209 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4210 Print the relevant types in diagnostics.
4212 2017-08-09 Marek Polacek <polacek@redhat.com>
4215 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
4216 build_conditional_expr.
4217 * c-parser.c (c_parser_conditional_expression): Create locations for
4218 EXP1 and EXP2 from their source ranges. Pass the locations down to
4219 build_conditional_expr.
4220 * c-tree.h (build_conditional_expr): Update declaration.
4221 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4222 For -Wsign-compare, also print the types.
4224 2017-08-08 Martin Liska <mliska@suse.cz>
4226 * c-convert.c: Include header files.
4227 * c-typeck.c: Likewise.
4229 2017-08-07 Martin Liska <mliska@suse.cz>
4231 * c-parser.c (c_parser_attributes): Canonicalize name of an
4234 2017-08-02 Marek Polacek <polacek@redhat.com>
4237 * c-parser.c (c_parser_unary_expression): Use set_error.
4241 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4242 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4244 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
4245 Martin Liska <mliska@suse.cz>
4247 * c-typeck.c (c_finish_goto_label): Build gimple predict
4250 2017-07-31 Martin Liska <mliska@suse.cz>
4253 * c-convert.c (convert): Guard condition with flag_sanitize_p
4254 also with current_function_decl non-null equality.
4255 * c-decl.c (grokdeclarator): Likewise.
4256 * c-typeck.c (build_binary_op): Likewise.
4258 2017-07-25 Marek Polacek <polacek@redhat.com>
4260 * c-decl.c (grokfield): Remove local variable.
4262 2017-07-25 Marek Polacek <polacek@redhat.com>
4265 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4266 macro expansion if the body is in { }.
4267 (c_parser_while_statement): Likewise.
4268 (c_parser_for_statement): Likewise.
4270 2017-07-18 Nathan Sidwell <nathan@acm.org>
4272 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4274 2017-07-14 David Malcolm <dmalcolm@redhat.com>
4276 * c-decl.c (implicitly_declare): When suggesting a missing
4277 #include, provide a fix-it hint.
4279 2017-07-06 David Malcolm <dmalcolm@redhat.com>
4281 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4282 and call that instead.
4283 * c-tree.h (selftest::run_c_tests): New decl.
4285 2017-06-26 Marek Polacek <polacek@redhat.com>
4288 * c-parser.c (c_parser_if_body): Set the location of the
4289 body of the conditional after parsing all the labels. Call
4290 warn_for_multistatement_macros.
4291 (c_parser_else_body): Likewise.
4292 (c_parser_switch_statement): Likewise.
4293 (c_parser_while_statement): Likewise.
4294 (c_parser_for_statement): Likewise.
4295 (c_parser_statement): Add a default argument. Save the location
4296 after labels have been parsed.
4297 (c_parser_c99_block_statement): Likewise.
4299 2017-06-19 Richard Biener <rguenther@suse.de>
4301 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4302 negated _Literals to parse _Literal (int) -1.
4304 2017-06-13 Martin Liska <mliska@suse.cz>
4307 * c-convert.c (convert): Use sanitize_flags_p.
4308 * c-decl.c (grokdeclarator): Likewise.
4309 * c-typeck.c (convert_for_assignment): Likewise.
4310 (c_finish_return): Likewise.
4311 (build_binary_op): Likewise.
4313 2017-06-08 Jakub Jelinek <jakub@redhat.com>
4316 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4317 to sizetype before size_binop.
4319 2017-06-07 Jakub Jelinek <jakub@redhat.com>
4321 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4324 2017-06-06 Marek Polacek <polacek@redhat.com>
4327 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4329 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4331 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4333 * c-parser.c (c_parser_binary_expression): Implement the
4334 -Wsizeof_pointer_div warning.
4335 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4336 from a parenthesized expression.
4337 (c_parser_expr_list): Use c_last_sizeof_loc.
4338 * c-tree.h (c_last_sizeof_loc): New external.
4339 * c-typeck.c (c_last_sizeof_loc): New variable.
4340 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4342 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4345 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4347 2017-05-30 David Malcolm <dmalcolm@redhat.com>
4349 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4352 2017-05-24 Martin Sebor <msebor@redhat.com>
4355 * c-fold.c (c_fully_fold_internal): Adjust.
4356 * c-typeck.c (parser_build_unary_op): Adjust.
4358 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4360 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4361 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4364 2017-05-23 Marek Polacek <polacek@redhat.com>
4366 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4369 2017-05-22 Jakub Jelinek <jakub@redhat.com>
4371 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4372 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4373 it returned invariant. Call tree_invariant_p unconditionally
4374 afterwards to decide whether to return expr or op0.
4376 2017-05-22 Nathan Sidwell <nathan@acm.org>
4378 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4380 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4382 * c-parser.c (c_parser_omp_clause_default): Handle
4383 "OMP_CLAUSE_DEFAULT_PRESENT".
4385 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4387 * config-lang.in (gtfiles): Add c-family/c-format.c.
4389 2017-05-18 Nathan Sidwell <nathan@acm.org>
4391 * c-decl.c (pushdecl_top_level): Delete unused function.
4393 2017-05-18 Marek Polacek <polacek@redhat.com>
4395 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4396 (check_earlier_gotos): Likewise.
4397 (define_label): Likewise.
4398 (pending_xref_error): Likewise.
4399 (smallest_type_quals_location): Likewise.
4400 (grokdeclarator): Likewise.
4401 (grokparms): Likewise.
4402 (identifier_global_value): Likewise.
4403 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4404 (find_init_member): Likewise.
4406 2017-05-18 Marek Polacek <polacek@redhat.com>
4408 * c-decl.c (start_decl): Use false/true instead of 0/1.
4409 (grokdeclarator): Likewise.
4410 (finish_struct): Likewise.
4411 (start_function): Change the return type to bool. Use false/true
4413 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4414 * c-tree.h (start_function): Update.
4415 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4416 (set_designator): Change the return type to bool. Use false/true
4419 2017-05-17 Marek Polacek <polacek@redhat.com>
4421 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4422 * c-typeck.c: Likewise.
4424 2017-05-17 Marek Polacek <polacek@redhat.com>
4427 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4428 DECL_IGNORED_P even for non-static compound literals.
4430 2017-05-17 Martin Liska <mliska@suse.cz>
4432 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4433 use it instead of int type.
4435 2017-05-17 Marek Polacek <polacek@redhat.com>
4437 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4439 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
4440 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
4441 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4442 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4444 (c_parser_conditional_expression): Likewise.
4445 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4446 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4447 (process_init_element): Likewise.
4448 (build_binary_op): Likewise.
4449 (handle_omp_array_sections_1): Likewise.
4451 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4453 * c-parser.c (c_parser_omp_clause_num_gangs)
4454 (c_parser_omp_clause_num_workers)
4455 (c_parser_omp_clause_vector_length): Merge functions into...
4456 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4459 2017-05-11 Nathan Sidwell <nathan@acm.org>
4461 * gimple-parser.c: Don't #include tree-dump.h.
4463 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4466 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4468 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4471 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4472 incorrect __MEM syntax.
4474 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4477 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4480 2017-05-09 Nathan Sidwell <nathan@acm.org>
4482 * c-tree.h (pushdecl): Declare.
4484 2017-05-05 David Malcolm <dmalcolm@redhat.com>
4486 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4487 with diagnostic_report_diagnostic.
4488 * c-errors.c (pedwarn_c99): Likewise.
4489 (pedwarn_c90): Likewise.
4491 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4494 * c-gimplify.c (c_gimplify_expr): Remove calls to
4495 cilk_gimplifY_call_params_in_spawned_fn.
4497 2017-04-25 David Malcolm <dmalcolm@redhat.com>
4499 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4500 hint for removing extra semicolon.
4502 2017-04-21 Jakub Jelinek <jakub@redhat.com>
4505 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4506 enabled, set specs->type to integer_type_node.
4508 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
4510 * c-array-notation.c: Fix typo in comment.
4512 2017-03-29 Marek Polacek <polacek@redhat.com>
4515 * c-decl.c (finish_decl): Check VAR_P.
4517 2017-03-27 Jakub Jelinek <jakub@redhat.com>
4520 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4521 * c-typeck.c (c_mark_addressable): Likewise. Look through
4522 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4524 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4526 2017-03-23 Marek Polacek <polacek@redhat.com>
4528 * c-tree.h: Remove a C_RID_YYCODE reference.
4530 2017-03-21 Jakub Jelinek <jakub@redhat.com>
4533 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4534 optional COMPOUND_EXPR with ubsan instrumentation.
4536 2017-03-17 Marek Polacek <polacek@redhat.com>
4538 * c-parser.c: Add C11 references.
4540 2017-03-15 Marek Polacek <polacek@redhat.com>
4542 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4544 2017-03-11 Marek Polacek <polacek@redhat.com>
4546 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4548 2017-03-10 David Malcolm <dmalcolm@redhat.com>
4550 PR translation/79848
4551 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4553 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4555 2017-03-09 Marek Polacek <polacek@redhat.com>
4558 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4559 parameter declarations with initializers.
4561 2017-03-09 Jakub Jelinek <jakub@redhat.com>
4564 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4567 2017-03-07 Jakub Jelinek <jakub@redhat.com>
4570 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4571 for "may only be used in compound statements" diagnostics, change it
4572 such that the same translatable string is used for all pragmas. For
4573 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4575 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4576 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4577 "may only be used in compound statements" diagnostics, such that the
4578 same translatable string is used for all pragmas.
4580 2017-03-04 Marek Polacek <polacek@redhat.com>
4583 * c-decl.c (implicit_decl_warning): Add missing space.
4585 2017-03-03 Marek Polacek <polacek@redhat.com>
4588 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4589 current_function_prototype_arg_types is error_mark_node. Fix
4590 formatting. Use TREE_VALUE instead of TREE_TYPE.
4592 2017-03-03 Jakub Jelinek <jakub@redhat.com>
4595 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4596 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4597 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4601 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4602 instead of %<_Generic>.
4603 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4604 (c_parser_omp_target_exit_data): Use %<release%> instead of
4607 2017-02-28 Jakub Jelinek <jakub@redhat.com>
4609 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4610 instead of just cond ? "..." : "...".
4611 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4612 for "enter"/"exit" keyword.
4613 (c_finish_oacc_routine): Don't use %s to supply portions of the
4616 2017-02-24 Jakub Jelinek <jakub@redhat.com>
4619 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4620 handle -Wrestrict here.
4621 * c-typeck.c (build_function_call_vec): Adjust
4622 check_function_arguments caller.
4624 2017-02-23 Richard Biener <rguenther@suse.de>
4627 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4628 to initialize c_exprs to return.
4629 (c_parser_gimple_binary_expression): Likewise.
4630 (c_parser_gimple_unary_expression): Likewise.
4631 (c_parser_gimple_postfix_expression): Likewise.
4633 2017-02-22 Marek Polacek <polacek@redhat.com>
4636 * c-typeck.c (convert_arguments): Handle error_mark_node.
4638 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4640 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4641 value of c_parser_parse_ssa_name against error_mark_node and emit
4642 error if ssa name is anonymous and written as default definition.
4644 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4646 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4649 2017-02-16 Jakub Jelinek <jakub@redhat.com>
4652 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4653 ignore #pragma omp target even when not followed by identifier.
4655 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4657 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4658 (c_parser_gimple_unary_expression): Likewise.
4660 2017-02-13 Jakub Jelinek <jakub@redhat.com>
4662 * c-parser.c (c_parser_oacc_declare): Add missing space in
4665 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4668 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4669 set_c_expr_source_range when parsing ssa-name.
4671 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
4672 Richard Biener <rguenther@suse.de>
4674 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4675 building IL when arguments are error_mark_node.
4676 (c_parser_gimple_unary_expression): Likewise.
4677 (c_parser_gimple_if_stmt): Likewise.
4678 (c_parser_gimple_switch_stmt): Likewise.
4679 (c_parser_gimple_return_stmt): Likewise.
4680 (c_parser_parse_ssa_name): When name lookup fails do not build
4681 an SSA name. Use undeclared rather than not declared in error
4684 2017-02-09 Marek Polacek <polacek@redhat.com>
4687 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4688 instead of c_parser_skip_until_found.
4690 2017-02-09 Jakub Jelinek <jakub@redhat.com>
4693 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4694 symtab_node::get on automatic variables.
4696 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4697 Chung-Lin Tang <cltang@codesourcery.com>
4699 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4700 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4702 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4704 2017-02-07 Richard Biener <rguenther@suse.de>
4706 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4707 (c_parser_gimple_postfix_expression_after_primary):
4708 Do not use c_build_function_call_vec to avoid folding and promotion.
4711 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4714 * c-decl.c (pop_scope): Pass main_input_filename to
4715 build_translation_unit_decl.
4717 2017-01-24 David Malcolm <dmalcolm@redhat.com>
4719 * c-parser.c: Include "read-rtl-function.h" and
4721 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4722 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4723 production. Update for renaming of field "gimple_pass" to
4724 "gimple_or_rtl_pass". If __RTL was seen, call
4725 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4726 to an auto_timevar, to cope with early exit.
4727 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4728 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4729 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4731 (c_parser_parse_rtl_body): New function.
4732 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4733 (struct c_declspecs): Rename field "gimple_pass" to
4734 "gimple_or_rtl_pass". Add field "rtl_p".
4735 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4736 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4737 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4738 (c_parser_gimple_or_rtl_pass_list): ...this.
4740 2017-01-20 Marek Polacek <polacek@redhat.com>
4743 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4745 2017-01-13 Richard Biener <rguenther@suse.de>
4747 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4750 2017-01-13 Richard Biener <rguenther@suse.de>
4752 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4753 _Literal ( type-name ) number.
4755 2017-01-12 Richard Biener <rguenther@suse.de>
4757 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4760 2017-01-11 Jakub Jelinek <jakub@redhat.com>
4763 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4766 2017-01-11 Richard Biener <rguenther@suse.de>
4769 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4770 returns on parse errors.
4772 2017-01-04 Marek Polacek <polacek@redhat.com>
4775 * c-parser.c (c_parser_postfix_expression): Mark zero character
4776 constants by setting original_type in c_expr.
4777 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4778 with a zero character constant.
4779 (char_type_p): New function.
4781 2017-01-04 David Malcolm <dmalcolm@redhat.com>
4783 * c-parser.c (c_parser_declaration_or_fndef): Create a
4784 rich_location at init_loc and parse it to start_init.
4785 (last_init_list_comma): New global.
4786 (c_parser_braced_init): Update last_init_list_comma when parsing
4787 commas. Pass it to pop_init_level. Pass location of closing
4788 brace to pop_init_level.
4789 (c_parser_postfix_expression_after_paren_type): Create a
4790 rich_location at type_loc and parse it to start_init.
4791 (c_parser_omp_declare_reduction): Likewise for loc.
4792 * c-tree.h (start_init): Add rich_location * param.
4793 (pop_init_level): Add location_t param.
4794 * c-typeck.c (struct initializer_stack): Add field
4795 "missing_brace_richloc".
4796 (start_init): Add richloc param, use it to initialize
4797 the stack node's missing_brace_richloc.
4798 (last_init_list_comma): New decl.
4799 (finish_implicit_inits): Pass last_init_list_comma to
4801 (push_init_level): When finding missing open braces, add fix-it
4802 hints to the richloc.
4803 (pop_init_level): Add "insert_before" param and pass it
4804 when calling pop_init_level. Add fixits about missing
4805 close braces to any richloc. Use the richloc for the
4806 -Wmissing-braces warning.
4807 (set_designator): Pass last_init_list_comma to pop_init_level.
4808 (process_init_element): Likewise.
4810 2017-01-01 Jakub Jelinek <jakub@redhat.com>
4812 Update copyright years.
4814 2016-12-21 Jakub Jelinek <jakub@redhat.com>
4817 * c-typeck.c (build_function_call_vec): If check_function_arguments
4818 returns true, set TREE_NO_WARNING on CALL_EXPR.
4821 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4822 to *expr instead of overwriting it.
4824 2016-12-20 Richard Biener <rguenther@suse.de>
4826 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4828 (c_parser_gimple_statement): Only build assigns for non-error
4830 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4832 2016-12-14 Martin Jambor <mjambor@suse.cz>
4834 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4836 (c_finish_oacc_routine): Adjusted call to
4837 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4838 to use their new names.
4839 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4841 (c_parser_oacc_update): Likewise.
4842 (c_parser_omp_simd): Likewise.
4843 (c_parser_omp_target_update): Likewise.
4844 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4845 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4847 (c_finish_omp_cancellation_point): Likewise.
4848 * gimple-parser.c: Do not include omp-low.h
4850 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4851 James Norris <jnorris@codesourcery.com>
4853 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4854 EXIT_DATA,WAIT} are not used in compound statements.
4855 (c_parser_oacc_enter_exit_data): Update diagnostics.
4857 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4860 * c-decl.c (diagnose_mismatched_decls): Use
4861 OPT_Wbuiltin_declaration_mismatch here too.
4863 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
4864 Alan Hayward <alan.hayward@arm.com>
4865 David Sherwood <david.sherwood@arm.com>
4867 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4868 (make_label, finish_struct): Likewise.
4870 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4871 Richard Biener <rguenther@suse.de>
4873 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4874 * config-lang.in (gtfiles): Add c/c-parser.h.
4875 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4876 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4877 * c-parser.c (enum c_id_kind, struct c_token,
4878 c_parser_next_token_is, c_parser_next_token_is_not,
4879 c_parser_next_token_is_keyword,
4880 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4882 * c-parser.h: ... new header.
4883 * c-parser.c: Include c-parser.h and gimple-parser.h.
4884 (c_parser_peek_token, c_parser_peek_2nd_token,
4885 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4886 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4887 c_parser_error, c_parser_require, c_parser_skip_until_found,
4888 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4889 c_parser_type_name): Export.
4890 (c_parser_tokens_buf): New function.
4891 (c_parser_error): Likewise.
4892 (c_parser_set_error): Likewise.
4893 (c_parser_declspecs): Handle RID_GIMPLE.
4894 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4895 via c_parser_parse_gimple_body.
4896 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4897 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4898 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4899 c_parser_error, c_parser_require, c_parser_skip_until_found,
4900 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4901 c_parser_type_name): Declare.
4902 (struct c_parser): Declare forward.
4903 (c_parser_tokens_buf): Declare.
4904 (c_parser_error): Likewise.
4905 (c_parser_set_error): Likewise.
4906 * gimple-parser.c: New file.
4907 * gimple-parser.h: Likewise.
4909 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4912 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4915 2016-09-11 Le-Chun Wu <lcwu@google.com>
4916 Mark Wielaard <mjw@redhat.com>
4918 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4919 to the given -Wshadow= variant.
4921 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4923 * c-typeck.c: Include memmodel.h.
4925 2016-10-13 Jakub Jelinek <jakub@redhat.com>
4928 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4929 instead of lhd_return_null_tree_v.
4931 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4934 * c-decl.c (smallest_type_quals_location): New static function.
4935 (grokdeclarator): Try to find the correct location for an ignored
4938 2016-09-26 Marek Polacek <polacek@redhat.com>
4941 * c-decl.c (pop_scope): Add gcc_fallthrough.
4943 2016-09-26 Marek Polacek <polacek@redhat.com>
4946 * c-parser.c (struct c_token): Add flags field.
4947 (c_lex_one_token): Pass it to c_lex_with_flags.
4948 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4949 into IFN_FALLTHROUGH.
4950 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4951 attribute fallthrough after a case label or default label.
4952 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4954 2016-09-24 Marek Polacek <polacek@redhat.com>
4957 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4958 have boolean value. Warn about ++/-- on booleans.
4960 2016-09-23 Jakub Jelinek <jakub@redhat.com>
4962 * c-parser.c (incomplete_record_decls): Remove unnecessary
4963 = vNULL initialization of file scope vec.
4965 2016-09-16 Marek Polacek <polacek@redhat.com>
4967 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4969 2016-09-14 Marek Polacek <polacek@redhat.com>
4971 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4972 (fix_array_notation_expr): Likewise.
4973 * c-decl.c (finish_decl): Likewise.
4974 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4975 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4976 (function_to_pointer_conversion): Use false instead of 0.
4977 (convert_lvalue_to_rvalue): Likewise.
4978 (parser_build_unary_op): Likewise.
4979 (build_atomic_assign): Likewise.
4980 (build_unary_op): Change nonconvert parameter type to bool, use
4981 true/false instead of 1/0.
4982 (build_binary_op): Use true instead of 1.
4984 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4986 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4987 of add_fixit_insert to add_fixit_insert_before.
4989 2016-09-13 Marek Polacek <polacek@redhat.com>
4991 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4994 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4997 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4998 COMPOUND_EXPR to warn_for_omitted_condop.
5000 2016-09-07 David Malcolm <dmalcolm@redhat.com>
5002 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5003 c_get_substring_location for this new langhook.
5005 2016-09-02 Jakub Jelinek <jakub@redhat.com>
5008 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5010 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5011 instead of mark_exp_read on low_bound/length expression.
5012 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5013 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5014 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5015 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5016 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5017 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5018 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5019 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5020 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5021 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5022 instead of mark_expr_read.
5023 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5024 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5025 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5026 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5027 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5028 array section bases outside of depend clause, for depend clause
5029 use convert_lvalue_to_rvalue on the base.
5030 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5031 linear, aligned, map, to and from clauses.
5032 (c_omp_clause_copy_ctor): New function.
5034 2016-09-01 Marek Polacek <polacek@redhat.com>
5037 * c-typeck.c (composite_type): Add FALLTHRU comment.
5039 2016-08-31 David Malcolm <dmalcolm@redhat.com>
5041 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5042 to the insertion fixits for "struct", "union", and "enum".
5044 2016-08-30 David Malcolm <dmalcolm@redhat.com>
5046 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5047 rather than add_fixit_misspelled_id.
5048 (undeclared_variable): Likewise.
5049 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5050 now-redundant "here" params from add_fixit_insert method calls.
5051 (c_parser_parameter_declaration): Likewise.
5052 * c-typeck.c (build_component_ref): Remove now-redundant range
5053 param from add_fixit_replace method calls.
5055 2016-08-25 Marek Polacek <polacek@redhat.com>
5057 * c-typeck.c (parser_build_binary_op): Pass LHS to
5058 warn_logical_not_parentheses.
5060 2016-08-25 Marek Polacek <polacek@redhat.com>
5063 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5064 or _FloatN or _FloatNx is not supported.
5065 (finish_declspecs): Set type to integer_type_node when _FloatN or
5066 _FloatNx is not supported.
5068 2016-08-19 Joseph Myers <joseph@codesourcery.com>
5071 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5072 (struct c_declspecs): Add field floatn_nx_idx.
5073 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5074 and _FloatNx type specifiers.
5075 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5076 (c_parser_declspecs, c_parser_attribute_any_word)
5077 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5078 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5079 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5080 narrower than double.
5082 2016-08-12 Jakub Jelinek <jakub@redhat.com>
5083 Martin Liska <mliska@suse.cz>
5086 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5087 % to determine val element to change. Assert that
5088 wchar_bytes * charwidth fits into val array.
5090 2016-08-12 Marek Polacek <polacek@redhat.com>
5093 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5094 (c_parser_postfix_expression): Likewise.
5095 * c-typeck.c (build_unary_op): Adjust fall through comment.
5096 (c_mark_addressable): Likewise.
5098 2016-08-11 Jakub Jelinek <jakub@redhat.com>
5101 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5102 array member through typedef, for orig_qual_indirect == 0 clear
5105 2016-08-08 David Malcolm <dmalcolm@redhat.com>
5108 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5109 this up to selftest::run_c_tests.
5110 (selftest::run_c_tests): New function.
5112 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5114 * c-parser.c (struct oacc_routine_data): Add error_seen and
5115 fndecl_seen members.
5116 (c_finish_oacc_routine): Use these.
5117 (c_parser_declaration_or_fndef): Adjust.
5118 (c_parser_oacc_routine): Likewise. Support more C language
5119 constructs, and improve diagnostics. Move pragma context
5121 (c_parser_pragma): ... here.
5123 * c-parser.c (struct oacc_routine_data): New.
5124 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5126 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5127 declare target" attribute.
5129 2016-08-01 Jan Beulich <jbeulich@suse.com>
5131 * c-fold.c (c_fully_fold_internal): Also emit shift count
5132 warnings for vector types.
5133 * c-typeck.c (build_binary_op): Likewise.
5135 2016-07-29 Marek Polacek <polacek@redhat.com>
5138 * c-decl.c (finish_struct): Rephrase an error message.
5141 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5142 to error node for invalid code.
5145 * c-decl.c (implicitly_declare): Return decl early not only for
5146 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5148 2016-07-29 Jakub Jelinek <jakub@redhat.com>
5151 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5152 on GNU extern inline functions.
5154 2016-07-29 Marek Polacek <polacek@redhat.com>
5157 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5160 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
5162 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5164 2016-07-20 David Malcolm <dmalcolm@redhat.com>
5166 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5168 (best_macro_match): Likewise, converting from a typedef to a
5170 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5171 (lookup_name_fuzzy): Update for change of best_macro_match to a
5172 subclass with a ctor that calls cpp_forall_identifiers.
5174 2016-07-20 David Malcolm <dmalcolm@redhat.com>
5176 * c-decl.c (implicit_decl_warning): Update for conversion of
5177 return type of lookup_name_fuzzy to const char *.
5178 (undeclared_variable): Likewise.
5179 (lookup_name_fuzzy): Convert return type from tree to
5181 * c-parser.c (c_parser_declaration_or_fndef): Update for
5182 conversion of return type of lookup_name_fuzzy to const char *.
5183 (c_parser_parameter_declaration): Likewise.
5185 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5187 * c-parser.c (c_parser_oacc_declare): Don't scan for
5189 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5190 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5191 zero-length subarrays.
5193 2016-07-15 Jakub Jelinek <jakub@redhat.com>
5196 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5197 instead of FUZZY_LOOKUP_NAME.
5198 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5199 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5201 2016-07-14 Jakub Jelinek <jakub@redhat.com>
5204 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5206 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5208 * c-parser.c (c_parser_generic_selection): Make type of variable
5210 (c_parser_omp_declare_simd): Likewise.
5212 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5214 * c-decl.c (struct c_struct_parse_info): Change member types
5215 from vec to auto_vec.
5216 (start_struct): Adjust.
5217 (finish_struct): Likewise.
5219 2016-07-02 Jakub Jelinek <jakub@redhat.com>
5222 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5224 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5226 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5227 Move pragma context checking into...
5228 (c_parser_omp_cancellation_point): ... here, and improve
5229 diagnostic messages.
5230 * c-typeck.c (c_finish_omp_cancel)
5231 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5233 2016-06-29 Jakub Jelinek <jakub@redhat.com>
5236 * c-typeck.c (c_build_qualified_type): Don't clear
5237 C_TYPE_INCOMPLETE_VARS for the main variant.
5239 2016-06-28 Martin Sebor <msebor@redhat.com>
5242 * c-typeck.c (output_init_element): Diagnose incompatible types
5243 before non-constant initializers.
5245 2016-06-28 Jakub Jelinek <jakub@redhat.com>
5247 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5249 2016-06-23 Andi Kleen <ak@linux.intel.com>
5251 * Make-lang.in: Add support for autofdo.
5253 2016-06-22 David Malcolm <dmalcolm@redhat.com>
5256 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5257 (implicit_decl_warning): When issuing warnings for implicit
5258 declarations, attempt to provide a suggestion via
5260 (undeclared_variable): Likewise when issuing errors.
5261 (lookup_name_in_scope): Likewise.
5262 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5263 (best_macro_match): New typedef.
5264 (find_closest_macro_cpp_cb): New function.
5265 (lookup_name_fuzzy): New function.
5266 * c-parser.c: Include gcc-rich-location.h.
5267 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5268 (c_keyword_starts_typename): ...this new function.
5269 (c_parser_declaration_or_fndef): When issuing errors about
5270 missing "struct" etc, add a fixit. For other kinds of errors,
5271 attempt to provide a suggestion via lookup_name_fuzzy.
5272 (c_parser_parms_declarator): When looking ahead to detect typos in
5273 type names, also reject CPP_KEYWORD.
5274 (c_parser_parameter_declaration): When issuing errors about
5275 unknown type names, attempt to provide a suggestion via
5277 * c-tree.h (c_keyword_starts_typename): New prototype.
5279 2016-06-20 Joseph Myers <joseph@codesourcery.com>
5282 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5283 c_common_type returns error_mark_node.
5285 2016-06-19 Martin Sebor <msebor@redhat.com>
5288 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5289 __alignof__ (expression).
5291 2016-06-14 David Malcolm <dmalcolm@redhat.com>
5293 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5295 2016-06-14 David Malcolm <dmalcolm@redhat.com>
5297 * c-typeck.c (build_component_ref): Simplify fixit code by
5298 using gcc_rich_location::add_fixit_misspelled_id.
5299 (set_init_label): Likewise.
5301 2016-06-13 David Malcolm <dmalcolm@redhat.com>
5303 * c-parser.c (c_parser_initelt): Provide location of name for new
5304 location_t param of set_init_label.
5305 * c-tree.h (set_init_label): Add location_t param.
5306 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5307 param and use it when issuing error messages about unrecognized
5308 field names. Attempt to provide a fixit hint if appropriate,
5309 otherwise update the error message to provide the type name.
5311 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5314 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5317 2016-06-08 Martin Sebor <msebor@redhat.com>
5318 Jakub Jelinek <jakub@redhat.com>
5322 * c-typeck.c (convert_arguments): Don't promote last argument
5323 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5325 2016-06-08 Marek Polacek <polacek@redhat.com>
5328 * c-decl.c (grokdeclarator): Check TYPE_P.
5331 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5334 2016-06-07 David Malcolm <dmalcolm@redhat.com>
5336 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5337 and structure element reference, capture the location of the
5338 element name token and pass it to build_component_ref.
5339 (c_parser_postfix_expression_after_primary): Likewise for
5340 structure element dereference.
5341 (c_parser_omp_variable_list): Likewise for
5342 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5343 * c-tree.h (build_component_ref): Add location_t param.
5344 * c-typeck.c (build_component_ref): Add location_t param
5345 COMPONENT_LOC. Use it, if available, when issuing hints about
5346 mispelled member names to provide a fixit replacement hint.
5348 2016-06-06 Marek Polacek <polacek@redhat.com>
5351 * c-parser.c (c_parser_direct_declarator): Set location.
5353 2016-06-06 Marek Polacek <polacek@redhat.com>
5355 * c-typeck.c (comptypes_internal): Handle comparisons of
5356 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5357 TYPE_REF_CAN_ALIAS_ALL.
5359 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5361 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5362 arguments as addressable when async clause exists.
5364 2016-05-30 Jakub Jelinek <jakub@redhat.com>
5367 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5368 when combined with target construct.
5370 2016-05-26 Jakub Jelinek <jakub@redhat.com>
5372 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5373 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5375 2016-05-25 Marek Polacek <polacek@redhat.com>
5378 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5381 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5383 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5385 * c-parser.c (c_parser_oacc_declare): Add support for
5386 GOMP_MAP_FIRSTPRIVATE_POINTER.
5387 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5388 argument with enum c_omp_region_type ort.
5389 (handle_omp_array_sections): Likewise. Update call to
5390 handle_omp_array_sections_1.
5391 (c_finish_omp_clauses): Add specific errors and warning messages for
5392 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5393 call to handle_omp_array_sections.
5395 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5397 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5399 2016-05-24 Richard Biener <rguenther@suse.de>
5403 * c-typeck.c (build_array_ref): Do not complain about indexing
5404 non-lvalue vectors. Adjust for function name change.
5406 2016-05-20 Martin Sebor <msebor@redhat.com>
5409 * c-typeck.c (error_init): Use
5410 expansion_point_location_if_in_system_header.
5411 (warning_init): Same.
5413 2016-05-19 David Malcolm <dmalcolm@redhat.com>
5416 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5418 (c_parser_postfix_expression): Likewise.
5419 * c-tree.h (c_expr::set_error): New method.
5420 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5421 that result's range is initialized.
5423 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5425 * c-typeck.c (parser_build_unary_op): Fix formatting.
5427 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5429 * c-decl.c (grokdeclarator): Remove errmsg and use of
5430 targetm.invalid_return_type.
5431 (grokparms): Remove errmsg and use of
5432 targetm.invalid_parameter_type.
5434 2016-05-13 Joseph Myers <joseph@codesourcery.com>
5436 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5437 function return type.
5439 2016-05-12 Marek Polacek <polacek@redhat.com>
5442 * c-decl.c (build_compound_literal): Pass LOC down to
5443 c_incomplete_type_error.
5444 * c-tree.h (require_complete_type): Adjust declaration.
5445 (c_incomplete_type_error): Likewise.
5446 * c-typeck.c (require_complete_type): Add location parameter, pass it
5447 down to c_incomplete_type_error.
5448 (c_incomplete_type_error): Add location parameter, pass it down to
5450 (build_component_ref): Pass location down to c_incomplete_type_error.
5451 (default_conversion): Pass location down to require_complete_type.
5452 (build_array_ref): Likewise.
5453 (build_function_call_vec): Likewise.
5454 (convert_arguments): Likewise.
5455 (build_unary_op): Likewise.
5456 (build_c_cast): Likewise.
5457 (build_modify_expr): Likewise.
5458 (convert_for_assignment): Likewise.
5459 (c_finish_omp_clauses): Likewise.
5461 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5464 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5466 * c-errors.c (pedwarn_c90): Return true if warned.
5467 * c-tree.h (pedwarn_c90): Change return type to bool.
5468 (enum c_declspec_word): Add new enumerator cdw_atomic.
5470 2016-05-11 Marek Polacek <polacek@redhat.com>
5473 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5474 diagnose_mismatched_attributes and call it.
5476 2016-05-10 Marek Polacek <polacek@redhat.com>
5479 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5480 on a declaration following the definition.
5482 2016-05-05 Jakub Jelinek <jakub@redhat.com>
5484 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5485 parse it through to c_parser_c99_block_statement.
5486 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5489 2016-05-04 Marek Polacek <polacek@redhat.com>
5491 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5494 2016-05-04 Marek Polacek <polacek@redhat.com>
5497 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5498 for macro expansions.
5500 2016-05-03 Marek Polacek <polacek@redhat.com>
5503 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5504 check_builtin_function_arguments.
5506 2016-05-03 Richard Biener <rguenther@suse.de>
5508 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5509 the checksum from the previous stage.
5511 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5513 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5514 c_finish_omp_clauses.
5515 (c_parser_omp_all_clauses): Likewise.
5516 (c_parser_oacc_cache): Likewise.
5517 (c_parser_oacc_loop): Likewise.
5518 (omp_split_clauses): Likewise.
5519 (c_parser_omp_declare_target): Likewise.
5520 (c_parser_cilk_all_clauses): Likewise.
5521 (c_parser_cilk_for): Likewise.
5522 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5523 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5525 2016-05-02 Marek Polacek <polacek@redhat.com>
5528 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5531 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5534 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5535 OACC_LOOP_CLAUSE_MASK.
5536 (c_parser_oacc_kernels_parallel): Update call to
5537 c_oacc_split_loop_clauses.
5539 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
5541 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5542 argument to build_modify_expr in two cases.
5544 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5546 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5547 warn_for_memset instead of warning directly here.
5549 2016-04-26 Marek Polacek <polacek@redhat.com>
5552 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5554 (c_parser_for_statement): ... here.
5555 (c_parser_if_statement): Use it.
5556 (c_parser_switch_statement): Use it.
5557 (c_parser_while_statement): Use it.
5560 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5562 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5565 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5566 instead of c_finish_cilk_clauses.
5567 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5568 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5569 floating-point variables in the linear clause for Cilk Plus.
5571 2016-04-18 Michael Matz <matz@suse.de>
5573 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5574 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5576 2016-04-15 Marek Polacek <polacek@redhat.com>
5579 * c-typeck.c (build_unary_op): Pass location down to error and
5582 2016-04-15 Jakub Jelinek <jakub@redhat.com>
5585 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5587 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5588 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5589 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5590 Adjust c_parser_pragma callers.
5591 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5593 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5595 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5596 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5597 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5598 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5599 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5600 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5601 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5602 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5604 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5605 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5608 2016-04-13 Marek Polacek <polacek@redhat.com>
5611 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5613 (c_parser_statement): Likewise.
5614 (c_parser_c99_block_statement): Likewise.
5615 (c_parser_while_statement): Likewise.
5616 (c_parser_for_statement): Likewise.
5617 (c_parser_if_body): Don't set IF_P here.
5618 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5619 about dangling else here.
5620 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5621 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5622 warn about dangling else here.
5624 2016-04-04 Marek Polacek <polacek@redhat.com>
5627 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5629 2016-03-31 Marek Polacek <polacek@redhat.com>
5632 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5634 2016-03-18 David Malcolm <dmalcolm@redhat.com>
5637 * c-parser.c (c_parser_postfix_expression): Set the source range
5638 for uses of "__builtin_types_compatible_p".
5640 2016-03-17 Jakub Jelinek <jakub@redhat.com>
5643 * c-typeck.c (composite_type): Don't count void_list_node
5644 into len, if the list is terminated by void_list_node, start
5645 with void_list_node instead of NULL for newargs. Stop
5648 2016-03-16 Marek Polacek <polacek@redhat.com>
5651 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5652 nested functions returning VM types.
5654 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5656 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5657 when calling c_finish_omp_clauses.
5659 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5662 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5665 2016-03-04 Marek Polacek <polacek@redhat.com>
5668 * c-parser.c (c_parser_postfix_expression): Call
5669 c_parser_cast_expression rather than c_parser_postfix_expression.
5671 2016-03-01 Jakub Jelinek <jakub@redhat.com>
5675 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5676 of incomplete decls to error_mark_node.
5678 2016-02-24 Marek Polacek <polacek@redhat.com>
5681 * c-decl.c (finish_decl): Don't update the copy of the type of a
5682 different decl type.
5684 2016-02-23 Jakub Jelinek <jakub@redhat.com>
5687 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5688 in id_kind reclassification.
5690 2016-02-16 Jakub Jelinek <jakub@redhat.com>
5693 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5695 2016-02-16 James Norris <jnorris@codesourcery.com>
5698 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5700 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5702 * c-decl.c (build_null_declspecs): Zero the entire struct.
5705 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5706 callers changed. If nested_p is true, use it to call
5707 finish_implicit_inits.
5708 * c-tree.h (finish_implicit_inits): Declare.
5709 * c-typeck.c (finish_implicit_inits): New function. Move code
5711 (push_init_level): ... here.
5712 (set_designator, process_init_element): Call finish_implicit_inits.
5714 2016-02-11 Jakub Jelinek <jakub@redhat.com>
5717 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5718 arguments for -Waddress warning.
5720 2016-02-04 Jakub Jelinek <jakub@redhat.com>
5723 * c-decl.c (finish_enum): When honoring mode attribute,
5724 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5726 2016-01-29 Jakub Jelinek <jakub@redhat.com>
5729 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5730 all type variants, not just TYPE_MAIN_VARIANT.
5732 2016-01-27 Jakub Jelinek <jakub@redhat.com>
5735 * c-decl.c (c_write_global_declarations_1): Warn with
5736 warn_unused_function if static prototype without definition
5739 2016-01-27 Marek Polacek <polacek@redhat.com>
5742 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5743 to unsigned, if needed. Add -Wsign-compare warning.
5745 2016-01-26 Jakub Jelinek <jakub@redhat.com>
5747 PR tree-optimization/69483
5748 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5750 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5753 * c-tree.h (incomplete_record_decls): Declare.
5754 * c-parser.c (incomplete_record_decls): Define.
5755 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5756 report error if any decl has zero size.
5757 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5758 or enum type to incomplete_record_decls.
5760 2016-01-14 Tom de Vries <tom@codesourcery.com>
5762 PR tree-optimization/68773
5763 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5766 2016-01-14 Marek Polacek <polacek@redhat.com>
5769 * c-decl.c (grokdeclarator): Provide more information for invalid
5772 2016-01-06 David Malcolm <dmalcolm@redhat.com>
5774 * c-parser.c (c_parser_unary_expression): For dereferences, build
5775 a combined location before calling build_indirect_ref, so that
5776 error reports cover the full range, manually updating the c_expr
5779 2016-01-06 Marek Polacek <polacek@redhat.com>
5782 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5783 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5786 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5788 Update copyright years.
5790 2016-01-04 Marek Polacek <polacek@redhat.com>
5793 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5794 optimization to use __atomic_fetch_* built-in if possible.
5796 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5798 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5800 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5803 2015-12-22 Marek Polacek <polacek@redhat.com>
5806 * c-typeck.c (build_component_ref): Warn when acessing elements of
5807 atomic structures or unions.
5809 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5811 * c-typeck.c: Include "gcc-rich-location.h".
5812 (build_binary_op): In the two places that call binary_op_error,
5813 create a gcc_rich_location and populate it with the location of
5814 the binary op and its two operands.
5816 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5818 * c-parser.c (c_parser_statement_after_labels): When calling
5819 c_finish_return, Use the return expression's location if it has
5820 one, falling back to the location of the first token within it.
5821 * c-typeck.c (c_finish_return): When issuing warnings about
5822 the incorrect presence/absence of a return value, issue a note
5823 showing the declaration of the function.
5825 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5827 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5829 (c_parser_peek_nth_token): New function.
5830 (c_parser_peek_conflict_marker): New function.
5831 (c_parser_error): Detect conflict markers and report them as such.
5833 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5835 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5836 to preserve range information for the primary expression
5837 in the call to c_parser_postfix_expression_after_primary.
5839 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5841 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5842 expression location, falling back on the first token location,
5843 rather than always using the latter.
5845 2015-12-16 Marek Polacek <polacek@redhat.com>
5848 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5851 2015-12-15 Marek Polacek <polacek@redhat.com>
5854 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5857 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5859 * c-parser.c (c_parser_alignof_expression): Capture location of
5860 closing parenthesis (if any), or of end of unary expression, and
5861 use it to build a src_range for the expression.
5863 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5866 * c-parser.c (c_parser_get_builtin_args): Add
5867 "out_close_paren_loc" param, and write back to it.
5868 (c_parser_postfix_expression): Capture the closing
5869 parenthesis location for RID_CHOOSE_EXPR,
5870 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5871 RID_BUILTIN_SHUFFLE and use it to set the source range
5872 for such expressions; within RID_BUILTIN_COMPLEX set
5873 the underlying location.
5875 2015-12-07 Marek Polacek <polacek@redhat.com>
5878 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5879 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5881 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5883 * c-tree.h (c_build_va_arg): Adjust prototype.
5884 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5885 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5886 parameter, adjust throughout and issue an error if EXPR is a component
5887 with reverse storage order.
5889 2015-12-02 Jason Merrill <jason@redhat.com>
5891 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5892 (c_fully_fold_internal, decl_constant_value_for_optimization):
5893 Move from c-common.c.
5894 * c-tree.h: Declare decl_constant_value_for_optimization.
5895 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5897 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5900 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5901 following link from declarator to next declarator. Track original
5902 qualified type and pass it to c_build_qualified_type.
5903 * c-typeck.c (c_build_qualified_type): Add arguments
5904 orig_qual_type and orig_qual_indirect.
5906 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5908 * c-parser.c (c_parser_omp_clause_name)
5909 (c_parser_oacc_all_clauses): Alphabetical sorting.
5911 2015-12-02 Jakub Jelinek <jakub@redhat.com>
5914 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5917 2015-12-01 Julian Brown <julian@codesourcery.com>
5918 Cesar Philippidis <cesar@codesourcery.com>
5919 James Norris <James_Norris@mentor.com>
5921 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5922 (c_parser_oacc_clause_use_device): New function.
5923 (c_parser_oacc_all_clauses): Add use_device support.
5924 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5925 (c_parser_oacc_host_data): New function.
5926 (c_parser_omp_construct): Add host_data support.
5927 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5928 * c-typeck.c (c_finish_oacc_host_data): New function.
5929 (c_finish_omp_clauses): Add use_device support.
5931 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5934 * c-decl.c: Set TYPE_PACKED in variants.
5936 2015-11-27 Martin Liska <mliska@suse.cz>
5939 * c-array-notation.c (fix_builtin_array_notation_fn):
5940 Use release_vec_vec instead of vec::release.
5941 (build_array_notation_expr): Likewise.
5942 (fix_conditional_array_notations_1): Likewise.
5943 (fix_array_notation_expr): Likewise.
5944 (fix_array_notation_call_expr): Likewise.
5946 2015-11-27 Jakub Jelinek <jakub@redhat.com>
5949 * c-parser.c (c_parser_compound_statement_nostart): If
5950 last_label is true, use pragma_stmt instead of pragma_compound
5951 as second c_parser_pragma argument.
5952 (c_parser_omp_ordered, c_parser_omp_target_update,
5953 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5954 false as second argument to c_parser_skip_to_pragma_eol after
5955 diagnosing standalone directives used in pragma_stmt context.
5957 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5959 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5960 with "if (ENABLE_OFFLOADING)".
5962 2015-11-23 David Malcolm <dmalcolm@redhat.com>
5965 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5966 for various Objective-C constructs: Class.name syntax,
5967 @selector(), @protocol(), @encode(), and [] message syntax.
5969 2015-11-20 David Malcolm <dmalcolm@redhat.com>
5972 * c-typeck.c (should_suggest_deref_p): New function.
5973 (build_component_ref): Special-case POINTER_TYPE when
5974 generating a "not a structure of union" error message, and
5975 suggest a "->" rather than a ".", providing a fix-it hint.
5977 2015-11-19 David Malcolm <dmalcolm@redhat.com>
5979 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5980 candidate into a new function, find_closest_identifier.
5982 2015-11-19 Marek Polacek <polacek@redhat.com>
5985 * c-typeck.c (parser_build_binary_op): Properly handle
5986 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5988 2015-11-17 David Malcolm <dmalcolm@redhat.com>
5990 * c-parser.c (set_c_expr_source_range): Bulletproof both
5991 overloaded implementations against NULL expr->value.
5992 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5994 (c_parser_unary_expression): Likewise when handling addresses of
5996 (c_parser_postfix_expression): Likewise for statement expressions,
5997 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5998 __builtin_va_arg, and for __builtin_offset_of.
5999 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6000 src_range using the range of the braced initializer.
6001 (c_parser_transaction_expression): Set src_range for "ret" to a
6002 sane pair of values.
6004 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6006 * c-parser.c (c_finish_omp_declare_simd): Look for
6007 "simd" attribute as well. Update error message.
6009 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6011 * c-parser.c (c_parser_omp_declare_target): Adjust.
6013 2015-11-14 Jakub Jelinek <jakub@redhat.com>
6015 * c-typeck.c (c_finish_omp_clauses): Don't mark
6016 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6018 2015-11-14 Marek Polacek <polacek@redhat.com>
6020 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6021 * c-typeck.c: Likewise.
6023 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6025 * c-decl.c (warn_defaults_to): Pass line_table to
6027 * c-errors.c (pedwarn_c99): Likewise.
6028 (pedwarn_c90): Likewise.
6029 * c-parser.c (set_c_expr_source_range): New functions.
6030 (c_token::get_range): New method.
6031 (c_token::get_finish): New method.
6032 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6033 based on the range from the start of the LHS to the end of the
6035 (c_parser_conditional_expression): Likewise, based on the range
6036 from the start of the cond.value to the end of exp2.value.
6037 (c_parser_binary_expression): Call set_c_expr_source_range on
6038 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6039 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6040 based on the cast_loc through to the end of the expr.
6041 (c_parser_unary_expression): Likewise, based on the
6042 op_loc through to the end of op.
6043 (c_parser_sizeof_expression) Likewise, based on the start of the
6044 sizeof token through to either the closing paren or the end of
6046 (c_parser_postfix_expression): Likewise, using the token range,
6047 or from the open paren through to the close paren for
6048 parenthesized expressions.
6049 (c_parser_postfix_expression_after_primary): Likewise, for
6050 various kinds of expression.
6051 * c-tree.h (struct c_expr): Add field "src_range".
6052 (c_expr::get_start): New method.
6053 (c_expr::get_finish): New method.
6054 (set_c_expr_source_range): New decls.
6055 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6056 on ret for prefix unary ops.
6057 (parser_build_binary_op): Likewise, running from the start of
6058 arg1.value through to the end of arg2.value.
6060 2015-11-13 Marek Polacek <polacek@redhat.com>
6063 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6065 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6067 * c-typeck.c: Include spellcheck.h.
6068 (lookup_field_fuzzy_find_candidates): New function.
6069 (lookup_field_fuzzy): New function.
6070 (build_component_ref): If the field was not found, try using
6071 lookup_field_fuzzy and potentially offer a suggestion.
6073 2015-11-12 James Norris <jnorris@codesourcery.com>
6074 Joseph Myers <joseph@codesourcery.com>
6076 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6077 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6078 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6079 and PRAGMA_OMP_CLAUSE_LINK.
6080 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6081 and PRAGMA_OACC_CLAUSE_LINK.
6082 (OACC_DECLARE_CLAUSE_MASK): New definition.
6083 (c_parser_oacc_declare): New function.
6085 2015-11-12 Marek Polacek <polacek@redhat.com>
6088 * c-parser.c (c_parser_for_statement): Reclassify the token in
6091 2015-11-11 Marek Polacek <polacek@redhat.com>
6095 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6096 checking the size of an array.
6098 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
6100 * c-array-notation.c: Remove unused header files.
6101 * c-aux-info.c: Likewise.
6102 * c-convert.c: Likewise.
6103 * c-decl.c: Likewise.
6104 * c-errors.c: Likewise.
6105 * c-lang.c: Likewise.
6106 * c-objc-common.c: Likewise.
6107 * c-parser.c: Likewise.
6108 * c-typeck.c: Likewise.
6109 * gccspec.c: Likewise.
6111 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6112 Cesar Philippidis <cesar@codesourcery.com>
6113 James Norris <jnorris@codesourcery.com>
6114 Julian Brown <julian@codesourcery.com>
6115 Nathan Sidwell <nathan@codesourcery.com>
6117 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6119 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6120 (c_parser_pragma): Parse 'acc routine'.
6121 (OACC_ROUTINE_CLAUSE_MARK): Define.
6122 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6124 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6127 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6128 location of the backward-goto to the start of the loop body.
6130 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6133 * c-parser.c (c_parser_while_statement): Finish the loop before
6134 parsing ahead for misleading indentation.
6135 (c_parser_for_statement): Likewise.
6137 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6139 * c-decl.c (finish_struct): If the structure has reverse storage
6140 order, rewrite the type of array fields with scalar component. Call
6141 maybe_apply_pragma_scalar_storage_order on entry.
6142 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6143 errors on bit-fields and reverse SSO here and not...
6144 (c_mark_addressable): ...here.
6145 (output_init_element): Adjust call to initializer_constant_valid_p.
6146 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6148 2015-11-06 David Malcolm <dmalcolm@redhat.com>
6150 * c-decl.c (warn_defaults_to): Update for change in signature
6151 of diagnostic_set_info.
6152 * c-errors.c (pedwarn_c99): Likewise.
6153 (pedwarn_c90): Likewise.
6154 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6155 for textinfo::set_location.
6157 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6158 Thomas Schwinge <thomas@codesourcery.com>
6159 James Norris <jnorris@codesourcery.com>
6161 * c-parser.c (c_parser_omp_clause_name): Add support for
6162 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6163 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6164 default(none) in OpenACC.
6165 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6167 (c_parser_oacc_clause_tile): New function.
6168 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6169 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6170 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6172 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6173 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6175 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6176 (c_parser_oacc_update): Update the error message for missing clauses.
6177 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6178 and OMP_CLAUSE_INDEPENDENT.
6180 2015-11-05 Marek Polacek <polacek@redhat.com>
6183 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6184 deal with pre-evaluation on invalid types.
6186 2015-11-05 Jakub Jelinek <jakub@redhat.com>
6187 Ilya Verbin <ilya.verbin@intel.com>
6189 * c-parser.c: Include context.h and gimple-expr.h.
6190 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6191 monotonic together with nonmonotonic.
6192 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6193 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6194 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6195 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6196 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6197 expressions on combined target teams before the target.
6198 (c_parser_omp_declare_target): If decl has "omp declare target" or
6199 "omp declare target link" attribute, and cgraph or varpool node already
6200 exists, then set corresponding flags. Call c_finish_omp_clauses
6201 in the parenthesized extended-list syntax case.
6202 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6204 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6205 on OMP_CLAUSE_REDUCTION array sections.
6206 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6207 into the constant offset, or for variable low-bound using
6208 POINTER_PLUS_EXPR. For structure element based array sections use
6209 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6210 (c_finish_omp_clauses): Drop generic_field_head, structure
6211 elements are now always mapped even as array section bases,
6212 diagnose same var in data sharing and mapping clauses. Diagnose if
6213 linear step on declare simd is neither a constant nor a uniform
6214 parameter. Look through POINTER_PLUS_EXPR for array section
6215 reductions. Diagnose the same var or function appearing multiple
6216 times on the same directive. Fix up wording for the to clause if t
6217 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6218 modifier on kinds other than dynamic or guided or nonmonotonic
6219 modifier together with ordered clause.
6221 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6222 Chung-Lin Tang <cltang@codesourcery.com>
6224 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6226 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
6228 * c-array-notation.c: Reorder #include's and remove duplicates.
6229 * c-aux-info.c: Likewise.
6230 * c-convert.c: Likewise.
6231 * c-decl.c: Likewise.
6232 * c-errors.c: Likewise.
6233 * c-lang.c: Likewise.
6234 * c-objc-common.c: Likewise.
6235 * c-parser.c: Likewise.
6236 * c-typeck.c: Likewise.
6238 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
6241 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6242 after calling build_qualified_type.
6244 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6245 Thomas Schwinge <thomas@codesourcery.com>
6246 James Norris <jnorris@codesourcery.com>
6247 Joseph Myers <joseph@codesourcery.com>
6248 Julian Brown <julian@codesourcery.com>
6249 Bernd Schmidt <bschmidt@redhat.com>
6251 * c-parser.c (c_parser_oacc_shape_clause): New.
6252 (c_parser_oacc_simple_clause): New.
6253 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6254 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6256 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6257 James Norris <jnorris@codesourcery.com>
6258 Cesar Philippidis <cesar@codesourcery.com>
6262 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6263 parameters, and handle these. Adjust all users.
6264 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6266 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6268 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6270 (c_finish_omp_construct): Declare function.
6271 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6272 Merge functions into...
6273 (c_finish_omp_construct): ... this new function.
6275 2015-10-22 Richard Biener <rguenther@suse.de>
6277 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6278 before folding a MINUS_EXPR.
6280 2015-10-21 Marek Polacek <polacek@redhat.com>
6283 * c-decl.c (start_function): Warn about vararg functions without
6286 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6288 * c-typeck.c (build_conditional_expr): Use boolean vector
6289 type for vector comparison.
6290 (build_vec_cmp): New.
6291 (build_binary_op): Use build_vec_cmp for comparison.
6293 2015-10-20 Marek Polacek <polacek@redhat.com>
6295 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6297 2015-10-20 Marek Polacek <polacek@redhat.com>
6300 * c-parser.c (c_parser_attributes): Break out of the loop if the
6301 token after an attribute isn't a comma.
6303 2015-10-13 Jakub Jelinek <jakub@redhat.com>
6304 Aldy Hernandez <aldyh@redhat.com>
6306 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6307 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6308 (c_parser_omp_variable_list): Handle structure elements for
6309 map, to and from clauses. Handle array sections in reduction
6310 clause. Formatting fixes.
6311 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6312 if clause modifiers.
6313 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6314 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6315 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6316 c_parser_omp_clause_is_device_ptr): New functions.
6317 (c_parser_omp_clause_ordered): Parse optional parameter.
6318 (c_parser_omp_clause_reduction): Handle array reductions.
6319 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6320 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6322 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6323 (c_parser_omp_clause_depend_sink): New function.
6324 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6325 (c_parser_omp_clause_map): Parse release/delete map kinds and
6326 optional always modifier.
6327 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6328 and c_finish_omp_clauses callers.
6329 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6330 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6331 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6332 (OMP_CRITICAL_CLAUSE_MASK): Define.
6333 (c_parser_omp_critical): Parse critical clauses.
6334 (c_parser_omp_for_loop): Handle doacross loops, adjust
6335 c_finish_omp_for and c_finish_omp_clauses callers.
6336 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6337 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6338 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6339 (c_parser_omp_for): Disallow ordered clause when combined with
6340 distribute. Disallow linear clause when combined with distribute
6341 and not combined with simd.
6342 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6343 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6344 parse clauses and if depend clause is found, don't parse a body.
6345 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6346 Allow target parallel without for after it.
6347 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6348 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6349 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6351 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6352 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6353 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6354 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6356 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6357 defaultmap and is_device_ptr clauses.
6358 (c_parser_omp_target): Parse target parallel and target simd. Set
6359 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6360 and target exit data. Diagnose invalid map kinds.
6361 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6362 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6364 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6366 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6367 (c_parser_omp_taskloop): New function.
6368 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6369 handle PRAGMA_OMP_TASKLOOP.
6370 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6371 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6372 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6373 Add IS_OMP argument, handle structure element bases, diagnose
6374 bitfields, pass IS_OMP recursively, diagnose known zero length
6375 array sections in depend clauses, handle array sections in reduction
6376 clause, diagnose negative length even for pointers.
6377 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6378 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6379 array sections in reduction clause, set
6380 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6381 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6382 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6383 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6385 2015-10-06 Marek Polacek <polacek@redhat.com>
6387 * c-parser.c (c_parser_statement_after_labels): Use
6388 protected_set_expr_location.
6389 (c_parser_omp_clause_num_gangs): Likewise.
6390 (c_parser_omp_clause_num_threads): Likewise.
6391 (c_parser_omp_clause_num_workers): Likewise.
6392 (c_parser_omp_clause_vector_length): Likewise.
6393 (c_parser_omp_clause_num_teams): Likewise.
6394 (c_parser_omp_clause_thread_limit): Likewise.
6395 * c-typeck.c (build_c_cast): Likewise.
6396 (c_cast_expr): Likewise.
6398 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6400 * c-typeck.c (c_tree_equal): Use real_equal instead of
6403 2015-10-04 Jason Merrill <jason@redhat.com>
6405 * c-parser.c (c_lex_one_token): Handle @synchronized.
6406 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6407 can change whether the function is transaction_safe.
6409 2015-10-02 Marek Polacek <polacek@redhat.com>
6412 * c-typeck.c (convert_for_assignment): Use the expansion point
6413 location throughout.
6415 2015-10-02 Marek Polacek <polacek@redhat.com>
6418 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6419 and pass it down to c_parser_if_statement.
6420 (c_parser_else_body): Add CHAIN parameter and pass it down to
6421 c_parser_statement_after_labels.
6422 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6423 duplicated if-else-if conditions.
6425 2015-10-01 Marek Polacek <polacek@redhat.com>
6427 * c-typeck.c (convert_for_assignment): Improve commentary.
6429 2015-09-30 Marek Polacek <polacek@redhat.com>
6432 * c-typeck.c (c_finish_return): Use the expansion point location for
6433 certain "return with value" warnings.
6435 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6437 * c-parser.c (pragma_lex): Add loc argument.
6439 2015-09-15 Marek Polacek <polacek@redhat.com>
6442 * c-decl.c (tag_exists_p): New function.
6443 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6444 struct/union/enum keywords are missing.
6445 * c-tree.h (tag_exists_p): Declare.
6447 2015-09-15 Marek Polacek <polacek@redhat.com>
6449 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6450 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6451 Return NULL_TREE instead of 0.
6452 (lookup_name): Return NULL_TREE instead of 0.
6453 (lookup_name_in_scope): Likewise.
6454 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6455 (parser_xref_tag): Use false instead of 0.
6456 (start_struct): Use true instead of 1.
6457 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6459 2015-09-14 Marek Polacek <polacek@redhat.com>
6461 * c-typeck.c (set_nonincremental_init_from_string): Use
6462 HOST_WIDE_INT_M1U when shifting a negative value.
6464 2015-09-09 Mark Wielaard <mjw@redhat.com>
6466 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6469 2015-09-10 Jakub Jelinek <jakub@redhat.com>
6472 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6473 into OMP_FOR_PRE_BODY rather than before the loop.
6475 2015-09-09 Jakub Jelinek <jakub@redhat.com>
6478 * c-parser.c (c_parser_oacc_all_clauses,
6479 c_parser_omp_all_clauses): Remove invalid clause from
6480 list of clauses even if parser->error is set.
6483 * c-parser.c (c_parser_omp_clause_aligned,
6484 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6486 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6490 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6491 instead of c_parser_unary_expression. If the result is !lvalue_p,
6492 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6494 2015-09-04 Marek Polacek <polacek@redhat.com>
6497 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6499 2015-09-03 Martin Sebor <msebor@redhat.com>
6502 * c-typeck.c (convert_arguments, parser_build_unary_op,
6503 build_conditional_expr, c_cast_expr, convert_for_assignment,
6504 build_binary_op, _objc_common_truthvalue_conversion): Call
6506 (c_decl_implicit): Define.
6508 2015-09-02 Marek Polacek <polacek@redhat.com>
6511 * c-parser.c (c_parser_enum_specifier): Give a better error for
6514 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6516 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6518 2015-08-12 Marek Polacek <polacek@redhat.com>
6520 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6523 2015-08-03 Marek Polacek <polacek@redhat.com>
6526 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6528 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6530 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6532 * c-parser.c (c_parser_if_body): Take token_indent_info
6533 argument. Call warn_for_misleading_indentation even when the
6534 body is a semicolon. Extract token_indent_infos corresponding
6535 to the guard, body and next tokens. Adjust call to
6536 warn_for_misleading_indentation accordingly.
6537 (c_parser_else_body): Likewise.
6538 (c_parser_if_statement): Likewise.
6539 (c_parser_while_statement): Likewise.
6540 (c_parser_for_statement): Likewise.
6542 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6543 Manuel López-Ibáñez <manu@gcc.gnu.org>
6545 * c-decl.c (get_parm_info): Remove static var. Update warning
6548 2015-07-27 Marek Polacek <polacek@redhat.com>
6552 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6554 2015-07-20 Marek Polacek <polacek@redhat.com>
6557 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6558 (build_binary_op): Warn about left shift overflows.
6560 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
6562 * c-array-notation.c: Adjust includes for flags.h changes.
6563 * c-objc-common.c: Likewise.
6565 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
6567 * c-array-notation.c: Adjust includes.
6568 * c-aux-info.c: Likewise.
6569 * c-convert.c: Likewise.
6570 * c-decl.c: Likewise.
6571 * c-errors.c: Likewise.
6572 * c-lang.c: Likewise.
6573 * c-objc-common.c: Likewise.
6574 * c-parser.c: Likewise.
6575 * c-typeck.c: Likewise.
6577 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6580 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6582 2015-06-29 Marek Polacek <polacek@redhat.com>
6585 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6586 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6587 about -Wswitch-bool here.
6588 (do_case): Update c_add_case_label call.
6589 (c_finish_case): Update c_do_switch_warnings call.
6591 2015-06-27 Marek Polacek <polacek@redhat.com>
6593 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6595 2015-06-26 Marek Polacek <polacek@redhat.com>
6597 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6599 * c-typeck.c (array_to_pointer_conversion): Likewise.
6600 (build_unary_op): Likewise.
6601 (c_finish_return): Likewise.
6603 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
6605 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6606 * c-parser.c: Likewise.
6608 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6610 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6611 instead of pointer_hash.
6612 (detect_field_duplicates): Likewise.
6614 2015-06-25 Marek Polacek <polacek@redhat.com>
6616 * c-array-notation.c: Use VAR_P throughout.
6617 * c-decl.c: Likewise.
6618 * c-objc-common.c: Likewise.
6619 * c-parser.c: Likewise.
6620 * c-typeck.c: Likewise.
6622 2015-06-25 Marek Polacek <polacek@redhat.com>
6624 * c-decl.c: Use is_global_var throughout.
6625 * c-parser.c: Likewise.
6626 * c-typeck.c: Likewise.
6628 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
6630 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6631 * c-aux-info.c: Likewise.
6632 * c-convert.c: Likewise.
6633 * c-decl.c: Likewise.
6634 * c-errors.c: Likewise.
6635 * c-lang.c: Likewise.
6636 * c-objc-common.c: Likewise.
6637 * c-parser.c: Likewise.
6638 * c-typeck.c: Likewise.
6640 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
6643 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6646 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6648 * c-decl.c (pop_scope): Register the main translation unit
6649 through the new debug hook.
6651 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
6653 * c-array-notation.c : Adjust include files.
6654 * c-aux-info.c : Likewise.
6655 * c-convert.c : Likewise.
6656 * c-decl.c : Likewise.
6657 * c-errors.c : Likewise.
6658 * c-lang.c : Likewise.
6659 * c-lang.h : Likewise.
6660 * c-objc-common.c : Likewise.
6661 * c-parser.c : Likewise.
6662 * c-typeck.c : Likewise.
6664 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6666 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6667 immediately clobber it.
6668 (c_write_global_declarations_1): Remove call to
6669 check_global_declaration_1.
6670 (c_write_global_declarations_2): Remove.
6671 (c_write_final_cleanups): Rename from c_write_global_declarations.
6672 Remove call to finalize_compilation_unit.
6673 Remove calls to debugging hooks.
6674 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6675 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6676 * c-tree.h: Remove c_write_global_declarations.
6678 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6680 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6681 * c-aux-info.c: Likewise.
6682 * c-convert.c: Likewise.
6683 * c-decl.c: Likewise.
6684 * c-errors.c: Likewise.
6685 * c-lang.c: Likewise.
6686 * c-objc-common.c: Likewise.
6687 * c-parser.c: Likewise.
6688 * c-typeck.c: Likewise.
6690 2015-06-04 Marek Polacek <polacek@redhat.com>
6693 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6696 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6698 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6699 Warn for empty struct.
6700 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6702 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6704 * c-decl.c (start_function): Call plugin before parsing.
6705 (finish_function): Call plugin after parsing.
6707 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6710 * c-decl.c (merge_decls): Merge DECL_COMMON.
6712 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
6714 * Make-lang.in (check_gcc_pallelize): Define.
6716 2015-05-22 Marek Polacek <polacek@redhat.com>
6719 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6722 2015-05-21 Marek Polacek <polacek@redhat.com>
6724 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6727 2015-05-20 Marek Polacek <polacek@redhat.com>
6729 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6730 * c-typeck.c: Likewise.
6732 2015-05-19 Marek Polacek <polacek@redhat.com>
6734 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6736 2015-05-19 Jakub Jelinek <jakub@redhat.com>
6739 * c-parser.c (c_parser_omp_for_loop): Don't add
6740 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6741 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6742 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6745 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6747 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
6750 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6753 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6756 2015-05-14 Marek Polacek <polacek@redhat.com>
6760 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6763 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6765 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6766 to add a call to warn_for_misleading_indentation.
6767 (c_parser_else_body): Likewise, adding param "else_loc".
6768 (c_parser_if_statement): Check for misleading indentation.
6769 (c_parser_while_statement): Likewise.
6770 (c_parser_for_statement): Likewise.
6772 2015-05-08 Marek Polacek <polacek@redhat.com>
6775 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6776 (output_init_element): Likewise.
6778 2015-05-07 Marek Polacek <polacek@redhat.com>
6781 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6784 2015-04-30 Marek Polacek <polacek@redhat.com>
6786 * c-typeck.c (set_init_label): Call error_at instead of error and
6789 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6792 * c-typeck.c (c_build_va_arg): Clarify the error message.
6794 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6796 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6797 OMP_STANDALONE_CLAUSES.
6799 2015-04-28 Marek Polacek <polacek@redhat.com>
6801 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6803 2015-04-28 Marek Polacek <polacek@redhat.com>
6806 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6808 2015-04-25 Marek Polacek <polacek@redhat.com>
6811 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6814 2015-04-23 Marek Polacek <polacek@redhat.com>
6817 * c-decl.c (set_labels_context_r): New function.
6818 (store_parm_decls): Call it via walk_tree_without_duplicates.
6819 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6820 instead of create_tmp_var. Build TARGET_EXPR instead of
6822 (build_atomic_assign): Use create_tmp_var_raw instead of
6823 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6825 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6827 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6828 (c_parser_omp_target_update): Add missed %> to error_at ().
6830 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6833 * c-decl.c (c_default_pointer_mode): Remove definition.
6834 * c-tree.h (c_default_pointer_mode): Remove declaration.
6836 2015-03-27 Tobias Burnus <burnus@net-b.de>
6839 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6841 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6842 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6843 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6845 2015-03-19 Jakub Jelinek <jakub@redhat.com>
6847 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6848 attribute for DECL_EXTERNAL VAR_DECLs.
6850 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6852 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6855 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6858 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6859 before preparing arguments to warn_logical_not_parentheses.
6861 2015-03-09 Jakub Jelinek <jakub@redhat.com>
6864 * c-typeck.c (parser_build_binary_op): Don't warn for
6865 !!x == y or !b == y where b is _Bool.
6867 2015-03-09 Marek Polacek <polacek@redhat.com>
6869 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6870 * c-decl.c (grokdeclarator): Likewise.
6871 * c-typeck.c (build_binary_op): Likewise.
6873 2015-02-27 Marek Polacek <polacek@redhat.com>
6876 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6878 2015-02-14 Marek Polacek <polacek@redhat.com>
6881 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6882 declared through a typedef name.
6884 2015-02-13 Marek Polacek <polacek@redhat.com>
6887 * c-decl.c (grokdeclarator): Print also the type when giving
6888 the error message about array's incomplete element type.
6890 2015-02-11 Jakub Jelinek <jakub@redhat.com>
6893 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6894 check in the POP macro.
6896 2015-02-09 Marek Polacek <polacek@redhat.com>
6899 * c-typeck.c (process_init_element): Don't always wrap
6900 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6901 initializing a range of elements.
6903 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6907 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6909 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
6911 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6912 processing enum declaration.
6914 2015-01-29 Marek Polacek <polacek@redhat.com>
6917 * c-typeck.c (pop_init_level): If constructor_elements has
6918 exactly one element with integer_zerop value, set constructor_zeroinit
6919 to 1. Remove braces around warning_init call.
6921 2015-01-27 Jakub Jelinek <jakub@redhat.com>
6924 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6925 of FUNCTION_DECLs with error_mark_node.
6927 2015-01-26 Jakub Jelinek <jakub@redhat.com>
6930 * c-typeck.c (convert_arguments): Return -1 if there are
6931 error_args, even if we've diagnosed too many arguments.
6933 2015-01-21 Richard Biener <rguenther@suse.de>
6936 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6937 for builtins the user declared correctly.
6939 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6940 Bernd Schmidt <bernds@codesourcery.com>
6941 Cesar Philippidis <cesar@codesourcery.com>
6942 James Norris <jnorris@codesourcery.com>
6943 Jakub Jelinek <jakub@redhat.com>
6944 Ilmir Usmanov <i.usmanov@samsung.com>
6946 * c-parser.c: Include "gomp-constants.h".
6947 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6948 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6949 Use OMP_CLAUSE_SET_MAP_KIND.
6950 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6951 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6952 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6953 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6954 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6955 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6956 "copyout", "create", "delete", "deviceptr", "gang", "host",
6957 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6958 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6959 "present_or_create", "pcreate", "seq", "self", "vector",
6960 "vector_length", "wait", "worker".
6961 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6962 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6963 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6964 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6965 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6966 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6967 (c_parser_oacc_data_clause_deviceptr)
6968 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6969 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6970 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6971 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6972 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6973 (c_parser_oacc_parallel, c_parser_oacc_update)
6974 (c_parser_oacc_wait): New functions.
6975 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6976 (c_finish_oacc_data): New prototypes.
6977 * c-typeck.c: Include "gomp-constants.h".
6978 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6979 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6980 OMP_CLAUSE_SET_MAP_KIND.
6981 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6982 (c_finish_oacc_data): New functions.
6983 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6984 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6985 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6986 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6987 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6988 GOMP_MAP_FORCE_DEVICEPTR.
6990 2015-01-09 Michael Collison <michael.collison@linaro.org>
6992 * c-array-notation.c: Include hash-set.h, machmode.h,
6993 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6994 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6995 * c-aux-info.c: Ditto.
6996 * c-convert.c: Ditto.
6998 * c-errors.c: Ditto.
6999 * c-lang.c: Dittoxs.
7000 * c-objc-common.c: Ditto.
7001 * c-parser.c: Ditto.
7002 * c-typeck.c: Include hash-set.h, machmode.h,
7003 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7004 fold-const.h, wide-int.h, inchash.h, real.h and
7005 fixed-value.h due to flattening of tree.h.
7007 2015-01-07 Marek Polacek <polacek@redhat.com>
7010 * c-typeck.c (process_init_element): Disallow initialization of
7011 a flexible array member with a string constant if the structure
7014 2015-01-05 Jakub Jelinek <jakub@redhat.com>
7017 * c-typeck.c (convert_for_assignment, c_finish_return): For
7018 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7019 types also set in_late_binary_op around convert call.
7020 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7021 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7022 result on expr as last argument to ubsan_instrument_float_cast,
7023 if in_late_binary_op, don't use c_save_expr but save_expr.
7025 Update copyright years.
7027 2015-01-05 Marek Polacek <polacek@redhat.com>
7030 * c-typeck.c (build_array_ref): Pass loc down to
7031 warn_array_subscript_with_type_char.
7033 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
7035 * c-typeck.c: New behavious for pointers to arrays with qualifiers
7036 (common-pointer-type): For pointers to arrays take qualifiers from
7038 (build_conditional_expr): Add warnings for lost qualifiers.
7039 (comp-target-types): Allow pointers to arrays with different qualifiers.
7040 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
7041 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
7042 to PEDWARN_FOR_QUALIFIERS.
7044 2014-12-17 Jakub Jelinek <jakub@redhat.com>
7047 * c-convert.c: Include ubsan.h.
7048 (convert): For real -> integral casts and
7049 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7050 instead instrument the float cast directly.
7052 2014-11-29 Jakub Jelinek <jakub@redhat.com>
7054 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7055 c_finish_stmt_expr): Remove NULL last argument from
7056 create_tmp_var_raw and create_tmp_var calls.
7057 * c-array-notation.c (fix_builtin_array_notation_fn,
7058 build_array_notation_expr, fix_conditional_array_notations_1,
7059 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7061 2014-11-28 Marek Polacek <polacek@redhat.com>
7064 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7065 convert the right operand to integer type.
7067 2014-11-25 Marek Polacek <polacek@redhat.com>
7070 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7071 for inline functions.
7073 2014-11-21 Jakub Jelinek <jakub@redhat.com>
7076 * c-typeck.c (build_array_ref): Adjust
7077 convert_vector_to_pointer_for_subscript caller. If it returns true,
7078 call non_lvalue_loc on the result.
7080 2014-11-11 Richard Biener <rguenther@suse.de>
7082 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7085 2014-11-10 Andi Kleen <ak@linux.intel.com>
7088 * c-parser.c (c_parser_statement_after_labels): Call
7090 (c_parser_if_statement): Dito.
7091 (c_parser_switch_statement): Dito.
7092 (c_parser_while_statement): Dito.
7093 (c_parser_do_statement): Dito.
7094 (c_parser_for_statement): Dito.
7095 * c-typeck.c (c_finish_loop): Dito.
7097 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7099 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7100 OPT_Wshift_count_overflow in the warnings.
7102 2014-10-30 Marek Polacek <polacek@redhat.com>
7104 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7105 print the stripped version as well, if they're not the same.
7107 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7109 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7112 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
7114 * c-decl.c: Adjust include files.
7115 * c-parser.c: Ditto.
7117 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7118 Tom Tromey <tromey@redhat.com>
7120 * c-tree.h (enum c_oracle_request): New.
7121 (c_binding_oracle_function): New typedef.
7122 (c_binding_oracle, c_pushtag, c_bind): Declare.
7123 * c-decl.c (c_binding_oracle): New global.
7124 (I_SYMBOL_CHECKED): New macro.
7125 (i_symbol_binding): New function.
7126 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7127 (I_TAG_CHECKED): New macro.
7128 (i_tag_binding): New function.
7129 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7130 (I_LABEL_CHECKED): New macro.
7131 (i_label_binding): New function.
7132 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7133 (c_print_identifier): Save and restore c_binding_oracle.
7134 (c_pushtag, c_bind): New functions.
7136 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
7138 * c-typeck.c: Adjust include files.
7140 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7143 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7144 initialization here...
7145 (c_initialize_diagnostics): ... but here. Set defaults after
7146 building pretty-printer.
7148 2014-10-23 Marek Polacek <polacek@redhat.com>
7151 * c-decl.c (pop_scope): Don't print warning in external_scope.
7153 2014-10-19 Marek Polacek <polacek@redhat.com>
7156 * c-typeck.c (output_init_element): Allow initializing objects with
7157 static storage duration with compound literals even in C99 and add
7160 2014-10-17 Marek Polacek <polacek@redhat.com>
7163 * c-typeck.c (digest_init): Allow initializing objects with static
7164 storage duration with compound literals even in C99 and add pedwarn
7167 2014-10-17 Marek Polacek <polacek@redhat.com>
7170 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7171 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7172 error multiple times. Print the type.
7174 2014-10-17 Marek Polacek <polacek@redhat.com>
7177 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7180 2014-10-17 Marek Polacek <polacek@redhat.com>
7182 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7183 (start_function): Use OPT_Wimplicit_int instead of 0.
7184 (store_parm_decls_oldstyle): Likewise.
7186 2014-10-17 Alan Modra <amodra@gmail.com>
7189 * c-decl.c (merge_decls): Don't merge section name or tls model
7190 to newdecl symtab node, instead merge to olddecl. Override
7191 existing olddecl section name. Set tls_model for all thread-local
7192 vars, not just OMP thread-private ones. Remove incorrect comment.
7194 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
7196 * c-decl.c: Adjust include files.
7198 2014-10-14 DJ Delorie <dj@redhat.com>
7200 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7201 (c_token_starts_typename): Check all __intN, not just __int128.
7202 (c_token_starts_declspecs): Likewise.
7203 (c_parser_declspecs): Likewise.
7204 (c_parser_attribute_any_word): Likewise.
7205 (c_parser_objc_selector): Likewise.
7206 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7207 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7209 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7211 (finish_declspecs): Likewise.
7213 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7215 * c-parser.c (c_parser_all_labels): New function to replace
7217 (c_parser_statement): Call the new function.
7219 2014-10-09 Marek Polacek <polacek@redhat.com>
7222 * c-typeck.c (pop_init_level): Don't warn about initializing
7225 2014-10-07 Marek Polacek <polacek@redhat.com>
7228 * c-decl.c (header_for_builtin_fn): New function.
7229 (implicitly_declare): Suggest which header to include.
7231 2014-10-07 Marek Polacek <polacek@redhat.com>
7233 * c-convert.c (convert): Use error_operand_p.
7234 * c-typeck.c (require_complete_type): Likewise.
7235 (really_atomic_lvalue): Likewise.
7236 (digest_init): Likewise.
7237 (handle_omp_array_sections_1): Likewise.
7239 2014-10-03 Marek Polacek <polacek@redhat.com>
7242 * c-decl.c (pop_scope): Don't warn about "inline function declared
7243 but never defined" for functions marked with gnu_inline attribute.
7245 2014-09-25 Jakub Jelinek <jakub@redhat.com>
7248 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7249 on low_bound and length.
7251 2014-09-24 Marek Polacek <polacek@redhat.com>
7255 * c-parser.c: Don't define CPP_KEYWORD.
7256 (c_parser_switch_statement): Pass original type to c_finish_case.
7257 * c-tree.h (c_finish_case): Update declaration.
7258 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7259 conditionally to c_do_switch_warnings.
7261 2014-09-03 Marek Polacek <polacek@redhat.com>
7264 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7267 2014-09-02 Jakub Jelinek <jakub@redhat.com>
7268 Balaji V. Iyer <balaji.v.iyer@intel.com>
7269 Igor Zamyatin <igor.zamyatin@intel.com>
7271 * c-parser.c (c_parser_cilk_for): New function.
7272 (c_parser_cilk_grainsize): Likewise.
7273 (c_get_temp_regvar): Likewise.
7274 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7275 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7276 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7277 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7280 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7282 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7283 with using HOST_WIDE_INT without truncation to 'int'
7285 2014-08-22 Marek Polacek <polacek@redhat.com>
7288 * c-typeck.c (parser_build_binary_op): Adjust call to
7289 warn_logical_not_parentheses.
7291 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7294 * c-parser.c (c_parser_array_notation): Check for correct
7295 type of an array added.
7297 2014-08-19 Marek Polacek <polacek@redhat.com>
7300 * c-typeck.c (build_binary_op): If either operand of a comparison
7301 is a boolean expression, call maybe_warn_bool_compare.
7303 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7306 * c-typeck.c (build_c_cast): Do a conversion even when the
7307 TYPE_MAIN_VARIANTs are the same.
7309 2014-08-19 Marek Polacek <polacek@redhat.com>
7311 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7312 pedwarn_c99 instead of pedwarn.
7313 (grokfield): Likewise.
7314 (warn_defaults_to): New function.
7315 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7316 Unconditionally call pedwarn_c99 instead of pedwarn.
7317 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7318 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7319 check flag_isoc11 before.
7320 * c-errors.c (pedwarn_c99): Change the return type to bool.
7321 Handle -Wc99-c11-compat.
7322 * c-parser.c (disable_extension_diagnostics): Handle
7323 warn_c99_c11_compat.
7324 (restore_extension_diagnostics): Likewise.
7325 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7326 instead of pedwarn, don't check flag_isoc11 before.
7327 (c_parser_declspecs): Likewise.
7328 (c_parser_alignas_specifier): Likewise.
7329 (c_parser_alignof_expression): Likewise.
7330 (c_parser_generic_selection): Likewise.
7331 * c-tree.h (pedwarn_c99): Update declaration.
7332 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7335 2014-08-19 Marek Polacek <polacek@redhat.com>
7337 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7339 * c-errors.c: Include "opts.h".
7340 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7341 * c-parser.c (disable_extension_diagnostics): Handle negative value
7342 of warn_c90_c99_compat, too.
7343 (restore_extension_diagnostics): Likewise.
7344 (c_parser_compound_statement_nostart): Pass
7345 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7347 2014-08-12 Marek Polacek <polacek@redhat.com>
7349 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7351 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7353 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7355 2014-08-10 Marek Polacek <polacek@redhat.com>
7358 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7359 Call pedwarn_c90 instead of pedwarn.
7360 (check_bitfield_type_and_width): Likewise.
7361 (declspecs_add_qual): Likewise.
7362 (declspecs_add_type): Likewise.
7363 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7364 Adjust to only call pedwarn_c90.
7365 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7366 pedwarn_c90 instead of pedwarn.
7367 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7368 * c-parser.c (disable_extension_diagnostics): Handle
7369 warn_c90_c99_compat.
7370 (restore_extension_diagnostics): Likewise.
7371 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7372 pedwarn_c90 instead of pedwarn.
7373 (c_parser_initelt): Likewise.
7374 (c_parser_postfix_expression): Likewise.
7375 (c_parser_postfix_expression_after_paren_type): Likewise.
7376 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7377 * c-tree.h: Fix formatting.
7378 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7379 pedwarn_c90 instead of pedwarn.
7381 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7383 * c-typeck.c: Remove include of pointer-set.h.
7385 2014-08-07 Marek Polacek <polacek@redhat.com>
7387 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7389 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7391 * c-typeck.c: Use hash_map instead of pointer_map.
7393 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7395 * c-decl.c: Use hash_set instead of pointer_set.
7397 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7400 * c-array-notation.c (expand_array_notations): Handling
7403 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
7406 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7409 2014-07-30 Tom Tromey <tromey@redhat.com>
7411 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7413 (really_start_incremental_init, push_init_level): Initialize
7415 (pop_init_level): Set global designator_depth.
7416 (process_init_element): Check for designated_init attribute.
7418 2014-07-20 Marek Polacek <polacek@redhat.com>
7421 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7422 (implicitly_declare): Pass location to implicit_decl_warning.
7424 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7427 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7428 If non-NULL, call c_parser_check_literal_zero.
7429 (c_parser_check_literal_zero): New function.
7430 (c_parser_postfix_expression_after_primary): Adjust
7431 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7433 2014-07-06 Marek Polacek <polacek@redhat.com>
7436 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7437 * c-tree.h (C_ARRAY_PARAMETER): Define.
7438 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7441 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
7442 Chen Gang <gang.chen.5i5j@gmail.com>
7444 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7447 2014-07-01 Marek Polacek <polacek@redhat.com>
7449 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7450 instead of 0 to WARN_FOR_ASSIGNMENT.
7452 2014-07-01 Marek Polacek <polacek@redhat.com>
7455 * c-typeck.c (convert_for_assignment): Pass
7456 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7458 2014-06-30 Marek Polacek <polacek@redhat.com>
7460 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7461 has no_sanitize_undefined attribute.
7463 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7466 * c-array-notation.c (fix_builtin_array_notation_fn):
7467 Check for 0 arguments in builtin call. Check that bultin argument is
7469 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7472 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7474 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7475 qualifiers in __auto_type for atomic types.
7476 (c_parser_typeof_specifier): Discard all type qualifiers in
7477 __typeof__ for atomic types.
7479 2014-06-25 Marek Polacek <polacek@redhat.com>
7482 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7483 the return expression to c_finish_return.
7485 2014-06-25 Jakub Jelinek <jakub@redhat.com>
7487 * c-typeck.c (c_finish_omp_clauses): Make sure
7488 OMP_CLAUSE_LINEAR_STEP has correct type.
7490 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7494 2014-06-24 Jakub Jelinek <jakub@redhat.com>
7496 * c-parser.c (c_parser_omp_for_loop): For
7497 #pragma omp parallel for simd move lastprivate clause from parallel
7498 to for rather than simd.
7500 2014-06-23 Marek Polacek <polacek@redhat.com>
7502 * c-typeck.c (parser_build_binary_op): Don't call
7503 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7505 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
7507 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7508 * c-decl.c (merge_decls): Likewise.
7510 2014-06-09 Marek Polacek <polacek@redhat.com>
7513 * c-typeck.c (error_init): Call inform instead of error_at.
7514 (pedwarn_init): Call inform instead of pedwarn.
7515 (warning_init): Call inform instead of warning_at.
7517 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
7519 * c-decl.c (merge_decls): Use set_decl_section_name.
7520 (duplicate_decls): Remove node if it exists.
7522 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7525 * c-typeck.c (push_init_level, process_init_element,
7526 pop_init_level): Correct check for zero initialization, move
7527 missing brace warning to respect zero initialization.
7529 2014-06-05 Marek Polacek <polacek@redhat.com>
7532 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7534 2014-06-05 Marek Polacek <polacek@redhat.com>
7537 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
7538 on the left hand side operand of a comparison.
7540 2014-06-05 Marek Polacek <polacek@redhat.com>
7543 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7544 Print note only if the warning was printed.
7546 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7549 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7552 2014-06-03 Marek Polacek <polacek@redhat.com>
7555 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7557 * c-tree.h (c_start_case): Update.
7558 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7559 switch condition has boolean value.
7561 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
7563 * c-decl.c: Include builtins.h.
7564 * c-parser.c: Likewise.
7566 2014-05-27 Marek Polacek <polacek@redhat.com>
7569 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7570 error and warning calls to error_at and warning_at. Pass location of
7571 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7572 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7573 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7575 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7578 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7579 function parameters.
7581 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
7583 * c-decl.c (merge_decls): Preserve symtab node pointers.
7584 (duplicate_decls): Free new decl.
7586 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7588 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7591 * c-parser.c (c_parser_omp_target): Return bool values.
7593 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7595 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7596 num_teams_loc variable to num_thread_limit_loc.
7598 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7600 * c-array-notation.c (expand_array_notations): Use void_node
7601 instead of void_zero_node.
7603 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7605 * c-decl.c (finish_struct): Adjust.
7606 (finish_enum): Likewise.
7608 (record_inline_static): Likewise.
7609 (push_scope): Likewise.
7610 (make_label): Likewise.
7611 (lookup_label_for_goto): Likewise.
7612 (finish_struct): Likewise.
7613 (finish_enum): Likewise.
7614 (store_parm_decls): Likewise.
7615 (c_push_function_context): Likewise.
7616 * c-lang.h: Remove usage of variable_size gty attribute.
7617 * c-parser.c (c_parse_init): Adjust.
7618 (c_parse_file): Likewise.
7620 2014-05-13 Marek Polacek <polacek@redhat.com>
7623 * c-typeck.c (convert_for_assignment): Pass location to
7624 WARN_FOR_ASSIGNMENT instead of input_location.
7626 2014-05-10 Marek Polacek <polacek@redhat.com>
7628 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7629 maybe_warn_string_init.
7630 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7631 maybe_warn_string_init.
7632 * c-tree.h (maybe_warn_string_init): Update declaration.
7633 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7634 Call pedwarn_init with loc instead of with input_location.
7635 (digest_init): Pass init_loc to maybe_warn_string_init.
7636 (pop_init_level): Call pedwarn_init with loc instead of with
7638 (set_init_index): Likewise.
7639 (process_init_element): Likewise.
7641 2014-05-09 Marek Polacek <polacek@redhat.com>
7644 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7645 (c_parser_initelt): Pass location to set_init_label. Pass array index
7646 location to set_init_index.
7647 * c-tree.h (push_init_level): Update declaration.
7648 (pop_init_level): Likewise.
7649 (set_init_index): Likewise.
7650 (set_init_label): Likewise.
7651 * c-typeck.c (error_init): Add location parameter. Call error_at
7653 (digest_init): Pass init_loc to error_init.
7654 (really_start_incremental_init):
7655 (push_init_level): Add location parameter. Pass loc to pop_init_level
7657 (pop_init_level): Likewise.
7658 (set_designator): Add location parameter. Pass loc to pop_init_level,
7659 push_init_level, and error_init.
7660 (set_init_index): Add location parameter. Pass loc to error_init and
7662 (set_init_label): Likewise.
7663 (output_init_element): Pass loc to error_init.
7664 (process_init_element): Pass loc to error_init, pop_init_level,
7665 pedwarn_init, and push_init_level.
7667 2014-05-09 Marek Polacek <polacek@redhat.com>
7670 * c-parser.c (c_parser_attributes): Parse the arguments as an
7671 expression-list if the attribute takes identifier.
7673 2014-05-08 Marek Polacek <polacek@redhat.com>
7676 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7679 2014-05-08 Marek Polacek <polacek@redhat.com>
7682 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7685 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7686 Mike Stump <mikestump@comcast.net>
7687 Richard Sandiford <rdsandiford@googlemail.com>
7689 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7690 (finish_enum): Use wide-int interfaces.
7691 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7692 * c-typeck.c (build_c_cast): Likewise.
7693 (set_nonincremental_init_from_string): Likewise.
7694 (c_tree_equal): Likewise.
7696 2014-05-02 Marek Polacek <polacek@redhat.com>
7699 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7700 Return size_one_node when the type is not complete.
7701 (pointer_diff): Remove comment.
7702 (build_unary_op): Improve error messages.
7704 2014-05-02 Marek Polacek <polacek@redhat.com>
7706 * c-typeck.c (c_finish_return): Separate warning_at calls.
7708 2014-05-02 Marek Polacek <polacek@redhat.com>
7710 * c-tree.h (error_init): Remove declaration.
7711 (pedwarn_init): Likewise.
7712 * c-typeck.c (error_init): Make static and move above.
7713 (pedwarn_init): Likewise.
7714 (warning_init): Move above.
7715 (maybe_warn_string_init): Likewise.
7717 2014-05-01 Jeff Law <law@redhat.com>
7721 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7722 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7725 2014-05-02 Marek Polacek <polacek@redhat.com>
7728 * c-typeck.c (push_init_level): Set constructor_designated to
7729 p->designated for structures.
7731 2014-05-01 Marek Polacek <polacek@redhat.com>
7734 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7735 function-definition has an attribute after the declarator.
7737 2014-05-01 Marek Polacek <polacek@redhat.com>
7740 * c-typeck.c (warning_init): Add location_t parameter. Call
7741 warning_at instead of warning.
7742 (push_init_level): Pass input_location to warning_init.
7743 (add_pending_init): Add location_t parameter. Pass loc to
7745 (set_nonincremental_init): Pass input_location to add_pending_init.
7746 (set_nonincremental_init_from_string): Likewise.
7747 (output_init_element): Pass loc to warning_init and to
7750 2014-05-01 Marek Polacek <polacek@redhat.com>
7753 * c-typeck.c (c_finish_return): Distinguish between label and variable
7754 when warning about returning local address.
7756 2014-05-01 Marek Polacek <polacek@redhat.com>
7759 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7762 2014-05-01 Marek Polacek <polacek@redhat.com>
7765 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7766 instead of 0 to WARN_FOR_QUALIFIERS.
7768 2014-05-01 Marek Polacek <polacek@redhat.com>
7771 * c-typeck.c (default_conversion): Use better location for
7774 2014-04-30 Marek Polacek <polacek@redhat.com>
7776 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7777 also when SANITIZE_FLOAT_DIVIDE is on.
7779 2014-04-30 Marek Polacek <polacek@redhat.com>
7782 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7783 and pedwarn_init. Use loc insted of input_location.
7785 2014-04-30 Marek Polacek <polacek@redhat.com>
7788 * c-typeck.c (build_binary_op): Use location when warning about
7791 2014-04-25 Marek Polacek <polacek@redhat.com>
7794 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7795 always_inline/noinline and hot/cold attributes.
7797 2014-04-25 Marek Polacek <polacek@redhat.com>
7800 * c-parser.c (c_parser_initelt): Pass input_location to
7801 process_init_element.
7802 (c_parser_initval): Pass loc to process_init_element.
7803 * c-tree.h (process_init_element): Adjust declaration.
7804 * c-typeck.c (push_init_level): Pass input_location to
7805 process_init_element.
7806 (pop_init_level): Likewise.
7807 (set_designator): Likewise.
7808 (output_init_element): Add location_t parameter. Pass loc to
7810 (output_pending_init_elements): Pass input_location to
7811 output_init_element.
7812 (process_init_element): Add location_t parameter. Pass loc to
7813 output_init_element.
7815 2014-04-24 Jakub Jelinek <jakub@redhat.com>
7817 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7818 atomic-clause, allow comma in between atomic-clause and
7821 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7824 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7825 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7827 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7830 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7831 create_tmp_var instead build_decl for creating temps.
7832 (build_array_notation_expr): Likewise.
7833 (fix_conditional_array_notations_1): Likewise.
7834 (fix_array_notation_expr): Likewise.
7835 (fix_array_notation_call_expr): Likewise.
7837 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7840 * c-tree.h (c_build_function_call_vec): New prototype.
7841 * c-typeck.c (build_function_call_vec): Don't call
7842 resolve_overloaded_builtin here.
7843 (c_build_function_call_vec): New wrapper function around
7844 build_function_call_vec. Call resolve_overloaded_builtin here.
7845 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7846 Call c_build_function_call_vec instead of build_function_call_vec.
7847 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7848 * c-decl.c (finish_decl): Likewise.
7850 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7853 * c-typeck.c: Use correct format string in cast-qual warning
7855 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7857 * c-decl.c (c_decl_attributes): Use
7858 lang_hooks.types.omp_mappable_type.
7859 * c-typeck.c (c_finish_omp_clauses): Likewise.
7861 2014-03-06 Marek Polacek <polacek@redhat.com>
7864 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7865 of checking tree code.
7867 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7869 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7870 (c_parser_parameter_declaration): Likewise.
7872 2014-02-19 Marek Polacek <polacek@redhat.com>
7875 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7876 Call mark_exp_read on exp.value.
7877 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7878 TREE_ADDRESSABLE on old instead of val.
7879 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7881 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7883 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7884 C_EXPR_APPEND by vec_safe_push.
7885 * c-tree.h (C_EXPR_APPEND): Remove.
7887 2014-01-31 Marek Polacek <polacek@redhat.com>
7890 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7891 build_function_call_vec.
7892 (build_function_call): Likewise.
7893 (build_atomic_assign): Likewise.
7894 (build_function_call_vec): Add arg_loc parameter. Use it.
7895 (convert_arguments): Likewise.
7896 (convert_for_assignment): Rename rhs_loc to expr_loc.
7897 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7898 (c_parser_objc_keywordexpr): Likewise.
7899 (c_parser_postfix_expression_after_primary): Call
7900 build_function_call_vec with expr_loc rather than op_loc.
7901 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7902 build_function_call_vec.
7903 (c_parser_expr_list): Add locations parameter. Fill it with locations
7904 of function arguments.
7905 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7907 2014-01-30 Marek Polacek <polacek@redhat.com>
7910 * c-typeck.c (build_function_call_vec): Use loc parameter.
7911 (convert_arguments): Add location parameter. Use it.
7912 (ep_convert_and_check): Likewise.
7913 (build_atomic_assign): Adjust convert_for_assignment call.
7914 (build_modify_expr): Likewise.
7915 (digest_init): Likewise.
7916 (c_finish_return): Likewise.
7917 (build_conditional_expr): Adjust ep_convert_and_check calls.
7918 (convert_for_assignment): Add rhs_loc parameter. Use it.
7919 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7922 2014-01-30 Richard Biener <rguenther@suse.de>
7925 * c-typeck.c (build_function_call_vec): Do not replace calls
7926 to a function via an incompatible type with a runtime abort.
7928 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7930 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7931 flag_enable_cilkplus with flag_cilkplus.
7932 (c_parser_direct_declarator_inner): Likewise.
7933 (c_parser_attribute_any_word): Likewise.
7934 (c_parser_attributes): Likewise.
7935 (c_parser_compound_statement): Likewise.
7936 (c_parser_statement_after_labels): Likewise.
7937 (c_parser_if_statement): Likewise.
7938 (c_parser_switch_statement): Likewise.
7939 (c_parser_do_statement): Likewise.
7940 (c_parser_for_statement): Likewise.
7941 (c_parser_unary_expression): Likewise.
7942 (c_parser_postfix_expression): Likewise.
7943 (c_parser_postfix_expression_after_primary): Likewise.
7944 (c_parser_postfix_expression_after_primary): Likewise.
7945 (c_parser_omp_clause_name): Likewise.
7946 (c_finish_omp_declare_simd): Likewise.
7947 (c_parser_cilk_verify_simd): Likewise.
7948 * c-typeck.c (build_array_ref): Likewise.
7949 (build_function_call_vec): Likewise.
7950 (convert_arguments): Likewise.
7951 (build_compound_expr): Likewise.
7952 (c_finish_return): Likewise.
7953 (c_finish_if_stmt): Likewise.
7954 (c_finish_loop): Likewise.
7955 (build_binary_op): Likewise.
7957 2014-01-23 Marek Polacek <polacek@redhat.com>
7960 * c-typeck.c (parser_build_binary_op): Use location instead of
7962 (build_binary_op): Pass location to shorten_compare.
7964 2014-01-23 Marek Polacek <polacek@redhat.com>
7967 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7970 2014-01-23 Marek Polacek <polacek@redhat.com>
7973 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7974 of a comma expression.
7975 (emit_side_effect_warnings): Likewise.
7977 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7980 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7981 function to use walk_tree and moved a lot of its functionality to
7982 expand_array_notations.
7983 (expand_array_notations): New function.
7985 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7987 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7988 attribute an attribute without value.
7990 2014-01-23 Jakub Jelinek <jakub@redhat.com>
7993 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7994 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7996 2014-01-22 Marek Polacek <polacek@redhat.com>
7999 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8000 of remove_c_maybe_const_expr on op1 and op2.
8002 2014-01-15 Jakub Jelinek <jakub@redhat.com>
8005 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8006 effects, preevaluate rhs using SAVE_EXPR first.
8008 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8011 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8012 statements with if-elseif statements.
8014 2014-01-06 Marek Polacek <polacek@redhat.com>
8017 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8018 defined bit-field types only in ISO C.
8020 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8022 Update copyright years
8024 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8026 * c-array-notation.c: Use the standard form for the copyright notice.
8028 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8030 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8031 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8032 field in parser is not empty. If not-empty, call the function
8033 c_parser_finish_omp_declare_simd.
8034 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8035 between SIMD-enabled functions and #pragma simd. Added new parameter.
8036 (c_parser_cilk_all_clauses): Modified the usage of the function
8037 c_parser_cilk_clause_vectorlength as mentioned above.
8038 (c_parser_cilk_simd_fn_vector_attrs): New function.
8039 (c_finish_cilk_simd_fn_tokens): Likewise.
8040 (is_cilkplus_vector_p): Likewise.
8041 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8042 "nomask," and "mask" strings in clause name.
8043 (c_parser_omp_all_clauses): Added 3 new case statements:
8044 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8045 PRAGMA_CILK_CLAUSE_NOMASK.
8046 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8047 check for vector attribute and if so call the function
8048 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8049 called the function c_finish_cilk_simd_fn_tokens.
8050 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8051 parser field is non-empty. If so, parse them as you would parse
8052 the omp declare simd pragma.
8053 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8054 Added a check when step is a parameter and flag it as error.
8055 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8056 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8059 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8061 * c-parser.c (c_parser_omp_parallel): Fix description.
8063 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8065 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8066 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8067 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8068 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8070 2013-12-04 Joseph Myers <joseph@codesourcery.com>
8073 * c-parser.c (c_parser_alignas_specifier): Use
8074 c_sizeof_or_alignof_type instead of c_alignof.
8075 (c_parser_alignof_expression): Likewise, with min_alignof
8076 parameter depending on alignof spelling used.
8078 2013-12-04 Marek Polacek <polacek@redhat.com>
8081 * c-decl.c (start_function): Don't warn for missing prototype for
8084 2013-12-03 Marek Polacek <polacek@redhat.com>
8087 * c-decl.c (build_compound_literal): Allow compound literals with
8088 empty initial value.
8090 2013-12-02 Joseph Myers <joseph@codesourcery.com>
8093 * c-typeck.c (build_modify_expr): Diagnose assignment to
8094 expression with array type.
8096 2013-11-29 Joseph Myers <joseph@codesourcery.com>
8099 * c-typeck.c (process_init_element): Do not treat a string as
8100 initializing a whole array when used with a designator for an
8103 2013-11-29 Joseph Myers <joseph@codesourcery.com>
8106 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8107 an inline function following a static declaration.
8109 2013-11-28 Jakub Jelinek <jakub@redhat.com>
8112 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8113 to p_name before calling c_parser_omp_teams instead of after.
8114 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8115 argument. Remove unused p_name variable.
8117 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
8118 Jakub Jelinek <jakub@redhat.com>
8120 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8121 external_scope is NULL.
8123 2013-11-27 Tom de Vries <tom@codesourcery.com>
8124 Marc Glisse <marc.glisse@inria.fr>
8127 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8129 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
8131 * c-typeck.c: Add required include files from gimple.h.
8133 2013-11-22 David Malcolm <dmalcolm@redhat.com>
8135 * c-decl.c (define_label, shadow_tag_warned)
8136 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8137 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8138 (declspecs_add_type): Remove use of in_system_header macro.
8139 * c-parser.c (c_parser_unary_expression): Likewise.
8140 * c-typeck.c (store_init_value, process_init_element)
8141 (c_start_case): Likewise.
8143 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8146 * c-parser.c (c_parser_set_source_position_from_token): Remove
8147 reference to in_system_header from comment.
8149 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8151 * c-decl.c (grokdeclarator): Update comment to refer to
8152 tree_to_[su]hwi rather than tree_low_cst.
8154 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8156 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8157 tree_to_uhwi throughout.
8159 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8161 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8164 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8166 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8169 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
8171 * c-parser.c (c_parser_cilk_simd): New.
8172 (c_parser_cilk_verify_simd): New.
8173 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8174 (c_parser_omp_for_loop): Add case for NE_EXPR.
8175 Set c_break_label for CILK_SIMD.
8176 (c_parser_cilk_clause_vectorlength): New.
8177 (c_parser_cilk_clause_linear): New.
8178 (c_parser_cilk_clause_name): New.
8179 (c_parser_cilk_all_clauses): New.
8180 * c-typeck.c (build_unary_op): Pass location argument to
8182 (build_modify_expr): Same.
8183 (build_asm_expr): Same.
8184 (c_finish_bc_stmt): Error on break/continue in loops.
8186 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
8188 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8190 2013-11-14 Diego Novillo <dnovillo@google.com>
8192 * c-decl.c: Include print-tree.h.
8193 Include stor-layout.h.
8196 Include stringpool.h.
8197 * c-lang.c: Include fold-const.h.
8198 * c-parser.c: Include stringpool.h.
8200 Include stor-layout.h.
8202 Include trans-mem.h.
8203 * c-typeck.c: Include stor-layout.h.
8204 Include trans-mem.h.
8208 2013-11-13 Joseph Myers <joseph@codesourcery.com>
8210 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8211 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8213 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8214 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8216 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8217 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8218 (c_parser_declarator, c_parser_direct_declarator_inner)
8219 (c_parser_parameter_declaration, c_parser_type_name): All callers
8221 (c_parser_declaration_or_fndef): Handle declarations with type
8222 determined from the initializer.
8224 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
8226 * c-typeck.c: Include gimplify.h.
8228 2013-11-12 Joseph Myers <joseph@codesourcery.com>
8230 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8231 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8233 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8234 or _Thread_local as appropriate in diagnostics.
8235 (build_null_declspecs): Initialize ret->thread_gnu_p.
8236 (declspecs_add_scspec): Handle either __thread or _Thread_local
8237 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8238 pedantic. Do not disallow _Thread_local extern and _Thread_local
8241 2013-11-07 Joseph Myers <joseph@codesourcery.com>
8242 Andrew MacLeod <amacleod@redhat.com>
8244 * c-aux-info.c (gen_type): Handle atomic qualifier.
8245 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8246 qualifiers when compating types.
8247 (shadow_tag_warned): Handle atomic_p in declspecs.
8248 (quals_from_declspecs): Likewise.
8249 (start_decl): Use c_type_promotes_to when promoting argument
8251 (grokdeclarator): Handle _Atomic.
8252 (get_parm_info): Diagnose any qualifier on "void" as only
8254 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8255 comparing types. Use c_type_promotes_to when promoting argument
8257 (finish_function): Use c_type_promotes_to when promoting argument
8259 (build_null_declspecs): Handle atomic_p in declspecs.
8260 (declspecs_add_qual): Handle RID_ATOMIC.
8261 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8262 (c_token_starts_declspecs): Handle RID_ATOMIC.
8263 (c_parser_declspecs): Handle atomic type specifiers and
8265 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8266 from types of expressions with atomic type.
8267 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8268 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8269 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8270 (c_parser_statement_after_labels, c_parser_switch_statement)
8271 (c_parser_for_statement, c_parser_expr_no_commas)
8272 (c_parser_conditional_expression, c_parser_binary_expression)
8273 (c_parser_cast_expression, c_parser_unary_expression)
8274 (c_parser_postfix_expression)
8275 (c_parser_postfix_expression_after_primary, c_parser_expression):
8276 Use convert_lvalue_to_rvalue.
8277 (c_parser_expression_conv, c_parser_expr_list): Document
8278 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8279 (c_parser_objc_synchronized_statement): Use
8280 convert_lvalue_to_rvalue.
8281 (c_parser_objc_selector): Handle RID_ATOMIC.
8282 (c_parser_objc_receiver, c_parser_array_notation): Use
8283 convert_lvalue_to_rvalue.
8284 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8285 _Atomic (type-name).
8286 (struct c_declspecs): Add atomic_p field.
8287 (convert_lvalue_to_rvalue): Declare.
8288 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8289 corresponding atomic types.
8290 (qualify_type): Don't add _Atomic qualifiers from second argument.
8291 (comp_target_types): Do not allow _Atomic mismatches.
8292 (type_lists_compatible_p): Do not remove atomic qualifiers when
8294 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8295 (build_atomic_assign): New functions.
8296 (build_unary_op): Use build_atomic_assign for atomic increment and
8298 (build_conditional_expr): Do not treat _Atomic void as a qualified
8300 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8301 (find_anonymous_field_with_type, convert_to_anonymous_field)
8302 (convert_for_assignment): Do not remove atomic qualifiers when
8304 (digest_init): Do not accept initialization of arrays of atomic
8305 elements by string constants.
8306 (build_asm_expr): Use convert_lvalue_to_rvalue.
8307 (build_binary_op): Do not treat _Atomic void as a qualified
8310 2013-11-06 DJ Delorie <dj@redhat.com>
8312 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8313 both explicit and builtin, print the location of the explicit one.
8315 2013-11-05 Tobias Burnus <burnus@net-b.de>
8317 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8318 c_parser_omp_distribute, c_parser_omp_teams,
8319 c_parser_omp_target, c_parser_omp_declare): Handle
8322 2013-11-03 Marek Polacek <polacek@redhat.com>
8324 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8326 2013-11-01 Jakub Jelinek <jakub@redhat.com>
8328 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8329 check_dup_generic at the end, unless remove is true.
8330 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8332 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8334 2013-10-31 Jakub Jelinek <jakub@redhat.com>
8336 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8337 with decl that is not pointer nor array.
8339 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8341 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8342 a spawning function is found.
8343 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8344 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8345 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8346 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8348 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8349 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8351 (c_finish_return): Added a check to reject _Cilk_spawn in return
8353 (build_cilk_spawn): New function.
8354 (build_cilk_sync): Likewise.
8355 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
8357 2013-10-27 Tobias Burnus <burnus@net-b.de>
8360 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8361 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8362 (c_parser_statement_after_labels): Update calls.
8364 2013-10-24 Tobias Burnus <burnus@net-b.de>
8367 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8368 Handle PRAGMA_IVDEP.
8369 (c_parser_statement_after_labels): Update call.
8371 2013-10-24 Marek Polacek <polacek@redhat.com>
8373 * c-parser.c (c_parser_struct_declaration): Add a comment.
8374 (c_parser_declarator): Don't allow _Alignas here.
8376 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
8378 * c-parser.c: Include omp-low.h.
8379 * c-typeck.c: Likewise.
8381 2013-10-17 Marek Polacek <polacek@redhat.com>
8384 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8385 Document syntax of the array-declarator.
8386 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8388 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8389 (c_parser_struct_declaration): Likewise.
8390 (c_parser_declarator): Likewise.
8391 (c_parser_direct_declarator_inner): Likewise.
8392 (c_parser_parameter_declaration): Likewise.
8393 (c_parser_type_name): Likewise.
8395 2013-10-11 Jakub Jelinek <jakub@redhat.com>
8397 * c-lang.h (current_omp_declare_target_attribute): New extern
8399 * c-parser.c: Include c-lang.h.
8400 (struct c_parser): Change tokens to c_token *.
8401 Add tokens_buf field. Change tokens_avail type to unsigned int.
8402 (c_parser_consume_token): If parser->tokens isn't
8403 &parser->tokens_buf[0], increment parser->tokens.
8404 (c_parser_consume_pragma): Likewise.
8405 (enum pragma_context): Add pragma_struct and pragma_param.
8406 (c_parser_external_declaration): Adjust
8407 c_parser_declaration_or_fndef caller.
8408 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8409 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8410 Adjust recursive call.
8411 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8413 (c_parser_parameter_declaration): Use pragma_param instead of
8415 (c_parser_compound_statement_nostart, c_parser_label,
8416 c_parser_for_statement): Adjust
8417 c_parser_declaration_or_fndef callers.
8418 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8419 it through to c_parser_conditional_expression.
8420 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8421 pass it through to c_parser_binary_expression. Adjust recursive
8423 (c_parser_binary_expression): Remove prec argument, add
8424 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8425 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8426 binop matches it, use build2 instead of parser_build_binary_op.
8427 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8428 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8429 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8430 Handle pragma_struct and pragma_param the same as pragma_external.
8431 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8432 (c_parser_omp_variable_list): Parse array sections for
8433 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8434 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8435 (c_parser_omp_clause_reduction): Handle user defined reductions.
8436 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8437 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8438 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8439 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8440 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8441 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8442 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8443 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8444 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8445 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8446 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8447 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8448 (c_parser_omp_for_loop): Add CODE argument, pass it through
8449 to c_finish_omp_for. Change last argument to cclauses,
8450 and adjust uses to grab parallel clauses from the array of all
8451 the split clauses. Adjust c_parser_binary_expression,
8452 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8453 (omp_split_clauses): New function.
8454 (c_parser_omp_simd): New function.
8455 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8456 Allow the function to be called also when parsing combined constructs,
8457 and call c_parser_omp_simd when parsing for simd.
8458 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8459 #pragma omp section, require exactly one structured-block instead of
8460 sequence of statements.
8461 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8462 Allow the function to be called also when parsing combined constructs.
8463 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8464 Allow the function to be called also when parsing combined
8466 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8467 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8468 c_parser_omp_teams, c_parser_omp_target_data,
8469 c_parser_omp_target_update, c_parser_omp_target,
8470 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8471 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8472 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8473 (c_parser_omp_construct): Add p_name and mask vars. Handle
8474 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8475 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8476 and c_parser_omp_sections callers.
8477 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8478 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8479 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8480 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8481 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8483 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8484 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8485 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8486 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8487 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8488 * c-typeck.c: Include tree-inline.h.
8489 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8490 handle_omp_array_sections_1, handle_omp_array_sections,
8491 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8492 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8493 user defined reductions.
8494 (c_tree_equal): New function.
8495 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8496 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8497 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8498 c_check_omp_declare_reduction_r): New prototypes.
8499 * c-decl.c (current_omp_declare_target_attribute): New variable.
8500 (c_decl_attributes): New function.
8501 (start_decl, start_function): Use it instead of decl_attributes.
8502 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8503 c_omp_reduction_decl, c_omp_reduction_lookup,
8504 c_check_omp_declare_reduction_r): New functions.
8506 2013-09-25 Tom Tromey <tromey@redhat.com>
8508 * Make-lang.in (c/gccspec.o): Remove.
8509 (CFLAGS-c/gccspec.o): New variable.
8510 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8511 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8512 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8514 2013-09-25 Tom Tromey <tromey@redhat.com>
8516 * Make-lang.in (c/gccspec.o): Don't use subshell.
8518 2013-09-18 Marek Polacek <polacek@redhat.com>
8521 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8522 Remove unnecessary check.
8524 2013-09-18 Marek Polacek <polacek@redhat.com>
8527 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8528 no_sanitize_undefined attribute.
8530 2013-09-13 Kai Tietz <ktietz@redhat.com>
8533 * c-decl.c (c_builtin_function_ext_scope): Remove
8534 wrong assumption that it is never called on prexisting
8537 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8539 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8541 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8543 * c-objc-common.c (c_tree_printer): Tidy.
8545 2013-08-30 Marek Polacek <polacek@redhat.com>
8547 * c-typeck.c (build_binary_op): Add division by zero and shift
8550 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
8551 Joseph Myers <joseph@codesourcery.com>
8554 * c-typeck.c (c_common_type): Prefer double_type_node over
8555 other REAL_TYPE types with the same precision.
8556 (convert_arguments): Likewise.
8558 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8560 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8561 (c_initialize_diagnostics): Call a destructor for the early printer.
8563 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8565 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8566 printer initialization.
8568 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
8571 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8572 check for truth values.
8573 (expand_array_notation_exprs): Added truth values case. Removed an
8574 unwanted else. Added for-loop to walk through subtrees in default
8577 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8579 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8581 2013-07-23 Joseph Myers <joseph@codesourcery.com>
8583 * c-parser.c (struct c_generic_association): Fix typo.
8585 2013-07-23 Tom Tromey <tromey@redhat.com>
8586 Joseph Myers <joseph@codesourcery.com>
8588 * c-parser.c (struct c_generic_association): New.
8589 (c_generic_association_d): New typedef.
8590 (c_parser_generic_selection): New function.
8591 (c_parser_postfix_expression): Handle RID_GENERIC.
8593 2013-07-13 Jason Merrill <jason@redhat.com>
8596 * c-decl.c (finish_struct): Check for too-large class.
8598 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8601 * c-typeck.c (set_init_index): When folding, check for index overflow.
8603 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8605 * c-parser.c (c_parser_array_notation): Removed rejection of array
8606 notations in an array of function pointers.
8608 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8610 * c-array-notation.c (make_triplet_val_inv): New function.
8611 (create_cmp_incr): Likewise.
8612 (create_array_refs): Likewise.
8613 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8614 Also modularized common parts between functions and called the function.
8615 (build_array_notation_expr): Likewise.
8616 (fix_conditional_array_notations_1): Likewise.
8617 (fix_array_notation_expr): Likewise.
8618 (fix_array_notation_call_expr): Likewise.
8620 2013-06-18 Marek Polacek <polacek@redhat.com>
8623 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8625 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8627 * c-array-notation.c (build_array_notation_expr): Reject array notation
8628 mismatch between LHS and RHS even inside a call_expr. Also, removed
8629 a couple while statements that were dead code.
8631 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8633 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8634 excessive precision expressions in function parameters. Also removed
8635 couple unwanted while statements.
8637 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8639 * c-array-notation.c (expand_array_notation_exprs): Added
8640 ARRAY_NOTATION_REF case.
8642 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8644 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8645 function to c-family/array-notation-common.c.
8646 (is_cilkplus_reduce_builtin): Likewise.
8647 (find_rank): Likewise.
8648 (extract_array_notation_exprs): Likewise.
8649 (replace_array_notations): Likewise.
8650 (find_inv_trees): Likewise.
8651 (replace_inv_trees): Likewise.
8652 (contains_array_notation_expr): Likewise.
8653 (find_correct_array_notation_type): Likewise.
8654 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8655 (struct inv_list): Moved this to c-family/array-notation-common.c.
8656 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
8658 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8660 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8661 reduction functions outside the for-loop. Added a check if the fundecl
8662 is non-NULL. Finally, removed an unwanted if-statement, and made the
8665 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8667 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8668 condition of the if-statement matches the rank of else-block and then-
8669 block when array notations are used.
8670 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8671 expression after the entire function body is parsed.
8672 (c_parser_expr_no_commas): Delayed creating array notation expressions
8673 to the end of function parsing.
8674 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8675 whole if-statement instead of just the condition.
8676 (expand_array_notation_exprs): Added MODIFY_EXPR case.
8678 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8681 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8682 array to NULL_TREE if they are unused. Also added a check for the
8683 field to be NULL before its fields are used in future.
8685 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8688 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8689 (build_array_notation_expr): Likewise.
8691 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8693 * c-typeck.c (build_array_ref): Added a check to see if array's
8694 index is greater than one. If true, then emit an error.
8695 (build_function_call_vec): Exclude error reporting and checking
8696 for builtin array-notation functions.
8697 (convert_arguments): Likewise.
8698 (c_finish_return): Added a check for array notations as a return
8699 expression. If true, then emit an error.
8700 (c_finish_loop): Added a check for array notations in a loop
8701 condition. If true then emit an error.
8702 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8703 (build_binary_op): Added a check for array notation expr inside
8704 op1 and op0. If present, we call another function to find correct
8706 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8707 * c-parser.c (c_parser_compound_statement): Check if array
8708 notation code is used in tree, if so, then transform them into
8710 (c_parser_expr_no_commas): Check if array notation is used in LHS
8711 or RHS, if so, then build array notation expression instead of
8713 (c_parser_postfix_expression_after_primary): Added a check for
8714 colon(s) after square braces, if so then handle it like an array
8715 notation. Also, break up array notations in unary op if found.
8716 (c_parser_direct_declarator_inner): Added a check for array
8718 (c_parser_compound_statement): Added a check for array notation in
8719 a stmt. If one is present, then expand array notation expr.
8720 (c_parser_if_statement): Likewise.
8721 (c_parser_switch_statement): Added a check for array notations in
8722 a switch statement's condition. If true, then output an error.
8723 (c_parser_while_statement): Similarly, but for a while.
8724 (c_parser_do_statement): Similarly, but for a do-while.
8725 (c_parser_for_statement): Similarly, but for a for-loop.
8726 (c_parser_unary_expression): Check if array notation is used in a
8727 pre-increment or pre-decrement expression. If true, then expand
8729 (c_parser_array_notation): New function.
8730 * c-array-notation.c: New file.
8731 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
8733 2013-05-23 Mike Stump <mikestump@comcast.net>
8735 * c-typeck.c (convert_for_assignment): Handle references to memory
8738 2013-05-16 Jason Merrill <jason@redhat.com>
8740 * Make-lang.in (cc1$(exeext)): Use link mutex.
8742 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8744 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8745 to simply use OPT_Wpointer_arith.
8746 (build_unary_op): Likewise.
8748 2013-04-03 Jakub Jelinek <jakub@redhat.com>
8751 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8752 argument. If set, or it temporarily for parsing of the first
8753 argument into force_folding_builtin_constant_p.
8754 (c_parser_postfix_expression): Adjust callers.
8756 2013-03-21 Richard Biener <rguenther@suse.de>
8758 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8759 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8761 2013-02-12 Marek Polacek <polacek@redhat.com>
8764 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8767 2013-01-24 Jakub Jelinek <jakub@redhat.com>
8770 * c-typeck.c (set_nonincremental_init_from_string): If
8771 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8773 (process_init_element): Likewise.
8775 2012-12-20 Jakub Jelinek <jakub@redhat.com>
8778 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8779 argument, don't call default_function_array_conversion
8780 nor c_fully_fold here.
8781 (c_parser_asm_statement): Adjust callers.
8782 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8783 and outputs here, and call default_function_array_conversion
8784 on inputs that don't need to be addressable.
8786 2012-12-18 Jakub Jelinek <jakub@redhat.com>
8789 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8790 warning require that both c_common_unsigned_type as well as
8791 c_common_signed_type is the same for both mvl and mvr types.
8793 2012-11-16 Diego Novillo <dnovillo@google.com>
8795 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8797 * c-common.c: Use new vec API in vec.h.
8798 * c-common.h: Likewise.
8799 * c-gimplify.c: Likewise.
8800 * c-pragma.c: Likewise.
8801 * c-pretty-print.c: Likewise.
8802 * c-pretty-print.h: Likewise.
8803 * c-semantics.c: Likewise.
8804 * c-decl.c: Likewise.
8805 * c-parser.c: Likewise.
8806 * c-tree.h: Likewise.
8807 * c-typeck.c: Likewise.
8809 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8812 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8814 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8817 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8818 shadows a function, unless the variable is a function or a
8819 pointer-to-function.
8821 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8824 * c-parser.c (struct c_tree_loc_pair): Removed.
8825 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8826 add location_t * and tree * arguments, fill in array of 3
8827 sizeof_arg trees and corresponding locs.
8828 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8829 c_parser_expr_list callers.
8830 (c_parser_postfix_expression_after_primary): Likewise. Pass
8831 array of 3 sizeof_arg trees and locs (corresponding to first
8832 3 arguments) to sizeof_pointer_memaccess_warning.
8834 2012-10-09 Lawrence Crowl <crowl@google.com>
8836 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8837 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8840 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8843 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8846 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8849 * c-typeck.c: Include c-common.h.
8850 (enum stv_conv): Moved to c-common.h.
8851 (scalar_to_vector): Moved to c-common.c.
8852 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8853 * Make-lang.in: c-typeck.c depends on c-common.h.
8855 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8857 * c-decl.c (c_write_global_declarations): Fix handling of
8860 2012-09-30 Sharad Singhai <singhai@google.com>
8862 * c-decl.c (c_write_global_declarations): Use a different method
8863 to determine if the dump has ben initialized.
8865 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8868 * c-typeck.c (c_cast_expr): When casting to a type requiring
8869 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8872 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8875 * c-typeck.c (build_unary_op): Pass original argument of
8876 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8877 any C_MAYBE_CONST_EXPR, if it has integer operands.
8878 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8879 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8880 to c_objc_common_truthvalue_conversion, then remove any
8881 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8882 c_objc_common_truthvalue_conversion not
8883 c_common_truthvalue_conversion.
8884 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8885 call note_integer_operands for arguments with integer operands
8886 that are not integer constants.
8888 2012-09-13 Jakub Jelinek <jakub@redhat.com>
8891 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8892 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8894 2012-08-31 Jakub Jelinek <jakub@redhat.com>
8897 * c-convert.c (convert): Don't call fold_convert_loc if
8898 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8899 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8900 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8902 2012-08-24 Jakub Jelinek <jakub@redhat.com>
8905 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8906 for nested and empty_ok arguments in the call to
8907 c_parser_declaration_or_fndef.
8909 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8911 * c-tree.h (c_last_sizeof_arg): Declare.
8912 * c-parser.c (struct c_tree_loc_pair): New type.
8913 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8915 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8916 (c_parser_postfix_expression_after_primary): Likewise. Call
8917 sizeof_pointer_memaccess_warning if needed.
8918 (sizeof_ptr_memacc_comptypes): New function.
8919 * c-typeck.c (c_last_sizeof_arg): New global variable.
8920 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8922 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
8924 * c-lang.h (lang_decl): Add variable_size GTY option.
8926 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8928 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8929 * Make-lang.in: Fix dependencies.
8931 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8933 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8934 and add language Makefile hooks.
8935 * config-lang.in: New file.
8936 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8937 add the required "normal" config-lang.in rules.
8938 * c-lang.h: Moved from gcc/ to here.
8939 * c-tree.h: Likewise.
8940 * c-objc-common.c: Likewise.
8941 * c-objc-common.h: Likewise.
8942 * c-typeck.c: Likewise.
8943 * c-convert.c: Likewise.
8944 * c-lang.c: Likewise.
8945 * c-aux-info.c: Likewise.
8946 * c-errors.c: Likewise.
8947 * gccspec.c: Likewise.
8948 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8949 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8951 Copyright (C) 2012-2022 Free Software Foundation, Inc.
8953 Copying and distribution of this file, with or without modification,
8954 are permitted in any medium without royalty provided the copyright
8955 notice and this notice are preserved.