1 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
3 * c-parser.cc (c_parser_omp_allocate): Parse align
4 clause and check for restrictions.
6 2023-02-08 Joseph Myers <joseph@codesourcery.com>
8 * c-typeck.cc (check_constexpr_init): Remove argument
9 null_pointer_constant. Only check pointer initializers for being
11 (digest_init): Update calls to check_constexpr_init.
13 2023-02-02 Joseph Myers <joseph@codesourcery.com>
15 * c-typeck.cc (build_binary_op): Allow comparisons between
16 pointers and nullptr_t values that are not null pointer constants.
18 2023-02-02 Joseph Myers <joseph@codesourcery.com>
20 * c-typeck.cc: Include "realmpfr.h".
21 (constexpr_init_fits_real_type): Do not allow signaling NaN
22 conversions to different types with the same mode. Handle
23 conversions from binary to decimal types.
24 (check_constexpr_init): Do not disallow real initializers for
25 complex types. Do not disallow binary initializers for decimal
28 2023-01-31 Marek Polacek <polacek@redhat.com>
32 * c-objc-common.cc (instantiation_dependent_expression_p): New.
34 2023-01-27 Joseph Myers <joseph@codesourcery.com>
36 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
37 around auto initializer.
39 2023-01-16 Jakub Jelinek <jakub@redhat.com>
42 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
43 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
46 2023-01-14 Jakub Jelinek <jakub@redhat.com>
49 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
52 2023-01-13 Qing Zhao <qing.zhao@oracle.com>
54 * c-decl.cc (strict_flex_array_level_of): ... here.
56 2023-01-11 Jakub Jelinek <jakub@redhat.com>
59 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
60 markers for K&R function parameter declarations of nested functions.
62 2023-01-09 Joseph Myers <joseph@codesourcery.com>
64 * c-decl.cc (build_compound_literal): Call record_inline_static.
66 2023-01-06 Joseph Myers <joseph@codesourcery.com>
68 * c-parser.cc (c_parser_postfix_expression): Handle integer
69 generic arguments to functions passed to __builtin_tgmath as
70 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
71 Do not handle integer arguments to some narrowing functions as
74 2022-12-19 Jakub Jelinek <jakub@redhat.com>
77 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
78 compound literals with function type.
80 2022-12-07 Joseph Myers <joseph@codesourcery.com>
82 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
83 auto, constexpr and a type used together.
85 2022-12-06 Qing Zhao <qing.zhao@oracle.com>
87 * c-decl.cc (is_flexible_array_member_p): Call new function
88 strict_flex_array_level_of.
90 2022-11-24 Florian Weimer <fweimer@redhat.com>
93 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
96 2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
98 * c-decl.cc (start_function): Set the result decl source
99 location to the location of the typespec.
101 2022-11-17 David Malcolm <dmalcolm@redhat.com>
104 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
105 to cpp_create_reader, rather than ident_hash, so that the new
106 reader gets its own hash table.
108 2022-11-15 David Malcolm <dmalcolm@redhat.com>
111 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
112 (class ana::c_translation_unit): New.
113 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
115 2022-11-12 Joseph Myers <joseph@codesourcery.com>
117 * c-decl.cc (start_underspecified_init)
118 (finish_underspecified_init): Handle name == NULL_TREE for
120 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
121 (shadow_tag_warned): Check for constexpr.
122 (start_decl): Add parameter do_push.
123 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
124 (grokdeclarator): Handle constexpr.
125 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
126 (declspecs_add_scspec): Handle constexpr.
127 * c-parser.cc (c_token_starts_compound_literal)
128 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
129 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
130 (c_parser_compound_literal_scspecs)
131 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
132 Update calls to start_init.
133 (c_parser_declaration_or_fndef, c_parser_initializer)
134 (c_parser_initval): Pass true for new argument of
135 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
136 constexpr compound literals.
137 (c_parser_static_assert_declaration_no_semi)
138 (c_parser_enum_specifier, c_parser_struct_declaration)
139 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
140 Call convert_lvalue_to_rvalue on expressions required to be
141 integer constant expressions.
142 (c_parser_omp_declare_reduction): Update call to start_init.
143 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
144 (C_DECL_DECLARED_CONSTEXPR): New macros.
145 (struct c_declspecs): Add constexpr_p.
146 (start_decl, convert_lvalue_to_rvalue, start_init): Update
148 * c-typeck.cc (require_constant_value, require_constant_elements):
150 (require_constexpr_value, maybe_get_constexpr_init)
151 (constexpr_init_fits_real_type, check_constexpr_init): New.
152 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
153 maybe_get_constexpr_init.
154 (store_init_value): Update call to digest_init.
155 (digest_init): Add parameters int_const_expr, arith_const_expr and
156 require_constexpr. Check constexpr initializers.
157 (constructor_top_level): Remove.
158 (struct initializer_stack): Remove top_level. Add
159 require_constexpr_value.
160 (start_init): Remove parameter top_level. Add parameters
161 init_require_constant and init_require_constexpr. Save
162 require_constexpr_value on stack.
163 (pop_init_level): Use a null pointer constant for zero initializer
164 of pointer initialized with {}.
165 (output_init_element): Update call to digest_init. Avoid passing
166 null pointer constants of pointer type through digest_init a
167 second time when initializing a constexpr object.
169 2022-11-03 Joseph Myers <joseph@codesourcery.com>
171 * c-decl.cc (in_underspecified_init, start_underspecified_init)
172 (finish_underspecified_init): New.
173 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
174 Give errors inside initializers of underspecified declarations.
175 (grokdeclarator): Handle (erroneous) case of C2X auto on a
177 (declspecs_add_type): Handle c2x_auto_p case.
178 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
180 (finish_declspecs): Handle c2x_auto_p.
181 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
182 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
183 (struct c_declspecs): Add c2x_auto_p.
184 (start_underspecified_init, finish_underspecified_init): New
186 * c-typeck.cc (build_external_ref): Give error for underspecified
187 declaration referenced in its initializer.
189 2022-10-28 Joseph Myers <joseph@codesourcery.com>
191 * c-decl.cc (grokdeclarator): Pass
192 arg_info->no_named_args_stdarg_p to build_function_type.
193 (grokparms): Check arg_info->no_named_args_stdarg_p before
194 converting () to (void).
195 (build_arg_info): Initialize no_named_args_stdarg_p.
196 (get_parm_info): Set no_named_args_stdarg_p.
197 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
199 (store_parm_decls): Count (...) functions as prototyped.
200 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
201 parenthesis to start parameter list.
202 (c_parser_parms_list_declarator): Always allow '...' with no
203 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
204 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
205 * c-typeck.cc (composite_type): Handle
206 TYPE_NO_NAMED_ARGS_STDARG_P.
207 (function_types_compatible_p): Compare
208 TYPE_NO_NAMED_ARGS_STDARG_P.
210 2022-10-28 Jakub Jelinek <jakub@redhat.com>
212 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
213 comma before the first clause.
214 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
215 c_parser_omp_flush, c_parser_omp_scan_loop_body,
216 c_parser_omp_ordered, c_finish_omp_declare_variant,
217 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
218 c_parser_omp_requires, c_parser_omp_error,
219 c_parser_omp_assumption_clauses): Likewise.
221 2022-10-28 Joseph Myers <joseph@codesourcery.com>
224 * c-convert.cc (c_convert): Handle enums with underlying boolean
226 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
227 enums with enum type specifier, but give errors for storage class
228 specifiers, qualifiers or alignment specifiers in non-definition
229 declarations of such enums.
230 (grokdeclarator): Give error for non-definition use of type
231 specifier with an enum type specifier.
232 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
233 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
234 (xref_tag): Update call to parser_xref_tag.
235 (start_enum): Add argument fixed_underlying_type. Complete enum
236 type with a fixed underlying type given in the definition. Give
237 error for defining without a fixed underlying type in the
238 definition if one was given in a prior declaration. Do not mark
239 enums with fixed underlying type as packed for -fshort-enums.
240 Store the enum type in the_enum.
241 (finish_enum): Do not adjust types of values or check their range
242 for an enum with a fixed underlying type. Set underlying type of
244 (build_enumerator): Check enumeration constants for enum with
245 fixed underlying type against that type and convert to that type.
246 Increment in the underlying integer type, with handling for bool.
247 (c_simulate_enum_decl): Update call to start_enum.
248 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
249 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
250 rather than recomputing an underlying type based on size.
251 * c-parser.cc (c_parser_declspecs)
252 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
253 Set has_enum_type_specifier for type specifiers.
254 (c_parser_enum_specifier): Handle enum type specifiers.
255 (c_parser_struct_or_union_specifier): Update call to
257 (c_parser_omp_atomic): Check for boolean increment or decrement
258 using C_BOOLEAN_TYPE_P.
259 * c-tree.h (C_BOOLEAN_TYPE_P): New.
260 (struct c_typespec): Add has_enum_type_specifier.
261 (struct c_declspecs): Add enum_type_specifier_ref_p.
262 (struct c_enum_contents): Add enum_type.
263 (start_enum, parser_xref_tag): Update prototypes.
264 * c-typeck.cc (composite_type): Allow for enumerated types
265 compatible with bool.
266 (common_type, comptypes_internal, perform_integral_promotions):
267 Use ENUM_UNDERLYING_TYPE.
268 (parser_build_binary_op, build_unary_op, convert_for_assignment)
269 (c_finish_return, c_start_switch, build_binary_op): Check for
270 boolean types using C_BOOLEAN_TYPE_P.
272 2022-10-24 Jakub Jelinek <jakub@redhat.com>
275 * c-typeck.cc (build_binary_op): Pass operands before excess precision
276 promotions to scalar_to_vector call.
278 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
280 * c-decl.cc (finish_function): Ignore hosted when deciding
281 whether to implicitly return zero, but check noreturn.
282 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
283 requirements to just MAIN_NAME_P when hosted, or `int main'
286 2022-10-20 Richard Biener <rguenther@suse.de>
290 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
291 the parsed IL and zap the body on error.
293 2022-10-18 Joseph Myers <joseph@codesourcery.com>
296 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
297 with previous declaration visible.
299 2022-10-18 Joseph Myers <joseph@codesourcery.com>
302 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
303 convert all to the type of the enumeration. pedwarn if no integer
304 type fits all enumerators and default to
305 widest_integer_literal_type_node in that case. Otherwise pedwarn
306 for type wider than intmax_t.
307 (build_enumerator): pedwarn for enumerators outside the range of
308 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
309 enumerators outside the range of int. On overflow, attempt to
310 find a wider type that can hold the value of the next enumerator.
311 Do not convert value to type determined with
312 c_common_type_for_size.
314 2022-10-14 Jakub Jelinek <jakub@redhat.com>
316 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
319 2022-10-14 Joseph Myers <joseph@codesourcery.com>
321 * c-decl.cc (build_compound_literal): Add parameter scspecs.
322 Handle storage class specifiers.
323 * c-parser.cc (c_token_starts_compound_literal)
324 (c_parser_compound_literal_scspecs): New.
325 (c_parser_postfix_expression_after_paren_type): Add parameter
326 scspecs. Call pedwarn_c11 for use of storage class specifiers.
327 Update call to build_compound_literal.
328 (c_parser_cast_expression, c_parser_sizeof_expression)
329 (c_parser_alignof_expression): Handle storage class specifiers for
330 compound literals. Update calls to
331 c_parser_postfix_expression_after_paren_type.
332 (c_parser_postfix_expression): Update syntax comment.
333 * c-tree.h (build_compound_literal): Update prototype.
334 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
335 register compound literal.
337 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
339 * c-decl.cc (flexible_array_member_type_p): New function.
340 (one_element_array_type_p): Likewise.
341 (zero_length_array_type_p): Likewise.
342 (add_flexible_array_elts_to_size): Call new utility
343 routine flexible_array_member_type_p.
344 (is_flexible_array_member_p): New function.
345 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
347 2022-10-06 Joseph Myers <joseph@codesourcery.com>
349 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
351 (c_keyword_starts_typename, c_token_starts_declspecs)
352 (c_parser_declspecs, c_parser_objc_selector): Handle
354 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
355 Distinguish typeof for C2x from __typeof__ for all standard
356 versions and typeof before C2x.
357 * c-typeck.cc (build_function_call_vec): Use unqualified version
358 of non-void return type.
359 (build_unary_op): Use unqualified type for increment and
362 2022-10-06 Jakub Jelinek <jakub@redhat.com>
364 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
365 call for holds clause on assume construct.
367 2022-10-06 Jakub Jelinek <jakub@redhat.com>
370 * c-parser.cc (handle_assume_attribute): New function.
371 (c_parser_declaration_or_fndef): Handle assume attribute.
372 (c_parser_attribute_arguments): Add assume_attr argument,
373 if true, parse first argument as conditional expression.
374 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
375 c_parser_attribute_arguments callers.
376 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
379 2022-10-04 Jakub Jelinek <jakub@redhat.com>
381 * c-lang.h (struct c_omp_declare_target_attr): New type.
382 (current_omp_declare_target_attribute): Change type from
383 int to vec<c_omp_declare_target_attr, va_gc> *.
384 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
385 If last pushed directive was begin declare target, use different
386 wording and simplify format strings for easier translations.
387 (c_parser_omp_clause_device_type): Uncomment
388 check_no_duplicate_clause call.
389 (c_parser_omp_declare_target): Adjust for the
390 current_omp_declare_target_attribute type change, push { -1 }.
391 Use error_at rather than warning_at for declare target with
392 only device_type clauses.
393 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
394 (c_parser_omp_begin): Add begin declare target support.
395 (c_parser_omp_end): Adjust for the
396 current_omp_declare_target_attribute type change, adjust
397 diagnostics wording and simplify format strings for easier
399 * c-decl.cc (current_omp_declare_target_attribute): Change type from
400 int to vec<c_omp_declare_target_attr, va_gc> *.
401 (c_decl_attributes): Adjust for the
402 current_omp_declare_target_attribute type change. If device_type
403 was present on begin declare target, add "omp declare target host"
404 and/or "omp declare target nohost" attributes.
406 2022-09-29 Joseph Myers <joseph@codesourcery.com>
408 * c-decl.cc (handle_std_noreturn_attribute): New function.
409 (std_attribute_table): Add _Noreturn and noreturn.
411 2022-09-27 Jakub Jelinek <jakub@redhat.com>
413 * c-lang.h (current_omp_begin_assumes): Declare.
414 * c-parser.cc: Include bitmap.h.
415 (c_parser_omp_end_declare_target): Rename to ...
416 (c_parser_omp_end): ... this. Handle also end assumes.
417 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
418 c_parser_omp_assumes, c_parser_omp_assume): New functions.
419 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
420 without corresponding #pragma omp end assumes.
421 (c_parser_pragma): Use %s in may only be used at file scope
422 diagnostics to decrease number of translatable messages. Handle
423 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
424 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
425 for it rather than c_parser_omp_end_declare_target.
426 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
427 * c-decl.cc (current_omp_begin_assumes): Define.
429 2022-09-24 Jakub Jelinek <jakub@redhat.com>
432 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
433 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
434 t2 have different types.
436 2022-09-22 David Malcolm <dmalcolm@redhat.com>
439 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
440 (c_parser_cast_expression): Likewise.
441 (c_parser_alignof_expression): Likewise.
442 (c_parser_postfix_expression_after_paren_type): Likewise.
443 (c_parser_postfix_expression_after_primary): Likewise.
444 (c_parser_expression): Likewise.
445 (c_parser_omp_variable_list): Likewise.
446 (c_parser_transaction_expression): Likewise.
447 * c-tree.h (c_expr::set_error): Likewise.
448 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
449 (parser_build_unary_op): Likewise.
450 (parser_build_binary_op): Likewise.
451 (digest_init): Likewise.
452 (pop_init_level): Likewise.
453 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
455 2022-09-19 Marek Polacek <polacek@redhat.com>
458 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
461 2022-09-15 Richard Biener <rguenther@suse.de>
463 * c-decl.cc (build_void_list_node): Remove.
465 2022-09-14 Julian Brown <julian@codesourcery.com>
467 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
470 2022-09-07 Joseph Myers <joseph@codesourcery.com>
472 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
473 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
474 for C2x spellings of keywords.
475 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
477 2022-09-06 Jakub Jelinek <jakub@redhat.com>
479 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
480 in omp_cur_iteration - 1 has integer_type_node type.
482 2022-09-03 Jakub Jelinek <jakub@redhat.com>
484 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
485 (c_parser_omp_clause_depend_sink): Renamed to ...
486 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
487 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
488 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
489 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
490 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
491 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
492 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
493 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
494 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
495 (c_parser_omp_clause_doacross): New function.
496 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
497 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
498 OMP_CLAUSE_DEPEND_SOURCE.
499 (c_parser_omp_for_loop): Don't diagnose here linear clause together
500 with ordered with argument.
501 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
503 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
504 (c_parser_omp_ordered): Handle also doacross and adjust for it
506 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
507 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
509 2022-09-02 David Malcolm <dmalcolm@redhat.com>
512 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
513 (c_parser_expr_no_commas): Likewise.
514 (c_parser_conditional_expression): Likewise.
515 (c_parser_binary_expression): Clear m_decimal when popping the
517 (c_parser_unary_expression): Clear ret.m_decimal.
518 (c_parser_has_attribute_expression): Likewise for result.
519 (c_parser_predefined_identifier): Likewise for expr.
520 (c_parser_postfix_expression): Likewise for expr.
521 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
523 * c-tree.h (c_expr::m_decimal): New bitfield.
524 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
525 (parser_build_binary_op): Call check_for_xor_used_as_pow.
527 2022-09-01 Joseph Myers <joseph@codesourcery.com>
529 * c-decl.cc (grokparms): Handle () in a function declaration the
530 same as (void) for C2X.
532 2022-08-31 Joseph Myers <joseph@codesourcery.com>
534 * c-parser.cc (c_parser_label): Pass attributes to do_case.
535 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
538 2022-08-26 Jakub Jelinek <jakub@redhat.com>
540 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
542 2022-08-25 Marek Polacek <polacek@redhat.com>
544 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
545 Give a better diagnostic when converting to nullptr_t.
546 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
548 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
549 (c_parser_postfix_expression): Handle RID_NULLPTR.
550 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
552 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
553 (build_conditional_expr): Handle the case when the second/third operand
554 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
555 (convert_for_assignment): Handle converting an expression of type
556 nullptr_t to pointer/bool.
557 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
558 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
560 2022-08-25 Joseph Myers <joseph@codesourcery.com>
562 * c-decl.cc (start_decl): Do not diagnose initialization of
563 variable-sized objects here.
564 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
566 (c_parser_initializer): Diagnose initialization of variable-sized
567 objects other than with braced initializer.
568 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
569 braces and update diagnostic text. Diagnose initialization of
570 variable-sized objects with nonempty braces.
571 * c-typeck.cc (digest_init): Update diagnostic for initialization
572 of variable-sized objects.
573 (really_start_incremental_init, set_designator)
574 (process_init_element): Update comments.
575 (pop_init_level): Allow scalar empty initializers.
577 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
578 Chung-Lin Tang <cltang@codesourcery.com>
581 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
582 instead of removed langhook.
583 * c-typeck.cc (c_finish_omp_clauses): Likewise.
585 2022-08-11 Marek Polacek <polacek@redhat.com>
588 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
589 Call suppress_warning.
590 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
591 (c_parser_omp_declare_reduction): Pass omp_priv down to
592 c_parser_initializer.
594 2022-08-08 Tom Honermann <tom@honermann.net>
596 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
597 of CPP_UTF8STRING when char8_t support is enabled.
598 * c-typeck.cc (digest_init): Allow initialization of an array
599 of character type by a string literal with type array of
602 2022-08-01 David Malcolm <dmalcolm@redhat.com>
604 * c-typeck.cc (build_c_cast): Quote names of address spaces in
606 (convert_for_assignment): Add a note to address space mismatch
607 diagnostics, specifying the expected and actual types.
609 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
611 PR preprocessor/97498
612 * c-parser.cc (c_parser_pragma): Set input_location to the
613 location of the pragma, rather than the start of the line.
615 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
616 Chung-Lin Tang <cltang@codesourcery.com>
617 Thomas Schwinge <thomas@codesourcery.com>
619 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
620 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
621 OMP_REQUIRES_TARGET_USED.
622 (c_parser_omp_requires): Remove sorry.
624 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
626 * c-parser.cc (c_parser_omp_target_enter_data,
627 c_parser_omp_target_exit_data): Accept tofrom
628 map-type modifier but use 'to' / 'from' internally.
630 2022-06-16 David Malcolm <dmalcolm@redhat.com>
632 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
633 group the warning with any note.
634 (warn_about_goto): Likewise to group error or warning with note.
635 Bail out if the warning wasn't emitted, to avoid emitting orphan
637 (lookup_label_for_goto): Add auto_diagnostic_group to
638 group the error with the note.
639 (check_earlier_gotos): Likewise.
640 (c_check_switch_jump_warnings): Likewise for any error/warning.
641 Conditionalize emission of the notes.
642 (diagnose_uninitialized_cst_member): Likewise for warning,
643 conditionalizing emission of the note.
644 (grokdeclarator): Add auto_diagnostic_group to group the "array
645 type has incomplete element type" error with any note.
646 (parser_xref_tag): Add auto_diagnostic_group to group warnings
647 with their notes. Conditionalize emission of notes.
648 (start_struct): Add auto_diagnostic_group to group the
649 "redefinition of" errors with any note.
650 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
651 (check_for_loop_decls): Likewise for pre-C99 error.
653 2022-06-07 Jakub Jelinek <jakub@redhat.com>
655 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
656 style linear clause modifiers. Set
657 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
658 old style modifiers are used.
659 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
660 with val modifier on simd or for if the old style modifiers are
663 2022-06-02 David Malcolm <dmalcolm@redhat.com>
665 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
666 (c_get_sarif_source_language): New.
667 * c-tree.h (c_get_sarif_source_language): New decl.
669 2022-05-31 Jason Merrill <jason@redhat.com>
671 * Make-lang.in (c.tags): Look at *.cc.
673 2022-05-31 Jakub Jelinek <jakub@redhat.com>
675 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
678 2022-05-28 Jakub Jelinek <jakub@redhat.com>
680 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
681 seen first, use "%<to%>" or "%<enter%>" depending on
682 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
683 "%<to%> or %<enter%>" wording.
685 2022-05-27 Jakub Jelinek <jakub@redhat.com>
687 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
688 (c_parser_omp_all_clauses): For to clause on declare target, use
689 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
690 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
691 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
692 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
693 OMP_CLAUSE_TO_DECLARE.
694 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
695 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
696 name in diagnostics instead of
697 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
699 2022-05-25 Jakub Jelinek <jakub@redhat.com>
702 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
703 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
704 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
705 diagnostic and fixit hint if DATUM has pointer type.
706 * c-parser.cc (c_parser_postfix_expression,
707 c_parser_omp_variable_list): Adjust build_component_ref callers.
708 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
711 2022-05-24 Jakub Jelinek <jakub@redhat.com>
714 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
716 2022-05-18 Marek Polacek <polacek@redhat.com>
719 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
721 * c-tree.h (comptypes_check_enum_int): Declare.
722 * c-typeck.cc (comptypes): No longer static.
724 2022-05-17 Marek Polacek <polacek@redhat.com>
726 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
729 2022-05-17 Jakub Jelinek <jakub@redhat.com>
731 * c-parser.cc (c_parser_omp_clause_depend): Parse
732 inoutset depend-kind.
733 (c_parser_omp_depobj): Likewise.
735 2022-05-16 Martin Liska <mliska@suse.cz>
737 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
739 2022-05-12 Jakub Jelinek <jakub@redhat.com>
741 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
743 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
744 in postfix expressions.
745 (c_parser_omp_variable_list): Handle omp_all_memory in depend
747 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
748 keyword in depend clause as null_pointer_node, diagnose invalid
751 2022-05-09 Martin Liska <mliska@suse.cz>
753 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
755 (c_parser_binary_expression): Likewise.
757 2022-05-07 Marek Polacek <polacek@redhat.com>
761 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
763 2022-04-08 Jakub Jelinek <jakub@redhat.com>
766 * c-typeck.cc (c_build_va_arg): Reject function types.
768 2022-03-22 Marek Polacek <polacek@redhat.com>
772 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
773 (start_init): Set it.
774 (finish_init): Restore constructor_designated.
775 (push_init_level): Set constructor_designated to the value of
776 constructor_designated in the upper constructor_stack.
778 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
781 * c-typeck.cc (handle_omp_array_sections_1)
782 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
783 instead of 'c_omp_map_clause_name'.
785 2022-03-09 Joseph Myers <joseph@codesourcery.com>
787 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
788 differently from earlier standards for unprototyped function type
791 2022-03-09 Jakub Jelinek <jakub@redhat.com>
794 * c-fold.cc (c_fully_fold_internal): Don't emit
795 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
796 * c-typeck.cc (build_binary_op): Likewise.
798 2022-03-07 Jakub Jelinek <jakub@redhat.com>
800 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
803 2022-02-23 Richard Biener <rguenther@suse.de>
805 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
806 SSA names without definition.
807 (c_parser_gimple_declaration): Handle pointer typed SSA names.
809 2022-02-17 Jakub Jelinek <jakub@redhat.com>
812 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
813 convert_lvalue_to_rvalue and build_indirect_ref instead of
814 build_simple_mem_ref.
816 2022-02-11 Richard Biener <rguenther@suse.de>
818 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
821 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
823 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
825 (c_parser_omp_variable_list): Handle array sections.
826 (c_parser_omp_clause_has_device_addr): Added.
827 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
829 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
831 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
832 (c_finish_omp_clauses): Handle array sections.
834 2022-02-09 Jakub Jelinek <jakub@redhat.com>
837 * c-parser.cc (c_parser_postfix_expression)
838 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
839 instead of build1_loc to build PAREN_EXPR.
840 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
841 * c-fold.cc (c_fully_fold_internal): Likewise.
843 2022-01-17 Martin Liska <mliska@suse.cz>
845 * Make-lang.in: Rename .c names to .cc.
846 * c-convert.cc: Likewise.
847 * c-decl.cc (struct lang_identifier): Likewise.
848 (pop_scope): Likewise.
849 (finish_decl): Likewise.
850 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
851 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
852 * c-parser.h (GCC_C_PARSER_H): Likewise.
853 * c-tree.h (c_keyword_starts_typename): Likewise.
854 (finish_declspecs): Likewise.
855 (c_get_alias_set): Likewise.
856 (enum c_oracle_request): Likewise.
857 (tag_exists_p): Likewise.
858 (set_c_expr_source_range): Likewise.
859 * c-typeck.cc (c_common_type): Likewise.
860 (c_finish_omp_clauses): Likewise.
861 * config-lang.in: Likewise.
863 2022-01-17 Martin Liska <mliska@suse.cz>
865 * c-aux-info.c: Moved to...
866 * c-aux-info.cc: ...here.
867 * c-convert.c: Moved to...
868 * c-convert.cc: ...here.
869 * c-decl.c: Moved to...
870 * c-decl.cc: ...here.
871 * c-errors.c: Moved to...
872 * c-errors.cc: ...here.
873 * c-fold.c: Moved to...
874 * c-fold.cc: ...here.
875 * c-lang.c: Moved to...
876 * c-lang.cc: ...here.
877 * c-objc-common.c: Moved to...
878 * c-objc-common.cc: ...here.
879 * c-parser.c: Moved to...
880 * c-parser.cc: ...here.
881 * c-typeck.c: Moved to...
882 * c-typeck.cc: ...here.
883 * gccspec.c: Moved to...
884 * gccspec.cc: ...here.
885 * gimple-parser.c: Moved to...
886 * gimple-parser.cc: ...here.
888 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
890 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
892 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
895 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
896 outer node for ARRAY_REFs.
898 2022-01-01 Jakub Jelinek <jakub@redhat.com>
901 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
902 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
904 2021-12-17 Marek Polacek <polacek@redhat.com>
907 * c-decl.c (c_warn_unused_attributes): Don't warn for
909 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
910 arguments when the attribute is ignored.
912 2021-12-14 Jakub Jelinek <jakub@redhat.com>
915 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
916 consume the pragma and silently skip to the pragma eol.
918 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
920 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
921 * c-parser.c: Likewise.
923 2021-12-09 Jakub Jelinek <jakub@redhat.com>
926 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
927 to resort_data.new_value.
929 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
931 * c-parser.c (struct omp_dim): New struct type for use inside
932 c_parser_omp_variable_list.
933 (c_parser_omp_variable_list): Allow multiple levels of array and
934 component accesses in array section base-pointer expression.
935 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
936 c_parser_omp_var_list_parens.
937 (c_parser_omp_clause_from): Likewise.
938 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
939 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
941 (c_finish_omp_clauses): Extend allowed ranged of expressions
942 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
944 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
947 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
948 call to c_parser_omp_variable_list to 'true'.
949 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
951 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
953 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
955 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
956 orphan loop" checking.
958 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
959 Thomas Schwinge <thomas@codesourcery.com>
961 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
962 OpenACC gang reductions.
964 2021-11-30 Richard Biener <rguenther@suse.de>
966 * gimple-parser.c (c_parser_gimple_postfix_expression):
967 avoid unreachable code after break.
969 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
972 * Make-lang.in: Use ETAGS variable in TAGS target.
974 2021-11-29 Richard Biener <rguenther@suse.de>
976 * c-typeck.c (c_tree_equal): Remove unreachable return.
977 * c-parser.c (get_matching_symbol): Likewise.
979 2021-11-23 Jakub Jelinek <jakub@redhat.com>
981 * c-typeck.c (c_clone_omp_udr): Don't initialize
982 id.transform_lang_insert_block.
984 2021-11-19 Martin Sebor <msebor@redhat.com>
988 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
989 code resulting from macro expansion.
991 2021-11-19 Martin Liska <mliska@suse.cz>
994 2021-11-19 Martin Liska <mliska@suse.cz>
996 * c-parser.c (add_debug_begin_stmt): Use option directly.
998 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1000 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1001 * c-parser.c (c_parser_postfix_expression): Likewise.
1003 2021-11-18 Martin Liska <mliska@suse.cz>
1005 * c-parser.c (add_debug_begin_stmt): Use option directly.
1007 2021-11-17 Martin Sebor <msebor@redhat.com>
1010 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1011 bounds before deciding if they're constant.
1013 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1015 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1016 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1018 2021-11-11 Jakub Jelinek <jakub@redhat.com>
1020 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1021 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1022 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1023 OMP_CLAUSE_NUM_TEAMS_EXPR.
1024 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1025 combined target teams even lower-bound expression.
1027 2021-11-11 Richard Biener <rguenther@suse.de>
1029 * gimple-parser.c: Shuffle bitmap.h include.
1031 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1034 * c-convert.c (c_convert): New function, based on convert.
1035 (convert): Make into wrapper of c_convert.
1036 (convert_init): New function.
1037 * c-typeck.c (enum impl_conv): Add ic_init_const.
1038 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1039 new argument to convert_and_check call.
1040 (digest_init): Pass ic_init_const to convert_for_assignment for
1041 initializers required to be constant.
1043 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1045 * c-tree.h (c_simulate_record_decl): Declare.
1046 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1047 * c-decl.c (c_simulate_record_decl): New function.
1049 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1052 * Make-lang.in: Add dummy c.install-dvi target.
1054 2021-10-15 Richard Biener <rguenther@suse.de>
1058 (c_parser_gimple_postfix_expression_after_primary): Check
1059 for a pointer do be dereferenced by ->.
1061 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1063 * c-parser.c (c_finish_omp_declare_variant): Change call from
1064 c_omp_check_context_selector to omp_check_context_selector. Change
1065 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1067 2021-10-09 Jakub Jelinek <jakub@redhat.com>
1069 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1070 (c_parser_omp_scan_loop_body): Use it.
1071 (c_parser_omp_sections_scope): Likewise.
1073 2021-10-07 Richard Biener <rguenther@suse.de>
1075 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1077 2021-10-05 Richard Biener <rguenther@suse.de>
1080 * gimple-parser.c (c_parser_gimple_postfix_expression):
1081 Accept more address _Literals.
1083 2021-10-04 Marek Polacek <polacek@redhat.com>
1086 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1088 2021-10-01 Martin Sebor <msebor@redhat.com>
1091 * c-typeck.c (maybe_warn_for_null_address): New function.
1092 (build_binary_op): Call it.
1094 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1095 Richard Biener <rguenther@suse.de>
1098 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1099 for division even for SANITIZE_SI_OVERFLOW.
1101 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1103 * c-parser.c (c_parser_omp_clause_order): Set
1104 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1106 2021-09-28 Andrew Pinski <apinski@marvell.com>
1109 * c-parser.c (c_parser_statement_after_labels): Pass
1110 the c_expr instead of the tree to c_finish_goto_ptr.
1111 * c-typeck.c (c_finish_goto_ptr): Change the second
1112 argument type to c_expr.
1113 * c-tree.h (c_finish_goto_ptr): Likewise.
1114 Error out if the expression was not of a pointer type.
1116 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1118 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1121 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1123 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1124 and reproducible modifiers.
1125 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1127 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1129 * c-parser.c (c_parser_omp_clause_default): Handle private and
1130 firstprivate arguments, adjust diagnostics on unknown argument.
1132 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1134 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1137 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1139 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1140 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1141 don't call build_conditional_expr, instead build a COND_EXPR directly.
1142 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1143 if omp_atomic_lhs even in more cases for >, < or ==.
1144 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1145 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1146 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1147 * c-typeck.c (build_binary_op): For flag_openmp only handle
1150 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1152 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1155 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1157 * c-decl.c (enum deprecated_states): Add unavailable state.
1158 (merge_decls): Copy unavailability.
1159 (quals_from_declspecs): Handle unavailable case.
1160 (start_decl): Amend the logic handling suppression of nested
1161 deprecation states to include unavailability.
1162 (smallest_type_quals_location): Amend comment.
1163 (grokdeclarator): Handle the unavailable deprecation state.
1164 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1165 * c-tree.h (struct c_declspecs): Add unavailable_p.
1166 * c-typeck.c (build_component_ref): Handle unavailability.
1167 (build_external_ref): Likewise.
1169 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1170 Joseph Myers <joseph@codesourcery.com>
1173 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1174 types of both (non-function) decls as error_mark_node, so that the
1175 middle-end can see the code is malformed.
1176 (free_attr_access_data): Don't process if the type has been set to
1179 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1181 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1182 and 'ancestor' in 'target device' clauses.
1184 2021-08-23 Jakub Jelinek <jakub@redhat.com>
1186 * c-parser.c (c_parser_omp_clause_num_tasks,
1187 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1189 2021-08-22 Martin Uecker <muecker@gwdg.de>
1192 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1193 for pointers to arrays with qualifiers.
1194 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1195 to arrays when the other pointer is a void pointer. Update warnings.
1196 (convert_for_assignment): Update warnings for C2X when converting from
1197 void* with qualifiers to a pointer to array with the same qualifiers.
1199 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1201 * c-parser.c (c_parser_omp_error): New function.
1202 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1204 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1206 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1207 comma at the end of list.
1208 (c_parser_omp_requires): Likewise.
1210 2021-08-19 Jakub Jelinek <jakub@redhat.com>
1212 * c-parser.c (c_parser_omp_requires): Don't call
1213 c_parser_peek_2nd_token and optionally consume token if current
1214 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1216 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1218 * c-parser.c (c_parser_omp_nothing): New function.
1219 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1221 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1223 * c-parser.c (c_parser_statement_after_labels): Add restart label
1224 near the start of the function. If c_parser_pragma returns false,
1226 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1227 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1228 return what c_parser_omp_declare returned. Return true instead of
1229 false after emitting errors that the directive is not allowed in
1230 pragma_stmt context.
1231 (c_parser_omp_ordered): Return true instead of
1232 false after emitting errors that the directive is not allowed in
1233 pragma_stmt context.
1234 (c_parser_omp_target_update): Likewise.
1235 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1236 Change return type from tree to bool, return false if the
1237 directive should be ignored in pragma_stmt contexts.
1238 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1239 return their result directly.
1240 (c_parser_omp_cancellation_point): Change return type from void to
1241 bool, return false if the directive should be ignored in pragma_stmt
1243 (c_parser_omp_declare): Likewise.
1245 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1247 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1248 (c_parser_omp_scope): New function.
1249 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1251 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1253 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1254 (c_parser_omp_clause_filter): New function.
1255 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1256 (OMP_MASKED_CLAUSE_MASK): Define.
1257 (c_parser_omp_masked): New function.
1258 (c_parser_omp_parallel): Handle parallel masked.
1259 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1260 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1262 2021-08-12 Martin Uecker <muecker@gwdg.de>
1266 * c-typeck.c (c_expr_sizeof_type): Evaluate
1267 size expressions for structs of variable size.
1269 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
1271 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1272 'primary' as alias for 'master'.
1274 2021-08-10 Martin Uecker <muecker@gwdg.de>
1277 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1278 size expressions for structs of variable size.
1280 2021-08-06 Tamar Christina <tamar.christina@arm.com>
1282 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1283 * c-tree.h (c_simulate_enum_decl): Likewise.
1285 2021-08-06 Martin Sebor <msebor@redhat.com>
1287 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1288 vec arguments to by-reference.
1289 (c_finish_omp_declare_simd): Same.
1290 (c_parser_compound_statement_nostart): Same.
1291 (c_parser_for_statement): Same.
1292 (c_parser_objc_methodprotolist): Same.
1293 (c_parser_oacc_routine): Same.
1294 (c_parser_omp_for_loop): Same.
1295 (c_parser_omp_declare_simd): Same.
1297 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1298 Joseph Myers <joseph@codesourcery.com>
1299 Cesar Philippidis <cesar@codesourcery.com>
1301 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1302 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1303 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1304 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1306 2021-07-20 Martin Sebor <msebor@redhat.com>
1308 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1310 * c-typeck.c (c_build_function_call_vec): Same.
1312 2021-07-15 Martin Sebor <msebor@redhat.com>
1316 * c-decl.c (get_parm_array_spec): Strip nops.
1318 2021-07-06 Martin Sebor <msebor@redhat.com>
1320 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1322 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1325 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1326 appears before a CPP_NAME.
1328 2021-06-25 Martin Sebor <msebor@redhat.com>
1330 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1331 warning_suppressed_p, suppress_warning, and copy_no_warning.
1332 (diagnose_mismatched_decls): Same.
1333 (duplicate_decls): Same.
1334 (grokdeclarator): Same.
1335 (finish_function): Same.
1336 (c_write_global_declarations_1): Same.
1337 * c-fold.c (c_fully_fold_internal): Same.
1338 * c-parser.c (c_parser_expr_no_commas): Same.
1339 (c_parser_postfix_expression): Same.
1340 * c-typeck.c (array_to_pointer_conversion): Same.
1341 (function_to_pointer_conversion): Same.
1342 (default_function_array_conversion): Same.
1343 (convert_lvalue_to_rvalue): Same.
1344 (default_conversion): Same.
1345 (build_indirect_ref): Same.
1346 (build_function_call_vec): Same.
1347 (build_atomic_assign): Same.
1348 (build_unary_op): Same.
1349 (c_finish_return): Same.
1350 (emit_side_effect_warnings): Same.
1351 (c_finish_stmt_expr): Same.
1352 (c_omp_clause_copy_ctor): Same.
1354 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1357 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1360 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1363 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1366 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1368 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1369 C_ORT_OMP for clauses on target construct.
1370 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1371 (c_parser_omp_target): For non-combined target add
1372 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1373 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1374 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1375 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1376 never present on C_ORT_*DECLARE_SIMD.
1377 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1378 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1379 corresponding map clauses.
1381 2021-06-21 Jakub Jelinek <jakub@redhat.com>
1383 PR inline-asm/100785
1384 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1385 bit-fields addressable.
1387 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1389 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1392 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
1395 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1396 var in the error case.
1398 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1401 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1402 spot built-in functions.
1404 2021-06-06 Jakub Jelinek <jakub@redhat.com>
1407 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1408 even when target is combined with other constructs.
1410 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1413 * c-decl.c (finish_struct): Fix thinko in previous change.
1414 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1415 assignment and initialization for storage order purposes if the
1416 RHS is a call to a DECL_IS_MALLOC function.
1418 2021-06-04 Martin Sebor <msebor@redhat.com>
1421 * c-objc-common.c (print_type): Handle erroneous types.
1423 2021-06-03 Jakub Jelinek <jakub@redhat.com>
1426 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1427 after depend only cases.
1429 2021-05-31 Richard Biener <rguenther@suse.de>
1432 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1433 * c-parser.c (c_parser_postfix_expression): Likewise.
1435 2021-05-28 Richard Biener <rguenther@suse.de>
1438 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1439 invalid if conditions.
1441 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1444 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1445 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1446 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1447 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1448 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1449 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1450 if present in map_head, map_field_head or map_firstprivate_head
1453 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1455 * c-parser.c (c_parser_omp_clause_affinity): New.
1456 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1457 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1458 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1459 c_finish_omp_clauses): Likewise.
1461 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1464 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1465 field with a differing scalar storage order.
1467 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1470 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1471 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1472 if a decl is mentioned both in map clause and in such firstprivate
1473 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1475 2021-05-19 Jakub Jelinek <jakub@redhat.com>
1478 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1479 master when combined with taskloop.
1480 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1481 parallel master when not combined with taskloop.
1483 2021-05-18 Richard Biener <rguenther@suse.de>
1486 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1487 Diagnose calls to non-functions.
1488 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1490 2021-05-17 Richard Biener <rguenther@suse.de>
1493 * gimple-parser.c (c_parser_gimple_label): Avoid building
1494 a GIMPLE label with NULL label decl.
1496 2021-05-13 Martin Sebor <msebor@redhat.com>
1499 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1501 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1503 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1506 2021-05-10 Martin Liska <mliska@suse.cz>
1508 * c-aux-info.c (affix_data_type): Use startswith
1509 function instead of strncmp.
1510 * c-typeck.c (build_function_call_vec): Likewise.
1511 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1513 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1515 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1516 on the address of a pointer field in a record with reverse SSO.
1518 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1520 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1521 for || and && reductions.
1523 2021-04-29 Joseph Myers <joseph@codesourcery.com>
1525 * c-typeck.c (function_types_compatible_p): For C2X, treat
1526 unprototyped function as compatible with non-variadic prototyped
1527 function even if some argument types are changed by the default
1528 argument promotions.
1530 2021-04-15 Martin Sebor <msebor@redhat.com>
1534 * c-decl.c (pushdecl): Always propagate type attribute.
1536 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1539 * c-typeck.c (c_common_type): Do not drop attributes that
1540 affect type identity.
1542 2021-04-10 Jakub Jelinek <jakub@redhat.com>
1545 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1548 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1551 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1554 2021-03-19 Jakub Jelinek <jakub@redhat.com>
1557 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1558 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1560 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1561 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1562 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1564 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
1567 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1568 ensure that the varpool node is marked as offloadable.
1570 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1573 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1575 2021-02-24 Martin Sebor <msebor@redhat.com>
1578 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1580 2021-02-18 Jakub Jelinek <jakub@redhat.com>
1583 * c-typeck.c (c_finish_return): Don't wrap retval into
1584 EXCESS_PRECISION_EXPR in functions that return void.
1586 2021-02-11 Marek Polacek <polacek@redhat.com>
1588 * c-parser.c (c_parser_if_statement): Use vec_free.
1590 2021-02-04 Martin Sebor <msebor@redhat.com>
1593 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1594 (diagnose_mismatched_decls): Same.
1595 (start_function): Introduce temporaries for better readability.
1596 * c-typeck.c (comptypes_internal): Only consider complete enum
1597 types in comparisons with integers.
1599 2021-02-01 Martin Sebor <msebor@redhat.com>
1602 * c-decl.c (free_attr_access_data): New function.
1603 (c_parse_final_cleanups): Call free_attr_access_data.
1605 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1607 * c-parser.c (c_parser_omp_clause_detach): New.
1608 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1609 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1610 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1611 clause. Prevent use of detach with mergeable and overriding the
1612 data sharing mode of the event handle.
1614 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1616 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1617 unqualified element type and then call c_build_qualified_type on the
1620 2021-01-07 Richard Biener <rguenther@suse.de>
1622 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1623 reallocate loop array if it is too small.
1625 2020-12-16 Martin Uecker <muecker@gwdg.de>
1628 * c-typeck.c (build_modify_expr): Drop qualifiers.
1630 2020-12-16 Martin Uecker <muecker@gwdg.de>
1633 * c-parser.c (c_parser_expression): Look into
1634 nop expression when marking expressions as read.
1636 2020-12-14 Martin Liska <mliska@suse.cz>
1639 * c-typeck.c (pointer_diff): Do not emit a top-level
1641 (build_binary_op): Likewise.
1643 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1645 * c-parser.c (c_parser_omp_allocate): New.
1646 (c_parser_omp_construct): Call it.
1648 2020-12-09 Richard Biener <rguenther@suse.de>
1651 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1654 2020-12-07 Martin Uecker <muecker@gwdg.de>
1657 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1658 that drops qualifiers to the end of the function.
1660 2020-11-26 Martin Uecker <muecker@gwdg.de>
1664 * c-parser.c (c_parser_declaration_or_fndef): Remove
1665 redundant code to drop qualifiers of _Atomic types for __auto_type.
1666 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1667 types for __typeof__.
1669 2020-11-24 Jakub Jelinek <jakub@redhat.com>
1672 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1673 expressions, use make_node instead of build2 to avoid checking build2
1676 2020-11-23 Joseph Myers <joseph@codesourcery.com>
1679 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1680 for comparisons of complete and incomplete pointers.
1682 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1684 * c-aux-info.c (gen_type): Support opaque types.
1686 2020-11-20 Martin Sebor <msebor@redhat.com>
1689 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1691 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1694 * Make-lang.in (c.serial): Change from goal to a variable.
1695 (.PHONY): Drop c.serial.
1697 2020-11-20 Martin Uecker <muecker@gwdg.de>
1699 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1701 2020-11-19 Jakub Jelinek <jakub@redhat.com>
1704 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1707 2020-11-18 Jakub Jelinek <jakub@redhat.com>
1709 * Make-lang.in (c.serial): New goal.
1710 (.PHONY): Add c.serial c.prev.
1711 (cc1$(exeext)): Call LINK_PROGRESS.
1713 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1715 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1717 * c-typeck.c (build_asm_expr): Remove an assert checking output
1718 absence for asm goto.
1720 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1722 * c-typeck.c (c_finish_omp_clauses): Don't clear
1723 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1725 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1728 * c-parser.c (c_parser_objc_class_definition): Pass the
1729 location of the class name to the interface declaration.
1731 2020-11-10 Strager Neds <strager.nds@gmail.com>
1733 * c-decl.c (merge_decls): Use new overload of
1734 set_decl_section_name.
1736 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1738 * c-parser.c (c_parser_omp_target_data): Add use of
1739 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1740 handled map clause kind.
1741 (c_parser_omp_target_enter_data): Likewise.
1742 (c_parser_omp_target_exit_data): Likewise.
1743 (c_parser_omp_target): Likewise.
1744 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1745 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1746 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1747 same struct field access to co-exist on OpenMP construct.
1749 2020-11-07 Martin Uecker <muecker@gwdg.de>
1751 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1752 (c_parser_all_labels): Likewise.
1754 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1756 * c-parser.c (c_parser_objc_at_property_declaration):
1757 Improve parsing fidelity. Associate better location info
1758 with @property attributes. Clean up the interface to
1759 objc_add_property_declaration ().
1761 2020-11-06 Nathan Sidwell <nathan@acm.org>
1763 * c-decl.c (diagnose_mismatched_decls): Rename
1764 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1765 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1766 (collect_source_refs): Likewise.
1767 * c-typeck.c (inform_declaration, inform_for_arg)
1768 (convert_for_assignment): Likewise.
1770 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
1772 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1774 (c_parser_omp_construct): Update call.
1776 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1779 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1780 find underlying decl to clear in the aligned_head bitmap.
1782 2020-11-04 Joseph Myers <joseph@codesourcery.com>
1784 * c-decl.c (handle_nodiscard_attribute): New.
1785 (std_attribute_table): Add nodiscard.
1786 * c-parser.c (c_parser_std_attribute): Expect argument to
1787 nodiscard attribute to be a string. Do not special-case ignoring
1789 * c-typeck.c (maybe_warn_nodiscard): New.
1790 (build_compound_expr, emit_side_effect_warnings): Call
1791 maybe_warn_nodiscard.
1792 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1793 emit_side_effect_warnings if warn_unused_result.
1795 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
1797 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1799 (finish_init): Likewise.
1800 (pop_init_level): Likewise.
1802 2020-10-28 Joseph Myers <joseph@codesourcery.com>
1804 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1805 error_at for omitted parameter name.
1807 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1809 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1810 (c_parser_omp_clause_allocate): New function.
1811 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1812 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1813 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1814 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1815 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1816 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1817 PRAGMA_OMP_CLAUSE_ALLOCATE.
1818 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1820 2020-10-27 Joseph Myers <joseph@codesourcery.com>
1822 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1823 standard attributes.
1825 2020-10-23 Marek Polacek <polacek@redhat.com>
1828 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1829 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1830 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1831 * c-tree.h (char_type_p): Declare.
1832 * c-typeck.c (char_type_p): No longer static.
1834 2020-10-23 Martin Sebor <msebor@redhat.com>
1837 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1839 2020-09-19 Martin Sebor <msebor@redhat.com>
1842 * c-decl.c (lookup_last_decl): Define new function.
1843 (c_decl_attributes): Call it.
1844 (start_decl): Add argument and use it.
1845 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1846 (get_parm_array_spec): Define new function.
1847 (push_parm_decl): Call get_parm_array_spec.
1848 (start_function): Call warn_parm_array_mismatch. Build attribute
1849 access and add it to current function.
1850 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1851 in forms of array parameters.
1852 * c-tree.h (start_decl): Add argument.
1854 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1856 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1858 (in_statement): New.
1859 (start_function): Adjust for above change.
1860 (c_push_function_context, c_pop_function_context): Likewise.
1861 * c-lang.h (struct language_function): Likewise.
1862 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1863 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1865 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1866 (c_parser_switch_statement): Adjust break/switch context handling
1867 and calls to renamed functions.
1868 (c_parser_while_statement): Adjust break/switch context handling and
1870 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1871 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1872 (c_parser_omp_for_loop): Adjust break/switch context handling.
1873 * c-tree.h (c_break_label, c_cont_label): Delete.
1874 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1875 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1876 (in_statement, switch_statement_break_seen_p): Declare.
1877 (c_start_case, c_finish_case): Renamed to...
1878 (c_start_switch, c_finish_switch).
1879 (c_finish_bc_stmt): Adjust arguments.
1880 * c-typeck.c (build_function_call_vec): Don't try to print
1881 statements with %qE format.
1882 (struct c_switch): Rename switch_expr field to switch_stmt.
1883 Add break_stmt_seen_p field.
1884 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1885 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1886 (do_case): Update for changes to struct c_switch.
1887 (c_finish_case): Rename to c_finish_switch. Update for changes to
1888 struct c_switch and change of representation from SWITCH_EXPR to
1890 (c_finish_loop): Delete.
1891 (c_finish_bc_stmt): Update to reflect changes to break/continue
1892 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1893 of a GOTO_EXPR except for objc foreach loops.
1895 2020-09-01 Jakub Jelinek <jakub@redhat.com>
1898 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1901 2020-08-28 Martin Sebor <msebor@redhat.com>
1904 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1907 2020-08-27 Martin Liska <mliska@suse.cz>
1909 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1910 growth function to true.
1912 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
1915 * c-typeck.c (handle_omp_array_sections_1): Talk about
1916 array function parameter in the error message.
1918 2020-08-18 Jakub Jelinek <jakub@redhat.com>
1921 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1922 to int, holding index of the match. Call mark_exp_read on the selector
1923 expression and on expressions other than the selected one.
1925 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1928 * c-typeck.c (process_init_element): Split test for whether to
1929 recurse into a record, union or array into...
1930 (initialize_elementwise_p): ...this new function. Don't recurse
1931 into a vector type if the initialization value is also a vector.
1933 2020-07-31 Richard Biener <rguenther@suse.de>
1936 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1937 Define to c_common_finalize_early_debug.
1939 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1941 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1942 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1943 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1945 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1948 * c-decl.c (finish_decl): Call target hook
1949 lower_local_decl_alignment to lower local decl alignment.
1951 2020-07-09 Julian Brown <julian@codesourcery.com>
1952 Thomas Schwinge <thomas@codesourcery.com>
1955 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1956 for standalone attach/detach clauses.
1958 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1960 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1961 set, warn for conversion between pointers that point to incompatible
1962 scalar storage orders.
1964 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1966 * c-parser.c (c_parser_statement_after_labels): Pass correct
1967 parameters to c_parser_do_statement.
1969 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1971 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1973 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1974 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1976 * c-tree.h (c_in_omp_for): Declare.
1977 * c-typeck.c (c_in_omp_for): Define.
1978 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1979 (digest_init): Likewise.
1980 (build_binary_op): Likewise.
1982 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1984 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1985 from kind by comma rather than colon.
1987 2020-06-05 Mark Wielaard <mark@klomp.org>
1989 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1990 an undeclared builtin, then add a fixit header hint, if found.
1991 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1992 warning_at about implicit builtin declaration type mismatch.
1994 2020-06-03 Mark Wielaard <mark@klomp.org>
1996 * c-parser.c (struct c_parser): Add seen_string_literal
1998 (c_parser_consume_token): Reset seen_string_literal.
1999 (c_parser_error_richloc): Add name_hint if seen_string_literal
2000 and next token is a CPP_NAME and we have a missing header
2001 suggestion for the name.
2002 (c_parser_string_literal): Set seen_string_literal.
2004 2020-06-03 Mark Wielaard <mark@klomp.org>
2006 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2007 scope with matching_parens after CPP_OPEN_PAREN.
2009 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2011 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2013 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2015 * Make-lang.in: Remove extra slash.
2017 2020-05-19 Martin Liska <mliska@suse.cz>
2019 * c-parser.c: Fix typo.
2021 2020-05-14 Jakub Jelinek <jakub@redhat.com>
2023 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2025 2020-05-07 Richard Biener <rguenther@suse.de>
2028 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2031 2020-04-30 Jakub Jelinek <jakub@redhat.com>
2034 * c-decl.c (set_labels_context_r): In addition to context-less
2035 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2036 parent function if any.
2037 (store_parm_decls): Adjust comment.
2039 2020-04-19 Jakub Jelinek <jakub@redhat.com>
2042 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2043 two CPP_COLON tokens.
2045 2020-04-17 Jakub Jelinek <jakub@redhat.com>
2048 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2051 2020-04-15 Jakub Jelinek <jakub@redhat.com>
2054 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2055 requires directive when not at file scope.
2057 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
2060 * c-decl.c (c_check_in_current_scope): New function.
2061 * c-tree.h (c_check_in_current_scope): Declare it.
2062 * c-parser.c (c_parser_oacc_declare): Add check that variables
2063 are declared in the same scope as the directive. Fix handling
2066 2020-04-07 Jakub Jelinek <jakub@redhat.com>
2069 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2070 if c_parser_omp_master succeeded.
2072 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2074 PR gcov-profile/94029
2076 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2077 the function_start_locus location. Don't do that afterwards for the
2078 __GIMPLE body parsing.
2080 2020-03-19 Jakub Jelinek <jakub@redhat.com>
2082 PR gcov-profile/94029
2083 * c-tree.h (finish_function): Add location_t argument defaulted to
2085 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2086 set it to the locus of closing } if non-NULL.
2087 (c_parser_compound_statement_nostart): Return locus of closing }.
2088 (c_parser_parse_rtl_body): Likewise.
2089 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2091 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2092 input_location to set function_end_locus.
2094 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2097 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2098 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2099 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2100 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2102 (finish_incomplete_vars): New function, moved from finish_struct. Use
2103 relayout_decl instead of layout_decl.
2104 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2105 being TYPE_VFIELD. Use finish_incomplete_vars.
2106 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2107 finish_incomplete_vars.
2108 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2109 also on ENUMERAL_TYPEs.
2111 2020-03-16 Jakub Jelinek <jakub@redhat.com>
2114 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2116 2020-03-13 Martin Sebor <msebor@redhat.com>
2119 * c-decl.c (builtin_structptr_type_count): New constant.
2120 (match_builtin_function_types): Reject decls that are incompatible
2121 in types pointed to by pointers.
2122 (diagnose_mismatched_decls): Adjust comments.
2124 2020-03-05 Joseph Myers <joseph@codesourcery.com>
2127 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2128 empty when initialized type is error_mark_node.
2129 (set_designator, process_init_element): Ignore initializers for
2130 elements of a variable-size type or of error_mark_node.
2132 2020-03-01 Martin Sebor <msebor@redhat.com>
2135 * c-decl.c (types_close_enough_to_match): New function.
2136 (match_builtin_function_types):
2137 (diagnose_mismatched_decls): Add missing inform call to a warning.
2139 2020-03-01 Martin Sebor <msebor@redhat.com>
2142 * c-typeck.c (build_functype_attribute_variant): New function.
2143 (composite_type): Call it.
2145 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2148 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2149 Rename last argument from probablity to probability.
2151 2020-02-13 Jakub Jelinek <jakub@redhat.com>
2154 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2155 *expr if it has side effects.
2157 2020-01-30 Jeff Law <law@redhat.com>
2160 * c-parser.c (c_parser_switch_statement): Make sure to request
2161 marking the switch expr as used.
2163 2020-01-22 Joseph Myers <joseph@codesourcery.com>
2166 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2167 argument with integer operands.
2169 2020-01-16 Kerem Kat <keremkat@gmail.com>
2172 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2173 to support 4 available tokens.
2175 2020-01-15 Joseph Myers <joseph@codesourcery.com>
2178 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2179 determine whether to set DECL_CONTEXT.
2181 2020-01-13 Joseph Myers <joseph@codesourcery.com>
2184 * c-typeck.c (build_c_cast): Check for expressions with integer
2185 operands that can occur in an unevaluated part of an integer
2186 constant expression and call note_integer_operands as needed.
2188 2019-01-08 Richard Biener <rguenther@suse.de>
2191 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2194 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2196 Update copyright years.
2198 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2200 * c-decl.c (collect_source_ref_cb): Delete.
2201 (for_each_global_decl): Rename into...
2202 (collect_source_refs): ...this. Call collect_source_ref directly.
2203 (c_parse_final_cleanups): Always call collect_source_ref on the main
2206 2019-12-19 Julian Brown <julian@codesourcery.com>
2207 Cesar Philippidis <cesar@codesourcery.com>
2209 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2211 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2212 Allow deref (->) in variable lists if true.
2213 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2214 Pass to c_parser_omp_variable_list.
2215 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2216 call to c_parser_omp_variable_list.
2217 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2218 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2219 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2220 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2221 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2222 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2223 and detach. Support deref.
2224 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2225 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2226 (c_oacc_check_attachments): New function.
2227 (c_finish_omp_clauses): Check attach/detach arguments for being
2228 pointers using above. Support deref.
2230 2019-12-19 Julian Brown <julian@codesourcery.com>
2231 Maciej W. Rozycki <macro@codesourcery.com>
2232 Tobias Burnus <tobias@codesourcery.com>
2233 Thomas Schwinge <thomas@codesourcery.com>
2235 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2236 (c_parser_oacc_data_clause): Likewise.
2237 (c_parser_oacc_all_clauses): Likewise.
2238 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2239 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2240 PRAGMA_OACC_CLAUSE_NO_CREATE.
2241 * c-typeck.c (handle_omp_array_sections): Support
2244 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2246 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2247 Replace label_text ctor calls.
2249 2019-12-04 Joseph Myers <joseph@codesourcery.com>
2253 * c-typeck.c (convert_lvalue_to_rvalue): Call
2254 require_complete_type for arguments not of void types.
2255 (build_indirect_ref): Do not diagnose dereferencing pointers to
2257 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2259 2019-12-03 Joseph Myers <joseph@codesourcery.com>
2262 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2263 old-style parameter definitions.
2265 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2269 * c-decl.c (flexible_array_type_p): Move to common code.
2271 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2273 * c-decl.c (start_decl): Allow initialization of variables whose
2274 size is a POLY_INT_CST.
2275 (finish_decl): Use verify_type_context to check whether the target
2276 allows variables with a particular type to have static or thread-local
2277 storage duration. Don't raise a second error if such variables do
2278 not have a constant size.
2279 (grokdeclarator): Use verify_type_context to check whether the
2280 target allows fields or array elements to have a particular type.
2281 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2282 the target allows pointer difference for the types involved.
2283 (build_unary_op): Likewise for pointer increment and decrement.
2285 2019-11-29 Joseph Myers <joseph@codesourcery.com>
2287 * c-parser.c (struct c_parser): Add members raw_tokens and
2289 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2290 using previously-lexed raw tokens.
2291 (c_parser_peek_nth_token_raw)
2292 (c_parser_check_balanced_raw_token_sequence): New functions.
2293 (c_parser_nth_token_starts_std_attributes): Use
2294 c_parser_check_balanced_raw_token_sequence for Objective-C.
2296 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2299 * c-decl.c (finish_declspecs): Use int instead of decimal
2300 floating-point types if decimal floating-point not supported.
2302 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2304 * c-tree.h (struct c_declarator): Use a structure for id member.
2305 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2306 declarators at the start, not when handling individual declarators
2307 later. Use u.id.id instead of u.id.
2308 (grokfield): Use u.id.id instead of u.id.
2309 (build_id_declarator): Set u.id.id and u.id.attrs.
2310 (finish_declspecs): Handle postfix attributes in case of typedef
2311 name or typeof used.
2312 * c-parser.c (c_parser_direct_declarator)
2313 (c_parser_direct_declarator_inner): Place declarator for
2314 attributes inside that for function or array, not outside. Set
2315 u.id.attrs for identifiers.
2316 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2317 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2320 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2323 * c-decl.c (identifier_global_tag): Define.
2325 2019-11-20 Richard Biener <rguenther@suse.de>
2328 * c-decl.c (grokdeclarator): Prevent inlining of nested
2329 function with VLA arguments.
2331 2019-11-20 Joseph Myers <joseph@codesourcery.com>
2333 * c-decl.c (c_warn_type_attributes): New function.
2334 (groktypename, grokdeclarator, finish_declspecs): Call
2335 c_warn_type_attributes before applying attributes to types.
2336 * c-tree.h (c_warn_type_attributes): Declare.
2338 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2340 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2341 standard attributes.
2342 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2343 pedwarn for unknown standard attributes and return error_mark_node
2346 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2348 * c-parser.c (c_parser_parse_rtl_body): Always call
2349 run_rtl_passes, even if startwith pass is not provided.
2351 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2353 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2354 duplicate standard attributes.
2356 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2358 * c-decl.c (std_attribute_table): Add maybe_unused.
2360 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2362 * c-decl.c (std_attribute_table): Add fallthrough.
2363 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2364 attribute at top level.
2366 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2368 * c-decl.c (std_attribute_table): New.
2369 (c_init_decl_processing): Register attributes from
2370 std_attribute_table.
2371 * c-parser.c (c_parser_attribute_arguments): Add arguments
2372 require_string and allow_empty_args. All callers changed.
2373 (c_parser_std_attribute): Set require_string argument for
2374 "deprecated" attribute.
2376 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2378 * c-parser.c (c_parser_postfix_expression)
2379 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2380 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2382 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2384 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2385 of build_same_sized_truth_vector_type.
2386 (build_vec_cmp): Likewise.
2388 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2390 * c-parser.c (c_parser_omp_context_selector): Don't require score
2391 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2394 * c-parser.c (c_parser_omp_context_selector): Rename
2395 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2396 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2397 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2398 and string literals.
2400 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2402 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2403 ctsk_tagfirstref_attrs.
2404 (struct c_declspecs): Update description of attrs. Add
2405 postfix_attrs and non_std_attrs_seen_p. Increase size of
2406 typespec_kind bit-field.
2407 (c_warn_unused_attributes): New declaration.
2408 (parser_xref_tag): Update prototype.
2409 * c-decl.c (c_warn_unused_attributes): New function.
2410 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2411 ctsk_tagref_attrs. Handle attribute declarations.
2412 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2413 (grokdeclarator): Handle standard attributes.
2414 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2415 attributes to incomplete type reference.
2416 (xref_tag): Update call to parser_xref_tag.
2417 (declspecs_add_addrspace, declspecs_add_type)
2418 (declspecs_add_scspec, declspecs_add_attrs): Set
2419 non_std_attrs_seen_p.
2420 (finish_declspecs): Apply postfix standard attributes to type.
2421 * c-parser.c (c_token_starts_declspecs)
2422 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2423 (c_parser_next_tokens_start_declaration): Update comments.
2424 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2425 parser->tokens[2] to parser->tokens[1].
2426 (c_parser_nth_token_starts_std_attributes)
2427 (c_parser_std_attribute_specifier_sequence): New functions.
2428 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2429 attrs. All callers changed. Handle standard attributes.
2430 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2431 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2432 All callers changed.
2433 (c_parser_declspecs): Add arguments start_std_attr_ok and
2434 end_std_attr_ok. All callers changed. Handle standard
2436 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2437 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2438 (c_parser_compound_statement_nostart, c_parser_all_labels)
2439 (c_parser_label, c_parser_statement, c_parser_for_statement):
2440 Handle standard attributes.
2441 * c-parser.h (c_parser_declspecs): Update prototype.
2442 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2445 2019-11-12 Martin Liska <mliska@suse.cz>
2447 * gimple-parser.c: Do not include params.h.
2449 2019-11-12 Martin Liska <mliska@suse.cz>
2451 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2452 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2455 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2456 Frederik Harwath <frederik@codesourcery.com>
2459 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2460 (c_parser_oacc_kernels_parallel): Rename function to...
2461 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2462 (c_parser_omp_construct): Update accordingly.
2465 2019-11-11 Jakub Jelinek <jakub@redhat.com>
2467 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2468 without corresponding end declare target.
2470 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2472 * c-convert.c (convert): Only handle vector conversions if one of
2473 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2475 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2476 vectors satisfy gnu_vector_type_p.
2477 (build_unary_op): Only allow unary operators to be applied to
2478 vectors if they satisfy gnu_vector_type_p.
2479 (digest_init): Only allow by-element initialization of vectors
2480 if they satisfy gnu_vector_type_p.
2481 (really_start_incremental_init): Likewise.
2482 (push_init_level): Likewise.
2483 (pop_init_level): Likewise.
2484 (process_init_element): Likewise.
2485 (build_binary_op): Only allow binary operators to be applied to
2486 vectors if they satisfy gnu_vector_type_p.
2488 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2490 * c-decl.c (grokparms): Convert () in a function definition to
2492 (store_parm_decls_oldstyle): Pedwarn for C2x.
2493 (store_parm_decls): Update comment about () not generating a
2496 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2498 * c-parser.c (c_parser_attribute_arguments): New function.
2499 Factored out of c_parser_gnu_attribute.
2500 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2501 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2502 (c_parser_std_attribute_specifier): New functions.
2503 (c_parser_transaction_attributes): Use
2504 c_parser_std_attribute_specifier.
2506 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2508 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2509 lex_joined_string and translate_strings_p.
2510 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2512 (c_parser_string_literal): New function.
2513 (c_parser_static_assert_declaration_no_semi): Use
2514 c_parser_string_literal. Do not set lex_untranslated_string.
2515 (c_parser_asm_string_literal): Use c_parser_string_literal.
2516 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2517 (c_parser_gnu_attributes): Set and restore translate_strings_p
2518 instead of lex_untranslated_string.
2519 (c_parser_asm_statement): Do not set lex_untranslated_string.
2520 (c_parser_asm_operands): Likewise.
2521 (c_parser_has_attribute_expression): Set and restore
2522 translate_strings_p instead of lex_untranslated_string.
2523 (c_parser_postfix_expression): Use c_parser_string_literal.
2524 (pragma_lex): Likewise.
2525 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2526 (c_parse_file): Set translate_strings_p.
2527 * gimple-parser.c (c_parser_gimple_postfix_expression)
2528 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2529 * c-parser.c (c_parser_string_literal): Declare function.
2531 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2533 * c-parser.c (c_finish_omp_declare_variant): Use
2534 omp_get_context_selector instead of c_omp_get_context_selector.
2536 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2538 * c-tree.h (c_simulate_enum_decl): Declare.
2539 * c-decl.c (c_simulate_enum_decl): New function.
2540 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2542 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2544 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2545 * c-decl.c (c_simulate_builtin_function_decl): New function.
2546 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2549 2019-10-28 Martin Sebor <msebor@redhat.com>
2552 * c-decl.c (names_builtin_p): Define a new function.
2554 2019-10-28 Richard Biener <rguenther@suse.de>
2557 * gimple-parser.c (c_parser_parse_gimple_body): Make
2558 current_bb the entry block initially to easier recover
2560 (c_parser_gimple_compound_statement): Adjust.
2562 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2564 * c-parser.c (c_finish_omp_declare_variant): Use
2565 omp_context_selector_matches instead of
2566 c_omp_context_selector_matches.
2567 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2568 attribute in between declare target and end declare target
2571 2019-10-15 Joseph Myers <joseph@codesourcery.com>
2573 * c-parser.c (c_parser_attribute_any_word): Rename to
2574 c_parser_gnu_attribute_any_word. All callers changed.
2575 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2577 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2579 (c_parser_declaration_or_fndef, c_parser_declspecs)
2580 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2581 (c_parser_struct_declaration, c_parser_declarator)
2582 (c_parser_gnu_attribute, c_parser_compound_statement)
2583 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2584 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2585 attribute-related syntax productions.
2587 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2589 * c-objc-common.c (useful_aka_type_p): Replace with...
2590 (get_aka_type): ...this new function. Given the original type,
2591 decide which aka type to print (if any). Only look through typedefs
2592 if user_facing_original_type_p.
2593 (print_type): Update accordingly.
2595 2019-10-14 Jakub Jelinek <jakub@redhat.com>
2597 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2598 into int NESTED, if it is 2, diagnose missing commas in between
2600 (c_parser_omp_context_selector): Pass 2 as last argument to
2601 c_parser_omp_all_clauses.
2603 2019-10-12 Jakub Jelinek <jakub@redhat.com>
2605 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2606 For simd properties, put them directly into TREE_VALUE.
2607 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2608 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2609 add "omp declare variant base" attribute rather than
2610 "omp declare variant".
2612 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2614 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2616 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2618 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2619 true, terminate processing on closing paren and don't skip to end of
2621 (c_parser_omp_declare_simd): Handle also declare variant.
2622 (omp_construct_selectors, omp_device_selectors,
2623 omp_implementation_selectors, omp_user_selectors): New variables.
2624 (c_parser_omp_context_selector,
2625 c_parser_omp_context_selector_specification,
2626 c_finish_omp_declare_variant): New functions.
2627 (c_finish_omp_declare_simd): Handle both declare simd and
2629 (c_parser_omp_declare): Handle declare variant.
2631 2019-10-02 Joseph Myers <joseph@codesourcery.com>
2633 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2636 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2638 * c-objc-common.c (useful_aka_type_p): New function.
2639 (print_type): Use it to decide whether an aka type is worth printing.
2641 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2644 * c-parser.c (c_parser_predefined_identifier): New function.
2645 (c_parser_postfix_expression): Use it.
2646 (c_parser_omp_variable_list): Parse predefined identifiers.
2647 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2648 in shared and firstprivate clauses, even when they are predetermined
2651 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2653 * c-typeck.c (build_function_call_vec): Take the original function
2654 decl as an optional final parameter. Pass all built-in calls to
2655 check_builtin_function_arguments.
2657 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2660 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2661 of identifiers in the external scope only for variables and functions.
2663 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2666 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2668 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2671 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2672 after determining that the first token is not
2673 PRAGMA_GCC_PCH_PREPROCESS.
2675 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2677 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2678 FUNCTION_DECL to the right value in the presence of nested declarators.
2680 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2683 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2685 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2688 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2689 of a built_in_function.
2690 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2692 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2694 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2695 (c_parser_omp_clause_device_type): New function.
2696 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2697 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2698 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2699 diagnostics for declare target with clauses nested in clause-less
2700 declare target declaration-definition-seq.
2701 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2703 2019-08-09 Jakub Jelinek <jakub@redhat.com>
2705 * c-parser.c (check_no_duplicate_clause): Simplify using
2707 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2708 directive name modifiers.
2709 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2712 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2713 check_no_duplicate_clause call. Comment it out, instead emit a
2714 warning for duplicate dist_schedule clauses.
2716 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2718 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2720 2019-08-08 Jakub Jelinek <jakub@redhat.com>
2722 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2723 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2724 instead of generic_head to track duplicates.
2726 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2728 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2729 (c_parser_omp_clause_use_device_addr): New function.
2730 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2731 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2732 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2733 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2734 map or use_device_* clauses.
2735 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2736 in OpenMP, require pointer type rather than pointer or array type.
2737 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2739 2019-07-31 Jakub Jelinek <jakub@redhat.com>
2742 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2743 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2746 2019-07-25 Martin Liska <mliska@suse.cz>
2747 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2750 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2752 2019-07-25 Martin Liska <mliska@suse.cz>
2754 * c-decl.c (merge_decls): Use new macros
2755 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2757 2019-07-23 Richard Biener <rguenther@suse.de>
2759 PR tree-optimization/83518
2760 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2761 a CFG also rebuild cgraph edges.
2763 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2765 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2766 (c_parser_omp_clause_bind): New function.
2767 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2768 (OMP_LOOP_CLAUSE_MASK): Define.
2769 (c_parser_omp_loop): New function.
2770 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2771 loop combined with parallel or teams.
2772 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2773 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2775 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2778 * c-decl.c (finish_function): Check targetm.warn_func_return
2779 before issuing a -Wreturn-type warning.
2781 2019-07-12 Alexandre Oliva <oliva@adacore.com>
2783 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2784 (c_parser_compound_statement): Call it.
2786 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2788 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2789 (c_parser_omp_clause_order): New function.
2790 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2791 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2792 PRAGMA_OMP_CLAUSE_ORDER.
2793 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2795 2019-07-10 Richard Biener <rguenther@suse.de>
2797 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2798 _Literal (int *) &x for address literals.
2800 2019-07-09 Martin Sebor <msebor@redhat.com>
2803 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2805 (field_decl_cmp): Same.
2806 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2808 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2810 2019-07-09 Martin Sebor <msebor@redhat.com>
2813 * c-decl.c: Change class-key from class to struct and vice versa
2814 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2815 * gimple-parser.c: Same.
2817 2019-07-01 Richard Biener <rguenther@suse.de>
2819 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2820 _Literal (char *) &"foo" for address literals pointing to
2823 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2825 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2826 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2827 C incompatibility if alternate "__intN__" form is used.
2829 2019-06-24 Martin Sebor <msebor@redhat.com>
2831 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2833 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2835 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2836 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2837 (c_parser_omp_scan_loop_body): New function.
2838 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2839 inscan reduction clauses.
2840 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2841 non-inscan reductions on the same construct, or inscan reductions with
2842 ordered or schedule clauses, or inscan array reductions.
2844 2019-06-05 Martin Sebor <msebor@redhat.com>
2847 * c-typeck.c (c_finish_return): Only consider functions returning
2848 pointers as candidates for -Wreturn-local-addr.
2850 2019-06-05 Martin Sebor <msebor@redhat.com>
2852 * c-decl.c (start_decl): Adjust quoting and hyphenation
2854 (finish_decl): Same.
2855 (finish_enum): Same.
2856 (start_function): Same.
2857 (declspecs_add_type): Same.
2858 * c-parser.c (warn_for_abs): Same.
2859 * c-typeck.c (build_binary_op): Same.
2861 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2864 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2865 marked with an OpenACC 'routine' directive.
2868 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2869 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2872 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2873 clauses from "omp declare target" attribute.
2875 2019-05-16 Martin Sebor <msebor@redhat.com>
2877 * c-decl.c (start_decl): Quote keywords, operators, and
2878 types in diagnostics.
2879 (finish_decl): Same.
2880 * c-parser.c (c_parser_asm_statement): Same.
2881 (c_parser_conditional_expression): Same.
2882 (c_parser_transaction_cancel): Same.
2883 * c-typeck.c (c_common_type): Same.
2884 (build_conditional_expr): Same.
2885 (digest_init): Same.
2886 (process_init_element): Same.
2887 (build_binary_op): Same.
2889 2019-05-17 Richard Biener <rguenther@suse.de>
2891 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2892 (c_parser_gimple_unary_expression): Likewise.
2893 (c_parser_gimple_parentized_ternary_expression): New function.
2895 2019-05-16 Richard Biener <rguenther@suse.de>
2897 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2898 (c_parser_gimple_unary_expression): Likewise.
2900 2019-05-15 Richard Biener <rguenther@suse.de>
2902 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2905 2019-05-14 Richard Biener <rguenther@suse.de>
2907 * gimple-parser.c (c_parser_gimple_statement): Remove
2908 questionable auto-promotion to VIEW_CONVERT_EXPR.
2909 (c_parser_gimple_typespec): Split out from __MEM parsing.
2910 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2911 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2912 as __VIEW_CONVERT with -gimple.
2914 2019-05-09 Martin Liska <mliska@suse.cz>
2916 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2918 (c_parser_gimple_unary_expression): Parse also binary expression
2920 (c_parser_gimple_parentized_binary_expression): New function.
2922 2019-05-09 Martin Liska <mliska@suse.cz>
2924 * gimple-parser.c (struct gimple_parser): Add probability.
2925 for gimple_parser_edge.
2926 (gimple_parser::push_edge): Add new argument probability.
2927 (c_parser_gimple_parse_bb_spec): Parse also probability
2929 (c_parser_parse_gimple_body): Set edge probability.
2930 (c_parser_gimple_compound_statement): Consume token
2931 before calling c_parser_gimple_goto_stmt.
2933 (c_parser_gimple_statement): Pass new argument.
2934 (c_parser_gimple_goto_stmt): Likewise.
2935 (c_parser_gimple_if_stmt): Likewise.
2936 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2937 * c-parser.c (c_parser_declaration_or_fndef): Pass
2938 hot_bb_threshold argument.
2939 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2941 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2943 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2946 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2947 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2948 (c_parser_do_statement): Likewise.
2949 (c_parser_for_statement): Likewise. Formatting fixes.
2950 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2951 emit DEBUG_BEGIN_STMTs if needed.
2953 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2956 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2957 (c_start_case): Don't clear it.
2958 (do_case): Adjust c_add_case_label caller.
2959 (c_finish_case): Adjust c_do_switch_warnings caller.
2962 * c-decl.c (merge_decls): If remove is main variant and
2963 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2964 variant that has newdecl as TYPE_NAME if any.
2966 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2969 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2970 don't try to remove it from the variant list, but instead assert
2973 2019-04-01 Richard Biener <rguenther@suse.de>
2976 * c-tree.h (c_get_alias_set): Declare.
2977 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2978 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2979 as the underlying integer type.
2981 2019-03-19 Martin Sebor <msebor@redhat.com>
2983 PR tree-optimization/89688
2984 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2985 kinds of initializers.
2987 2019-03-19 Jakub Jelinek <jakub@redhat.com>
2990 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2991 return type even if quals_used is 0. Formatting fixes.
2993 2019-03-14 Richard Biener <rguenther@suse.de>
2995 * c-tree.h (enum c_declspec_il): New.
2996 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2998 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2999 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3000 (c_parser_declspecs): Adjust.
3001 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3002 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3004 (struct gimple_parser): New.
3005 (gimple_parser::push_edge): New method.
3006 (c_parser_gimple_parse_bb_spec): New helper.
3007 (c_parser_parse_gimple_body): Get start pass and IL specification.
3008 Initialize SSA and CFG.
3009 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3010 Build a gimple_parser parsing state and pass it along.
3011 (c_parser_gimple_statement): Change intermittend __PHI internal
3012 function argument for the edge.
3013 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3014 (c_parser_gimple_goto_stmt): Record edges to build.
3015 (c_parser_gimple_if_stmt): Likewise.
3016 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3017 (c_parser_gimple_or_rtl_pass_list): Likewise.
3019 2019-03-11 Martin Liska <mliska@suse.cz>
3021 * c-decl.c (check_for_loop_decls): Wrap an option name
3022 in a string format message and fix GNU coding style.
3023 * c-parser.c (c_parser_declspecs): Likewise.
3025 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3027 PR tree-optimization/89550
3028 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3030 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3031 or warning returned true.
3033 2019-02-28 Jakub Jelinek <jakub@redhat.com>
3036 * c-typeck.c (convert_arguments): Call inform_declaration only if
3037 the previous warning_at call returned true.
3039 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3041 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3042 parameter. Adjust all users.
3043 (c_parser_oacc_simple_clause): Replace parser with loc formal
3044 parameter. Adjust all users.
3046 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
3049 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3050 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3052 2019-02-15 Jakub Jelinek <jakub@redhat.com>
3055 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3056 before c_decl_attributes rather than after it.
3058 2019-02-06 Jakub Jelinek <jakub@redhat.com>
3061 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3062 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3063 instead of 3 nested ifs.
3065 2019-02-06 Joseph Myers <joseph@codesourcery.com>
3068 * c-decl.c (finish_decl): Do not complete array types for arrays
3069 with external linkage not at file scope.
3071 2019-02-05 Richard Biener <rguenther@suse.de>
3074 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3075 all type variants when not supported.
3077 2019-01-30 Jakub Jelinek <jakub@redhat.com>
3080 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3081 * c-decl.c (decl_jump_unsafe): Return false for
3082 C_DECL_COMPOUND_LITERAL_P decls.
3083 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3085 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3088 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3092 * c-decl.c (last_fileptr_type): Remove.
3093 (last_structptr_types): New variable.
3094 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3095 {old,new}rettype instead of the types themselves. Assert
3096 last_structptr_types array has the same number of elements
3097 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3098 argument oldtype and newtype. Instead of handling
3099 just fileptr_type_node specially, handle all builtin_structptr_types
3100 pointer nodes. Formatting fix.
3102 2019-01-24 Martin Sebor <msebor@redhat.com>
3107 * c-decl.c (match_builtin_function_types): Add arguments.
3108 (diagnose_mismatched_decls): Diagnose mismatched declarations
3109 of built-ins more strictly.
3111 2019-01-24 Jakub Jelinek <jakub@redhat.com>
3114 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3115 on #pragma omp cancel with different modifiers.
3117 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3121 * c-typeck.c (convert_for_assignment): Upate the
3122 warn_for_address_or_pointer_of_packed_member call.
3124 2019-01-16 Tom Honermann <tom@honermann.net>
3125 Jason Merrill <jason@redhat.com>
3127 * c-typeck.c (digest_init): Revised the error message produced for
3128 ill-formed cases of array initialization with a string literal.
3129 (error_init): Make variadic.
3131 2019-01-12 Jakub Jelinek <jakub@redhat.com>
3133 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3135 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3138 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3139 if current_function_decl is non-NULL.
3141 2019-01-07 Joseph Myers <joseph@codesourcery.com>
3145 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3146 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3147 functions declared but never defined only for external scope, not
3150 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3153 * c-parser.c (c_parser_postfix_expression): Parse
3154 __builtin_convertvector.
3156 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3158 Update copyright years.
3160 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3163 * c-typeck.c (convert_for_assignment): Call
3164 warn_for_address_or_pointer_of_packed_member.
3166 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3168 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3169 a more specific error message (instead of just falling through).
3171 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3173 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3174 asm qualifier is first seen; use that to give nicer "duplicate asm
3175 qualifier" messages. Delete 'quals" variable, instead pass the
3176 "is_volatile_ flag to build_asm_stmt directly.
3177 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3178 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3180 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3182 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3183 "done" boolean variable.
3185 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3188 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3189 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3190 (build_binary_op): Use struct op_location_t and
3191 class binary_op_rich_location.
3193 2018-12-11 Jakub Jelinek <jakub@redhat.com>
3196 * c-convert.c (convert): Call c_fully_fold before calling
3197 ubsan_instrument_float_cast.
3199 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3201 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3204 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3206 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3207 after asm. Pass a flag for it to build_asm_expr.
3208 * c-tree.h (build_asm_expr): Update declaration.
3209 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3212 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3215 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3216 combination of volatile and goto, in any order, without repetitions.
3218 2018-12-04 James Norris <jnorris@codesourcery.com>
3219 Cesar Philippidis <cesar@codesourcery.com>
3220 Julian Brown <julian@codesourcery.com>
3222 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3225 2018-11-30 Richard Biener <rguenther@suse.de>
3227 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3228 _Literal (type) { ... } as empty aggregate or vector constructor.
3230 2018-11-29 Martin Sebor <msebor@redhat.com>
3233 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3234 (convert_arguments): Add comments. Pass additional argument to
3237 2018-11-29 Martin Sebor <msebor@redhat.com>
3241 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3243 2018-11-23 Martin Sebor <msebor@redhat.com>
3246 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3247 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3249 2018-11-20 Martin Sebor <msebor@redhat.com>
3251 * c-parser.c (c_parser_has_attribute_expression): New function.
3252 (c_parser_attribute): New function.
3253 (c_parser_attributes): Move code into c_parser_attribute.
3254 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3256 2018-11-15 Martin Sebor <msebor@redhat.com>
3259 * c-decl.c (header_for_builtin_fn): Declare.
3260 (diagnose_mismatched_decls): Diagnose declarations of built-in
3261 functions without a prototype.
3262 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3263 (convert_argument): Same.
3264 (convert_arguments): Factor code out into convert_argument.
3265 Detect mismatches between built-in formal arguments in calls
3266 to built-in without prototype.
3267 (build_conditional_expr): Same.
3268 (type_or_builtin_type): New function.
3269 (convert_for_assignment): Add argument. Conditionally issue
3270 warnings instead of errors for mismatches.
3272 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3274 * c-decl.c: Replace "source_location" with "location_t".
3275 * c-tree.h: Likewise.
3276 * c-typeck.c: Likewise.
3277 * gimple-parser.c: Likewise.
3279 2018-11-09 Jakub Jelinek <jakub@redhat.com>
3281 * c-parser.c (c_parser_omp_clause_final): Use
3282 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3283 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3284 parsing instead of c_parser_paren_condition.
3285 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3286 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3287 c_fully_fold instead of c_parser_condition.
3288 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3289 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3290 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3291 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3292 c_parser_expr_no_commas instead of c_parser_expression.
3294 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3295 reduction clause with inscan modifier.
3297 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3298 clauses other than atomic_default_mem_order.
3300 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3302 * c-parser.c: Include memmode.h.
3303 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3304 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3305 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3306 task_reduction clauses.
3307 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3308 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3309 section, or lvalue assignment expression.
3310 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3311 (c_parser_omp_clause_lastprivate): Parse optional
3312 conditional: modifier.
3313 (c_parser_omp_clause_hint): Require constant integer expression rather
3314 than just integer expression.
3315 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3317 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3318 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3319 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3321 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3322 iterators. Parse mutexinoutset and depobj kinds.
3323 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3325 (c_parser_omp_all_clauses): Likewise. Handle
3326 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3327 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3328 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3329 default memory order from requires directive if any. Adjust
3330 c_finish_omp_atomic caller.
3331 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3332 (c_parser_omp_flush): Parse flush with memory-order-clause.
3333 (c_parser_omp_for_loop): Allow NE_EXPR even in
3334 OpenMP loops, adjust c_finish_omp_for caller.
3335 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3336 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3337 Allow to be called while parsing combined parallel master.
3338 Parse combined master taskloop{, simd}.
3339 (c_parser_omp_parallel): Parse combined
3340 parallel master{, taskloop{, simd}} constructs.
3341 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3342 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3343 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3344 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3345 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3346 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3347 around teams body. Use SET_EXPR_LOCATION.
3348 (c_parser_omp_target_data): Allow target data
3349 with only use_device_ptr clauses.
3350 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3351 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3352 (c_parser_omp_requires): New function.
3353 (c_finish_taskloop_clauses): New function.
3354 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3355 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3356 declaration. Disallow in_reduction clause when combined with parallel
3358 (c_parser_omp_construct): Adjust c_parser_omp_master and
3359 c_parser_omp_taskgroup callers.
3360 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3362 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3363 like OMP_CLAUSE_REDUCTION.
3364 (handle_omp_array_sections): Likewise. Call save_expr on array
3365 reductions before calling build_index_type. Handle depend clauses
3367 (struct c_find_omp_var_s): New type.
3368 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3369 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3370 with static, runtime or auto schedule kinds. Call save_expr for whole
3371 array reduction sizes. Diagnose reductions with zero sized elements
3372 or variable length structures. Diagnose nogroup clause used with
3373 reduction clause(s). Handle depend clause with
3374 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3375 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3376 some different type for other kinds. Use build_unary_op with
3377 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3378 Handle depend clauses with iterators. Remove no longer needed special
3379 case that predetermined const qualified vars may be specified in
3380 firstprivate clause. Complain if const qualified vars are mentioned
3381 in data-sharing clauses other than firstprivate or shared. Use
3382 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3383 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3384 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3385 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3387 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3389 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3390 logic for change to name_hint::operator bool.
3391 (undeclared_variable): Likewise.
3392 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3393 (c_parser_parameter_declaration): Likewise.
3395 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3397 * c-errors.c (pedwarn_c11): New function.
3398 * c-parser.c (disable_extension_diagnostics): Save
3399 warn_c11_c2x_compat and set it to 0.
3400 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3401 (c_parser_static_assert_declaration_no_semi): Handle
3402 _Static_assert without string constant.
3403 * c-tree.h (pedwarn_c11): New prototype.
3405 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3407 * Make-lang.in (selftest-c): New.
3408 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3409 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3410 from gcc/Makefile.in.
3412 2018-10-02 Richard Biener <rguenther@suse.de>
3414 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3416 2018-09-26 Joseph Myers <joseph@codesourcery.com>
3419 * c-typeck.c (build_binary_op): Use excess precision for
3420 comparisons of integers and floating-point for C11 and later.
3422 2018-09-26 Martin Jambor <mjambor@suse.cz>
3425 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
3428 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3430 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3431 Update for new param.
3432 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3435 2018-09-17 Martin Jambor <mjambor@suse.cz>
3438 * c-parser.c: (warn_for_abs): New function.
3439 (c_parser_postfix_expression_after_primary): Call it.
3441 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3443 * c-typeck.c (digest_init): Shorten overlength strings.
3445 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3447 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3449 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3451 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3452 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3454 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
3456 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3457 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3459 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3462 * c-decl.c (implicitly_declare): Update call to
3463 maybe_add_include_fixit to suggest overriding the location, as it
3465 * c-objc-common.c (c_tree_printer): Update for conversion of
3466 show_caret_p to a tri-state.
3468 2018-08-27 Martin Liska <mliska@suse.cz>
3470 * c-decl.c (locate_old_decl): Use new function
3471 fndecl_built_in_p and remove check for FUNCTION_DECL if
3473 (diagnose_mismatched_decls): Likewise.
3474 (merge_decls): Likewise.
3475 (warn_if_shadowing): Likewise.
3476 (pushdecl): Likewise.
3477 (implicitly_declare): Likewise.
3478 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3479 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3480 * c-typeck.c (build_function_call_vec): Likewise.
3481 (convert_arguments): Likewise.
3483 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3486 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3487 (diagnose_mismatched_decls): Likewise, in various places.
3488 (warn_if_shadowing): Likewise.
3489 (implicit_decl_warning): Likewise.
3490 (implicitly_declare): Likewise.
3491 (undeclared_variable): Likewise.
3492 (declare_label): Likewise.
3493 (grokdeclarator): Likewise.
3494 (start_function): Likewise.
3495 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3496 (c_parser_parameter_declaration): Likewise.
3497 (c_parser_binary_expression): Likewise.
3498 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3499 (parser_build_binary_op): Likewise.
3500 (build_unary_op): Likewise.
3501 (error_init): Likewise.
3502 (pedwarn_init): Likewise.
3503 (warning_init): Likewise.
3504 (convert_for_assignment): Likewise.
3506 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3508 * c-objc-common.c: Include "gcc-rich-location.h".
3509 (c_tree_printer): Move implemenation of '%T' to...
3510 (print_type): ...this new function.
3511 (range_label_for_type_mismatch::get_text): New function.
3512 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3513 range for the various ic_argpass cases.
3514 (class maybe_range_label_for_tree_type_mismatch): New class.
3515 (build_binary_op): Use it when calling binary_op_error.
3517 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3519 * c-decl.c (start_decl): Do not warn if variables is named as main
3520 and is a local variable.
3522 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3525 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3526 objects of unknown size.
3528 2018-08-13 Martin Sebor <msebor@redhat.com>
3530 PR tree-optimization/71625
3531 * c-parser.c (c_parser_declaration_or_fndef): Call
3532 braced_list_to_string.
3534 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3537 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3540 2018-08-01 Martin Sebor <msebor@redhat.com>
3542 PR tree-optimization/86650
3543 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3544 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3546 2018-08-01 Jakub Jelinek <jakub@redhat.com>
3549 * c-typeck.c (init_field_decl_cmp): New function.
3550 (output_pending_init_elements): Use it for field comparisons
3551 instead of pure bit_position comparisons.
3553 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3555 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3556 type here, instead add "omp declare target implicit" attribute.
3557 (finish_decl): Diagnose vars without mappable type here.
3559 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3560 Thomas Schwinge <thomas@codesourcery.com>
3561 Cesar Philippidis <cesar@codesourcery.com>
3563 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3564 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3565 to their non-present_or_* counterparts. Make 'self' an alias to
3566 PRAGMA_OACC_CLAUSE_HOST.
3567 (c_parser_oacc_data_clause): Update GOMP mappings for
3568 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3569 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3570 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3571 Remove support for present_or_* clauses.
3572 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3573 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3574 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3575 (OACC_DATA_CLAUSE_MASK): Likewise.
3576 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3577 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3578 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3579 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3580 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3582 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3584 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3585 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3586 (c_parser_gimple_unary_expression): Likewise.
3588 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3591 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3592 before doing POINTER_DIFF_EXPR.
3594 2018-06-07 Marek Polacek <polacek@redhat.com>
3597 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3598 for loop initial declarations.
3600 2018-05-30 David Pagan <dave.pagan@oracle.com>
3603 * c-decl.c (grokdeclarator): Update check for return type warnings.
3604 (start_function): Likewise.
3605 (finish_function): Likewise.
3606 * c-typeck.c (c_finish_return): Update check for return type warnings.
3607 Pass OPT_Wreturn_type to pedwarn when appropriate.
3609 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3611 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3614 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3616 * gimple-parser.c: Include internal-fn.h.
3617 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3618 (c_parser_gimple_call_internal): New function.
3619 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3620 Fix typos in comment.
3622 2018-05-10 Jakub Jelinek <jakub@redhat.com>
3625 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3626 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3628 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3629 fold_offsetof_1, pass argtype as TYPE to it and drop the
3632 2018-05-02 David Pagan <dave.pagan@oracle.com>
3635 * c-decl.c (old_style_parameter_scope): New function.
3636 * c-parser.c (c_parser_postfix_expression): Check for statement
3637 expressions in old-style function parameter list declarations.
3638 * c-parser.h (old_style_parameter_scope): New extern declaration.
3640 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3643 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3644 it is not TREE_STATIC.
3645 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3646 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3647 its COMPOUND_LITERAL_EXPR_DECL.
3649 2018-03-21 Joseph Myers <joseph@codesourcery.com>
3651 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3652 where all functions return the same _FloatN or _FloatNx type,
3653 treat integer types as _Float64 instead of double.
3655 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3658 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3659 building vector comparison, diagnose it and return error_mark_node.
3661 2018-03-15 Jakub Jelinek <jakub@redhat.com>
3664 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3665 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3666 INTEGER_TYPE element type.
3668 2018-03-13 David Pagan <dave.pagan@oracle.com>
3671 * c-typeck.c (output_init_element): Ensure field initializer
3672 expression is always evaluated if there are side effects.
3674 2018-03-06 Jakub Jelinek <jakub@redhat.com>
3677 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3678 !building_stmt_list_p ().
3680 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3683 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3684 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3685 and include the BIND_EXPR in the list of things that need to be
3688 2018-02-09 Nathan Sidwell <nathan@acm.org>
3691 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3692 to strict_aliasing_warning.
3694 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3696 * c-typeck.c (really_start_incremental_init, push_init_level,
3697 set_nonincremental_init, output_init_element, process_init_element):
3698 Use DECL_UNNAMED_BIT_FIELD.
3700 2018-01-31 Marek Polacek <polacek@redhat.com>
3703 * c-parser.c (c_parser_compound_statement_nostart): Call
3704 expansion_point_location_if_in_system_header.
3706 2018-01-17 David Malcolm <dmalcolm@redhat.com>
3709 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3712 2018-01-13 Jakub Jelinek <jakub@redhat.com>
3715 * c-tree.h (decl_constant_value_1): Add a bool argument.
3716 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3717 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3718 (decl_constant_value): Adjust caller.
3719 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3720 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3721 decl_constant_value returns initializer that has BLKmode or
3723 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3726 Alan Hayward <alan.hayward@arm.com>
3727 David Sherwood <david.sherwood@arm.com>
3729 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3730 TYPE_VECTOR_SUBPARTS.
3732 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3734 Update copyright years.
3736 2018-01-01 Jakub Jelinek <jakub@redhat.com>
3739 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3740 c_parser_conditional_expression, c_parser_cast_expression,
3741 c_parser_sizeof_expression, c_parser_alignof_expression,
3742 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3743 c_parser_transaction_expression): Use set_error () method instead
3744 of setting value member to error_mark_node.
3746 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3748 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3749 and _Float<N>X built-in functions.
3751 2017-12-22 Jakub Jelinek <jakub@redhat.com>
3754 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3755 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3756 incomplete vars rather than after it.
3759 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3760 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3761 and consider empty ones if there are no other stmts. For
3762 -Wunused-value walk all statements before the one only followed by
3765 2017-12-22 Mike Stump <mikestump@comcast.net>
3766 Eric Botcazou <ebotcazou@adacore.com>
3768 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3769 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3770 (c_parser_do_statement): Likewise.
3771 (c_parser_for_statement): Likewise.
3772 (c_parser_statement_after_labels): Adjust calls to above.
3773 (c_parse_pragma_ivdep): New static function.
3774 (c_parser_pragma_unroll): Likewise.
3775 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3776 <PRAGMA_UNROLL>: New case.
3778 2017-12-19 Jakub Jelinek <jakub@redhat.com>
3780 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3781 perform_integral_promotions, digest_init): Replace Yoda conditions
3782 with typical order conditions.
3783 * c-decl.c (check_bitfield_type_and_width): Likewise.
3785 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3787 * c-typeck.c (c_safe_arg_type_equiv_p,
3788 c_safe_function_type_cast_p): New function.
3789 (build_c_cast): Implement -Wcast-function-type.
3791 2017-12-14 Richard Biener <rguenther@suse.de>
3794 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3795 like REALPART_EXPR for the behavior of whether its operand
3798 2017-12-12 Marek Polacek <polacek@redhat.com>
3801 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3803 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
3805 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3806 * c-parser.c (add_debug_begin_stmt): New.
3807 (c_parser_declaration_or_fndef): Call it.
3808 (c_parser_compound_statement_nostart): Likewise.
3809 (c_parser_statement_after_labels): Likewise.
3810 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3812 2017-12-07 Joseph Myers <joseph@codesourcery.com>
3814 * c-decl.c (build_compound_literal): Add parameter alignas_align
3815 and set alignment of decl if nonzero.
3816 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3817 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3819 (c_parser_struct_declaration): Update syntax comment.
3820 (c_parser_type_name): Add alignas_ok argument and pass it to
3822 (c_parser_cast_expression): Pass true to c_parser_type_name and
3823 give error if a cast used an _Alignas specifier.
3824 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3825 give error if sizeof (type-name) used an _Alignas specifier.
3826 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3827 give error if _Alignof (type-name) used an _Alignas specifier.
3828 (c_parser_postfix_expression_after_paren_type): Check specified
3829 alignment for a compound literal and pass it to
3830 build_compound_literal.
3831 * c-parser.h (c_parser_type_name): Update prototype.
3832 * c-tree.h (build_compound_literal): Update prototype.
3834 2017-12-07 Martin Sebor <msebor@redhat.com>
3837 * c-decl.c (c_decl_attributes): Look up existing declaration and
3838 pass it to decl_attributes.
3840 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3843 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3844 reserved for use by the implementation.
3846 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3848 * c-decl.c: Include "c-family/c-spellcheck.h".
3850 2017-12-05 Martin Liska <mliska@suse.cz>
3851 Jakub Jelinek <jakub@redhat.com>
3853 * c-typeck.c (pointer_diff): Add new argument and instrument
3854 pointer subtraction.
3855 (build_binary_op): Similar for pointer comparison.
3857 2017-12-01 Jakub Jelinek <jakub@redhat.com>
3860 * c-parser.c: Include tree-iterator.h.
3861 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3862 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3866 * c-tree.h (decl_constant_value_1): Declare.
3867 * c-typeck.c (decl_constant_value_1): New function.
3868 (decl_constant_value): Use it.
3869 * c-fold.c (c_fully_fold_internal): If in_init, use
3870 decl_constant_value_1 instead of decl_constant_value.
3872 2017-11-30 Jakub Jelinek <jakub@redhat.com>
3874 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3876 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3879 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3880 c_switch_covers_all_cases_p returns true.
3882 2017-11-28 Julia Koval <julia.koval@intel.com>
3883 Sebastian Peryt <sebastian.peryt@intel.com>
3885 * Make-lang.in (c/c-array-notation.o): Remove.
3886 * c-array-notation.c: Delete.
3887 * c-decl.c: Remove cilkplus condition.
3888 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3889 c_parser_cilk_verify_simd, c_parser_array_notation,
3890 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3891 c_parser_cilk_simd_fn_vector_attrs,
3892 c_finish_cilk_simd_fn_tokens): Delete.
3893 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3894 (c_parser_direct_declarator_inner): Ditto.
3895 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3896 (c_parser_attributes, c_parser_compound_statement,
3897 c_parser_statement_after_labels, c_parser_if_statement,
3898 c_parser_switch_statement, c_parser_while_statement,
3899 c_parser_do_statement, c_parser_for_statement,
3900 c_parser_unary_expression, c_parser_postfix_expression,
3901 c_parser_postfix_expression_after_primary,
3902 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3903 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3905 * c-typeck.c (build_array_ref, build_function_call_vec,
3907 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3908 c_finish_loop, build_binary_op): Remove cilkplus support.
3910 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3912 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3915 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
3917 * Make-lang.in (c.install-plugin): Install backend import library.
3919 2017-11-23 Jakub Jelinek <jakub@redhat.com>
3921 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3922 pragma_stmt context.
3924 2017-11-23 Mike Stump <mikestump@comcast.net>
3925 Eric Botcazou <ebotcazou@adacore.com>
3927 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3929 (c_parser_do_statement): Likewise.
3930 (c_parser_for_statement): Likewise.
3932 2017-11-22 David Malcolm <dmalcolm@redhat.com>
3935 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3936 bool to bool *. Within '%T' handling, if showing an "aka", use
3937 "quoted" param to add appropriate quoting.
3939 2017-11-22 Marek Polacek <polacek@redhat.com>
3944 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3946 2017-11-21 David Malcolm <dmalcolm@redhat.com>
3949 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3950 earlier failed lookups.
3952 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
3954 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3955 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3957 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3960 * c-decl.c: Include "c-family/known-headers.h".
3961 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3962 to known-headers.cc.
3963 (class suggest_missing_header): Move to known-header.h.
3964 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3965 than get_c_name_hint.
3967 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3969 * c-decl.c (get_c_name_hint): New function.
3970 (class suggest_missing_header): New class.
3971 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3972 suggest missing headers to the user.
3974 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3976 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3977 Include "c-family/name-hint.h"
3978 (implicit_decl_warning): Convert "hint" from
3979 const char * to name_hint. Pass location to
3980 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3981 warning was not printed.
3982 (undeclared_variable): Likewise for "guessed_id".
3983 (lookup_name_fuzzy): Convert return type from const char *
3984 to name_hint. Add location_t param.
3985 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3986 Include "c-family/name-hint.h"
3987 (c_parser_declaration_or_fndef): Convert "hint" from
3988 const char * to name_hint. Pass location to lookup_name_fuzzy.
3989 (c_parser_parameter_declaration): Likewise.
3991 2017-11-19 Jakub Jelinek <jakub@redhat.com>
3995 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3997 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3998 handle_omp_array_sections): Likewise.
3999 (digest_init): Don't call decl_constant_value_for_optimization.
4000 * c-tree.h (decl_constant_value_for_optimization): Removed.
4001 * c-fold.c (c_fold_array_ref): New function.
4002 (c_fully_fold_internal): Add LVAL argument, propagate it through
4003 recursive calls. For VAR_P call decl_constant_value and
4004 unshare if not LVAL and either optimizing or IN_INIT. Remove
4005 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4006 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4007 (c_fully_fold): Add LVAL argument, pass it through to
4008 c_fully_fold_internal.
4009 (decl_constant_value_for_optimization): Removed.
4011 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4014 * c-parser.c (check_tgmath_function): New function.
4015 (enum tgmath_parm_kind): New enum.
4016 (c_parser_postfix_expression): Handle __builtin_tgmath.
4018 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4020 * c-decl.c (implicit_decl_warning): Update for renaming of
4021 pedwarn_at_rich_loc and warning_at_rich_loc.
4022 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4023 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4024 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4025 (c_parser_struct_or_union_specifier): Likewise for renaming of
4026 pedwarn_at_rich_loc.
4027 (c_parser_parameter_declaration): Likewise for renaming of
4029 * c-typeck.c (build_component_ref): Likewise.
4030 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4031 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4032 (set_init_label): Likewise for renaming of error_at_rich_loc.
4034 2017-10-30 Richard Biener <rguenther@suse.de>
4036 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4039 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4041 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4042 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4044 2017-10-25 David Malcolm <dmalcolm@redhat.com>
4047 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4050 2017-10-25 Jakub Jelinek <jakub@redhat.com>
4053 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4054 newdecl to corresponding __builtin_ if any.
4056 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4059 * c-decl.c (diagnose_mismatched_decls): Use
4060 OPT_Wbuiltin_declaration_mismatch.
4062 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4064 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4065 use it to guard calls to maybe_suggest_missing_token_insertion.
4066 (c_parser_parms_list_declarator): Override default value of new
4067 "type_is_unique" param to c_parser_require.
4068 (c_parser_asm_statement): Likewise.
4069 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4072 2017-10-11 Nathan Sidwell <nathan@acm.org>
4074 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4076 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4078 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4079 operating on trees as wide_ints.
4080 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4081 (c_tree_equal): Likewise.
4083 2017-10-04 David Malcolm <dmalcolm@redhat.com>
4085 * c-decl.c (push_parm_decl): Store c_parm's location into the
4087 (build_c_parm): Add "loc" param and store it within the c_parm.
4088 * c-parser.c (struct c_parser): Add "last_token_location" field.
4089 (c_parser_consume_token): Store location of the token into the
4091 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4092 when handling a FUNCTION_DECL, if it doesn't already have them.
4093 (c_parser_parameter_declaration): Generate a location for the
4094 parameter, and pass it to the call to build_c_parm.
4095 * c-tree.h (struct c_parm): Add field "loc".
4096 (build_c_parm): Add location_t param.
4097 * c-typeck.c (get_fndecl_argument_location): New function.
4098 (inform_for_arg): New function.
4099 (convert_for_assignment): Use inform_for_arg when dealing with
4102 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4104 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4106 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4107 don't SET_DECL_C_BIT_FIELD here.
4110 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4111 instead of trying to set just TREE_READONLY manually.
4113 2017-09-16 Tom de Vries <tom@codesourcery.com>
4116 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4119 2017-09-15 Joseph Myers <joseph@codesourcery.com>
4122 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4124 (build_conditional_expr): For C11, generate result with excess
4125 precision when one argument is an integer and the other is of a
4126 type using excess precision.
4128 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4130 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4132 2017-09-13 Marek Polacek <polacek@redhat.com>
4135 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4136 than expr.original_type.
4138 2017-09-12 Nathan Sidwell <nathan@acm.org>
4140 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4141 resort_sorted_fields): Moved from c-family/c-common.c.
4142 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4144 2017-09-01 Joseph Myers <joseph@codesourcery.com>
4147 * c-typeck.c (build_atomic_assign): Handle argument with excess
4148 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4149 argument passed to build_binary_op and convert_for_assignment but
4150 not for call to c_fully_fold.
4151 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4152 Ensure build_binary_op is called with argument with original
4153 semantic type. Avoid calling c_fully_fold with an
4154 EXCESS_PRECISION_EXPR from build_binary_op.
4156 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4159 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4161 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4162 Alan Hayward <alan.hayward@arm.com>
4163 David Sherwood <david.sherwood@arm.com>
4165 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4166 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4167 m1 and m2 to the signed equivalent of a fixed-point
4170 2017-08-24 David Malcolm <dmalcolm@redhat.com>
4172 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4173 than CAN_HAVE_LOCATION_P when determining whether to use the
4174 location_t value within "value".
4176 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4178 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4179 rather than peeking the location of the first token.
4180 * c-tree.h (c_expr::get_location): New method.
4182 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4184 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4185 to check_function_arguments.
4187 2017-08-18 Marek Polacek <polacek@redhat.com>
4189 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4192 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4195 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4196 (check_bitfield_type_and_width): Don't allow bit-field with
4197 warn_if_not_aligned type.
4199 2017-08-14 Martin Sebor <msebor@redhat.com>
4202 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4204 2017-08-11 Marek Polacek <polacek@redhat.com>
4207 * c-decl.c (pushtag): Only print inform if the warning was printed.
4208 (grokdeclarator): Likewise.
4210 2017-08-10 David Malcolm <dmalcolm@redhat.com>
4212 * c-parser.c (c_parser_error): Rename to...
4213 (c_parser_error_richloc): ...this, making static, and adding
4214 "richloc" parameter, passing it to the c_parse_error call,
4215 rather than calling c_parser_set_source_position_from_token.
4216 (c_parser_error): Reintroduce, reimplementing in terms of the
4217 above, converting return type from void to bool.
4218 (class token_pair): New class.
4219 (struct matching_paren_traits): New struct.
4220 (matching_parens): New typedef.
4221 (struct matching_brace_traits): New struct.
4222 (matching_braces): New typedef.
4223 (get_matching_symbol): New function.
4224 (c_parser_require): Add param MATCHING_LOCATION, using it to
4225 highlight matching "opening" tokens for missing "closing" tokens.
4226 (c_parser_skip_until_found): Likewise.
4227 (c_parser_static_assert_declaration_no_semi): Convert explicit
4228 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4229 class matching_parens, so that the pertinent open parenthesis is
4230 highlighted when there are problems locating the close
4232 (c_parser_struct_or_union_specifier): Likewise.
4233 (c_parser_typeof_specifier): Likewise.
4234 (c_parser_alignas_specifier): Likewise.
4235 (c_parser_simple_asm_expr): Likewise.
4236 (c_parser_braced_init): Likewise, for matching_braces.
4237 (c_parser_paren_condition): Likewise, for matching_parens.
4238 (c_parser_switch_statement): Likewise.
4239 (c_parser_for_statement): Likewise.
4240 (c_parser_asm_statement): Likewise.
4241 (c_parser_asm_operands): Likewise.
4242 (c_parser_cast_expression): Likewise.
4243 (c_parser_sizeof_expression): Likewise.
4244 (c_parser_alignof_expression): Likewise.
4245 (c_parser_generic_selection): Likewise.
4246 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4247 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4248 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4249 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4250 c_parser_skip_until_found call.
4251 (c_parser_objc_class_definition): Use class matching_parens as
4253 (c_parser_objc_method_decl): Likewise.
4254 (c_parser_objc_try_catch_finally_statement): Likewise.
4255 (c_parser_objc_synchronized_statement): Likewise.
4256 (c_parser_objc_at_property_declaration): Likewise.
4257 (c_parser_oacc_wait_list): Likewise.
4258 (c_parser_omp_var_list_parens): Likewise.
4259 (c_parser_omp_clause_collapse): Likewise.
4260 (c_parser_omp_clause_default): Likewise.
4261 (c_parser_omp_clause_if): Likewise.
4262 (c_parser_omp_clause_num_threads): Likewise.
4263 (c_parser_omp_clause_num_tasks): Likewise.
4264 (c_parser_omp_clause_grainsize): Likewise.
4265 (c_parser_omp_clause_priority): Likewise.
4266 (c_parser_omp_clause_hint): Likewise.
4267 (c_parser_omp_clause_defaultmap): Likewise.
4268 (c_parser_oacc_single_int_clause): Likewise.
4269 (c_parser_omp_clause_ordered): Likewise.
4270 (c_parser_omp_clause_reduction): Likewise.
4271 (c_parser_omp_clause_schedule): Likewise.
4272 (c_parser_omp_clause_num_teams): Likewise.
4273 (c_parser_omp_clause_thread_limit): Likewise.
4274 (c_parser_omp_clause_aligned): Likewise.
4275 (c_parser_omp_clause_linear): Likewise.
4276 (c_parser_omp_clause_safelen): Likewise.
4277 (c_parser_omp_clause_simdlen): Likewise.
4278 (c_parser_omp_clause_depend): Likewise.
4279 (c_parser_omp_clause_map): Likewise.
4280 (c_parser_omp_clause_device): Likewise.
4281 (c_parser_omp_clause_dist_schedule): Likewise.
4282 (c_parser_omp_clause_proc_bind): Likewise.
4283 (c_parser_omp_clause_uniform): Likewise.
4284 (c_parser_omp_for_loop): Likewise.
4285 (c_parser_cilk_clause_vectorlength): Likewise.
4286 (c_parser_cilk_clause_linear): Likewise.
4287 (c_parser_transaction_expression): Likewise.
4288 * c-parser.h (c_parser_require): Add param matching_location with
4289 default UNKNOWN_LOCATION.
4290 (c_parser_error): Convert return type from void to bool.
4291 (c_parser_skip_until_found): Add param matching_location with
4292 default UNKNOWN_LOCATION.
4294 2017-08-09 Marek Polacek <polacek@redhat.com>
4296 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4297 * c-tree.h (build_external_ref): Update declaration.
4298 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4299 (build_external_ref): Change the type of a parameter to bool.
4300 (parser_build_binary_op): Use true/false instead of 1/0.
4301 (pointer_diff): Likewise.
4302 (build_modify_expr): Likewise.
4303 (set_designator): Change the type of a parameter to bool.
4304 (set_init_index): Use true/false instead of 1/0.
4305 (set_init_label): Likewise.
4306 (output_init_element): Change the type of a parameter to bool.
4307 (output_pending_init_elements): Use true/false instead of 1/0.
4308 (process_init_element): Likewise.
4309 (build_binary_op): Change the type of a parameter to bool.
4311 2017-08-09 Marek Polacek <polacek@redhat.com>
4314 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4315 Call emit_diagnostic_valist instead of pedwarn.
4316 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4317 Print the relevant types in diagnostics.
4319 2017-08-09 Marek Polacek <polacek@redhat.com>
4322 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
4323 build_conditional_expr.
4324 * c-parser.c (c_parser_conditional_expression): Create locations for
4325 EXP1 and EXP2 from their source ranges. Pass the locations down to
4326 build_conditional_expr.
4327 * c-tree.h (build_conditional_expr): Update declaration.
4328 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4329 For -Wsign-compare, also print the types.
4331 2017-08-08 Martin Liska <mliska@suse.cz>
4333 * c-convert.c: Include header files.
4334 * c-typeck.c: Likewise.
4336 2017-08-07 Martin Liska <mliska@suse.cz>
4338 * c-parser.c (c_parser_attributes): Canonicalize name of an
4341 2017-08-02 Marek Polacek <polacek@redhat.com>
4344 * c-parser.c (c_parser_unary_expression): Use set_error.
4348 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4349 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4351 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
4352 Martin Liska <mliska@suse.cz>
4354 * c-typeck.c (c_finish_goto_label): Build gimple predict
4357 2017-07-31 Martin Liska <mliska@suse.cz>
4360 * c-convert.c (convert): Guard condition with flag_sanitize_p
4361 also with current_function_decl non-null equality.
4362 * c-decl.c (grokdeclarator): Likewise.
4363 * c-typeck.c (build_binary_op): Likewise.
4365 2017-07-25 Marek Polacek <polacek@redhat.com>
4367 * c-decl.c (grokfield): Remove local variable.
4369 2017-07-25 Marek Polacek <polacek@redhat.com>
4372 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4373 macro expansion if the body is in { }.
4374 (c_parser_while_statement): Likewise.
4375 (c_parser_for_statement): Likewise.
4377 2017-07-18 Nathan Sidwell <nathan@acm.org>
4379 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4381 2017-07-14 David Malcolm <dmalcolm@redhat.com>
4383 * c-decl.c (implicitly_declare): When suggesting a missing
4384 #include, provide a fix-it hint.
4386 2017-07-06 David Malcolm <dmalcolm@redhat.com>
4388 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4389 and call that instead.
4390 * c-tree.h (selftest::run_c_tests): New decl.
4392 2017-06-26 Marek Polacek <polacek@redhat.com>
4395 * c-parser.c (c_parser_if_body): Set the location of the
4396 body of the conditional after parsing all the labels. Call
4397 warn_for_multistatement_macros.
4398 (c_parser_else_body): Likewise.
4399 (c_parser_switch_statement): Likewise.
4400 (c_parser_while_statement): Likewise.
4401 (c_parser_for_statement): Likewise.
4402 (c_parser_statement): Add a default argument. Save the location
4403 after labels have been parsed.
4404 (c_parser_c99_block_statement): Likewise.
4406 2017-06-19 Richard Biener <rguenther@suse.de>
4408 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4409 negated _Literals to parse _Literal (int) -1.
4411 2017-06-13 Martin Liska <mliska@suse.cz>
4414 * c-convert.c (convert): Use sanitize_flags_p.
4415 * c-decl.c (grokdeclarator): Likewise.
4416 * c-typeck.c (convert_for_assignment): Likewise.
4417 (c_finish_return): Likewise.
4418 (build_binary_op): Likewise.
4420 2017-06-08 Jakub Jelinek <jakub@redhat.com>
4423 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4424 to sizetype before size_binop.
4426 2017-06-07 Jakub Jelinek <jakub@redhat.com>
4428 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4431 2017-06-06 Marek Polacek <polacek@redhat.com>
4434 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4436 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4438 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4440 * c-parser.c (c_parser_binary_expression): Implement the
4441 -Wsizeof_pointer_div warning.
4442 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4443 from a parenthesized expression.
4444 (c_parser_expr_list): Use c_last_sizeof_loc.
4445 * c-tree.h (c_last_sizeof_loc): New external.
4446 * c-typeck.c (c_last_sizeof_loc): New variable.
4447 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4449 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4452 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4454 2017-05-30 David Malcolm <dmalcolm@redhat.com>
4456 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4459 2017-05-24 Martin Sebor <msebor@redhat.com>
4462 * c-fold.c (c_fully_fold_internal): Adjust.
4463 * c-typeck.c (parser_build_unary_op): Adjust.
4465 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4467 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4468 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4471 2017-05-23 Marek Polacek <polacek@redhat.com>
4473 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4476 2017-05-22 Jakub Jelinek <jakub@redhat.com>
4478 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4479 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4480 it returned invariant. Call tree_invariant_p unconditionally
4481 afterwards to decide whether to return expr or op0.
4483 2017-05-22 Nathan Sidwell <nathan@acm.org>
4485 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4487 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4489 * c-parser.c (c_parser_omp_clause_default): Handle
4490 "OMP_CLAUSE_DEFAULT_PRESENT".
4492 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4494 * config-lang.in (gtfiles): Add c-family/c-format.c.
4496 2017-05-18 Nathan Sidwell <nathan@acm.org>
4498 * c-decl.c (pushdecl_top_level): Delete unused function.
4500 2017-05-18 Marek Polacek <polacek@redhat.com>
4502 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4503 (check_earlier_gotos): Likewise.
4504 (define_label): Likewise.
4505 (pending_xref_error): Likewise.
4506 (smallest_type_quals_location): Likewise.
4507 (grokdeclarator): Likewise.
4508 (grokparms): Likewise.
4509 (identifier_global_value): Likewise.
4510 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4511 (find_init_member): Likewise.
4513 2017-05-18 Marek Polacek <polacek@redhat.com>
4515 * c-decl.c (start_decl): Use false/true instead of 0/1.
4516 (grokdeclarator): Likewise.
4517 (finish_struct): Likewise.
4518 (start_function): Change the return type to bool. Use false/true
4520 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4521 * c-tree.h (start_function): Update.
4522 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4523 (set_designator): Change the return type to bool. Use false/true
4526 2017-05-17 Marek Polacek <polacek@redhat.com>
4528 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4529 * c-typeck.c: Likewise.
4531 2017-05-17 Marek Polacek <polacek@redhat.com>
4534 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4535 DECL_IGNORED_P even for non-static compound literals.
4537 2017-05-17 Martin Liska <mliska@suse.cz>
4539 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4540 use it instead of int type.
4542 2017-05-17 Marek Polacek <polacek@redhat.com>
4544 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4546 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
4547 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
4548 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4549 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4551 (c_parser_conditional_expression): Likewise.
4552 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4553 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4554 (process_init_element): Likewise.
4555 (build_binary_op): Likewise.
4556 (handle_omp_array_sections_1): Likewise.
4558 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4560 * c-parser.c (c_parser_omp_clause_num_gangs)
4561 (c_parser_omp_clause_num_workers)
4562 (c_parser_omp_clause_vector_length): Merge functions into...
4563 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4566 2017-05-11 Nathan Sidwell <nathan@acm.org>
4568 * gimple-parser.c: Don't #include tree-dump.h.
4570 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4573 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4575 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4578 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4579 incorrect __MEM syntax.
4581 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4584 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4587 2017-05-09 Nathan Sidwell <nathan@acm.org>
4589 * c-tree.h (pushdecl): Declare.
4591 2017-05-05 David Malcolm <dmalcolm@redhat.com>
4593 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4594 with diagnostic_report_diagnostic.
4595 * c-errors.c (pedwarn_c99): Likewise.
4596 (pedwarn_c90): Likewise.
4598 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4601 * c-gimplify.c (c_gimplify_expr): Remove calls to
4602 cilk_gimplifY_call_params_in_spawned_fn.
4604 2017-04-25 David Malcolm <dmalcolm@redhat.com>
4606 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4607 hint for removing extra semicolon.
4609 2017-04-21 Jakub Jelinek <jakub@redhat.com>
4612 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4613 enabled, set specs->type to integer_type_node.
4615 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
4617 * c-array-notation.c: Fix typo in comment.
4619 2017-03-29 Marek Polacek <polacek@redhat.com>
4622 * c-decl.c (finish_decl): Check VAR_P.
4624 2017-03-27 Jakub Jelinek <jakub@redhat.com>
4627 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4628 * c-typeck.c (c_mark_addressable): Likewise. Look through
4629 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4631 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4633 2017-03-23 Marek Polacek <polacek@redhat.com>
4635 * c-tree.h: Remove a C_RID_YYCODE reference.
4637 2017-03-21 Jakub Jelinek <jakub@redhat.com>
4640 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4641 optional COMPOUND_EXPR with ubsan instrumentation.
4643 2017-03-17 Marek Polacek <polacek@redhat.com>
4645 * c-parser.c: Add C11 references.
4647 2017-03-15 Marek Polacek <polacek@redhat.com>
4649 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4651 2017-03-11 Marek Polacek <polacek@redhat.com>
4653 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4655 2017-03-10 David Malcolm <dmalcolm@redhat.com>
4657 PR translation/79848
4658 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4660 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4662 2017-03-09 Marek Polacek <polacek@redhat.com>
4665 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4666 parameter declarations with initializers.
4668 2017-03-09 Jakub Jelinek <jakub@redhat.com>
4671 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4674 2017-03-07 Jakub Jelinek <jakub@redhat.com>
4677 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4678 for "may only be used in compound statements" diagnostics, change it
4679 such that the same translatable string is used for all pragmas. For
4680 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4682 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4683 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4684 "may only be used in compound statements" diagnostics, such that the
4685 same translatable string is used for all pragmas.
4687 2017-03-04 Marek Polacek <polacek@redhat.com>
4690 * c-decl.c (implicit_decl_warning): Add missing space.
4692 2017-03-03 Marek Polacek <polacek@redhat.com>
4695 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4696 current_function_prototype_arg_types is error_mark_node. Fix
4697 formatting. Use TREE_VALUE instead of TREE_TYPE.
4699 2017-03-03 Jakub Jelinek <jakub@redhat.com>
4702 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4703 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4704 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4708 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4709 instead of %<_Generic>.
4710 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4711 (c_parser_omp_target_exit_data): Use %<release%> instead of
4714 2017-02-28 Jakub Jelinek <jakub@redhat.com>
4716 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4717 instead of just cond ? "..." : "...".
4718 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4719 for "enter"/"exit" keyword.
4720 (c_finish_oacc_routine): Don't use %s to supply portions of the
4723 2017-02-24 Jakub Jelinek <jakub@redhat.com>
4726 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4727 handle -Wrestrict here.
4728 * c-typeck.c (build_function_call_vec): Adjust
4729 check_function_arguments caller.
4731 2017-02-23 Richard Biener <rguenther@suse.de>
4734 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4735 to initialize c_exprs to return.
4736 (c_parser_gimple_binary_expression): Likewise.
4737 (c_parser_gimple_unary_expression): Likewise.
4738 (c_parser_gimple_postfix_expression): Likewise.
4740 2017-02-22 Marek Polacek <polacek@redhat.com>
4743 * c-typeck.c (convert_arguments): Handle error_mark_node.
4745 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4747 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4748 value of c_parser_parse_ssa_name against error_mark_node and emit
4749 error if ssa name is anonymous and written as default definition.
4751 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4753 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4756 2017-02-16 Jakub Jelinek <jakub@redhat.com>
4759 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4760 ignore #pragma omp target even when not followed by identifier.
4762 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4764 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4765 (c_parser_gimple_unary_expression): Likewise.
4767 2017-02-13 Jakub Jelinek <jakub@redhat.com>
4769 * c-parser.c (c_parser_oacc_declare): Add missing space in
4772 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4775 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4776 set_c_expr_source_range when parsing ssa-name.
4778 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
4779 Richard Biener <rguenther@suse.de>
4781 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4782 building IL when arguments are error_mark_node.
4783 (c_parser_gimple_unary_expression): Likewise.
4784 (c_parser_gimple_if_stmt): Likewise.
4785 (c_parser_gimple_switch_stmt): Likewise.
4786 (c_parser_gimple_return_stmt): Likewise.
4787 (c_parser_parse_ssa_name): When name lookup fails do not build
4788 an SSA name. Use undeclared rather than not declared in error
4791 2017-02-09 Marek Polacek <polacek@redhat.com>
4794 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4795 instead of c_parser_skip_until_found.
4797 2017-02-09 Jakub Jelinek <jakub@redhat.com>
4800 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4801 symtab_node::get on automatic variables.
4803 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4804 Chung-Lin Tang <cltang@codesourcery.com>
4806 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4807 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4809 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4811 2017-02-07 Richard Biener <rguenther@suse.de>
4813 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4814 (c_parser_gimple_postfix_expression_after_primary):
4815 Do not use c_build_function_call_vec to avoid folding and promotion.
4818 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4821 * c-decl.c (pop_scope): Pass main_input_filename to
4822 build_translation_unit_decl.
4824 2017-01-24 David Malcolm <dmalcolm@redhat.com>
4826 * c-parser.c: Include "read-rtl-function.h" and
4828 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4829 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4830 production. Update for renaming of field "gimple_pass" to
4831 "gimple_or_rtl_pass". If __RTL was seen, call
4832 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4833 to an auto_timevar, to cope with early exit.
4834 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4835 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4836 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4838 (c_parser_parse_rtl_body): New function.
4839 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4840 (struct c_declspecs): Rename field "gimple_pass" to
4841 "gimple_or_rtl_pass". Add field "rtl_p".
4842 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4843 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4844 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4845 (c_parser_gimple_or_rtl_pass_list): ...this.
4847 2017-01-20 Marek Polacek <polacek@redhat.com>
4850 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4852 2017-01-13 Richard Biener <rguenther@suse.de>
4854 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4857 2017-01-13 Richard Biener <rguenther@suse.de>
4859 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4860 _Literal ( type-name ) number.
4862 2017-01-12 Richard Biener <rguenther@suse.de>
4864 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4867 2017-01-11 Jakub Jelinek <jakub@redhat.com>
4870 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4873 2017-01-11 Richard Biener <rguenther@suse.de>
4876 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4877 returns on parse errors.
4879 2017-01-04 Marek Polacek <polacek@redhat.com>
4882 * c-parser.c (c_parser_postfix_expression): Mark zero character
4883 constants by setting original_type in c_expr.
4884 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4885 with a zero character constant.
4886 (char_type_p): New function.
4888 2017-01-04 David Malcolm <dmalcolm@redhat.com>
4890 * c-parser.c (c_parser_declaration_or_fndef): Create a
4891 rich_location at init_loc and parse it to start_init.
4892 (last_init_list_comma): New global.
4893 (c_parser_braced_init): Update last_init_list_comma when parsing
4894 commas. Pass it to pop_init_level. Pass location of closing
4895 brace to pop_init_level.
4896 (c_parser_postfix_expression_after_paren_type): Create a
4897 rich_location at type_loc and parse it to start_init.
4898 (c_parser_omp_declare_reduction): Likewise for loc.
4899 * c-tree.h (start_init): Add rich_location * param.
4900 (pop_init_level): Add location_t param.
4901 * c-typeck.c (struct initializer_stack): Add field
4902 "missing_brace_richloc".
4903 (start_init): Add richloc param, use it to initialize
4904 the stack node's missing_brace_richloc.
4905 (last_init_list_comma): New decl.
4906 (finish_implicit_inits): Pass last_init_list_comma to
4908 (push_init_level): When finding missing open braces, add fix-it
4909 hints to the richloc.
4910 (pop_init_level): Add "insert_before" param and pass it
4911 when calling pop_init_level. Add fixits about missing
4912 close braces to any richloc. Use the richloc for the
4913 -Wmissing-braces warning.
4914 (set_designator): Pass last_init_list_comma to pop_init_level.
4915 (process_init_element): Likewise.
4917 2017-01-01 Jakub Jelinek <jakub@redhat.com>
4919 Update copyright years.
4921 2016-12-21 Jakub Jelinek <jakub@redhat.com>
4924 * c-typeck.c (build_function_call_vec): If check_function_arguments
4925 returns true, set TREE_NO_WARNING on CALL_EXPR.
4928 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4929 to *expr instead of overwriting it.
4931 2016-12-20 Richard Biener <rguenther@suse.de>
4933 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4935 (c_parser_gimple_statement): Only build assigns for non-error
4937 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4939 2016-12-14 Martin Jambor <mjambor@suse.cz>
4941 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4943 (c_finish_oacc_routine): Adjusted call to
4944 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4945 to use their new names.
4946 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4948 (c_parser_oacc_update): Likewise.
4949 (c_parser_omp_simd): Likewise.
4950 (c_parser_omp_target_update): Likewise.
4951 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4952 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4954 (c_finish_omp_cancellation_point): Likewise.
4955 * gimple-parser.c: Do not include omp-low.h
4957 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4958 James Norris <jnorris@codesourcery.com>
4960 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4961 EXIT_DATA,WAIT} are not used in compound statements.
4962 (c_parser_oacc_enter_exit_data): Update diagnostics.
4964 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4967 * c-decl.c (diagnose_mismatched_decls): Use
4968 OPT_Wbuiltin_declaration_mismatch here too.
4970 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
4971 Alan Hayward <alan.hayward@arm.com>
4972 David Sherwood <david.sherwood@arm.com>
4974 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4975 (make_label, finish_struct): Likewise.
4977 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4978 Richard Biener <rguenther@suse.de>
4980 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4981 * config-lang.in (gtfiles): Add c/c-parser.h.
4982 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4983 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4984 * c-parser.c (enum c_id_kind, struct c_token,
4985 c_parser_next_token_is, c_parser_next_token_is_not,
4986 c_parser_next_token_is_keyword,
4987 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4989 * c-parser.h: ... new header.
4990 * c-parser.c: Include c-parser.h and gimple-parser.h.
4991 (c_parser_peek_token, c_parser_peek_2nd_token,
4992 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4993 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4994 c_parser_error, c_parser_require, c_parser_skip_until_found,
4995 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4996 c_parser_type_name): Export.
4997 (c_parser_tokens_buf): New function.
4998 (c_parser_error): Likewise.
4999 (c_parser_set_error): Likewise.
5000 (c_parser_declspecs): Handle RID_GIMPLE.
5001 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5002 via c_parser_parse_gimple_body.
5003 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5004 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5005 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5006 c_parser_error, c_parser_require, c_parser_skip_until_found,
5007 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5008 c_parser_type_name): Declare.
5009 (struct c_parser): Declare forward.
5010 (c_parser_tokens_buf): Declare.
5011 (c_parser_error): Likewise.
5012 (c_parser_set_error): Likewise.
5013 * gimple-parser.c: New file.
5014 * gimple-parser.h: Likewise.
5016 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5019 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5022 2016-09-11 Le-Chun Wu <lcwu@google.com>
5023 Mark Wielaard <mjw@redhat.com>
5025 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5026 to the given -Wshadow= variant.
5028 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5030 * c-typeck.c: Include memmodel.h.
5032 2016-10-13 Jakub Jelinek <jakub@redhat.com>
5035 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5036 instead of lhd_return_null_tree_v.
5038 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5041 * c-decl.c (smallest_type_quals_location): New static function.
5042 (grokdeclarator): Try to find the correct location for an ignored
5045 2016-09-26 Marek Polacek <polacek@redhat.com>
5048 * c-decl.c (pop_scope): Add gcc_fallthrough.
5050 2016-09-26 Marek Polacek <polacek@redhat.com>
5053 * c-parser.c (struct c_token): Add flags field.
5054 (c_lex_one_token): Pass it to c_lex_with_flags.
5055 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5056 into IFN_FALLTHROUGH.
5057 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5058 attribute fallthrough after a case label or default label.
5059 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5061 2016-09-24 Marek Polacek <polacek@redhat.com>
5064 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5065 have boolean value. Warn about ++/-- on booleans.
5067 2016-09-23 Jakub Jelinek <jakub@redhat.com>
5069 * c-parser.c (incomplete_record_decls): Remove unnecessary
5070 = vNULL initialization of file scope vec.
5072 2016-09-16 Marek Polacek <polacek@redhat.com>
5074 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5076 2016-09-14 Marek Polacek <polacek@redhat.com>
5078 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5079 (fix_array_notation_expr): Likewise.
5080 * c-decl.c (finish_decl): Likewise.
5081 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5082 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5083 (function_to_pointer_conversion): Use false instead of 0.
5084 (convert_lvalue_to_rvalue): Likewise.
5085 (parser_build_unary_op): Likewise.
5086 (build_atomic_assign): Likewise.
5087 (build_unary_op): Change nonconvert parameter type to bool, use
5088 true/false instead of 1/0.
5089 (build_binary_op): Use true instead of 1.
5091 2016-09-13 David Malcolm <dmalcolm@redhat.com>
5093 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5094 of add_fixit_insert to add_fixit_insert_before.
5096 2016-09-13 Marek Polacek <polacek@redhat.com>
5098 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5101 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5104 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5105 COMPOUND_EXPR to warn_for_omitted_condop.
5107 2016-09-07 David Malcolm <dmalcolm@redhat.com>
5109 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5110 c_get_substring_location for this new langhook.
5112 2016-09-02 Jakub Jelinek <jakub@redhat.com>
5115 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5117 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5118 instead of mark_exp_read on low_bound/length expression.
5119 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5120 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5121 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5122 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5123 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5124 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5125 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5126 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5127 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5128 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5129 instead of mark_expr_read.
5130 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5131 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5132 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5133 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5134 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5135 array section bases outside of depend clause, for depend clause
5136 use convert_lvalue_to_rvalue on the base.
5137 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5138 linear, aligned, map, to and from clauses.
5139 (c_omp_clause_copy_ctor): New function.
5141 2016-09-01 Marek Polacek <polacek@redhat.com>
5144 * c-typeck.c (composite_type): Add FALLTHRU comment.
5146 2016-08-31 David Malcolm <dmalcolm@redhat.com>
5148 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5149 to the insertion fixits for "struct", "union", and "enum".
5151 2016-08-30 David Malcolm <dmalcolm@redhat.com>
5153 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5154 rather than add_fixit_misspelled_id.
5155 (undeclared_variable): Likewise.
5156 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5157 now-redundant "here" params from add_fixit_insert method calls.
5158 (c_parser_parameter_declaration): Likewise.
5159 * c-typeck.c (build_component_ref): Remove now-redundant range
5160 param from add_fixit_replace method calls.
5162 2016-08-25 Marek Polacek <polacek@redhat.com>
5164 * c-typeck.c (parser_build_binary_op): Pass LHS to
5165 warn_logical_not_parentheses.
5167 2016-08-25 Marek Polacek <polacek@redhat.com>
5170 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5171 or _FloatN or _FloatNx is not supported.
5172 (finish_declspecs): Set type to integer_type_node when _FloatN or
5173 _FloatNx is not supported.
5175 2016-08-19 Joseph Myers <joseph@codesourcery.com>
5178 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5179 (struct c_declspecs): Add field floatn_nx_idx.
5180 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5181 and _FloatNx type specifiers.
5182 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5183 (c_parser_declspecs, c_parser_attribute_any_word)
5184 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5185 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5186 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5187 narrower than double.
5189 2016-08-12 Jakub Jelinek <jakub@redhat.com>
5190 Martin Liska <mliska@suse.cz>
5193 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5194 % to determine val element to change. Assert that
5195 wchar_bytes * charwidth fits into val array.
5197 2016-08-12 Marek Polacek <polacek@redhat.com>
5200 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5201 (c_parser_postfix_expression): Likewise.
5202 * c-typeck.c (build_unary_op): Adjust fall through comment.
5203 (c_mark_addressable): Likewise.
5205 2016-08-11 Jakub Jelinek <jakub@redhat.com>
5208 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5209 array member through typedef, for orig_qual_indirect == 0 clear
5212 2016-08-08 David Malcolm <dmalcolm@redhat.com>
5215 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5216 this up to selftest::run_c_tests.
5217 (selftest::run_c_tests): New function.
5219 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5221 * c-parser.c (struct oacc_routine_data): Add error_seen and
5222 fndecl_seen members.
5223 (c_finish_oacc_routine): Use these.
5224 (c_parser_declaration_or_fndef): Adjust.
5225 (c_parser_oacc_routine): Likewise. Support more C language
5226 constructs, and improve diagnostics. Move pragma context
5228 (c_parser_pragma): ... here.
5230 * c-parser.c (struct oacc_routine_data): New.
5231 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5233 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5234 declare target" attribute.
5236 2016-08-01 Jan Beulich <jbeulich@suse.com>
5238 * c-fold.c (c_fully_fold_internal): Also emit shift count
5239 warnings for vector types.
5240 * c-typeck.c (build_binary_op): Likewise.
5242 2016-07-29 Marek Polacek <polacek@redhat.com>
5245 * c-decl.c (finish_struct): Rephrase an error message.
5248 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5249 to error node for invalid code.
5252 * c-decl.c (implicitly_declare): Return decl early not only for
5253 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5255 2016-07-29 Jakub Jelinek <jakub@redhat.com>
5258 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5259 on GNU extern inline functions.
5261 2016-07-29 Marek Polacek <polacek@redhat.com>
5264 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5267 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
5269 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5271 2016-07-20 David Malcolm <dmalcolm@redhat.com>
5273 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5275 (best_macro_match): Likewise, converting from a typedef to a
5277 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5278 (lookup_name_fuzzy): Update for change of best_macro_match to a
5279 subclass with a ctor that calls cpp_forall_identifiers.
5281 2016-07-20 David Malcolm <dmalcolm@redhat.com>
5283 * c-decl.c (implicit_decl_warning): Update for conversion of
5284 return type of lookup_name_fuzzy to const char *.
5285 (undeclared_variable): Likewise.
5286 (lookup_name_fuzzy): Convert return type from tree to
5288 * c-parser.c (c_parser_declaration_or_fndef): Update for
5289 conversion of return type of lookup_name_fuzzy to const char *.
5290 (c_parser_parameter_declaration): Likewise.
5292 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5294 * c-parser.c (c_parser_oacc_declare): Don't scan for
5296 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5297 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5298 zero-length subarrays.
5300 2016-07-15 Jakub Jelinek <jakub@redhat.com>
5303 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5304 instead of FUZZY_LOOKUP_NAME.
5305 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5306 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5308 2016-07-14 Jakub Jelinek <jakub@redhat.com>
5311 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5313 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5315 * c-parser.c (c_parser_generic_selection): Make type of variable
5317 (c_parser_omp_declare_simd): Likewise.
5319 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5321 * c-decl.c (struct c_struct_parse_info): Change member types
5322 from vec to auto_vec.
5323 (start_struct): Adjust.
5324 (finish_struct): Likewise.
5326 2016-07-02 Jakub Jelinek <jakub@redhat.com>
5329 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5331 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5333 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5334 Move pragma context checking into...
5335 (c_parser_omp_cancellation_point): ... here, and improve
5336 diagnostic messages.
5337 * c-typeck.c (c_finish_omp_cancel)
5338 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5340 2016-06-29 Jakub Jelinek <jakub@redhat.com>
5343 * c-typeck.c (c_build_qualified_type): Don't clear
5344 C_TYPE_INCOMPLETE_VARS for the main variant.
5346 2016-06-28 Martin Sebor <msebor@redhat.com>
5349 * c-typeck.c (output_init_element): Diagnose incompatible types
5350 before non-constant initializers.
5352 2016-06-28 Jakub Jelinek <jakub@redhat.com>
5354 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5356 2016-06-23 Andi Kleen <ak@linux.intel.com>
5358 * Make-lang.in: Add support for autofdo.
5360 2016-06-22 David Malcolm <dmalcolm@redhat.com>
5363 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5364 (implicit_decl_warning): When issuing warnings for implicit
5365 declarations, attempt to provide a suggestion via
5367 (undeclared_variable): Likewise when issuing errors.
5368 (lookup_name_in_scope): Likewise.
5369 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5370 (best_macro_match): New typedef.
5371 (find_closest_macro_cpp_cb): New function.
5372 (lookup_name_fuzzy): New function.
5373 * c-parser.c: Include gcc-rich-location.h.
5374 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5375 (c_keyword_starts_typename): ...this new function.
5376 (c_parser_declaration_or_fndef): When issuing errors about
5377 missing "struct" etc, add a fixit. For other kinds of errors,
5378 attempt to provide a suggestion via lookup_name_fuzzy.
5379 (c_parser_parms_declarator): When looking ahead to detect typos in
5380 type names, also reject CPP_KEYWORD.
5381 (c_parser_parameter_declaration): When issuing errors about
5382 unknown type names, attempt to provide a suggestion via
5384 * c-tree.h (c_keyword_starts_typename): New prototype.
5386 2016-06-20 Joseph Myers <joseph@codesourcery.com>
5389 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5390 c_common_type returns error_mark_node.
5392 2016-06-19 Martin Sebor <msebor@redhat.com>
5395 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5396 __alignof__ (expression).
5398 2016-06-14 David Malcolm <dmalcolm@redhat.com>
5400 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5402 2016-06-14 David Malcolm <dmalcolm@redhat.com>
5404 * c-typeck.c (build_component_ref): Simplify fixit code by
5405 using gcc_rich_location::add_fixit_misspelled_id.
5406 (set_init_label): Likewise.
5408 2016-06-13 David Malcolm <dmalcolm@redhat.com>
5410 * c-parser.c (c_parser_initelt): Provide location of name for new
5411 location_t param of set_init_label.
5412 * c-tree.h (set_init_label): Add location_t param.
5413 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5414 param and use it when issuing error messages about unrecognized
5415 field names. Attempt to provide a fixit hint if appropriate,
5416 otherwise update the error message to provide the type name.
5418 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5421 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5424 2016-06-08 Martin Sebor <msebor@redhat.com>
5425 Jakub Jelinek <jakub@redhat.com>
5429 * c-typeck.c (convert_arguments): Don't promote last argument
5430 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5432 2016-06-08 Marek Polacek <polacek@redhat.com>
5435 * c-decl.c (grokdeclarator): Check TYPE_P.
5438 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5441 2016-06-07 David Malcolm <dmalcolm@redhat.com>
5443 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5444 and structure element reference, capture the location of the
5445 element name token and pass it to build_component_ref.
5446 (c_parser_postfix_expression_after_primary): Likewise for
5447 structure element dereference.
5448 (c_parser_omp_variable_list): Likewise for
5449 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5450 * c-tree.h (build_component_ref): Add location_t param.
5451 * c-typeck.c (build_component_ref): Add location_t param
5452 COMPONENT_LOC. Use it, if available, when issuing hints about
5453 mispelled member names to provide a fixit replacement hint.
5455 2016-06-06 Marek Polacek <polacek@redhat.com>
5458 * c-parser.c (c_parser_direct_declarator): Set location.
5460 2016-06-06 Marek Polacek <polacek@redhat.com>
5462 * c-typeck.c (comptypes_internal): Handle comparisons of
5463 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5464 TYPE_REF_CAN_ALIAS_ALL.
5466 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5468 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5469 arguments as addressable when async clause exists.
5471 2016-05-30 Jakub Jelinek <jakub@redhat.com>
5474 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5475 when combined with target construct.
5477 2016-05-26 Jakub Jelinek <jakub@redhat.com>
5479 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5480 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5482 2016-05-25 Marek Polacek <polacek@redhat.com>
5485 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5488 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5490 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5492 * c-parser.c (c_parser_oacc_declare): Add support for
5493 GOMP_MAP_FIRSTPRIVATE_POINTER.
5494 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5495 argument with enum c_omp_region_type ort.
5496 (handle_omp_array_sections): Likewise. Update call to
5497 handle_omp_array_sections_1.
5498 (c_finish_omp_clauses): Add specific errors and warning messages for
5499 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5500 call to handle_omp_array_sections.
5502 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5504 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5506 2016-05-24 Richard Biener <rguenther@suse.de>
5510 * c-typeck.c (build_array_ref): Do not complain about indexing
5511 non-lvalue vectors. Adjust for function name change.
5513 2016-05-20 Martin Sebor <msebor@redhat.com>
5516 * c-typeck.c (error_init): Use
5517 expansion_point_location_if_in_system_header.
5518 (warning_init): Same.
5520 2016-05-19 David Malcolm <dmalcolm@redhat.com>
5523 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5525 (c_parser_postfix_expression): Likewise.
5526 * c-tree.h (c_expr::set_error): New method.
5527 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5528 that result's range is initialized.
5530 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5532 * c-typeck.c (parser_build_unary_op): Fix formatting.
5534 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5536 * c-decl.c (grokdeclarator): Remove errmsg and use of
5537 targetm.invalid_return_type.
5538 (grokparms): Remove errmsg and use of
5539 targetm.invalid_parameter_type.
5541 2016-05-13 Joseph Myers <joseph@codesourcery.com>
5543 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5544 function return type.
5546 2016-05-12 Marek Polacek <polacek@redhat.com>
5549 * c-decl.c (build_compound_literal): Pass LOC down to
5550 c_incomplete_type_error.
5551 * c-tree.h (require_complete_type): Adjust declaration.
5552 (c_incomplete_type_error): Likewise.
5553 * c-typeck.c (require_complete_type): Add location parameter, pass it
5554 down to c_incomplete_type_error.
5555 (c_incomplete_type_error): Add location parameter, pass it down to
5557 (build_component_ref): Pass location down to c_incomplete_type_error.
5558 (default_conversion): Pass location down to require_complete_type.
5559 (build_array_ref): Likewise.
5560 (build_function_call_vec): Likewise.
5561 (convert_arguments): Likewise.
5562 (build_unary_op): Likewise.
5563 (build_c_cast): Likewise.
5564 (build_modify_expr): Likewise.
5565 (convert_for_assignment): Likewise.
5566 (c_finish_omp_clauses): Likewise.
5568 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5571 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5573 * c-errors.c (pedwarn_c90): Return true if warned.
5574 * c-tree.h (pedwarn_c90): Change return type to bool.
5575 (enum c_declspec_word): Add new enumerator cdw_atomic.
5577 2016-05-11 Marek Polacek <polacek@redhat.com>
5580 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5581 diagnose_mismatched_attributes and call it.
5583 2016-05-10 Marek Polacek <polacek@redhat.com>
5586 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5587 on a declaration following the definition.
5589 2016-05-05 Jakub Jelinek <jakub@redhat.com>
5591 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5592 parse it through to c_parser_c99_block_statement.
5593 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5596 2016-05-04 Marek Polacek <polacek@redhat.com>
5598 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5601 2016-05-04 Marek Polacek <polacek@redhat.com>
5604 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5605 for macro expansions.
5607 2016-05-03 Marek Polacek <polacek@redhat.com>
5610 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5611 check_builtin_function_arguments.
5613 2016-05-03 Richard Biener <rguenther@suse.de>
5615 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5616 the checksum from the previous stage.
5618 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5620 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5621 c_finish_omp_clauses.
5622 (c_parser_omp_all_clauses): Likewise.
5623 (c_parser_oacc_cache): Likewise.
5624 (c_parser_oacc_loop): Likewise.
5625 (omp_split_clauses): Likewise.
5626 (c_parser_omp_declare_target): Likewise.
5627 (c_parser_cilk_all_clauses): Likewise.
5628 (c_parser_cilk_for): Likewise.
5629 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5630 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5632 2016-05-02 Marek Polacek <polacek@redhat.com>
5635 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5638 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5641 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5642 OACC_LOOP_CLAUSE_MASK.
5643 (c_parser_oacc_kernels_parallel): Update call to
5644 c_oacc_split_loop_clauses.
5646 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
5648 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5649 argument to build_modify_expr in two cases.
5651 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5653 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5654 warn_for_memset instead of warning directly here.
5656 2016-04-26 Marek Polacek <polacek@redhat.com>
5659 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5661 (c_parser_for_statement): ... here.
5662 (c_parser_if_statement): Use it.
5663 (c_parser_switch_statement): Use it.
5664 (c_parser_while_statement): Use it.
5667 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5669 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5672 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5673 instead of c_finish_cilk_clauses.
5674 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5675 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5676 floating-point variables in the linear clause for Cilk Plus.
5678 2016-04-18 Michael Matz <matz@suse.de>
5680 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5681 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5683 2016-04-15 Marek Polacek <polacek@redhat.com>
5686 * c-typeck.c (build_unary_op): Pass location down to error and
5689 2016-04-15 Jakub Jelinek <jakub@redhat.com>
5692 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5694 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5695 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5696 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5697 Adjust c_parser_pragma callers.
5698 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5700 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5702 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5703 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5704 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5705 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5706 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5707 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5708 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5709 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5711 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5712 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5715 2016-04-13 Marek Polacek <polacek@redhat.com>
5718 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5720 (c_parser_statement): Likewise.
5721 (c_parser_c99_block_statement): Likewise.
5722 (c_parser_while_statement): Likewise.
5723 (c_parser_for_statement): Likewise.
5724 (c_parser_if_body): Don't set IF_P here.
5725 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5726 about dangling else here.
5727 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5728 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5729 warn about dangling else here.
5731 2016-04-04 Marek Polacek <polacek@redhat.com>
5734 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5736 2016-03-31 Marek Polacek <polacek@redhat.com>
5739 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5741 2016-03-18 David Malcolm <dmalcolm@redhat.com>
5744 * c-parser.c (c_parser_postfix_expression): Set the source range
5745 for uses of "__builtin_types_compatible_p".
5747 2016-03-17 Jakub Jelinek <jakub@redhat.com>
5750 * c-typeck.c (composite_type): Don't count void_list_node
5751 into len, if the list is terminated by void_list_node, start
5752 with void_list_node instead of NULL for newargs. Stop
5755 2016-03-16 Marek Polacek <polacek@redhat.com>
5758 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5759 nested functions returning VM types.
5761 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5763 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5764 when calling c_finish_omp_clauses.
5766 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5769 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5772 2016-03-04 Marek Polacek <polacek@redhat.com>
5775 * c-parser.c (c_parser_postfix_expression): Call
5776 c_parser_cast_expression rather than c_parser_postfix_expression.
5778 2016-03-01 Jakub Jelinek <jakub@redhat.com>
5782 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5783 of incomplete decls to error_mark_node.
5785 2016-02-24 Marek Polacek <polacek@redhat.com>
5788 * c-decl.c (finish_decl): Don't update the copy of the type of a
5789 different decl type.
5791 2016-02-23 Jakub Jelinek <jakub@redhat.com>
5794 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5795 in id_kind reclassification.
5797 2016-02-16 Jakub Jelinek <jakub@redhat.com>
5800 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5802 2016-02-16 James Norris <jnorris@codesourcery.com>
5805 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5807 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5809 * c-decl.c (build_null_declspecs): Zero the entire struct.
5812 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5813 callers changed. If nested_p is true, use it to call
5814 finish_implicit_inits.
5815 * c-tree.h (finish_implicit_inits): Declare.
5816 * c-typeck.c (finish_implicit_inits): New function. Move code
5818 (push_init_level): ... here.
5819 (set_designator, process_init_element): Call finish_implicit_inits.
5821 2016-02-11 Jakub Jelinek <jakub@redhat.com>
5824 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5825 arguments for -Waddress warning.
5827 2016-02-04 Jakub Jelinek <jakub@redhat.com>
5830 * c-decl.c (finish_enum): When honoring mode attribute,
5831 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5833 2016-01-29 Jakub Jelinek <jakub@redhat.com>
5836 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5837 all type variants, not just TYPE_MAIN_VARIANT.
5839 2016-01-27 Jakub Jelinek <jakub@redhat.com>
5842 * c-decl.c (c_write_global_declarations_1): Warn with
5843 warn_unused_function if static prototype without definition
5846 2016-01-27 Marek Polacek <polacek@redhat.com>
5849 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5850 to unsigned, if needed. Add -Wsign-compare warning.
5852 2016-01-26 Jakub Jelinek <jakub@redhat.com>
5854 PR tree-optimization/69483
5855 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5857 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5860 * c-tree.h (incomplete_record_decls): Declare.
5861 * c-parser.c (incomplete_record_decls): Define.
5862 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5863 report error if any decl has zero size.
5864 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5865 or enum type to incomplete_record_decls.
5867 2016-01-14 Tom de Vries <tom@codesourcery.com>
5869 PR tree-optimization/68773
5870 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5873 2016-01-14 Marek Polacek <polacek@redhat.com>
5876 * c-decl.c (grokdeclarator): Provide more information for invalid
5879 2016-01-06 David Malcolm <dmalcolm@redhat.com>
5881 * c-parser.c (c_parser_unary_expression): For dereferences, build
5882 a combined location before calling build_indirect_ref, so that
5883 error reports cover the full range, manually updating the c_expr
5886 2016-01-06 Marek Polacek <polacek@redhat.com>
5889 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5890 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5893 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5895 Update copyright years.
5897 2016-01-04 Marek Polacek <polacek@redhat.com>
5900 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5901 optimization to use __atomic_fetch_* built-in if possible.
5903 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5905 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5907 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5910 2015-12-22 Marek Polacek <polacek@redhat.com>
5913 * c-typeck.c (build_component_ref): Warn when acessing elements of
5914 atomic structures or unions.
5916 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5918 * c-typeck.c: Include "gcc-rich-location.h".
5919 (build_binary_op): In the two places that call binary_op_error,
5920 create a gcc_rich_location and populate it with the location of
5921 the binary op and its two operands.
5923 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5925 * c-parser.c (c_parser_statement_after_labels): When calling
5926 c_finish_return, Use the return expression's location if it has
5927 one, falling back to the location of the first token within it.
5928 * c-typeck.c (c_finish_return): When issuing warnings about
5929 the incorrect presence/absence of a return value, issue a note
5930 showing the declaration of the function.
5932 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5934 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5936 (c_parser_peek_nth_token): New function.
5937 (c_parser_peek_conflict_marker): New function.
5938 (c_parser_error): Detect conflict markers and report them as such.
5940 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5942 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5943 to preserve range information for the primary expression
5944 in the call to c_parser_postfix_expression_after_primary.
5946 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5948 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5949 expression location, falling back on the first token location,
5950 rather than always using the latter.
5952 2015-12-16 Marek Polacek <polacek@redhat.com>
5955 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5958 2015-12-15 Marek Polacek <polacek@redhat.com>
5961 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5964 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5966 * c-parser.c (c_parser_alignof_expression): Capture location of
5967 closing parenthesis (if any), or of end of unary expression, and
5968 use it to build a src_range for the expression.
5970 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5973 * c-parser.c (c_parser_get_builtin_args): Add
5974 "out_close_paren_loc" param, and write back to it.
5975 (c_parser_postfix_expression): Capture the closing
5976 parenthesis location for RID_CHOOSE_EXPR,
5977 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5978 RID_BUILTIN_SHUFFLE and use it to set the source range
5979 for such expressions; within RID_BUILTIN_COMPLEX set
5980 the underlying location.
5982 2015-12-07 Marek Polacek <polacek@redhat.com>
5985 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5986 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5988 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5990 * c-tree.h (c_build_va_arg): Adjust prototype.
5991 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5992 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5993 parameter, adjust throughout and issue an error if EXPR is a component
5994 with reverse storage order.
5996 2015-12-02 Jason Merrill <jason@redhat.com>
5998 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5999 (c_fully_fold_internal, decl_constant_value_for_optimization):
6000 Move from c-common.c.
6001 * c-tree.h: Declare decl_constant_value_for_optimization.
6002 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6004 2015-12-02 Joseph Myers <joseph@codesourcery.com>
6007 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6008 following link from declarator to next declarator. Track original
6009 qualified type and pass it to c_build_qualified_type.
6010 * c-typeck.c (c_build_qualified_type): Add arguments
6011 orig_qual_type and orig_qual_indirect.
6013 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6015 * c-parser.c (c_parser_omp_clause_name)
6016 (c_parser_oacc_all_clauses): Alphabetical sorting.
6018 2015-12-02 Jakub Jelinek <jakub@redhat.com>
6021 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6024 2015-12-01 Julian Brown <julian@codesourcery.com>
6025 Cesar Philippidis <cesar@codesourcery.com>
6026 James Norris <James_Norris@mentor.com>
6028 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6029 (c_parser_oacc_clause_use_device): New function.
6030 (c_parser_oacc_all_clauses): Add use_device support.
6031 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6032 (c_parser_oacc_host_data): New function.
6033 (c_parser_omp_construct): Add host_data support.
6034 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6035 * c-typeck.c (c_finish_oacc_host_data): New function.
6036 (c_finish_omp_clauses): Add use_device support.
6038 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
6041 * c-decl.c: Set TYPE_PACKED in variants.
6043 2015-11-27 Martin Liska <mliska@suse.cz>
6046 * c-array-notation.c (fix_builtin_array_notation_fn):
6047 Use release_vec_vec instead of vec::release.
6048 (build_array_notation_expr): Likewise.
6049 (fix_conditional_array_notations_1): Likewise.
6050 (fix_array_notation_expr): Likewise.
6051 (fix_array_notation_call_expr): Likewise.
6053 2015-11-27 Jakub Jelinek <jakub@redhat.com>
6056 * c-parser.c (c_parser_compound_statement_nostart): If
6057 last_label is true, use pragma_stmt instead of pragma_compound
6058 as second c_parser_pragma argument.
6059 (c_parser_omp_ordered, c_parser_omp_target_update,
6060 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6061 false as second argument to c_parser_skip_to_pragma_eol after
6062 diagnosing standalone directives used in pragma_stmt context.
6064 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6066 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6067 with "if (ENABLE_OFFLOADING)".
6069 2015-11-23 David Malcolm <dmalcolm@redhat.com>
6072 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6073 for various Objective-C constructs: Class.name syntax,
6074 @selector(), @protocol(), @encode(), and [] message syntax.
6076 2015-11-20 David Malcolm <dmalcolm@redhat.com>
6079 * c-typeck.c (should_suggest_deref_p): New function.
6080 (build_component_ref): Special-case POINTER_TYPE when
6081 generating a "not a structure of union" error message, and
6082 suggest a "->" rather than a ".", providing a fix-it hint.
6084 2015-11-19 David Malcolm <dmalcolm@redhat.com>
6086 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6087 candidate into a new function, find_closest_identifier.
6089 2015-11-19 Marek Polacek <polacek@redhat.com>
6092 * c-typeck.c (parser_build_binary_op): Properly handle
6093 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6095 2015-11-17 David Malcolm <dmalcolm@redhat.com>
6097 * c-parser.c (set_c_expr_source_range): Bulletproof both
6098 overloaded implementations against NULL expr->value.
6099 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6101 (c_parser_unary_expression): Likewise when handling addresses of
6103 (c_parser_postfix_expression): Likewise for statement expressions,
6104 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6105 __builtin_va_arg, and for __builtin_offset_of.
6106 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6107 src_range using the range of the braced initializer.
6108 (c_parser_transaction_expression): Set src_range for "ret" to a
6109 sane pair of values.
6111 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6113 * c-parser.c (c_finish_omp_declare_simd): Look for
6114 "simd" attribute as well. Update error message.
6116 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6118 * c-parser.c (c_parser_omp_declare_target): Adjust.
6120 2015-11-14 Jakub Jelinek <jakub@redhat.com>
6122 * c-typeck.c (c_finish_omp_clauses): Don't mark
6123 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6125 2015-11-14 Marek Polacek <polacek@redhat.com>
6127 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6128 * c-typeck.c: Likewise.
6130 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6132 * c-decl.c (warn_defaults_to): Pass line_table to
6134 * c-errors.c (pedwarn_c99): Likewise.
6135 (pedwarn_c90): Likewise.
6136 * c-parser.c (set_c_expr_source_range): New functions.
6137 (c_token::get_range): New method.
6138 (c_token::get_finish): New method.
6139 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6140 based on the range from the start of the LHS to the end of the
6142 (c_parser_conditional_expression): Likewise, based on the range
6143 from the start of the cond.value to the end of exp2.value.
6144 (c_parser_binary_expression): Call set_c_expr_source_range on
6145 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6146 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6147 based on the cast_loc through to the end of the expr.
6148 (c_parser_unary_expression): Likewise, based on the
6149 op_loc through to the end of op.
6150 (c_parser_sizeof_expression) Likewise, based on the start of the
6151 sizeof token through to either the closing paren or the end of
6153 (c_parser_postfix_expression): Likewise, using the token range,
6154 or from the open paren through to the close paren for
6155 parenthesized expressions.
6156 (c_parser_postfix_expression_after_primary): Likewise, for
6157 various kinds of expression.
6158 * c-tree.h (struct c_expr): Add field "src_range".
6159 (c_expr::get_start): New method.
6160 (c_expr::get_finish): New method.
6161 (set_c_expr_source_range): New decls.
6162 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6163 on ret for prefix unary ops.
6164 (parser_build_binary_op): Likewise, running from the start of
6165 arg1.value through to the end of arg2.value.
6167 2015-11-13 Marek Polacek <polacek@redhat.com>
6170 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6172 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6174 * c-typeck.c: Include spellcheck.h.
6175 (lookup_field_fuzzy_find_candidates): New function.
6176 (lookup_field_fuzzy): New function.
6177 (build_component_ref): If the field was not found, try using
6178 lookup_field_fuzzy and potentially offer a suggestion.
6180 2015-11-12 James Norris <jnorris@codesourcery.com>
6181 Joseph Myers <joseph@codesourcery.com>
6183 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6184 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6185 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6186 and PRAGMA_OMP_CLAUSE_LINK.
6187 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6188 and PRAGMA_OACC_CLAUSE_LINK.
6189 (OACC_DECLARE_CLAUSE_MASK): New definition.
6190 (c_parser_oacc_declare): New function.
6192 2015-11-12 Marek Polacek <polacek@redhat.com>
6195 * c-parser.c (c_parser_for_statement): Reclassify the token in
6198 2015-11-11 Marek Polacek <polacek@redhat.com>
6202 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6203 checking the size of an array.
6205 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
6207 * c-array-notation.c: Remove unused header files.
6208 * c-aux-info.c: Likewise.
6209 * c-convert.c: Likewise.
6210 * c-decl.c: Likewise.
6211 * c-errors.c: Likewise.
6212 * c-lang.c: Likewise.
6213 * c-objc-common.c: Likewise.
6214 * c-parser.c: Likewise.
6215 * c-typeck.c: Likewise.
6216 * gccspec.c: Likewise.
6218 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6219 Cesar Philippidis <cesar@codesourcery.com>
6220 James Norris <jnorris@codesourcery.com>
6221 Julian Brown <julian@codesourcery.com>
6222 Nathan Sidwell <nathan@codesourcery.com>
6224 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6226 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6227 (c_parser_pragma): Parse 'acc routine'.
6228 (OACC_ROUTINE_CLAUSE_MARK): Define.
6229 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6231 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6234 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6235 location of the backward-goto to the start of the loop body.
6237 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6240 * c-parser.c (c_parser_while_statement): Finish the loop before
6241 parsing ahead for misleading indentation.
6242 (c_parser_for_statement): Likewise.
6244 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6246 * c-decl.c (finish_struct): If the structure has reverse storage
6247 order, rewrite the type of array fields with scalar component. Call
6248 maybe_apply_pragma_scalar_storage_order on entry.
6249 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6250 errors on bit-fields and reverse SSO here and not...
6251 (c_mark_addressable): ...here.
6252 (output_init_element): Adjust call to initializer_constant_valid_p.
6253 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6255 2015-11-06 David Malcolm <dmalcolm@redhat.com>
6257 * c-decl.c (warn_defaults_to): Update for change in signature
6258 of diagnostic_set_info.
6259 * c-errors.c (pedwarn_c99): Likewise.
6260 (pedwarn_c90): Likewise.
6261 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6262 for textinfo::set_location.
6264 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6265 Thomas Schwinge <thomas@codesourcery.com>
6266 James Norris <jnorris@codesourcery.com>
6268 * c-parser.c (c_parser_omp_clause_name): Add support for
6269 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6270 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6271 default(none) in OpenACC.
6272 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6274 (c_parser_oacc_clause_tile): New function.
6275 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6276 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6277 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6279 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6280 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6282 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6283 (c_parser_oacc_update): Update the error message for missing clauses.
6284 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6285 and OMP_CLAUSE_INDEPENDENT.
6287 2015-11-05 Marek Polacek <polacek@redhat.com>
6290 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6291 deal with pre-evaluation on invalid types.
6293 2015-11-05 Jakub Jelinek <jakub@redhat.com>
6294 Ilya Verbin <ilya.verbin@intel.com>
6296 * c-parser.c: Include context.h and gimple-expr.h.
6297 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6298 monotonic together with nonmonotonic.
6299 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6300 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6301 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6302 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6303 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6304 expressions on combined target teams before the target.
6305 (c_parser_omp_declare_target): If decl has "omp declare target" or
6306 "omp declare target link" attribute, and cgraph or varpool node already
6307 exists, then set corresponding flags. Call c_finish_omp_clauses
6308 in the parenthesized extended-list syntax case.
6309 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6311 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6312 on OMP_CLAUSE_REDUCTION array sections.
6313 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6314 into the constant offset, or for variable low-bound using
6315 POINTER_PLUS_EXPR. For structure element based array sections use
6316 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6317 (c_finish_omp_clauses): Drop generic_field_head, structure
6318 elements are now always mapped even as array section bases,
6319 diagnose same var in data sharing and mapping clauses. Diagnose if
6320 linear step on declare simd is neither a constant nor a uniform
6321 parameter. Look through POINTER_PLUS_EXPR for array section
6322 reductions. Diagnose the same var or function appearing multiple
6323 times on the same directive. Fix up wording for the to clause if t
6324 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6325 modifier on kinds other than dynamic or guided or nonmonotonic
6326 modifier together with ordered clause.
6328 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6329 Chung-Lin Tang <cltang@codesourcery.com>
6331 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6333 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
6335 * c-array-notation.c: Reorder #include's and remove duplicates.
6336 * c-aux-info.c: Likewise.
6337 * c-convert.c: Likewise.
6338 * c-decl.c: Likewise.
6339 * c-errors.c: Likewise.
6340 * c-lang.c: Likewise.
6341 * c-objc-common.c: Likewise.
6342 * c-parser.c: Likewise.
6343 * c-typeck.c: Likewise.
6345 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
6348 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6349 after calling build_qualified_type.
6351 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6352 Thomas Schwinge <thomas@codesourcery.com>
6353 James Norris <jnorris@codesourcery.com>
6354 Joseph Myers <joseph@codesourcery.com>
6355 Julian Brown <julian@codesourcery.com>
6356 Bernd Schmidt <bschmidt@redhat.com>
6358 * c-parser.c (c_parser_oacc_shape_clause): New.
6359 (c_parser_oacc_simple_clause): New.
6360 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6361 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6363 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6364 James Norris <jnorris@codesourcery.com>
6365 Cesar Philippidis <cesar@codesourcery.com>
6369 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6370 parameters, and handle these. Adjust all users.
6371 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6373 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6375 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6377 (c_finish_omp_construct): Declare function.
6378 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6379 Merge functions into...
6380 (c_finish_omp_construct): ... this new function.
6382 2015-10-22 Richard Biener <rguenther@suse.de>
6384 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6385 before folding a MINUS_EXPR.
6387 2015-10-21 Marek Polacek <polacek@redhat.com>
6390 * c-decl.c (start_function): Warn about vararg functions without
6393 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6395 * c-typeck.c (build_conditional_expr): Use boolean vector
6396 type for vector comparison.
6397 (build_vec_cmp): New.
6398 (build_binary_op): Use build_vec_cmp for comparison.
6400 2015-10-20 Marek Polacek <polacek@redhat.com>
6402 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6404 2015-10-20 Marek Polacek <polacek@redhat.com>
6407 * c-parser.c (c_parser_attributes): Break out of the loop if the
6408 token after an attribute isn't a comma.
6410 2015-10-13 Jakub Jelinek <jakub@redhat.com>
6411 Aldy Hernandez <aldyh@redhat.com>
6413 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6414 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6415 (c_parser_omp_variable_list): Handle structure elements for
6416 map, to and from clauses. Handle array sections in reduction
6417 clause. Formatting fixes.
6418 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6419 if clause modifiers.
6420 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6421 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6422 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6423 c_parser_omp_clause_is_device_ptr): New functions.
6424 (c_parser_omp_clause_ordered): Parse optional parameter.
6425 (c_parser_omp_clause_reduction): Handle array reductions.
6426 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6427 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6429 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6430 (c_parser_omp_clause_depend_sink): New function.
6431 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6432 (c_parser_omp_clause_map): Parse release/delete map kinds and
6433 optional always modifier.
6434 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6435 and c_finish_omp_clauses callers.
6436 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6437 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6438 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6439 (OMP_CRITICAL_CLAUSE_MASK): Define.
6440 (c_parser_omp_critical): Parse critical clauses.
6441 (c_parser_omp_for_loop): Handle doacross loops, adjust
6442 c_finish_omp_for and c_finish_omp_clauses callers.
6443 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6444 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6445 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6446 (c_parser_omp_for): Disallow ordered clause when combined with
6447 distribute. Disallow linear clause when combined with distribute
6448 and not combined with simd.
6449 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6450 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6451 parse clauses and if depend clause is found, don't parse a body.
6452 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6453 Allow target parallel without for after it.
6454 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6455 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6456 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6458 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6459 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6460 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6461 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6463 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6464 defaultmap and is_device_ptr clauses.
6465 (c_parser_omp_target): Parse target parallel and target simd. Set
6466 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6467 and target exit data. Diagnose invalid map kinds.
6468 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6469 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6471 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6473 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6474 (c_parser_omp_taskloop): New function.
6475 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6476 handle PRAGMA_OMP_TASKLOOP.
6477 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6478 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6479 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6480 Add IS_OMP argument, handle structure element bases, diagnose
6481 bitfields, pass IS_OMP recursively, diagnose known zero length
6482 array sections in depend clauses, handle array sections in reduction
6483 clause, diagnose negative length even for pointers.
6484 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6485 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6486 array sections in reduction clause, set
6487 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6488 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6489 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6490 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6492 2015-10-06 Marek Polacek <polacek@redhat.com>
6494 * c-parser.c (c_parser_statement_after_labels): Use
6495 protected_set_expr_location.
6496 (c_parser_omp_clause_num_gangs): Likewise.
6497 (c_parser_omp_clause_num_threads): Likewise.
6498 (c_parser_omp_clause_num_workers): Likewise.
6499 (c_parser_omp_clause_vector_length): Likewise.
6500 (c_parser_omp_clause_num_teams): Likewise.
6501 (c_parser_omp_clause_thread_limit): Likewise.
6502 * c-typeck.c (build_c_cast): Likewise.
6503 (c_cast_expr): Likewise.
6505 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6507 * c-typeck.c (c_tree_equal): Use real_equal instead of
6510 2015-10-04 Jason Merrill <jason@redhat.com>
6512 * c-parser.c (c_lex_one_token): Handle @synchronized.
6513 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6514 can change whether the function is transaction_safe.
6516 2015-10-02 Marek Polacek <polacek@redhat.com>
6519 * c-typeck.c (convert_for_assignment): Use the expansion point
6520 location throughout.
6522 2015-10-02 Marek Polacek <polacek@redhat.com>
6525 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6526 and pass it down to c_parser_if_statement.
6527 (c_parser_else_body): Add CHAIN parameter and pass it down to
6528 c_parser_statement_after_labels.
6529 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6530 duplicated if-else-if conditions.
6532 2015-10-01 Marek Polacek <polacek@redhat.com>
6534 * c-typeck.c (convert_for_assignment): Improve commentary.
6536 2015-09-30 Marek Polacek <polacek@redhat.com>
6539 * c-typeck.c (c_finish_return): Use the expansion point location for
6540 certain "return with value" warnings.
6542 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6544 * c-parser.c (pragma_lex): Add loc argument.
6546 2015-09-15 Marek Polacek <polacek@redhat.com>
6549 * c-decl.c (tag_exists_p): New function.
6550 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6551 struct/union/enum keywords are missing.
6552 * c-tree.h (tag_exists_p): Declare.
6554 2015-09-15 Marek Polacek <polacek@redhat.com>
6556 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6557 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6558 Return NULL_TREE instead of 0.
6559 (lookup_name): Return NULL_TREE instead of 0.
6560 (lookup_name_in_scope): Likewise.
6561 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6562 (parser_xref_tag): Use false instead of 0.
6563 (start_struct): Use true instead of 1.
6564 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6566 2015-09-14 Marek Polacek <polacek@redhat.com>
6568 * c-typeck.c (set_nonincremental_init_from_string): Use
6569 HOST_WIDE_INT_M1U when shifting a negative value.
6571 2015-09-09 Mark Wielaard <mjw@redhat.com>
6573 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6576 2015-09-10 Jakub Jelinek <jakub@redhat.com>
6579 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6580 into OMP_FOR_PRE_BODY rather than before the loop.
6582 2015-09-09 Jakub Jelinek <jakub@redhat.com>
6585 * c-parser.c (c_parser_oacc_all_clauses,
6586 c_parser_omp_all_clauses): Remove invalid clause from
6587 list of clauses even if parser->error is set.
6590 * c-parser.c (c_parser_omp_clause_aligned,
6591 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6593 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6597 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6598 instead of c_parser_unary_expression. If the result is !lvalue_p,
6599 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6601 2015-09-04 Marek Polacek <polacek@redhat.com>
6604 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6606 2015-09-03 Martin Sebor <msebor@redhat.com>
6609 * c-typeck.c (convert_arguments, parser_build_unary_op,
6610 build_conditional_expr, c_cast_expr, convert_for_assignment,
6611 build_binary_op, _objc_common_truthvalue_conversion): Call
6613 (c_decl_implicit): Define.
6615 2015-09-02 Marek Polacek <polacek@redhat.com>
6618 * c-parser.c (c_parser_enum_specifier): Give a better error for
6621 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6623 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6625 2015-08-12 Marek Polacek <polacek@redhat.com>
6627 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6630 2015-08-03 Marek Polacek <polacek@redhat.com>
6633 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6635 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6637 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6639 * c-parser.c (c_parser_if_body): Take token_indent_info
6640 argument. Call warn_for_misleading_indentation even when the
6641 body is a semicolon. Extract token_indent_infos corresponding
6642 to the guard, body and next tokens. Adjust call to
6643 warn_for_misleading_indentation accordingly.
6644 (c_parser_else_body): Likewise.
6645 (c_parser_if_statement): Likewise.
6646 (c_parser_while_statement): Likewise.
6647 (c_parser_for_statement): Likewise.
6649 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6650 Manuel López-Ibáñez <manu@gcc.gnu.org>
6652 * c-decl.c (get_parm_info): Remove static var. Update warning
6655 2015-07-27 Marek Polacek <polacek@redhat.com>
6659 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6661 2015-07-20 Marek Polacek <polacek@redhat.com>
6664 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6665 (build_binary_op): Warn about left shift overflows.
6667 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
6669 * c-array-notation.c: Adjust includes for flags.h changes.
6670 * c-objc-common.c: Likewise.
6672 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
6674 * c-array-notation.c: Adjust includes.
6675 * c-aux-info.c: Likewise.
6676 * c-convert.c: Likewise.
6677 * c-decl.c: Likewise.
6678 * c-errors.c: Likewise.
6679 * c-lang.c: Likewise.
6680 * c-objc-common.c: Likewise.
6681 * c-parser.c: Likewise.
6682 * c-typeck.c: Likewise.
6684 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6687 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6689 2015-06-29 Marek Polacek <polacek@redhat.com>
6692 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6693 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6694 about -Wswitch-bool here.
6695 (do_case): Update c_add_case_label call.
6696 (c_finish_case): Update c_do_switch_warnings call.
6698 2015-06-27 Marek Polacek <polacek@redhat.com>
6700 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6702 2015-06-26 Marek Polacek <polacek@redhat.com>
6704 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6706 * c-typeck.c (array_to_pointer_conversion): Likewise.
6707 (build_unary_op): Likewise.
6708 (c_finish_return): Likewise.
6710 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
6712 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6713 * c-parser.c: Likewise.
6715 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6717 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6718 instead of pointer_hash.
6719 (detect_field_duplicates): Likewise.
6721 2015-06-25 Marek Polacek <polacek@redhat.com>
6723 * c-array-notation.c: Use VAR_P throughout.
6724 * c-decl.c: Likewise.
6725 * c-objc-common.c: Likewise.
6726 * c-parser.c: Likewise.
6727 * c-typeck.c: Likewise.
6729 2015-06-25 Marek Polacek <polacek@redhat.com>
6731 * c-decl.c: Use is_global_var throughout.
6732 * c-parser.c: Likewise.
6733 * c-typeck.c: Likewise.
6735 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
6737 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6738 * c-aux-info.c: Likewise.
6739 * c-convert.c: Likewise.
6740 * c-decl.c: Likewise.
6741 * c-errors.c: Likewise.
6742 * c-lang.c: Likewise.
6743 * c-objc-common.c: Likewise.
6744 * c-parser.c: Likewise.
6745 * c-typeck.c: Likewise.
6747 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
6750 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6753 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6755 * c-decl.c (pop_scope): Register the main translation unit
6756 through the new debug hook.
6758 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
6760 * c-array-notation.c : Adjust include files.
6761 * c-aux-info.c : Likewise.
6762 * c-convert.c : Likewise.
6763 * c-decl.c : Likewise.
6764 * c-errors.c : Likewise.
6765 * c-lang.c : Likewise.
6766 * c-lang.h : Likewise.
6767 * c-objc-common.c : Likewise.
6768 * c-parser.c : Likewise.
6769 * c-typeck.c : Likewise.
6771 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6773 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6774 immediately clobber it.
6775 (c_write_global_declarations_1): Remove call to
6776 check_global_declaration_1.
6777 (c_write_global_declarations_2): Remove.
6778 (c_write_final_cleanups): Rename from c_write_global_declarations.
6779 Remove call to finalize_compilation_unit.
6780 Remove calls to debugging hooks.
6781 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6782 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6783 * c-tree.h: Remove c_write_global_declarations.
6785 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6787 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6788 * c-aux-info.c: Likewise.
6789 * c-convert.c: Likewise.
6790 * c-decl.c: Likewise.
6791 * c-errors.c: Likewise.
6792 * c-lang.c: Likewise.
6793 * c-objc-common.c: Likewise.
6794 * c-parser.c: Likewise.
6795 * c-typeck.c: Likewise.
6797 2015-06-04 Marek Polacek <polacek@redhat.com>
6800 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6803 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6805 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6806 Warn for empty struct.
6807 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6809 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6811 * c-decl.c (start_function): Call plugin before parsing.
6812 (finish_function): Call plugin after parsing.
6814 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6817 * c-decl.c (merge_decls): Merge DECL_COMMON.
6819 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
6821 * Make-lang.in (check_gcc_pallelize): Define.
6823 2015-05-22 Marek Polacek <polacek@redhat.com>
6826 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6829 2015-05-21 Marek Polacek <polacek@redhat.com>
6831 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6834 2015-05-20 Marek Polacek <polacek@redhat.com>
6836 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6837 * c-typeck.c: Likewise.
6839 2015-05-19 Marek Polacek <polacek@redhat.com>
6841 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6843 2015-05-19 Jakub Jelinek <jakub@redhat.com>
6846 * c-parser.c (c_parser_omp_for_loop): Don't add
6847 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6848 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6849 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6852 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6854 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
6857 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6860 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6863 2015-05-14 Marek Polacek <polacek@redhat.com>
6867 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6870 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6872 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6873 to add a call to warn_for_misleading_indentation.
6874 (c_parser_else_body): Likewise, adding param "else_loc".
6875 (c_parser_if_statement): Check for misleading indentation.
6876 (c_parser_while_statement): Likewise.
6877 (c_parser_for_statement): Likewise.
6879 2015-05-08 Marek Polacek <polacek@redhat.com>
6882 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6883 (output_init_element): Likewise.
6885 2015-05-07 Marek Polacek <polacek@redhat.com>
6888 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6891 2015-04-30 Marek Polacek <polacek@redhat.com>
6893 * c-typeck.c (set_init_label): Call error_at instead of error and
6896 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6899 * c-typeck.c (c_build_va_arg): Clarify the error message.
6901 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6903 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6904 OMP_STANDALONE_CLAUSES.
6906 2015-04-28 Marek Polacek <polacek@redhat.com>
6908 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6910 2015-04-28 Marek Polacek <polacek@redhat.com>
6913 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6915 2015-04-25 Marek Polacek <polacek@redhat.com>
6918 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6921 2015-04-23 Marek Polacek <polacek@redhat.com>
6924 * c-decl.c (set_labels_context_r): New function.
6925 (store_parm_decls): Call it via walk_tree_without_duplicates.
6926 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6927 instead of create_tmp_var. Build TARGET_EXPR instead of
6929 (build_atomic_assign): Use create_tmp_var_raw instead of
6930 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6932 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6934 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6935 (c_parser_omp_target_update): Add missed %> to error_at ().
6937 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6940 * c-decl.c (c_default_pointer_mode): Remove definition.
6941 * c-tree.h (c_default_pointer_mode): Remove declaration.
6943 2015-03-27 Tobias Burnus <burnus@net-b.de>
6946 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6948 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6949 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6950 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6952 2015-03-19 Jakub Jelinek <jakub@redhat.com>
6954 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6955 attribute for DECL_EXTERNAL VAR_DECLs.
6957 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6959 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6962 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6965 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6966 before preparing arguments to warn_logical_not_parentheses.
6968 2015-03-09 Jakub Jelinek <jakub@redhat.com>
6971 * c-typeck.c (parser_build_binary_op): Don't warn for
6972 !!x == y or !b == y where b is _Bool.
6974 2015-03-09 Marek Polacek <polacek@redhat.com>
6976 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6977 * c-decl.c (grokdeclarator): Likewise.
6978 * c-typeck.c (build_binary_op): Likewise.
6980 2015-02-27 Marek Polacek <polacek@redhat.com>
6983 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6985 2015-02-14 Marek Polacek <polacek@redhat.com>
6988 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6989 declared through a typedef name.
6991 2015-02-13 Marek Polacek <polacek@redhat.com>
6994 * c-decl.c (grokdeclarator): Print also the type when giving
6995 the error message about array's incomplete element type.
6997 2015-02-11 Jakub Jelinek <jakub@redhat.com>
7000 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7001 check in the POP macro.
7003 2015-02-09 Marek Polacek <polacek@redhat.com>
7006 * c-typeck.c (process_init_element): Don't always wrap
7007 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7008 initializing a range of elements.
7010 2015-02-04 Jakub Jelinek <jakub@redhat.com>
7014 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7016 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
7018 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7019 processing enum declaration.
7021 2015-01-29 Marek Polacek <polacek@redhat.com>
7024 * c-typeck.c (pop_init_level): If constructor_elements has
7025 exactly one element with integer_zerop value, set constructor_zeroinit
7026 to 1. Remove braces around warning_init call.
7028 2015-01-27 Jakub Jelinek <jakub@redhat.com>
7031 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7032 of FUNCTION_DECLs with error_mark_node.
7034 2015-01-26 Jakub Jelinek <jakub@redhat.com>
7037 * c-typeck.c (convert_arguments): Return -1 if there are
7038 error_args, even if we've diagnosed too many arguments.
7040 2015-01-21 Richard Biener <rguenther@suse.de>
7043 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7044 for builtins the user declared correctly.
7046 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7047 Bernd Schmidt <bernds@codesourcery.com>
7048 Cesar Philippidis <cesar@codesourcery.com>
7049 James Norris <jnorris@codesourcery.com>
7050 Jakub Jelinek <jakub@redhat.com>
7051 Ilmir Usmanov <i.usmanov@samsung.com>
7053 * c-parser.c: Include "gomp-constants.h".
7054 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7055 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7056 Use OMP_CLAUSE_SET_MAP_KIND.
7057 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7058 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7059 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7060 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7061 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7062 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7063 "copyout", "create", "delete", "deviceptr", "gang", "host",
7064 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7065 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7066 "present_or_create", "pcreate", "seq", "self", "vector",
7067 "vector_length", "wait", "worker".
7068 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7069 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7070 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7071 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7072 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7073 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7074 (c_parser_oacc_data_clause_deviceptr)
7075 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7076 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7077 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7078 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7079 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7080 (c_parser_oacc_parallel, c_parser_oacc_update)
7081 (c_parser_oacc_wait): New functions.
7082 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7083 (c_finish_oacc_data): New prototypes.
7084 * c-typeck.c: Include "gomp-constants.h".
7085 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7086 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7087 OMP_CLAUSE_SET_MAP_KIND.
7088 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7089 (c_finish_oacc_data): New functions.
7090 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7091 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7092 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7093 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7094 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7095 GOMP_MAP_FORCE_DEVICEPTR.
7097 2015-01-09 Michael Collison <michael.collison@linaro.org>
7099 * c-array-notation.c: Include hash-set.h, machmode.h,
7100 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7101 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7102 * c-aux-info.c: Ditto.
7103 * c-convert.c: Ditto.
7105 * c-errors.c: Ditto.
7106 * c-lang.c: Dittoxs.
7107 * c-objc-common.c: Ditto.
7108 * c-parser.c: Ditto.
7109 * c-typeck.c: Include hash-set.h, machmode.h,
7110 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7111 fold-const.h, wide-int.h, inchash.h, real.h and
7112 fixed-value.h due to flattening of tree.h.
7114 2015-01-07 Marek Polacek <polacek@redhat.com>
7117 * c-typeck.c (process_init_element): Disallow initialization of
7118 a flexible array member with a string constant if the structure
7121 2015-01-05 Jakub Jelinek <jakub@redhat.com>
7124 * c-typeck.c (convert_for_assignment, c_finish_return): For
7125 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7126 types also set in_late_binary_op around convert call.
7127 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7128 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7129 result on expr as last argument to ubsan_instrument_float_cast,
7130 if in_late_binary_op, don't use c_save_expr but save_expr.
7132 Update copyright years.
7134 2015-01-05 Marek Polacek <polacek@redhat.com>
7137 * c-typeck.c (build_array_ref): Pass loc down to
7138 warn_array_subscript_with_type_char.
7140 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
7142 * c-typeck.c: New behavious for pointers to arrays with qualifiers
7143 (common-pointer-type): For pointers to arrays take qualifiers from
7145 (build_conditional_expr): Add warnings for lost qualifiers.
7146 (comp-target-types): Allow pointers to arrays with different qualifiers.
7147 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
7148 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
7149 to PEDWARN_FOR_QUALIFIERS.
7151 2014-12-17 Jakub Jelinek <jakub@redhat.com>
7154 * c-convert.c: Include ubsan.h.
7155 (convert): For real -> integral casts and
7156 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7157 instead instrument the float cast directly.
7159 2014-11-29 Jakub Jelinek <jakub@redhat.com>
7161 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7162 c_finish_stmt_expr): Remove NULL last argument from
7163 create_tmp_var_raw and create_tmp_var calls.
7164 * c-array-notation.c (fix_builtin_array_notation_fn,
7165 build_array_notation_expr, fix_conditional_array_notations_1,
7166 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7168 2014-11-28 Marek Polacek <polacek@redhat.com>
7171 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7172 convert the right operand to integer type.
7174 2014-11-25 Marek Polacek <polacek@redhat.com>
7177 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7178 for inline functions.
7180 2014-11-21 Jakub Jelinek <jakub@redhat.com>
7183 * c-typeck.c (build_array_ref): Adjust
7184 convert_vector_to_pointer_for_subscript caller. If it returns true,
7185 call non_lvalue_loc on the result.
7187 2014-11-11 Richard Biener <rguenther@suse.de>
7189 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7192 2014-11-10 Andi Kleen <ak@linux.intel.com>
7195 * c-parser.c (c_parser_statement_after_labels): Call
7197 (c_parser_if_statement): Dito.
7198 (c_parser_switch_statement): Dito.
7199 (c_parser_while_statement): Dito.
7200 (c_parser_do_statement): Dito.
7201 (c_parser_for_statement): Dito.
7202 * c-typeck.c (c_finish_loop): Dito.
7204 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7206 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7207 OPT_Wshift_count_overflow in the warnings.
7209 2014-10-30 Marek Polacek <polacek@redhat.com>
7211 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7212 print the stripped version as well, if they're not the same.
7214 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7216 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7219 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
7221 * c-decl.c: Adjust include files.
7222 * c-parser.c: Ditto.
7224 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7225 Tom Tromey <tromey@redhat.com>
7227 * c-tree.h (enum c_oracle_request): New.
7228 (c_binding_oracle_function): New typedef.
7229 (c_binding_oracle, c_pushtag, c_bind): Declare.
7230 * c-decl.c (c_binding_oracle): New global.
7231 (I_SYMBOL_CHECKED): New macro.
7232 (i_symbol_binding): New function.
7233 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7234 (I_TAG_CHECKED): New macro.
7235 (i_tag_binding): New function.
7236 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7237 (I_LABEL_CHECKED): New macro.
7238 (i_label_binding): New function.
7239 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7240 (c_print_identifier): Save and restore c_binding_oracle.
7241 (c_pushtag, c_bind): New functions.
7243 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
7245 * c-typeck.c: Adjust include files.
7247 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7250 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7251 initialization here...
7252 (c_initialize_diagnostics): ... but here. Set defaults after
7253 building pretty-printer.
7255 2014-10-23 Marek Polacek <polacek@redhat.com>
7258 * c-decl.c (pop_scope): Don't print warning in external_scope.
7260 2014-10-19 Marek Polacek <polacek@redhat.com>
7263 * c-typeck.c (output_init_element): Allow initializing objects with
7264 static storage duration with compound literals even in C99 and add
7267 2014-10-17 Marek Polacek <polacek@redhat.com>
7270 * c-typeck.c (digest_init): Allow initializing objects with static
7271 storage duration with compound literals even in C99 and add pedwarn
7274 2014-10-17 Marek Polacek <polacek@redhat.com>
7277 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7278 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7279 error multiple times. Print the type.
7281 2014-10-17 Marek Polacek <polacek@redhat.com>
7284 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7287 2014-10-17 Marek Polacek <polacek@redhat.com>
7289 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7290 (start_function): Use OPT_Wimplicit_int instead of 0.
7291 (store_parm_decls_oldstyle): Likewise.
7293 2014-10-17 Alan Modra <amodra@gmail.com>
7296 * c-decl.c (merge_decls): Don't merge section name or tls model
7297 to newdecl symtab node, instead merge to olddecl. Override
7298 existing olddecl section name. Set tls_model for all thread-local
7299 vars, not just OMP thread-private ones. Remove incorrect comment.
7301 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
7303 * c-decl.c: Adjust include files.
7305 2014-10-14 DJ Delorie <dj@redhat.com>
7307 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7308 (c_token_starts_typename): Check all __intN, not just __int128.
7309 (c_token_starts_declspecs): Likewise.
7310 (c_parser_declspecs): Likewise.
7311 (c_parser_attribute_any_word): Likewise.
7312 (c_parser_objc_selector): Likewise.
7313 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7314 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7316 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7318 (finish_declspecs): Likewise.
7320 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7322 * c-parser.c (c_parser_all_labels): New function to replace
7324 (c_parser_statement): Call the new function.
7326 2014-10-09 Marek Polacek <polacek@redhat.com>
7329 * c-typeck.c (pop_init_level): Don't warn about initializing
7332 2014-10-07 Marek Polacek <polacek@redhat.com>
7335 * c-decl.c (header_for_builtin_fn): New function.
7336 (implicitly_declare): Suggest which header to include.
7338 2014-10-07 Marek Polacek <polacek@redhat.com>
7340 * c-convert.c (convert): Use error_operand_p.
7341 * c-typeck.c (require_complete_type): Likewise.
7342 (really_atomic_lvalue): Likewise.
7343 (digest_init): Likewise.
7344 (handle_omp_array_sections_1): Likewise.
7346 2014-10-03 Marek Polacek <polacek@redhat.com>
7349 * c-decl.c (pop_scope): Don't warn about "inline function declared
7350 but never defined" for functions marked with gnu_inline attribute.
7352 2014-09-25 Jakub Jelinek <jakub@redhat.com>
7355 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7356 on low_bound and length.
7358 2014-09-24 Marek Polacek <polacek@redhat.com>
7362 * c-parser.c: Don't define CPP_KEYWORD.
7363 (c_parser_switch_statement): Pass original type to c_finish_case.
7364 * c-tree.h (c_finish_case): Update declaration.
7365 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7366 conditionally to c_do_switch_warnings.
7368 2014-09-03 Marek Polacek <polacek@redhat.com>
7371 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7374 2014-09-02 Jakub Jelinek <jakub@redhat.com>
7375 Balaji V. Iyer <balaji.v.iyer@intel.com>
7376 Igor Zamyatin <igor.zamyatin@intel.com>
7378 * c-parser.c (c_parser_cilk_for): New function.
7379 (c_parser_cilk_grainsize): Likewise.
7380 (c_get_temp_regvar): Likewise.
7381 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7382 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7383 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7384 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7387 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7389 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7390 with using HOST_WIDE_INT without truncation to 'int'
7392 2014-08-22 Marek Polacek <polacek@redhat.com>
7395 * c-typeck.c (parser_build_binary_op): Adjust call to
7396 warn_logical_not_parentheses.
7398 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7401 * c-parser.c (c_parser_array_notation): Check for correct
7402 type of an array added.
7404 2014-08-19 Marek Polacek <polacek@redhat.com>
7407 * c-typeck.c (build_binary_op): If either operand of a comparison
7408 is a boolean expression, call maybe_warn_bool_compare.
7410 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7413 * c-typeck.c (build_c_cast): Do a conversion even when the
7414 TYPE_MAIN_VARIANTs are the same.
7416 2014-08-19 Marek Polacek <polacek@redhat.com>
7418 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7419 pedwarn_c99 instead of pedwarn.
7420 (grokfield): Likewise.
7421 (warn_defaults_to): New function.
7422 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7423 Unconditionally call pedwarn_c99 instead of pedwarn.
7424 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7425 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7426 check flag_isoc11 before.
7427 * c-errors.c (pedwarn_c99): Change the return type to bool.
7428 Handle -Wc99-c11-compat.
7429 * c-parser.c (disable_extension_diagnostics): Handle
7430 warn_c99_c11_compat.
7431 (restore_extension_diagnostics): Likewise.
7432 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7433 instead of pedwarn, don't check flag_isoc11 before.
7434 (c_parser_declspecs): Likewise.
7435 (c_parser_alignas_specifier): Likewise.
7436 (c_parser_alignof_expression): Likewise.
7437 (c_parser_generic_selection): Likewise.
7438 * c-tree.h (pedwarn_c99): Update declaration.
7439 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7442 2014-08-19 Marek Polacek <polacek@redhat.com>
7444 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7446 * c-errors.c: Include "opts.h".
7447 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7448 * c-parser.c (disable_extension_diagnostics): Handle negative value
7449 of warn_c90_c99_compat, too.
7450 (restore_extension_diagnostics): Likewise.
7451 (c_parser_compound_statement_nostart): Pass
7452 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7454 2014-08-12 Marek Polacek <polacek@redhat.com>
7456 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7458 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7460 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7462 2014-08-10 Marek Polacek <polacek@redhat.com>
7465 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7466 Call pedwarn_c90 instead of pedwarn.
7467 (check_bitfield_type_and_width): Likewise.
7468 (declspecs_add_qual): Likewise.
7469 (declspecs_add_type): Likewise.
7470 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7471 Adjust to only call pedwarn_c90.
7472 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7473 pedwarn_c90 instead of pedwarn.
7474 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7475 * c-parser.c (disable_extension_diagnostics): Handle
7476 warn_c90_c99_compat.
7477 (restore_extension_diagnostics): Likewise.
7478 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7479 pedwarn_c90 instead of pedwarn.
7480 (c_parser_initelt): Likewise.
7481 (c_parser_postfix_expression): Likewise.
7482 (c_parser_postfix_expression_after_paren_type): Likewise.
7483 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7484 * c-tree.h: Fix formatting.
7485 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7486 pedwarn_c90 instead of pedwarn.
7488 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7490 * c-typeck.c: Remove include of pointer-set.h.
7492 2014-08-07 Marek Polacek <polacek@redhat.com>
7494 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7496 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7498 * c-typeck.c: Use hash_map instead of pointer_map.
7500 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7502 * c-decl.c: Use hash_set instead of pointer_set.
7504 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7507 * c-array-notation.c (expand_array_notations): Handling
7510 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
7513 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7516 2014-07-30 Tom Tromey <tromey@redhat.com>
7518 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7520 (really_start_incremental_init, push_init_level): Initialize
7522 (pop_init_level): Set global designator_depth.
7523 (process_init_element): Check for designated_init attribute.
7525 2014-07-20 Marek Polacek <polacek@redhat.com>
7528 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7529 (implicitly_declare): Pass location to implicit_decl_warning.
7531 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7534 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7535 If non-NULL, call c_parser_check_literal_zero.
7536 (c_parser_check_literal_zero): New function.
7537 (c_parser_postfix_expression_after_primary): Adjust
7538 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7540 2014-07-06 Marek Polacek <polacek@redhat.com>
7543 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7544 * c-tree.h (C_ARRAY_PARAMETER): Define.
7545 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7548 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
7549 Chen Gang <gang.chen.5i5j@gmail.com>
7551 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7554 2014-07-01 Marek Polacek <polacek@redhat.com>
7556 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7557 instead of 0 to WARN_FOR_ASSIGNMENT.
7559 2014-07-01 Marek Polacek <polacek@redhat.com>
7562 * c-typeck.c (convert_for_assignment): Pass
7563 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7565 2014-06-30 Marek Polacek <polacek@redhat.com>
7567 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7568 has no_sanitize_undefined attribute.
7570 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7573 * c-array-notation.c (fix_builtin_array_notation_fn):
7574 Check for 0 arguments in builtin call. Check that bultin argument is
7576 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7579 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7581 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7582 qualifiers in __auto_type for atomic types.
7583 (c_parser_typeof_specifier): Discard all type qualifiers in
7584 __typeof__ for atomic types.
7586 2014-06-25 Marek Polacek <polacek@redhat.com>
7589 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7590 the return expression to c_finish_return.
7592 2014-06-25 Jakub Jelinek <jakub@redhat.com>
7594 * c-typeck.c (c_finish_omp_clauses): Make sure
7595 OMP_CLAUSE_LINEAR_STEP has correct type.
7597 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7601 2014-06-24 Jakub Jelinek <jakub@redhat.com>
7603 * c-parser.c (c_parser_omp_for_loop): For
7604 #pragma omp parallel for simd move lastprivate clause from parallel
7605 to for rather than simd.
7607 2014-06-23 Marek Polacek <polacek@redhat.com>
7609 * c-typeck.c (parser_build_binary_op): Don't call
7610 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7612 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
7614 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7615 * c-decl.c (merge_decls): Likewise.
7617 2014-06-09 Marek Polacek <polacek@redhat.com>
7620 * c-typeck.c (error_init): Call inform instead of error_at.
7621 (pedwarn_init): Call inform instead of pedwarn.
7622 (warning_init): Call inform instead of warning_at.
7624 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
7626 * c-decl.c (merge_decls): Use set_decl_section_name.
7627 (duplicate_decls): Remove node if it exists.
7629 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7632 * c-typeck.c (push_init_level, process_init_element,
7633 pop_init_level): Correct check for zero initialization, move
7634 missing brace warning to respect zero initialization.
7636 2014-06-05 Marek Polacek <polacek@redhat.com>
7639 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7641 2014-06-05 Marek Polacek <polacek@redhat.com>
7644 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
7645 on the left hand side operand of a comparison.
7647 2014-06-05 Marek Polacek <polacek@redhat.com>
7650 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7651 Print note only if the warning was printed.
7653 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7656 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7659 2014-06-03 Marek Polacek <polacek@redhat.com>
7662 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7664 * c-tree.h (c_start_case): Update.
7665 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7666 switch condition has boolean value.
7668 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
7670 * c-decl.c: Include builtins.h.
7671 * c-parser.c: Likewise.
7673 2014-05-27 Marek Polacek <polacek@redhat.com>
7676 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7677 error and warning calls to error_at and warning_at. Pass location of
7678 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7679 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7680 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7682 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7685 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7686 function parameters.
7688 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
7690 * c-decl.c (merge_decls): Preserve symtab node pointers.
7691 (duplicate_decls): Free new decl.
7693 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7695 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7698 * c-parser.c (c_parser_omp_target): Return bool values.
7700 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7702 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7703 num_teams_loc variable to num_thread_limit_loc.
7705 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7707 * c-array-notation.c (expand_array_notations): Use void_node
7708 instead of void_zero_node.
7710 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7712 * c-decl.c (finish_struct): Adjust.
7713 (finish_enum): Likewise.
7715 (record_inline_static): Likewise.
7716 (push_scope): Likewise.
7717 (make_label): Likewise.
7718 (lookup_label_for_goto): Likewise.
7719 (finish_struct): Likewise.
7720 (finish_enum): Likewise.
7721 (store_parm_decls): Likewise.
7722 (c_push_function_context): Likewise.
7723 * c-lang.h: Remove usage of variable_size gty attribute.
7724 * c-parser.c (c_parse_init): Adjust.
7725 (c_parse_file): Likewise.
7727 2014-05-13 Marek Polacek <polacek@redhat.com>
7730 * c-typeck.c (convert_for_assignment): Pass location to
7731 WARN_FOR_ASSIGNMENT instead of input_location.
7733 2014-05-10 Marek Polacek <polacek@redhat.com>
7735 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7736 maybe_warn_string_init.
7737 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7738 maybe_warn_string_init.
7739 * c-tree.h (maybe_warn_string_init): Update declaration.
7740 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7741 Call pedwarn_init with loc instead of with input_location.
7742 (digest_init): Pass init_loc to maybe_warn_string_init.
7743 (pop_init_level): Call pedwarn_init with loc instead of with
7745 (set_init_index): Likewise.
7746 (process_init_element): Likewise.
7748 2014-05-09 Marek Polacek <polacek@redhat.com>
7751 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7752 (c_parser_initelt): Pass location to set_init_label. Pass array index
7753 location to set_init_index.
7754 * c-tree.h (push_init_level): Update declaration.
7755 (pop_init_level): Likewise.
7756 (set_init_index): Likewise.
7757 (set_init_label): Likewise.
7758 * c-typeck.c (error_init): Add location parameter. Call error_at
7760 (digest_init): Pass init_loc to error_init.
7761 (really_start_incremental_init):
7762 (push_init_level): Add location parameter. Pass loc to pop_init_level
7764 (pop_init_level): Likewise.
7765 (set_designator): Add location parameter. Pass loc to pop_init_level,
7766 push_init_level, and error_init.
7767 (set_init_index): Add location parameter. Pass loc to error_init and
7769 (set_init_label): Likewise.
7770 (output_init_element): Pass loc to error_init.
7771 (process_init_element): Pass loc to error_init, pop_init_level,
7772 pedwarn_init, and push_init_level.
7774 2014-05-09 Marek Polacek <polacek@redhat.com>
7777 * c-parser.c (c_parser_attributes): Parse the arguments as an
7778 expression-list if the attribute takes identifier.
7780 2014-05-08 Marek Polacek <polacek@redhat.com>
7783 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7786 2014-05-08 Marek Polacek <polacek@redhat.com>
7789 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7792 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7793 Mike Stump <mikestump@comcast.net>
7794 Richard Sandiford <rdsandiford@googlemail.com>
7796 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7797 (finish_enum): Use wide-int interfaces.
7798 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7799 * c-typeck.c (build_c_cast): Likewise.
7800 (set_nonincremental_init_from_string): Likewise.
7801 (c_tree_equal): Likewise.
7803 2014-05-02 Marek Polacek <polacek@redhat.com>
7806 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7807 Return size_one_node when the type is not complete.
7808 (pointer_diff): Remove comment.
7809 (build_unary_op): Improve error messages.
7811 2014-05-02 Marek Polacek <polacek@redhat.com>
7813 * c-typeck.c (c_finish_return): Separate warning_at calls.
7815 2014-05-02 Marek Polacek <polacek@redhat.com>
7817 * c-tree.h (error_init): Remove declaration.
7818 (pedwarn_init): Likewise.
7819 * c-typeck.c (error_init): Make static and move above.
7820 (pedwarn_init): Likewise.
7821 (warning_init): Move above.
7822 (maybe_warn_string_init): Likewise.
7824 2014-05-01 Jeff Law <law@redhat.com>
7828 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7829 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7832 2014-05-02 Marek Polacek <polacek@redhat.com>
7835 * c-typeck.c (push_init_level): Set constructor_designated to
7836 p->designated for structures.
7838 2014-05-01 Marek Polacek <polacek@redhat.com>
7841 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7842 function-definition has an attribute after the declarator.
7844 2014-05-01 Marek Polacek <polacek@redhat.com>
7847 * c-typeck.c (warning_init): Add location_t parameter. Call
7848 warning_at instead of warning.
7849 (push_init_level): Pass input_location to warning_init.
7850 (add_pending_init): Add location_t parameter. Pass loc to
7852 (set_nonincremental_init): Pass input_location to add_pending_init.
7853 (set_nonincremental_init_from_string): Likewise.
7854 (output_init_element): Pass loc to warning_init and to
7857 2014-05-01 Marek Polacek <polacek@redhat.com>
7860 * c-typeck.c (c_finish_return): Distinguish between label and variable
7861 when warning about returning local address.
7863 2014-05-01 Marek Polacek <polacek@redhat.com>
7866 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7869 2014-05-01 Marek Polacek <polacek@redhat.com>
7872 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7873 instead of 0 to WARN_FOR_QUALIFIERS.
7875 2014-05-01 Marek Polacek <polacek@redhat.com>
7878 * c-typeck.c (default_conversion): Use better location for
7881 2014-04-30 Marek Polacek <polacek@redhat.com>
7883 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7884 also when SANITIZE_FLOAT_DIVIDE is on.
7886 2014-04-30 Marek Polacek <polacek@redhat.com>
7889 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7890 and pedwarn_init. Use loc insted of input_location.
7892 2014-04-30 Marek Polacek <polacek@redhat.com>
7895 * c-typeck.c (build_binary_op): Use location when warning about
7898 2014-04-25 Marek Polacek <polacek@redhat.com>
7901 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7902 always_inline/noinline and hot/cold attributes.
7904 2014-04-25 Marek Polacek <polacek@redhat.com>
7907 * c-parser.c (c_parser_initelt): Pass input_location to
7908 process_init_element.
7909 (c_parser_initval): Pass loc to process_init_element.
7910 * c-tree.h (process_init_element): Adjust declaration.
7911 * c-typeck.c (push_init_level): Pass input_location to
7912 process_init_element.
7913 (pop_init_level): Likewise.
7914 (set_designator): Likewise.
7915 (output_init_element): Add location_t parameter. Pass loc to
7917 (output_pending_init_elements): Pass input_location to
7918 output_init_element.
7919 (process_init_element): Add location_t parameter. Pass loc to
7920 output_init_element.
7922 2014-04-24 Jakub Jelinek <jakub@redhat.com>
7924 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7925 atomic-clause, allow comma in between atomic-clause and
7928 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7931 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7932 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7934 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7937 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7938 create_tmp_var instead build_decl for creating temps.
7939 (build_array_notation_expr): Likewise.
7940 (fix_conditional_array_notations_1): Likewise.
7941 (fix_array_notation_expr): Likewise.
7942 (fix_array_notation_call_expr): Likewise.
7944 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7947 * c-tree.h (c_build_function_call_vec): New prototype.
7948 * c-typeck.c (build_function_call_vec): Don't call
7949 resolve_overloaded_builtin here.
7950 (c_build_function_call_vec): New wrapper function around
7951 build_function_call_vec. Call resolve_overloaded_builtin here.
7952 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7953 Call c_build_function_call_vec instead of build_function_call_vec.
7954 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7955 * c-decl.c (finish_decl): Likewise.
7957 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7960 * c-typeck.c: Use correct format string in cast-qual warning
7962 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7964 * c-decl.c (c_decl_attributes): Use
7965 lang_hooks.types.omp_mappable_type.
7966 * c-typeck.c (c_finish_omp_clauses): Likewise.
7968 2014-03-06 Marek Polacek <polacek@redhat.com>
7971 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7972 of checking tree code.
7974 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7976 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7977 (c_parser_parameter_declaration): Likewise.
7979 2014-02-19 Marek Polacek <polacek@redhat.com>
7982 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7983 Call mark_exp_read on exp.value.
7984 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7985 TREE_ADDRESSABLE on old instead of val.
7986 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7988 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7990 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7991 C_EXPR_APPEND by vec_safe_push.
7992 * c-tree.h (C_EXPR_APPEND): Remove.
7994 2014-01-31 Marek Polacek <polacek@redhat.com>
7997 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7998 build_function_call_vec.
7999 (build_function_call): Likewise.
8000 (build_atomic_assign): Likewise.
8001 (build_function_call_vec): Add arg_loc parameter. Use it.
8002 (convert_arguments): Likewise.
8003 (convert_for_assignment): Rename rhs_loc to expr_loc.
8004 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8005 (c_parser_objc_keywordexpr): Likewise.
8006 (c_parser_postfix_expression_after_primary): Call
8007 build_function_call_vec with expr_loc rather than op_loc.
8008 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8009 build_function_call_vec.
8010 (c_parser_expr_list): Add locations parameter. Fill it with locations
8011 of function arguments.
8012 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8014 2014-01-30 Marek Polacek <polacek@redhat.com>
8017 * c-typeck.c (build_function_call_vec): Use loc parameter.
8018 (convert_arguments): Add location parameter. Use it.
8019 (ep_convert_and_check): Likewise.
8020 (build_atomic_assign): Adjust convert_for_assignment call.
8021 (build_modify_expr): Likewise.
8022 (digest_init): Likewise.
8023 (c_finish_return): Likewise.
8024 (build_conditional_expr): Adjust ep_convert_and_check calls.
8025 (convert_for_assignment): Add rhs_loc parameter. Use it.
8026 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8029 2014-01-30 Richard Biener <rguenther@suse.de>
8032 * c-typeck.c (build_function_call_vec): Do not replace calls
8033 to a function via an incompatible type with a runtime abort.
8035 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8037 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8038 flag_enable_cilkplus with flag_cilkplus.
8039 (c_parser_direct_declarator_inner): Likewise.
8040 (c_parser_attribute_any_word): Likewise.
8041 (c_parser_attributes): Likewise.
8042 (c_parser_compound_statement): Likewise.
8043 (c_parser_statement_after_labels): Likewise.
8044 (c_parser_if_statement): Likewise.
8045 (c_parser_switch_statement): Likewise.
8046 (c_parser_do_statement): Likewise.
8047 (c_parser_for_statement): Likewise.
8048 (c_parser_unary_expression): Likewise.
8049 (c_parser_postfix_expression): Likewise.
8050 (c_parser_postfix_expression_after_primary): Likewise.
8051 (c_parser_postfix_expression_after_primary): Likewise.
8052 (c_parser_omp_clause_name): Likewise.
8053 (c_finish_omp_declare_simd): Likewise.
8054 (c_parser_cilk_verify_simd): Likewise.
8055 * c-typeck.c (build_array_ref): Likewise.
8056 (build_function_call_vec): Likewise.
8057 (convert_arguments): Likewise.
8058 (build_compound_expr): Likewise.
8059 (c_finish_return): Likewise.
8060 (c_finish_if_stmt): Likewise.
8061 (c_finish_loop): Likewise.
8062 (build_binary_op): Likewise.
8064 2014-01-23 Marek Polacek <polacek@redhat.com>
8067 * c-typeck.c (parser_build_binary_op): Use location instead of
8069 (build_binary_op): Pass location to shorten_compare.
8071 2014-01-23 Marek Polacek <polacek@redhat.com>
8074 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8077 2014-01-23 Marek Polacek <polacek@redhat.com>
8080 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8081 of a comma expression.
8082 (emit_side_effect_warnings): Likewise.
8084 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8087 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8088 function to use walk_tree and moved a lot of its functionality to
8089 expand_array_notations.
8090 (expand_array_notations): New function.
8092 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8094 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8095 attribute an attribute without value.
8097 2014-01-23 Jakub Jelinek <jakub@redhat.com>
8100 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8101 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8103 2014-01-22 Marek Polacek <polacek@redhat.com>
8106 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8107 of remove_c_maybe_const_expr on op1 and op2.
8109 2014-01-15 Jakub Jelinek <jakub@redhat.com>
8112 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8113 effects, preevaluate rhs using SAVE_EXPR first.
8115 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8118 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8119 statements with if-elseif statements.
8121 2014-01-06 Marek Polacek <polacek@redhat.com>
8124 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8125 defined bit-field types only in ISO C.
8127 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8129 Update copyright years
8131 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8133 * c-array-notation.c: Use the standard form for the copyright notice.
8135 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8137 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8138 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8139 field in parser is not empty. If not-empty, call the function
8140 c_parser_finish_omp_declare_simd.
8141 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8142 between SIMD-enabled functions and #pragma simd. Added new parameter.
8143 (c_parser_cilk_all_clauses): Modified the usage of the function
8144 c_parser_cilk_clause_vectorlength as mentioned above.
8145 (c_parser_cilk_simd_fn_vector_attrs): New function.
8146 (c_finish_cilk_simd_fn_tokens): Likewise.
8147 (is_cilkplus_vector_p): Likewise.
8148 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8149 "nomask," and "mask" strings in clause name.
8150 (c_parser_omp_all_clauses): Added 3 new case statements:
8151 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8152 PRAGMA_CILK_CLAUSE_NOMASK.
8153 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8154 check for vector attribute and if so call the function
8155 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8156 called the function c_finish_cilk_simd_fn_tokens.
8157 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8158 parser field is non-empty. If so, parse them as you would parse
8159 the omp declare simd pragma.
8160 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8161 Added a check when step is a parameter and flag it as error.
8162 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8163 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8166 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8168 * c-parser.c (c_parser_omp_parallel): Fix description.
8170 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8172 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8173 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8174 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8175 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8177 2013-12-04 Joseph Myers <joseph@codesourcery.com>
8180 * c-parser.c (c_parser_alignas_specifier): Use
8181 c_sizeof_or_alignof_type instead of c_alignof.
8182 (c_parser_alignof_expression): Likewise, with min_alignof
8183 parameter depending on alignof spelling used.
8185 2013-12-04 Marek Polacek <polacek@redhat.com>
8188 * c-decl.c (start_function): Don't warn for missing prototype for
8191 2013-12-03 Marek Polacek <polacek@redhat.com>
8194 * c-decl.c (build_compound_literal): Allow compound literals with
8195 empty initial value.
8197 2013-12-02 Joseph Myers <joseph@codesourcery.com>
8200 * c-typeck.c (build_modify_expr): Diagnose assignment to
8201 expression with array type.
8203 2013-11-29 Joseph Myers <joseph@codesourcery.com>
8206 * c-typeck.c (process_init_element): Do not treat a string as
8207 initializing a whole array when used with a designator for an
8210 2013-11-29 Joseph Myers <joseph@codesourcery.com>
8213 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8214 an inline function following a static declaration.
8216 2013-11-28 Jakub Jelinek <jakub@redhat.com>
8219 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8220 to p_name before calling c_parser_omp_teams instead of after.
8221 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8222 argument. Remove unused p_name variable.
8224 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
8225 Jakub Jelinek <jakub@redhat.com>
8227 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8228 external_scope is NULL.
8230 2013-11-27 Tom de Vries <tom@codesourcery.com>
8231 Marc Glisse <marc.glisse@inria.fr>
8234 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8236 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
8238 * c-typeck.c: Add required include files from gimple.h.
8240 2013-11-22 David Malcolm <dmalcolm@redhat.com>
8242 * c-decl.c (define_label, shadow_tag_warned)
8243 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8244 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8245 (declspecs_add_type): Remove use of in_system_header macro.
8246 * c-parser.c (c_parser_unary_expression): Likewise.
8247 * c-typeck.c (store_init_value, process_init_element)
8248 (c_start_case): Likewise.
8250 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8253 * c-parser.c (c_parser_set_source_position_from_token): Remove
8254 reference to in_system_header from comment.
8256 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8258 * c-decl.c (grokdeclarator): Update comment to refer to
8259 tree_to_[su]hwi rather than tree_low_cst.
8261 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8263 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8264 tree_to_uhwi throughout.
8266 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8268 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8271 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8273 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8276 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
8278 * c-parser.c (c_parser_cilk_simd): New.
8279 (c_parser_cilk_verify_simd): New.
8280 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8281 (c_parser_omp_for_loop): Add case for NE_EXPR.
8282 Set c_break_label for CILK_SIMD.
8283 (c_parser_cilk_clause_vectorlength): New.
8284 (c_parser_cilk_clause_linear): New.
8285 (c_parser_cilk_clause_name): New.
8286 (c_parser_cilk_all_clauses): New.
8287 * c-typeck.c (build_unary_op): Pass location argument to
8289 (build_modify_expr): Same.
8290 (build_asm_expr): Same.
8291 (c_finish_bc_stmt): Error on break/continue in loops.
8293 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
8295 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8297 2013-11-14 Diego Novillo <dnovillo@google.com>
8299 * c-decl.c: Include print-tree.h.
8300 Include stor-layout.h.
8303 Include stringpool.h.
8304 * c-lang.c: Include fold-const.h.
8305 * c-parser.c: Include stringpool.h.
8307 Include stor-layout.h.
8309 Include trans-mem.h.
8310 * c-typeck.c: Include stor-layout.h.
8311 Include trans-mem.h.
8315 2013-11-13 Joseph Myers <joseph@codesourcery.com>
8317 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8318 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8320 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8321 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8323 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8324 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8325 (c_parser_declarator, c_parser_direct_declarator_inner)
8326 (c_parser_parameter_declaration, c_parser_type_name): All callers
8328 (c_parser_declaration_or_fndef): Handle declarations with type
8329 determined from the initializer.
8331 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
8333 * c-typeck.c: Include gimplify.h.
8335 2013-11-12 Joseph Myers <joseph@codesourcery.com>
8337 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8338 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8340 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8341 or _Thread_local as appropriate in diagnostics.
8342 (build_null_declspecs): Initialize ret->thread_gnu_p.
8343 (declspecs_add_scspec): Handle either __thread or _Thread_local
8344 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8345 pedantic. Do not disallow _Thread_local extern and _Thread_local
8348 2013-11-07 Joseph Myers <joseph@codesourcery.com>
8349 Andrew MacLeod <amacleod@redhat.com>
8351 * c-aux-info.c (gen_type): Handle atomic qualifier.
8352 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8353 qualifiers when compating types.
8354 (shadow_tag_warned): Handle atomic_p in declspecs.
8355 (quals_from_declspecs): Likewise.
8356 (start_decl): Use c_type_promotes_to when promoting argument
8358 (grokdeclarator): Handle _Atomic.
8359 (get_parm_info): Diagnose any qualifier on "void" as only
8361 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8362 comparing types. Use c_type_promotes_to when promoting argument
8364 (finish_function): Use c_type_promotes_to when promoting argument
8366 (build_null_declspecs): Handle atomic_p in declspecs.
8367 (declspecs_add_qual): Handle RID_ATOMIC.
8368 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8369 (c_token_starts_declspecs): Handle RID_ATOMIC.
8370 (c_parser_declspecs): Handle atomic type specifiers and
8372 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8373 from types of expressions with atomic type.
8374 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8375 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8376 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8377 (c_parser_statement_after_labels, c_parser_switch_statement)
8378 (c_parser_for_statement, c_parser_expr_no_commas)
8379 (c_parser_conditional_expression, c_parser_binary_expression)
8380 (c_parser_cast_expression, c_parser_unary_expression)
8381 (c_parser_postfix_expression)
8382 (c_parser_postfix_expression_after_primary, c_parser_expression):
8383 Use convert_lvalue_to_rvalue.
8384 (c_parser_expression_conv, c_parser_expr_list): Document
8385 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8386 (c_parser_objc_synchronized_statement): Use
8387 convert_lvalue_to_rvalue.
8388 (c_parser_objc_selector): Handle RID_ATOMIC.
8389 (c_parser_objc_receiver, c_parser_array_notation): Use
8390 convert_lvalue_to_rvalue.
8391 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8392 _Atomic (type-name).
8393 (struct c_declspecs): Add atomic_p field.
8394 (convert_lvalue_to_rvalue): Declare.
8395 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8396 corresponding atomic types.
8397 (qualify_type): Don't add _Atomic qualifiers from second argument.
8398 (comp_target_types): Do not allow _Atomic mismatches.
8399 (type_lists_compatible_p): Do not remove atomic qualifiers when
8401 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8402 (build_atomic_assign): New functions.
8403 (build_unary_op): Use build_atomic_assign for atomic increment and
8405 (build_conditional_expr): Do not treat _Atomic void as a qualified
8407 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8408 (find_anonymous_field_with_type, convert_to_anonymous_field)
8409 (convert_for_assignment): Do not remove atomic qualifiers when
8411 (digest_init): Do not accept initialization of arrays of atomic
8412 elements by string constants.
8413 (build_asm_expr): Use convert_lvalue_to_rvalue.
8414 (build_binary_op): Do not treat _Atomic void as a qualified
8417 2013-11-06 DJ Delorie <dj@redhat.com>
8419 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8420 both explicit and builtin, print the location of the explicit one.
8422 2013-11-05 Tobias Burnus <burnus@net-b.de>
8424 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8425 c_parser_omp_distribute, c_parser_omp_teams,
8426 c_parser_omp_target, c_parser_omp_declare): Handle
8429 2013-11-03 Marek Polacek <polacek@redhat.com>
8431 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8433 2013-11-01 Jakub Jelinek <jakub@redhat.com>
8435 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8436 check_dup_generic at the end, unless remove is true.
8437 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8439 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8441 2013-10-31 Jakub Jelinek <jakub@redhat.com>
8443 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8444 with decl that is not pointer nor array.
8446 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8448 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8449 a spawning function is found.
8450 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8451 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8452 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8453 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8455 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8456 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8458 (c_finish_return): Added a check to reject _Cilk_spawn in return
8460 (build_cilk_spawn): New function.
8461 (build_cilk_sync): Likewise.
8462 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
8464 2013-10-27 Tobias Burnus <burnus@net-b.de>
8467 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8468 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8469 (c_parser_statement_after_labels): Update calls.
8471 2013-10-24 Tobias Burnus <burnus@net-b.de>
8474 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8475 Handle PRAGMA_IVDEP.
8476 (c_parser_statement_after_labels): Update call.
8478 2013-10-24 Marek Polacek <polacek@redhat.com>
8480 * c-parser.c (c_parser_struct_declaration): Add a comment.
8481 (c_parser_declarator): Don't allow _Alignas here.
8483 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
8485 * c-parser.c: Include omp-low.h.
8486 * c-typeck.c: Likewise.
8488 2013-10-17 Marek Polacek <polacek@redhat.com>
8491 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8492 Document syntax of the array-declarator.
8493 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8495 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8496 (c_parser_struct_declaration): Likewise.
8497 (c_parser_declarator): Likewise.
8498 (c_parser_direct_declarator_inner): Likewise.
8499 (c_parser_parameter_declaration): Likewise.
8500 (c_parser_type_name): Likewise.
8502 2013-10-11 Jakub Jelinek <jakub@redhat.com>
8504 * c-lang.h (current_omp_declare_target_attribute): New extern
8506 * c-parser.c: Include c-lang.h.
8507 (struct c_parser): Change tokens to c_token *.
8508 Add tokens_buf field. Change tokens_avail type to unsigned int.
8509 (c_parser_consume_token): If parser->tokens isn't
8510 &parser->tokens_buf[0], increment parser->tokens.
8511 (c_parser_consume_pragma): Likewise.
8512 (enum pragma_context): Add pragma_struct and pragma_param.
8513 (c_parser_external_declaration): Adjust
8514 c_parser_declaration_or_fndef caller.
8515 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8516 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8517 Adjust recursive call.
8518 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8520 (c_parser_parameter_declaration): Use pragma_param instead of
8522 (c_parser_compound_statement_nostart, c_parser_label,
8523 c_parser_for_statement): Adjust
8524 c_parser_declaration_or_fndef callers.
8525 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8526 it through to c_parser_conditional_expression.
8527 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8528 pass it through to c_parser_binary_expression. Adjust recursive
8530 (c_parser_binary_expression): Remove prec argument, add
8531 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8532 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8533 binop matches it, use build2 instead of parser_build_binary_op.
8534 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8535 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8536 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8537 Handle pragma_struct and pragma_param the same as pragma_external.
8538 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8539 (c_parser_omp_variable_list): Parse array sections for
8540 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8541 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8542 (c_parser_omp_clause_reduction): Handle user defined reductions.
8543 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8544 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8545 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8546 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8547 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8548 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8549 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8550 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8551 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8552 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8553 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8554 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8555 (c_parser_omp_for_loop): Add CODE argument, pass it through
8556 to c_finish_omp_for. Change last argument to cclauses,
8557 and adjust uses to grab parallel clauses from the array of all
8558 the split clauses. Adjust c_parser_binary_expression,
8559 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8560 (omp_split_clauses): New function.
8561 (c_parser_omp_simd): New function.
8562 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8563 Allow the function to be called also when parsing combined constructs,
8564 and call c_parser_omp_simd when parsing for simd.
8565 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8566 #pragma omp section, require exactly one structured-block instead of
8567 sequence of statements.
8568 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8569 Allow the function to be called also when parsing combined constructs.
8570 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8571 Allow the function to be called also when parsing combined
8573 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8574 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8575 c_parser_omp_teams, c_parser_omp_target_data,
8576 c_parser_omp_target_update, c_parser_omp_target,
8577 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8578 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8579 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8580 (c_parser_omp_construct): Add p_name and mask vars. Handle
8581 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8582 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8583 and c_parser_omp_sections callers.
8584 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8585 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8586 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8587 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8588 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8590 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8591 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8592 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8593 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8594 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8595 * c-typeck.c: Include tree-inline.h.
8596 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8597 handle_omp_array_sections_1, handle_omp_array_sections,
8598 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8599 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8600 user defined reductions.
8601 (c_tree_equal): New function.
8602 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8603 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8604 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8605 c_check_omp_declare_reduction_r): New prototypes.
8606 * c-decl.c (current_omp_declare_target_attribute): New variable.
8607 (c_decl_attributes): New function.
8608 (start_decl, start_function): Use it instead of decl_attributes.
8609 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8610 c_omp_reduction_decl, c_omp_reduction_lookup,
8611 c_check_omp_declare_reduction_r): New functions.
8613 2013-09-25 Tom Tromey <tromey@redhat.com>
8615 * Make-lang.in (c/gccspec.o): Remove.
8616 (CFLAGS-c/gccspec.o): New variable.
8617 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8618 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8619 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8621 2013-09-25 Tom Tromey <tromey@redhat.com>
8623 * Make-lang.in (c/gccspec.o): Don't use subshell.
8625 2013-09-18 Marek Polacek <polacek@redhat.com>
8628 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8629 Remove unnecessary check.
8631 2013-09-18 Marek Polacek <polacek@redhat.com>
8634 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8635 no_sanitize_undefined attribute.
8637 2013-09-13 Kai Tietz <ktietz@redhat.com>
8640 * c-decl.c (c_builtin_function_ext_scope): Remove
8641 wrong assumption that it is never called on prexisting
8644 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8646 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8648 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8650 * c-objc-common.c (c_tree_printer): Tidy.
8652 2013-08-30 Marek Polacek <polacek@redhat.com>
8654 * c-typeck.c (build_binary_op): Add division by zero and shift
8657 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
8658 Joseph Myers <joseph@codesourcery.com>
8661 * c-typeck.c (c_common_type): Prefer double_type_node over
8662 other REAL_TYPE types with the same precision.
8663 (convert_arguments): Likewise.
8665 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8667 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8668 (c_initialize_diagnostics): Call a destructor for the early printer.
8670 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8672 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8673 printer initialization.
8675 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
8678 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8679 check for truth values.
8680 (expand_array_notation_exprs): Added truth values case. Removed an
8681 unwanted else. Added for-loop to walk through subtrees in default
8684 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8686 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8688 2013-07-23 Joseph Myers <joseph@codesourcery.com>
8690 * c-parser.c (struct c_generic_association): Fix typo.
8692 2013-07-23 Tom Tromey <tromey@redhat.com>
8693 Joseph Myers <joseph@codesourcery.com>
8695 * c-parser.c (struct c_generic_association): New.
8696 (c_generic_association_d): New typedef.
8697 (c_parser_generic_selection): New function.
8698 (c_parser_postfix_expression): Handle RID_GENERIC.
8700 2013-07-13 Jason Merrill <jason@redhat.com>
8703 * c-decl.c (finish_struct): Check for too-large class.
8705 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8708 * c-typeck.c (set_init_index): When folding, check for index overflow.
8710 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8712 * c-parser.c (c_parser_array_notation): Removed rejection of array
8713 notations in an array of function pointers.
8715 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8717 * c-array-notation.c (make_triplet_val_inv): New function.
8718 (create_cmp_incr): Likewise.
8719 (create_array_refs): Likewise.
8720 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8721 Also modularized common parts between functions and called the function.
8722 (build_array_notation_expr): Likewise.
8723 (fix_conditional_array_notations_1): Likewise.
8724 (fix_array_notation_expr): Likewise.
8725 (fix_array_notation_call_expr): Likewise.
8727 2013-06-18 Marek Polacek <polacek@redhat.com>
8730 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8732 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8734 * c-array-notation.c (build_array_notation_expr): Reject array notation
8735 mismatch between LHS and RHS even inside a call_expr. Also, removed
8736 a couple while statements that were dead code.
8738 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8740 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8741 excessive precision expressions in function parameters. Also removed
8742 couple unwanted while statements.
8744 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8746 * c-array-notation.c (expand_array_notation_exprs): Added
8747 ARRAY_NOTATION_REF case.
8749 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8751 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8752 function to c-family/array-notation-common.c.
8753 (is_cilkplus_reduce_builtin): Likewise.
8754 (find_rank): Likewise.
8755 (extract_array_notation_exprs): Likewise.
8756 (replace_array_notations): Likewise.
8757 (find_inv_trees): Likewise.
8758 (replace_inv_trees): Likewise.
8759 (contains_array_notation_expr): Likewise.
8760 (find_correct_array_notation_type): Likewise.
8761 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8762 (struct inv_list): Moved this to c-family/array-notation-common.c.
8763 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
8765 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8767 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8768 reduction functions outside the for-loop. Added a check if the fundecl
8769 is non-NULL. Finally, removed an unwanted if-statement, and made the
8772 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8774 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8775 condition of the if-statement matches the rank of else-block and then-
8776 block when array notations are used.
8777 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8778 expression after the entire function body is parsed.
8779 (c_parser_expr_no_commas): Delayed creating array notation expressions
8780 to the end of function parsing.
8781 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8782 whole if-statement instead of just the condition.
8783 (expand_array_notation_exprs): Added MODIFY_EXPR case.
8785 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8788 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8789 array to NULL_TREE if they are unused. Also added a check for the
8790 field to be NULL before its fields are used in future.
8792 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8795 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8796 (build_array_notation_expr): Likewise.
8798 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8800 * c-typeck.c (build_array_ref): Added a check to see if array's
8801 index is greater than one. If true, then emit an error.
8802 (build_function_call_vec): Exclude error reporting and checking
8803 for builtin array-notation functions.
8804 (convert_arguments): Likewise.
8805 (c_finish_return): Added a check for array notations as a return
8806 expression. If true, then emit an error.
8807 (c_finish_loop): Added a check for array notations in a loop
8808 condition. If true then emit an error.
8809 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8810 (build_binary_op): Added a check for array notation expr inside
8811 op1 and op0. If present, we call another function to find correct
8813 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8814 * c-parser.c (c_parser_compound_statement): Check if array
8815 notation code is used in tree, if so, then transform them into
8817 (c_parser_expr_no_commas): Check if array notation is used in LHS
8818 or RHS, if so, then build array notation expression instead of
8820 (c_parser_postfix_expression_after_primary): Added a check for
8821 colon(s) after square braces, if so then handle it like an array
8822 notation. Also, break up array notations in unary op if found.
8823 (c_parser_direct_declarator_inner): Added a check for array
8825 (c_parser_compound_statement): Added a check for array notation in
8826 a stmt. If one is present, then expand array notation expr.
8827 (c_parser_if_statement): Likewise.
8828 (c_parser_switch_statement): Added a check for array notations in
8829 a switch statement's condition. If true, then output an error.
8830 (c_parser_while_statement): Similarly, but for a while.
8831 (c_parser_do_statement): Similarly, but for a do-while.
8832 (c_parser_for_statement): Similarly, but for a for-loop.
8833 (c_parser_unary_expression): Check if array notation is used in a
8834 pre-increment or pre-decrement expression. If true, then expand
8836 (c_parser_array_notation): New function.
8837 * c-array-notation.c: New file.
8838 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
8840 2013-05-23 Mike Stump <mikestump@comcast.net>
8842 * c-typeck.c (convert_for_assignment): Handle references to memory
8845 2013-05-16 Jason Merrill <jason@redhat.com>
8847 * Make-lang.in (cc1$(exeext)): Use link mutex.
8849 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8851 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8852 to simply use OPT_Wpointer_arith.
8853 (build_unary_op): Likewise.
8855 2013-04-03 Jakub Jelinek <jakub@redhat.com>
8858 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8859 argument. If set, or it temporarily for parsing of the first
8860 argument into force_folding_builtin_constant_p.
8861 (c_parser_postfix_expression): Adjust callers.
8863 2013-03-21 Richard Biener <rguenther@suse.de>
8865 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8866 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8868 2013-02-12 Marek Polacek <polacek@redhat.com>
8871 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8874 2013-01-24 Jakub Jelinek <jakub@redhat.com>
8877 * c-typeck.c (set_nonincremental_init_from_string): If
8878 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8880 (process_init_element): Likewise.
8882 2012-12-20 Jakub Jelinek <jakub@redhat.com>
8885 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8886 argument, don't call default_function_array_conversion
8887 nor c_fully_fold here.
8888 (c_parser_asm_statement): Adjust callers.
8889 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8890 and outputs here, and call default_function_array_conversion
8891 on inputs that don't need to be addressable.
8893 2012-12-18 Jakub Jelinek <jakub@redhat.com>
8896 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8897 warning require that both c_common_unsigned_type as well as
8898 c_common_signed_type is the same for both mvl and mvr types.
8900 2012-11-16 Diego Novillo <dnovillo@google.com>
8902 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8904 * c-common.c: Use new vec API in vec.h.
8905 * c-common.h: Likewise.
8906 * c-gimplify.c: Likewise.
8907 * c-pragma.c: Likewise.
8908 * c-pretty-print.c: Likewise.
8909 * c-pretty-print.h: Likewise.
8910 * c-semantics.c: Likewise.
8911 * c-decl.c: Likewise.
8912 * c-parser.c: Likewise.
8913 * c-tree.h: Likewise.
8914 * c-typeck.c: Likewise.
8916 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8919 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8921 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8924 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8925 shadows a function, unless the variable is a function or a
8926 pointer-to-function.
8928 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8931 * c-parser.c (struct c_tree_loc_pair): Removed.
8932 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8933 add location_t * and tree * arguments, fill in array of 3
8934 sizeof_arg trees and corresponding locs.
8935 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8936 c_parser_expr_list callers.
8937 (c_parser_postfix_expression_after_primary): Likewise. Pass
8938 array of 3 sizeof_arg trees and locs (corresponding to first
8939 3 arguments) to sizeof_pointer_memaccess_warning.
8941 2012-10-09 Lawrence Crowl <crowl@google.com>
8943 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8944 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8947 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8950 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8953 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8956 * c-typeck.c: Include c-common.h.
8957 (enum stv_conv): Moved to c-common.h.
8958 (scalar_to_vector): Moved to c-common.c.
8959 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8960 * Make-lang.in: c-typeck.c depends on c-common.h.
8962 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8964 * c-decl.c (c_write_global_declarations): Fix handling of
8967 2012-09-30 Sharad Singhai <singhai@google.com>
8969 * c-decl.c (c_write_global_declarations): Use a different method
8970 to determine if the dump has ben initialized.
8972 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8975 * c-typeck.c (c_cast_expr): When casting to a type requiring
8976 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8979 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8982 * c-typeck.c (build_unary_op): Pass original argument of
8983 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8984 any C_MAYBE_CONST_EXPR, if it has integer operands.
8985 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8986 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8987 to c_objc_common_truthvalue_conversion, then remove any
8988 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8989 c_objc_common_truthvalue_conversion not
8990 c_common_truthvalue_conversion.
8991 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8992 call note_integer_operands for arguments with integer operands
8993 that are not integer constants.
8995 2012-09-13 Jakub Jelinek <jakub@redhat.com>
8998 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8999 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9001 2012-08-31 Jakub Jelinek <jakub@redhat.com>
9004 * c-convert.c (convert): Don't call fold_convert_loc if
9005 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9006 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9007 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9009 2012-08-24 Jakub Jelinek <jakub@redhat.com>
9012 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9013 for nested and empty_ok arguments in the call to
9014 c_parser_declaration_or_fndef.
9016 2012-08-17 Jakub Jelinek <jakub@redhat.com>
9018 * c-tree.h (c_last_sizeof_arg): Declare.
9019 * c-parser.c (struct c_tree_loc_pair): New type.
9020 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9022 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9023 (c_parser_postfix_expression_after_primary): Likewise. Call
9024 sizeof_pointer_memaccess_warning if needed.
9025 (sizeof_ptr_memacc_comptypes): New function.
9026 * c-typeck.c (c_last_sizeof_arg): New global variable.
9027 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9029 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
9031 * c-lang.h (lang_decl): Add variable_size GTY option.
9033 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9035 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9036 * Make-lang.in: Fix dependencies.
9038 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9040 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9041 and add language Makefile hooks.
9042 * config-lang.in: New file.
9043 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9044 add the required "normal" config-lang.in rules.
9045 * c-lang.h: Moved from gcc/ to here.
9046 * c-tree.h: Likewise.
9047 * c-objc-common.c: Likewise.
9048 * c-objc-common.h: Likewise.
9049 * c-typeck.c: Likewise.
9050 * c-convert.c: Likewise.
9051 * c-lang.c: Likewise.
9052 * c-aux-info.c: Likewise.
9053 * c-errors.c: Likewise.
9054 * gccspec.c: Likewise.
9055 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9056 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9058 Copyright (C) 2012-2023 Free Software Foundation, Inc.
9060 Copying and distribution of this file, with or without modification,
9061 are permitted in any medium without royalty provided the copyright
9062 notice and this notice are preserved.