]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Add another commit to ignore
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
cdc34229
GA
12022-11-15 David Malcolm <dmalcolm@redhat.com>
2
3 PR analyzer/106302
4 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
5 (class ana::c_translation_unit): New.
6 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
7
30d77d49
GA
82022-11-12 Joseph Myers <joseph@codesourcery.com>
9
10 * c-decl.cc (start_underspecified_init)
11 (finish_underspecified_init): Handle name == NULL_TREE for
12 compound literals.
13 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
14 (shadow_tag_warned): Check for constexpr.
15 (start_decl): Add parameter do_push.
16 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
17 (grokdeclarator): Handle constexpr.
18 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
19 (declspecs_add_scspec): Handle constexpr.
20 * c-parser.cc (c_token_starts_compound_literal)
21 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
22 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
23 (c_parser_compound_literal_scspecs)
24 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
25 Update calls to start_init.
26 (c_parser_declaration_or_fndef, c_parser_initializer)
27 (c_parser_initval): Pass true for new argument of
28 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
29 constexpr compound literals.
30 (c_parser_static_assert_declaration_no_semi)
31 (c_parser_enum_specifier, c_parser_struct_declaration)
32 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
33 Call convert_lvalue_to_rvalue on expressions required to be
34 integer constant expressions.
35 (c_parser_omp_declare_reduction): Update call to start_init.
36 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
37 (C_DECL_DECLARED_CONSTEXPR): New macros.
38 (struct c_declspecs): Add constexpr_p.
39 (start_decl, convert_lvalue_to_rvalue, start_init): Update
40 prototypes.
41 * c-typeck.cc (require_constant_value, require_constant_elements):
42 Change to bool.
43 (require_constexpr_value, maybe_get_constexpr_init)
44 (constexpr_init_fits_real_type, check_constexpr_init): New.
45 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
46 maybe_get_constexpr_init.
47 (store_init_value): Update call to digest_init.
48 (digest_init): Add parameters int_const_expr, arith_const_expr and
49 require_constexpr. Check constexpr initializers.
50 (constructor_top_level): Remove.
51 (struct initializer_stack): Remove top_level. Add
52 require_constexpr_value.
53 (start_init): Remove parameter top_level. Add parameters
54 init_require_constant and init_require_constexpr. Save
55 require_constexpr_value on stack.
56 (pop_init_level): Use a null pointer constant for zero initializer
57 of pointer initialized with {}.
58 (output_init_element): Update call to digest_init. Avoid passing
59 null pointer constants of pointer type through digest_init a
60 second time when initializing a constexpr object.
61
d29260ce
GA
622022-11-03 Joseph Myers <joseph@codesourcery.com>
63
64 * c-decl.cc (in_underspecified_init, start_underspecified_init)
65 (finish_underspecified_init): New.
66 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
67 Give errors inside initializers of underspecified declarations.
68 (grokdeclarator): Handle (erroneous) case of C2X auto on a
69 parameter.
70 (declspecs_add_type): Handle c2x_auto_p case.
71 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
72 C2X mode.
73 (finish_declspecs): Handle c2x_auto_p.
74 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
75 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
76 (struct c_declspecs): Add c2x_auto_p.
77 (start_underspecified_init, finish_underspecified_init): New
78 prototypes.
79 * c-typeck.cc (build_external_ref): Give error for underspecified
80 declaration referenced in its initializer.
81
3055829a
GA
822022-10-28 Joseph Myers <joseph@codesourcery.com>
83
84 * c-decl.cc (grokdeclarator): Pass
85 arg_info->no_named_args_stdarg_p to build_function_type.
86 (grokparms): Check arg_info->no_named_args_stdarg_p before
87 converting () to (void).
88 (build_arg_info): Initialize no_named_args_stdarg_p.
89 (get_parm_info): Set no_named_args_stdarg_p.
90 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
91 build_function_type.
92 (store_parm_decls): Count (...) functions as prototyped.
93 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
94 parenthesis to start parameter list.
95 (c_parser_parms_list_declarator): Always allow '...' with no
96 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
97 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
98 * c-typeck.cc (composite_type): Handle
99 TYPE_NO_NAMED_ARGS_STDARG_P.
100 (function_types_compatible_p): Compare
101 TYPE_NO_NAMED_ARGS_STDARG_P.
102
1032022-10-28 Jakub Jelinek <jakub@redhat.com>
104
105 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
106 comma before the first clause.
107 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
108 c_parser_omp_flush, c_parser_omp_scan_loop_body,
109 c_parser_omp_ordered, c_finish_omp_declare_variant,
110 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
111 c_parser_omp_requires, c_parser_omp_error,
112 c_parser_omp_assumption_clauses): Likewise.
113
1142022-10-28 Joseph Myers <joseph@codesourcery.com>
115
116 PR c/61469
117 * c-convert.cc (c_convert): Handle enums with underlying boolean
118 type like bool.
119 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
120 enums with enum type specifier, but give errors for storage class
121 specifiers, qualifiers or alignment specifiers in non-definition
122 declarations of such enums.
123 (grokdeclarator): Give error for non-definition use of type
124 specifier with an enum type specifier.
125 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
126 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
127 (xref_tag): Update call to parser_xref_tag.
128 (start_enum): Add argument fixed_underlying_type. Complete enum
129 type with a fixed underlying type given in the definition. Give
130 error for defining without a fixed underlying type in the
131 definition if one was given in a prior declaration. Do not mark
132 enums with fixed underlying type as packed for -fshort-enums.
133 Store the enum type in the_enum.
134 (finish_enum): Do not adjust types of values or check their range
135 for an enum with a fixed underlying type. Set underlying type of
136 enum and variants.
137 (build_enumerator): Check enumeration constants for enum with
138 fixed underlying type against that type and convert to that type.
139 Increment in the underlying integer type, with handling for bool.
140 (c_simulate_enum_decl): Update call to start_enum.
141 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
142 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
143 rather than recomputing an underlying type based on size.
144 * c-parser.cc (c_parser_declspecs)
145 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
146 Set has_enum_type_specifier for type specifiers.
147 (c_parser_enum_specifier): Handle enum type specifiers.
148 (c_parser_struct_or_union_specifier): Update call to
149 parser_xref_tag.
150 (c_parser_omp_atomic): Check for boolean increment or decrement
151 using C_BOOLEAN_TYPE_P.
152 * c-tree.h (C_BOOLEAN_TYPE_P): New.
153 (struct c_typespec): Add has_enum_type_specifier.
154 (struct c_declspecs): Add enum_type_specifier_ref_p.
155 (struct c_enum_contents): Add enum_type.
156 (start_enum, parser_xref_tag): Update prototypes.
157 * c-typeck.cc (composite_type): Allow for enumerated types
158 compatible with bool.
159 (common_type, comptypes_internal, perform_integral_promotions):
160 Use ENUM_UNDERLYING_TYPE.
161 (parser_build_binary_op, build_unary_op, convert_for_assignment)
162 (c_finish_return, c_start_switch, build_binary_op): Check for
163 boolean types using C_BOOLEAN_TYPE_P.
164
4e939ae1
GA
1652022-10-24 Jakub Jelinek <jakub@redhat.com>
166
167 PR c++/107358
168 * c-typeck.cc (build_binary_op): Pass operands before excess precision
169 promotions to scalar_to_vector call.
170
1712022-10-24 Arsen Arsenović <arsen@aarsen.me>
172
173 * c-decl.cc (finish_function): Ignore hosted when deciding
174 whether to implicitly return zero, but check noreturn.
175 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
176 requirements to just MAIN_NAME_P when hosted, or `int main'
177 otherwise.
178
47a6ae56
GA
1792022-10-20 Richard Biener <rguenther@suse.de>
180
181 PR c/107305
182 PR c/107306
183 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
184 the parsed IL and zap the body on error.
185
21de009f
GA
1862022-10-18 Joseph Myers <joseph@codesourcery.com>
187
188 PR c/107164
189 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
190 with previous declaration visible.
191
1922022-10-18 Joseph Myers <joseph@codesourcery.com>
193
194 PR c/36113
195 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
196 convert all to the type of the enumeration. pedwarn if no integer
197 type fits all enumerators and default to
198 widest_integer_literal_type_node in that case. Otherwise pedwarn
199 for type wider than intmax_t.
200 (build_enumerator): pedwarn for enumerators outside the range of
201 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
202 enumerators outside the range of int. On overflow, attempt to
203 find a wider type that can hold the value of the next enumerator.
204 Do not convert value to type determined with
205 c_common_type_for_size.
206
baeec7cc
GA
2072022-10-14 Jakub Jelinek <jakub@redhat.com>
208
209 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
210 double.
211
2122022-10-14 Joseph Myers <joseph@codesourcery.com>
213
214 * c-decl.cc (build_compound_literal): Add parameter scspecs.
215 Handle storage class specifiers.
216 * c-parser.cc (c_token_starts_compound_literal)
217 (c_parser_compound_literal_scspecs): New.
218 (c_parser_postfix_expression_after_paren_type): Add parameter
219 scspecs. Call pedwarn_c11 for use of storage class specifiers.
220 Update call to build_compound_literal.
221 (c_parser_cast_expression, c_parser_sizeof_expression)
222 (c_parser_alignof_expression): Handle storage class specifiers for
223 compound literals. Update calls to
224 c_parser_postfix_expression_after_paren_type.
225 (c_parser_postfix_expression): Update syntax comment.
226 * c-tree.h (build_compound_literal): Update prototype.
227 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
228 register compound literal.
229
9ff6c33e
GA
2302022-10-07 Qing Zhao <qing.zhao@oracle.com>
231
232 * c-decl.cc (flexible_array_member_type_p): New function.
233 (one_element_array_type_p): Likewise.
234 (zero_length_array_type_p): Likewise.
235 (add_flexible_array_elts_to_size): Call new utility
236 routine flexible_array_member_type_p.
237 (is_flexible_array_member_p): New function.
238 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
239
629d04d3
GA
2402022-10-06 Joseph Myers <joseph@codesourcery.com>
241
242 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
243 and not C2x.
244 (c_keyword_starts_typename, c_token_starts_declspecs)
245 (c_parser_declspecs, c_parser_objc_selector): Handle
246 RID_TYPEOF_UNQUAL.
247 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
248 Distinguish typeof for C2x from __typeof__ for all standard
249 versions and typeof before C2x.
250 * c-typeck.cc (build_function_call_vec): Use unqualified version
251 of non-void return type.
252 (build_unary_op): Use unqualified type for increment and
253 decrement.
254
2552022-10-06 Jakub Jelinek <jakub@redhat.com>
256
257 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
258 call for holds clause on assume construct.
259
2602022-10-06 Jakub Jelinek <jakub@redhat.com>
261
262 PR c++/106654
263 * c-parser.cc (handle_assume_attribute): New function.
264 (c_parser_declaration_or_fndef): Handle assume attribute.
265 (c_parser_attribute_arguments): Add assume_attr argument,
266 if true, parse first argument as conditional expression.
267 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
268 c_parser_attribute_arguments callers.
269 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
270 assume attribute.
271
85872a69
GA
2722022-10-04 Jakub Jelinek <jakub@redhat.com>
273
274 * c-lang.h (struct c_omp_declare_target_attr): New type.
275 (current_omp_declare_target_attribute): Change type from
276 int to vec<c_omp_declare_target_attr, va_gc> *.
277 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
278 If last pushed directive was begin declare target, use different
279 wording and simplify format strings for easier translations.
280 (c_parser_omp_clause_device_type): Uncomment
281 check_no_duplicate_clause call.
282 (c_parser_omp_declare_target): Adjust for the
283 current_omp_declare_target_attribute type change, push { -1 }.
284 Use error_at rather than warning_at for declare target with
285 only device_type clauses.
286 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
287 (c_parser_omp_begin): Add begin declare target support.
288 (c_parser_omp_end): Adjust for the
289 current_omp_declare_target_attribute type change, adjust
290 diagnostics wording and simplify format strings for easier
291 translations.
292 * c-decl.cc (current_omp_declare_target_attribute): Change type from
293 int to vec<c_omp_declare_target_attr, va_gc> *.
294 (c_decl_attributes): Adjust for the
295 current_omp_declare_target_attribute type change. If device_type
296 was present on begin declare target, add "omp declare target host"
297 and/or "omp declare target nohost" attributes.
298
bbdcdf5c
GA
2992022-09-29 Joseph Myers <joseph@codesourcery.com>
300
301 * c-decl.cc (handle_std_noreturn_attribute): New function.
302 (std_attribute_table): Add _Noreturn and noreturn.
303
1f16a020
GA
3042022-09-27 Jakub Jelinek <jakub@redhat.com>
305
306 * c-lang.h (current_omp_begin_assumes): Declare.
307 * c-parser.cc: Include bitmap.h.
308 (c_parser_omp_end_declare_target): Rename to ...
309 (c_parser_omp_end): ... this. Handle also end assumes.
310 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
311 c_parser_omp_assumes, c_parser_omp_assume): New functions.
312 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
313 without corresponding #pragma omp end assumes.
314 (c_parser_pragma): Use %s in may only be used at file scope
315 diagnostics to decrease number of translatable messages. Handle
316 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
317 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
318 for it rather than c_parser_omp_end_declare_target.
319 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
320 * c-decl.cc (current_omp_begin_assumes): Define.
321
28a61ecd
GA
3222022-09-24 Jakub Jelinek <jakub@redhat.com>
323
324 PR c/106981
325 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
326 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
327 t2 have different types.
328
279c6715
GA
3292022-09-22 David Malcolm <dmalcolm@redhat.com>
330
331 PR c/106830
332 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
333 (c_parser_cast_expression): Likewise.
334 (c_parser_alignof_expression): Likewise.
335 (c_parser_postfix_expression_after_paren_type): Likewise.
336 (c_parser_postfix_expression_after_primary): Likewise.
337 (c_parser_expression): Likewise.
338 (c_parser_omp_variable_list): Likewise.
339 (c_parser_transaction_expression): Likewise.
340 * c-tree.h (c_expr::set_error): Likewise.
341 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
342 (parser_build_unary_op): Likewise.
343 (parser_build_binary_op): Likewise.
344 (digest_init): Likewise.
345 (pop_init_level): Likewise.
346 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
347
43be56c4
GA
3482022-09-19 Marek Polacek <polacek@redhat.com>
349
350 PR c/106947
351 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
352 notes.
353
d0fc05e8
GA
3542022-09-15 Richard Biener <rguenther@suse.de>
355
356 * c-decl.cc (build_void_list_node): Remove.
357
ff822367
GA
3582022-09-14 Julian Brown <julian@codesourcery.com>
359
360 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
361 on error.
362
fe2a8ce9
GA
3632022-09-07 Joseph Myers <joseph@codesourcery.com>
364
365 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
366 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
367 for C2x spellings of keywords.
368 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
369
25aeb922
GA
3702022-09-06 Jakub Jelinek <jakub@redhat.com>
371
372 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
373 in omp_cur_iteration - 1 has integer_type_node type.
374
83f2f228
GA
3752022-09-03 Jakub Jelinek <jakub@redhat.com>
376
377 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
378 (c_parser_omp_clause_depend_sink): Renamed to ...
379 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
380 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
381 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
382 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
383 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
384 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
385 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
386 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
387 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
388 (c_parser_omp_clause_doacross): New function.
389 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
390 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
391 OMP_CLAUSE_DEPEND_SOURCE.
392 (c_parser_omp_for_loop): Don't diagnose here linear clause together
393 with ordered with argument.
394 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
395 for simd.
396 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
397 (c_parser_omp_ordered): Handle also doacross and adjust for it
398 diagnostic wording.
399 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
400 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
401
c64b0947
GA
4022022-09-02 David Malcolm <dmalcolm@redhat.com>
403
404 PR c/90885
405 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
406 (c_parser_expr_no_commas): Likewise.
407 (c_parser_conditional_expression): Likewise.
408 (c_parser_binary_expression): Clear m_decimal when popping the
409 stack.
410 (c_parser_unary_expression): Clear ret.m_decimal.
411 (c_parser_has_attribute_expression): Likewise for result.
412 (c_parser_predefined_identifier): Likewise for expr.
413 (c_parser_postfix_expression): Likewise for expr.
414 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
415 token.
416 * c-tree.h (c_expr::m_decimal): New bitfield.
417 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
418 (parser_build_binary_op): Call check_for_xor_used_as_pow.
419
bb0a1556
GA
4202022-09-01 Joseph Myers <joseph@codesourcery.com>
421
422 * c-decl.cc (grokparms): Handle () in a function declaration the
423 same as (void) for C2X.
424
542c60c4
GA
4252022-08-31 Joseph Myers <joseph@codesourcery.com>
426
427 * c-parser.cc (c_parser_label): Pass attributes to do_case.
428 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
429 c_add_case_label.
430
16f542d6
GA
4312022-08-26 Jakub Jelinek <jakub@redhat.com>
432
433 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
434
5d4389dc
GA
4352022-08-25 Marek Polacek <polacek@redhat.com>
436
437 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
438 Give a better diagnostic when converting to nullptr_t.
439 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
440 initialization.
441 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
442 (c_parser_postfix_expression): Handle RID_NULLPTR.
443 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
444 nullptr_node.
445 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
446 (build_conditional_expr): Handle the case when the second/third operand
447 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
448 (convert_for_assignment): Handle converting an expression of type
449 nullptr_t to pointer/bool.
450 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
451 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
452
4532022-08-25 Joseph Myers <joseph@codesourcery.com>
454
455 * c-decl.cc (start_decl): Do not diagnose initialization of
456 variable-sized objects here.
457 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
458 callers changed.
459 (c_parser_initializer): Diagnose initialization of variable-sized
460 objects other than with braced initializer.
461 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
462 braces and update diagnostic text. Diagnose initialization of
463 variable-sized objects with nonempty braces.
464 * c-typeck.cc (digest_init): Update diagnostic for initialization
465 of variable-sized objects.
466 (really_start_incremental_init, set_designator)
467 (process_init_element): Update comments.
468 (pop_init_level): Allow scalar empty initializers.
469
0342f034
GA
4702022-08-17 Tobias Burnus <tobias@codesourcery.com>
471 Chung-Lin Tang <cltang@codesourcery.com>
472
473 PR c++/104493
474 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
475 instead of removed langhook.
476 * c-typeck.cc (c_finish_omp_clauses): Likewise.
477
5cd525f0
GA
4782022-08-11 Marek Polacek <polacek@redhat.com>
479
480 PR middle-end/102633
481 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
482 Call suppress_warning.
483 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
484 (c_parser_omp_declare_reduction): Pass omp_priv down to
485 c_parser_initializer.
486
5f17badb
GA
4872022-08-08 Tom Honermann <tom@honermann.net>
488
489 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
490 of CPP_UTF8STRING when char8_t support is enabled.
491 * c-typeck.cc (digest_init): Allow initialization of an array
492 of character type by a string literal with type array of
493 char8_t.
494
32510382
GA
4952022-08-01 David Malcolm <dmalcolm@redhat.com>
496
497 * c-typeck.cc (build_c_cast): Quote names of address spaces in
498 diagnostics.
499 (convert_for_assignment): Add a note to address space mismatch
500 diagnostics, specifying the expected and actual types.
501
b53ebbc5
GA
5022022-07-10 Lewis Hyatt <lhyatt@gmail.com>
503
504 PR preprocessor/97498
505 * c-parser.cc (c_parser_pragma): Set input_location to the
506 location of the pragma, rather than the start of the line.
507
8467574d
GA
5082022-07-04 Tobias Burnus <tobias@codesourcery.com>
509 Chung-Lin Tang <cltang@codesourcery.com>
510 Thomas Schwinge <thomas@codesourcery.com>
511
512 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
513 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
514 OMP_REQUIRES_TARGET_USED.
515 (c_parser_omp_requires): Remove sorry.
516
ed974488
GA
5172022-07-01 Tobias Burnus <tobias@codesourcery.com>
518
519 * c-parser.cc (c_parser_omp_target_enter_data,
520 c_parser_omp_target_exit_data): Accept tofrom
521 map-type modifier but use 'to' / 'from' internally.
522
bc7e9f76
GA
5232022-06-16 David Malcolm <dmalcolm@redhat.com>
524
525 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
526 group the warning with any note.
527 (warn_about_goto): Likewise to group error or warning with note.
528 Bail out if the warning wasn't emitted, to avoid emitting orphan
529 notes.
530 (lookup_label_for_goto): Add auto_diagnostic_group to
531 group the error with the note.
532 (check_earlier_gotos): Likewise.
533 (c_check_switch_jump_warnings): Likewise for any error/warning.
534 Conditionalize emission of the notes.
535 (diagnose_uninitialized_cst_member): Likewise for warning,
536 conditionalizing emission of the note.
537 (grokdeclarator): Add auto_diagnostic_group to group the "array
538 type has incomplete element type" error with any note.
539 (parser_xref_tag): Add auto_diagnostic_group to group warnings
540 with their notes. Conditionalize emission of notes.
541 (start_struct): Add auto_diagnostic_group to group the
542 "redefinition of" errors with any note.
543 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
544 (check_for_loop_decls): Likewise for pre-C99 error.
545
445ba599
GA
5462022-06-07 Jakub Jelinek <jakub@redhat.com>
547
548 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
549 style linear clause modifiers. Set
550 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
551 old style modifiers are used.
552 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
553 with val modifier on simd or for if the old style modifiers are
554 used.
555
b168441c
GA
5562022-06-02 David Malcolm <dmalcolm@redhat.com>
557
558 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
559 (c_get_sarif_source_language): New.
560 * c-tree.h (c_get_sarif_source_language): New decl.
561
820ead45
GA
5622022-05-31 Jason Merrill <jason@redhat.com>
563
564 * Make-lang.in (c.tags): Look at *.cc.
565
5662022-05-31 Jakub Jelinek <jakub@redhat.com>
567
568 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
569 clauses.
570
37b3b5da
GA
5712022-05-28 Jakub Jelinek <jakub@redhat.com>
572
573 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
574 seen first, use "%<to%>" or "%<enter%>" depending on
575 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
576 "%<to%> or %<enter%>" wording.
577
d9176e64
GA
5782022-05-27 Jakub Jelinek <jakub@redhat.com>
579
580 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
581 (c_parser_omp_all_clauses): For to clause on declare target, use
582 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
583 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
584 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
585 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
586 OMP_CLAUSE_TO_DECLARE.
587 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
588 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
589 name in diagnostics instead of
590 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
591
3dff965c
GA
5922022-05-25 Jakub Jelinek <jakub@redhat.com>
593
594 PR c/91134
595 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
596 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
597 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
598 diagnostic and fixit hint if DATUM has pointer type.
599 * c-parser.cc (c_parser_postfix_expression,
600 c_parser_omp_variable_list): Adjust build_component_ref callers.
601 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
602 Likewise.
603
768f49a2
GA
6042022-05-24 Jakub Jelinek <jakub@redhat.com>
605
606 PR c/105378
607 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
608
1cda629f
GA
6092022-05-18 Marek Polacek <polacek@redhat.com>
610
611 PR c/105131
612 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
613 mismatches.
614 * c-tree.h (comptypes_check_enum_int): Declare.
615 * c-typeck.cc (comptypes): No longer static.
616
3d9439b1
GA
6172022-05-17 Marek Polacek <polacek@redhat.com>
618
619 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
620 its value.
621
6222022-05-17 Jakub Jelinek <jakub@redhat.com>
623
624 * c-parser.cc (c_parser_omp_clause_depend): Parse
625 inoutset depend-kind.
626 (c_parser_omp_depobj): Likewise.
627
702bd11f
GA
6282022-05-16 Martin Liska <mliska@suse.cz>
629
630 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
631
49ace834
GA
6322022-05-12 Jakub Jelinek <jakub@redhat.com>
633
634 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
635 if flag_openmp.
636 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
637 in postfix expressions.
638 (c_parser_omp_variable_list): Handle omp_all_memory in depend
639 clause.
640 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
641 keyword in depend clause as null_pointer_node, diagnose invalid
642 uses.
643
bd022ff9
GA
6442022-05-09 Martin Liska <mliska@suse.cz>
645
646 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
647 macros.
648 (c_parser_binary_expression): Likewise.
649
a1947c92
GA
6502022-05-07 Marek Polacek <polacek@redhat.com>
651
652 PR c++/101833
653 PR c++/47634
654 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
655
405eda0d
GA
6562022-04-08 Jakub Jelinek <jakub@redhat.com>
657
658 PR c/105149
659 * c-typeck.cc (c_build_va_arg): Reject function types.
660
a2287813
GA
6612022-03-22 Marek Polacek <polacek@redhat.com>
662
663 PR c/82283
664 PR c/84685
665 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
666 (start_init): Set it.
667 (finish_init): Restore constructor_designated.
668 (push_init_level): Set constructor_designated to the value of
669 constructor_designated in the upper constructor_stack.
670
57eeedda
GA
6712022-03-12 Thomas Schwinge <thomas@codesourcery.com>
672
673 PR other/65095
674 * c-typeck.cc (handle_omp_array_sections_1)
675 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
676 instead of 'c_omp_map_clause_name'.
677
8cc4f9cd
GA
6782022-03-09 Joseph Myers <joseph@codesourcery.com>
679
680 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
681 differently from earlier standards for unprototyped function type
682 compatibility.
683
6842022-03-09 Jakub Jelinek <jakub@redhat.com>
685
686 PR c/104711
687 * c-fold.cc (c_fully_fold_internal): Don't emit
688 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
689 * c-typeck.cc (build_binary_op): Likewise.
690
e6533e2e
GA
6912022-03-07 Jakub Jelinek <jakub@redhat.com>
692
693 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
694 literal.
695
4bf3bac1
GA
6962022-02-23 Richard Biener <rguenther@suse.de>
697
698 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
699 SSA names without definition.
700 (c_parser_gimple_declaration): Handle pointer typed SSA names.
701
0bdb0498
GA
7022022-02-17 Jakub Jelinek <jakub@redhat.com>
703
704 PR c/104532
705 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
706 convert_lvalue_to_rvalue and build_indirect_ref instead of
707 build_simple_mem_ref.
708
e8d68f0a
GA
7092022-02-11 Richard Biener <rguenther@suse.de>
710
711 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
712 VEC_COND_EXPRs.
713
a645583d
GA
7142022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
715
716 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
717 clause.
718 (c_parser_omp_variable_list): Handle array sections.
719 (c_parser_omp_clause_has_device_addr): Added.
720 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
721 case.
722 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
723 OMP_CLAUSE_MASK.
724 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
725 (c_finish_omp_clauses): Handle array sections.
726
3adf509f
GA
7272022-02-09 Jakub Jelinek <jakub@redhat.com>
728
729 PR c/104427
730 * c-parser.cc (c_parser_postfix_expression)
731 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
732 instead of build1_loc to build PAREN_EXPR.
733 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
734 * c-fold.cc (c_fully_fold_internal): Likewise.
735
fc829782
GA
7362022-01-17 Martin Liska <mliska@suse.cz>
737
738 * Make-lang.in: Rename .c names to .cc.
739 * c-convert.cc: Likewise.
740 * c-decl.cc (struct lang_identifier): Likewise.
741 (pop_scope): Likewise.
742 (finish_decl): Likewise.
743 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
744 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
745 * c-parser.h (GCC_C_PARSER_H): Likewise.
746 * c-tree.h (c_keyword_starts_typename): Likewise.
747 (finish_declspecs): Likewise.
748 (c_get_alias_set): Likewise.
749 (enum c_oracle_request): Likewise.
750 (tag_exists_p): Likewise.
751 (set_c_expr_source_range): Likewise.
752 * c-typeck.cc (c_common_type): Likewise.
753 (c_finish_omp_clauses): Likewise.
754 * config-lang.in: Likewise.
755
7562022-01-17 Martin Liska <mliska@suse.cz>
757
758 * c-aux-info.c: Moved to...
759 * c-aux-info.cc: ...here.
760 * c-convert.c: Moved to...
761 * c-convert.cc: ...here.
762 * c-decl.c: Moved to...
763 * c-decl.cc: ...here.
764 * c-errors.c: Moved to...
765 * c-errors.cc: ...here.
766 * c-fold.c: Moved to...
767 * c-fold.cc: ...here.
768 * c-lang.c: Moved to...
769 * c-lang.cc: ...here.
770 * c-objc-common.c: Moved to...
771 * c-objc-common.cc: ...here.
772 * c-parser.c: Moved to...
773 * c-parser.cc: ...here.
774 * c-typeck.c: Moved to...
775 * c-typeck.cc: ...here.
776 * gccspec.c: Moved to...
777 * gccspec.cc: ...here.
778 * gimple-parser.c: Moved to...
779 * gimple-parser.cc: ...here.
780
7812022-01-17 Andrew Stubbs <ams@codesourcery.com>
782
783 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
784
617db51d
GA
7852022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
786
787 PR c++/103705
788 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
789 outer node for ARRAY_REFs.
790
62eb5308
GA
7912022-01-01 Jakub Jelinek <jakub@redhat.com>
792
793 PR objc/103639
794 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
795 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
796
2554e2da
GA
7972021-12-17 Marek Polacek <polacek@redhat.com>
798
799 PR c/103649
800 * c-decl.c (c_warn_unused_attributes): Don't warn for
801 attribute_ignored_p.
802 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
803 arguments when the attribute is ignored.
804
9c6586bc
GA
8052021-12-14 Jakub Jelinek <jakub@redhat.com>
806
807 PR c/103587
808 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
809 consume the pragma and silently skip to the pragma eol.
810
c8dcf64b
GA
8112021-12-12 Jonathan Wakely <jwakely@redhat.com>
812
813 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
814 * c-parser.c: Likewise.
815
4b4839e3
GA
8162021-12-09 Jakub Jelinek <jakub@redhat.com>
817
818 PR pch/71934
819 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
820 to resort_data.new_value.
821
641ff219
GA
8222021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
823
824 * c-parser.c (struct omp_dim): New struct type for use inside
825 c_parser_omp_variable_list.
826 (c_parser_omp_variable_list): Allow multiple levels of array and
827 component accesses in array section base-pointer expression.
828 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
829 c_parser_omp_var_list_parens.
830 (c_parser_omp_clause_from): Likewise.
831 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
832 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
833 POINTER_PLUS_EXPR.
834 (c_finish_omp_clauses): Extend allowed ranged of expressions
835 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
836
8372021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
838
839 PR middle-end/92120
840 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
841 call to c_parser_omp_variable_list to 'true'.
842 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
843 array base handling.
844 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
845
c177e806
GA
8462021-11-30 Thomas Schwinge <thomas@codesourcery.com>
847
848 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
849 orphan loop" checking.
850
8512021-11-30 Cesar Philippidis <cesar@codesourcery.com>
852 Thomas Schwinge <thomas@codesourcery.com>
853
854 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
855 OpenACC gang reductions.
856
8572021-11-30 Richard Biener <rguenther@suse.de>
858
859 * gimple-parser.c (c_parser_gimple_postfix_expression):
860 avoid unreachable code after break.
861
87cd82c8
GA
8622021-11-29 Eric Gallager <egallager@gcc.gnu.org>
863
864 PR other/103021
865 * Make-lang.in: Use ETAGS variable in TAGS target.
866
8672021-11-29 Richard Biener <rguenther@suse.de>
868
869 * c-typeck.c (c_tree_equal): Remove unreachable return.
870 * c-parser.c (get_matching_symbol): Likewise.
871
e1d43592
GA
8722021-11-23 Jakub Jelinek <jakub@redhat.com>
873
874 * c-typeck.c (c_clone_omp_udr): Don't initialize
875 id.transform_lang_insert_block.
876
9c077398
GA
8772021-11-19 Martin Sebor <msebor@redhat.com>
878
879 PR c++/33925
880 PR c/102867
881 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
882 code resulting from macro expansion.
883
8842021-11-19 Martin Liska <mliska@suse.cz>
885
886 Revert:
887 2021-11-19 Martin Liska <mliska@suse.cz>
888
889 * c-parser.c (add_debug_begin_stmt): Use option directly.
890
483092d3
GA
8912021-11-18 Matthias Kretz <m.kretz@gsi.de>
892
893 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
894 * c-parser.c (c_parser_postfix_expression): Likewise.
895
8962021-11-18 Martin Liska <mliska@suse.cz>
897
898 * c-parser.c (add_debug_begin_stmt): Use option directly.
899
280d2838
GA
9002021-11-17 Martin Sebor <msebor@redhat.com>
901
902 PR c/101702
903 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
904 bounds before deciding if they're constant.
905
e2b57363
GA
9062021-11-15 Jakub Jelinek <jakub@redhat.com>
907
908 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
909 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
910
b39265d4
GA
9112021-11-11 Jakub Jelinek <jakub@redhat.com>
912
913 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
914 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
915 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
916 OMP_CLAUSE_NUM_TEAMS_EXPR.
917 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
918 combined target teams even lower-bound expression.
919
9202021-11-11 Richard Biener <rguenther@suse.de>
921
922 * gimple-parser.c: Shuffle bitmap.h include.
923
18ae471f
GA
9242021-11-03 Joseph Myers <joseph@codesourcery.com>
925
926 PR c/103031
927 * c-convert.c (c_convert): New function, based on convert.
928 (convert): Make into wrapper of c_convert.
929 (convert_init): New function.
930 * c-typeck.c (enum impl_conv): Add ic_init_const.
931 (convert_for_assignment): Handle ic_init_const like ic_init. Add
932 new argument to convert_and_check call.
933 (digest_init): Pass ic_init_const to convert_for_assignment for
934 initializers required to be constant.
935
b4df2dd3
GA
9362021-11-02 Richard Sandiford <richard.sandiford@arm.com>
937
938 * c-tree.h (c_simulate_record_decl): Declare.
939 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
940 * c-decl.c (c_simulate_record_decl): New function.
941
c2bd5d8a
GA
9422021-10-22 Eric Gallager <egallager@gcc.gnu.org>
943
944 PR other/102663
945 * Make-lang.in: Add dummy c.install-dvi target.
946
93d183a5
GA
9472021-10-15 Richard Biener <rguenther@suse.de>
948
949 PR c/102763
950 * gimple-parser.c
951 (c_parser_gimple_postfix_expression_after_primary): Check
952 for a pointer do be dereferenced by ->.
953
5d5885c9
GA
9542021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
955
956 * c-parser.c (c_finish_omp_declare_variant): Change call from
957 c_omp_check_context_selector to omp_check_context_selector. Change
958 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
959
c9db17b8
GA
9602021-10-09 Jakub Jelinek <jakub@redhat.com>
961
962 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
963 (c_parser_omp_scan_loop_body): Use it.
964 (c_parser_omp_sections_scope): Likewise.
965
50e20ee6
GA
9662021-10-07 Richard Biener <rguenther@suse.de>
967
968 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
969
bb6194e0
GA
9702021-10-05 Richard Biener <rguenther@suse.de>
971
972 PR c/102605
973 * gimple-parser.c (c_parser_gimple_postfix_expression):
974 Accept more address _Literals.
975
da9c5f78
GA
9762021-10-04 Marek Polacek <polacek@redhat.com>
977
978 PR c++/97573
979 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
980
9d116bcc
GA
9812021-10-01 Martin Sebor <msebor@redhat.com>
982
983 PR c/102103
984 * c-typeck.c (maybe_warn_for_null_address): New function.
985 (build_binary_op): Call it.
986
9872021-10-01 Jakub Jelinek <jakub@redhat.com>
988 Richard Biener <rguenther@suse.de>
989
990 PR sanitizer/102515
991 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
992 for division even for SANITIZE_SI_OVERFLOW.
993
9942021-10-01 Jakub Jelinek <jakub@redhat.com>
995
996 * c-parser.c (c_parser_omp_clause_order): Set
997 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
998
fd133479
GA
9992021-09-28 Andrew Pinski <apinski@marvell.com>
1000
1001 PR c/32122
1002 * c-parser.c (c_parser_statement_after_labels): Pass
1003 the c_expr instead of the tree to c_finish_goto_ptr.
1004 * c-typeck.c (c_finish_goto_ptr): Change the second
1005 argument type to c_expr.
1006 * c-tree.h (c_finish_goto_ptr): Likewise.
1007 Error out if the expression was not of a pointer type.
1008
e4777439
GA
10092021-09-22 Jakub Jelinek <jakub@redhat.com>
1010
1011 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1012 modifiers.
1013
cf74e7b5
GA
10142021-09-18 Jakub Jelinek <jakub@redhat.com>
1015
1016 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1017 and reproducible modifiers.
1018 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1019
10202021-09-18 Jakub Jelinek <jakub@redhat.com>
1021
1022 * c-parser.c (c_parser_omp_clause_default): Handle private and
1023 firstprivate arguments, adjust diagnostics on unknown argument.
1024
0a4cb439
GA
10252021-09-17 Jakub Jelinek <jakub@redhat.com>
1026
1027 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1028 is true.
1029
a26206ec
GA
10302021-09-10 Jakub Jelinek <jakub@redhat.com>
1031
1032 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1033 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1034 don't call build_conditional_expr, instead build a COND_EXPR directly.
1035 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1036 if omp_atomic_lhs even in more cases for >, < or ==.
1037 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1038 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1039 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1040 * c-typeck.c (build_binary_op): For flag_openmp only handle
1041 MIN_EXPR/MAX_EXPR.
1042
b2748138
GA
10432021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1044
1045 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1046 directive.
1047
e11c6046
GA
10482021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1049
1050 * c-decl.c (enum deprecated_states): Add unavailable state.
1051 (merge_decls): Copy unavailability.
1052 (quals_from_declspecs): Handle unavailable case.
1053 (start_decl): Amend the logic handling suppression of nested
1054 deprecation states to include unavailability.
1055 (smallest_type_quals_location): Amend comment.
1056 (grokdeclarator): Handle the unavailable deprecation state.
1057 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1058 * c-tree.h (struct c_declspecs): Add unavailable_p.
1059 * c-typeck.c (build_component_ref): Handle unavailability.
1060 (build_external_ref): Likewise.
1061
10622021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1063 Joseph Myers <joseph@codesourcery.com>
1064
1065 PR c/79412
1066 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1067 types of both (non-function) decls as error_mark_node, so that the
1068 middle-end can see the code is malformed.
1069 (free_attr_access_data): Don't process if the type has been set to
1070 error_mark_node.
1071
6d51ee43
GA
10722021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1073
1074 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1075 and 'ancestor' in 'target device' clauses.
1076
38b19c5b
GA
10772021-08-23 Jakub Jelinek <jakub@redhat.com>
1078
1079 * c-parser.c (c_parser_omp_clause_num_tasks,
1080 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1081
5b2876f9
GA
10822021-08-22 Martin Uecker <muecker@gwdg.de>
1083
1084 PR c/98397
1085 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1086 for pointers to arrays with qualifiers.
1087 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1088 to arrays when the other pointer is a void pointer. Update warnings.
1089 (convert_for_assignment): Update warnings for C2X when converting from
1090 void* with qualifiers to a pointer to array with the same qualifiers.
1091
7c9e1645
GA
10922021-08-20 Jakub Jelinek <jakub@redhat.com>
1093
1094 * c-parser.c (c_parser_omp_error): New function.
1095 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1096
10972021-08-20 Jakub Jelinek <jakub@redhat.com>
1098
1099 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1100 comma at the end of list.
1101 (c_parser_omp_requires): Likewise.
1102
b57fba5e
GA
11032021-08-19 Jakub Jelinek <jakub@redhat.com>
1104
1105 * c-parser.c (c_parser_omp_requires): Don't call
1106 c_parser_peek_2nd_token and optionally consume token if current
1107 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1108
6e529985
GA
11092021-08-18 Jakub Jelinek <jakub@redhat.com>
1110
1111 * c-parser.c (c_parser_omp_nothing): New function.
1112 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1113
11142021-08-18 Jakub Jelinek <jakub@redhat.com>
1115
1116 * c-parser.c (c_parser_statement_after_labels): Add restart label
1117 near the start of the function. If c_parser_pragma returns false,
1118 goto restart.
1119 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1120 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1121 return what c_parser_omp_declare returned. Return true instead of
1122 false after emitting errors that the directive is not allowed in
1123 pragma_stmt context.
1124 (c_parser_omp_ordered): Return true instead of
1125 false after emitting errors that the directive is not allowed in
1126 pragma_stmt context.
1127 (c_parser_omp_target_update): Likewise.
1128 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1129 Change return type from tree to bool, return false if the
1130 directive should be ignored in pragma_stmt contexts.
1131 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1132 return their result directly.
1133 (c_parser_omp_cancellation_point): Change return type from void to
1134 bool, return false if the directive should be ignored in pragma_stmt
1135 contexts.
1136 (c_parser_omp_declare): Likewise.
1137
2d14d64b
GA
11382021-08-17 Jakub Jelinek <jakub@redhat.com>
1139
1140 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1141 (c_parser_omp_scope): New function.
1142 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1143
72be20e2
GA
11442021-08-12 Jakub Jelinek <jakub@redhat.com>
1145
1146 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1147 (c_parser_omp_clause_filter): New function.
1148 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1149 (OMP_MASKED_CLAUSE_MASK): Define.
1150 (c_parser_omp_masked): New function.
1151 (c_parser_omp_parallel): Handle parallel masked.
1152 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1153 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1154
11552021-08-12 Martin Uecker <muecker@gwdg.de>
1156
1157 PR c/101838
1158 PR c/29970
1159 * c-typeck.c (c_expr_sizeof_type): Evaluate
1160 size expressions for structs of variable size.
1161
11622021-08-12 Tobias Burnus <tobias@codesourcery.com>
1163
1164 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1165 'primary' as alias for 'master'.
1166
3ae564ea
GA
11672021-08-10 Martin Uecker <muecker@gwdg.de>
1168
1169 PR c/29970
1170 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1171 size expressions for structs of variable size.
1172
f92f4778
GA
11732021-08-06 Tamar Christina <tamar.christina@arm.com>
1174
1175 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1176 * c-tree.h (c_simulate_enum_decl): Likewise.
1177
11782021-08-06 Martin Sebor <msebor@redhat.com>
1179
1180 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1181 vec arguments to by-reference.
1182 (c_finish_omp_declare_simd): Same.
1183 (c_parser_compound_statement_nostart): Same.
1184 (c_parser_for_statement): Same.
1185 (c_parser_objc_methodprotolist): Same.
1186 (c_parser_oacc_routine): Same.
1187 (c_parser_omp_for_loop): Same.
1188 (c_parser_omp_declare_simd): Same.
1189
419c6c68
GA
11902021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1191 Joseph Myers <joseph@codesourcery.com>
1192 Cesar Philippidis <cesar@codesourcery.com>
1193
1194 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1195 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1196 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1197 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1198
92d45509
GA
11992021-07-20 Martin Sebor <msebor@redhat.com>
1200
1201 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1202 by-const-reference.
1203 * c-typeck.c (c_build_function_call_vec): Same.
1204
d97d71a1
GA
12052021-07-15 Martin Sebor <msebor@redhat.com>
1206
1207 PR c/101289
1208 PR c/97548
1209 * c-decl.c (get_parm_array_spec): Strip nops.
1210
6fba0eea
GA
12112021-07-06 Martin Sebor <msebor@redhat.com>
1212
1213 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1214
7a60a6e8
GA
12152021-07-02 Jakub Jelinek <jakub@redhat.com>
1216
1217 PR c/101297
1218 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1219 appears before a CPP_NAME.
1220
90708f87
GA
12212021-06-25 Martin Sebor <msebor@redhat.com>
1222
1223 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1224 warning_suppressed_p, suppress_warning, and copy_no_warning.
1225 (diagnose_mismatched_decls): Same.
1226 (duplicate_decls): Same.
1227 (grokdeclarator): Same.
1228 (finish_function): Same.
1229 (c_write_global_declarations_1): Same.
1230 * c-fold.c (c_fully_fold_internal): Same.
1231 * c-parser.c (c_parser_expr_no_commas): Same.
1232 (c_parser_postfix_expression): Same.
1233 * c-typeck.c (array_to_pointer_conversion): Same.
1234 (function_to_pointer_conversion): Same.
1235 (default_function_array_conversion): Same.
1236 (convert_lvalue_to_rvalue): Same.
1237 (default_conversion): Same.
1238 (build_indirect_ref): Same.
1239 (build_function_call_vec): Same.
1240 (build_atomic_assign): Same.
1241 (build_unary_op): Same.
1242 (c_finish_return): Same.
1243 (emit_side_effect_warnings): Same.
1244 (c_finish_stmt_expr): Same.
1245 (c_omp_clause_copy_ctor): Same.
1246
9aa8327e
GA
12472021-06-24 Jakub Jelinek <jakub@redhat.com>
1248
1249 PR c/101176
1250 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1251 the result.
1252
12532021-06-24 Jakub Jelinek <jakub@redhat.com>
1254
1255 PR c/101171
1256 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1257 error_mark_node.
1258
12592021-06-24 Jakub Jelinek <jakub@redhat.com>
1260
1261 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1262 C_ORT_OMP for clauses on target construct.
1263 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1264 (c_parser_omp_target): For non-combined target add
1265 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1266 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1267 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1268 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1269 never present on C_ORT_*DECLARE_SIMD.
1270 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1271 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1272 corresponding map clauses.
1273
2f080224
GA
12742021-06-21 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR inline-asm/100785
1277 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1278 bit-fields addressable.
1279
ede6c356
GA
12802021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1281
1282 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1283 similar.
1284
8dc48181
GA
12852021-06-14 Tobias Burnus <tobias@codesourcery.com>
1286
1287 PR c/100913
1288 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1289 var in the error case.
1290
438aac59
GA
12912021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1292
1293 PR c/100920
1294 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1295 spot built-in functions.
1296
7d6987e9
GA
12972021-06-06 Jakub Jelinek <jakub@redhat.com>
1298
1299 PR c/100902
1300 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1301 even when target is combined with other constructs.
1302
13032021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1304
1305 PR c/100920
1306 * c-decl.c (finish_struct): Fix thinko in previous change.
1307 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1308 assignment and initialization for storage order purposes if the
1309 RHS is a call to a DECL_IS_MALLOC function.
1310
600f90cb
GA
13112021-06-04 Martin Sebor <msebor@redhat.com>
1312
1313 PR c/100783
1314 * c-objc-common.c (print_type): Handle erroneous types.
1315
440c8a0a
GA
13162021-06-03 Jakub Jelinek <jakub@redhat.com>
1317
1318 PR c++/100859
1319 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1320 after depend only cases.
1321
ee682192
GA
13222021-05-31 Richard Biener <rguenther@suse.de>
1323
1324 PR c++/88601
1325 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1326 * c-parser.c (c_parser_postfix_expression): Likewise.
1327
48166757
GA
13282021-05-28 Richard Biener <rguenther@suse.de>
1329
1330 PR c/100803
1331 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1332 invalid if conditions.
1333
13342021-05-28 Jakub Jelinek <jakub@redhat.com>
1335
1336 PR middle-end/99928
1337 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1338 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1339 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1340 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1341 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1342 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1343 if present in map_head, map_field_head or map_firstprivate_head
1344 bitmaps.
1345
13462021-05-28 Tobias Burnus <tobias@codesourcery.com>
1347
1348 * c-parser.c (c_parser_omp_clause_affinity): New.
1349 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1350 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1351 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1352 c_finish_omp_clauses): Likewise.
1353
01c59ef2
GA
13542021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1355
1356 PR c/100653
1357 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1358 field with a differing scalar storage order.
1359
2832d51b
GA
13602021-05-21 Jakub Jelinek <jakub@redhat.com>
1361
1362 PR middle-end/99928
1363 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1364 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1365 if a decl is mentioned both in map clause and in such firstprivate
1366 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1367
65f32e5d
GA
13682021-05-19 Jakub Jelinek <jakub@redhat.com>
1369
1370 PR middle-end/99928
1371 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1372 master when combined with taskloop.
1373 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1374 parallel master when not combined with taskloop.
1375
a8daf9a1
GA
13762021-05-18 Richard Biener <rguenther@suse.de>
1377
1378 PR c/100522
1379 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1380 Diagnose calls to non-functions.
1381 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1382
a7ffc1ef
GA
13832021-05-17 Richard Biener <rguenther@suse.de>
1384
1385 PR c/100625
1386 * gimple-parser.c (c_parser_gimple_label): Avoid building
1387 a GIMPLE label with NULL label decl.
1388
f9af11c7
GA
13892021-05-13 Martin Sebor <msebor@redhat.com>
1390
1391 PR c/100550
1392 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1393
0ff3a0f2
GA
13942021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1395
1396 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1397 'close'.
1398
aa891c56
GA
13992021-05-10 Martin Liska <mliska@suse.cz>
1400
1401 * c-aux-info.c (affix_data_type): Use startswith
1402 function instead of strncmp.
1403 * c-typeck.c (build_function_call_vec): Likewise.
1404 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1405
62d87a32
GA
14062021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1407
1408 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1409 on the address of a pointer field in a record with reverse SSO.
1410
99e8df7a
GA
14112021-05-04 Tobias Burnus <tobias@codesourcery.com>
1412
1413 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1414 for || and && reductions.
1415
3c8e539d
GA
14162021-04-29 Joseph Myers <joseph@codesourcery.com>
1417
1418 * c-typeck.c (function_types_compatible_p): For C2X, treat
1419 unprototyped function as compatible with non-variadic prototyped
1420 function even if some argument types are changed by the default
1421 argument promotions.
1422
ee351f7f
GA
14232021-04-15 Martin Sebor <msebor@redhat.com>
1424
1425 PR c/99420
1426 PR c/99972
1427 * c-decl.c (pushdecl): Always propagate type attribute.
1428
14292021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1430
1431 PR c/98852
1432 * c-typeck.c (c_common_type): Do not drop attributes that
1433 affect type identity.
1434
1d54b138
GA
14352021-04-10 Jakub Jelinek <jakub@redhat.com>
1436
1437 PR c/99990
1438 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1439 error_mark_node.
1440
4493b1c1
GA
14412021-03-25 Jakub Jelinek <jakub@redhat.com>
1442
1443 PR c++/99565
1444 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1445 to operand_equal_p.
1446
5f256a70
GA
14472021-03-19 Jakub Jelinek <jakub@redhat.com>
1448
1449 PR c/99588
1450 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1451 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1452 if found.
1453 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1454 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1455 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1456
3c5b6d24
GA
14572021-03-15 Tobias Burnus <tobias@codesourcery.com>
1458
1459 PR c++/99509
1460 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1461 ensure that the varpool node is marked as offloadable.
1462
ceae9533
GA
14632021-03-05 Tobias Burnus <tobias@codesourcery.com>
1464
1465 PR c/99137
1466 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1467
4028d01a
GA
14682021-02-24 Martin Sebor <msebor@redhat.com>
1469
1470 PR middle-end/97172
1471 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1472
bf81237e
GA
14732021-02-18 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR c/99136
1476 * c-typeck.c (c_finish_return): Don't wrap retval into
1477 EXCESS_PRECISION_EXPR in functions that return void.
1478
0c5cdb31
GA
14792021-02-11 Marek Polacek <polacek@redhat.com>
1480
1481 * c-parser.c (c_parser_if_statement): Use vec_free.
1482
a19dd5e6
GA
14832021-02-04 Martin Sebor <msebor@redhat.com>
1484
1485 PR c/97882
1486 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1487 (diagnose_mismatched_decls): Same.
1488 (start_function): Introduce temporaries for better readability.
1489 * c-typeck.c (comptypes_internal): Only consider complete enum
1490 types in comparisons with integers.
1491
f7884fb1
GA
14922021-02-01 Martin Sebor <msebor@redhat.com>
1493
1494 PR middle-end/97172
1495 * c-decl.c (free_attr_access_data): New function.
1496 (c_parse_final_cleanups): Call free_attr_access_data.
1497
59cf67d1
GA
14982021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1499
1500 * c-parser.c (c_parser_omp_clause_detach): New.
1501 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1502 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1503 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1504 clause. Prevent use of detach with mergeable and overriding the
1505 data sharing mode of the event handle.
1506
2f7f0d32
GA
15072021-01-15 Jakub Jelinek <jakub@redhat.com>
1508
1509 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1510 unqualified element type and then call c_build_qualified_type on the
1511 ARRAY_TYPE.
1512
7d187e4f
GA
15132021-01-07 Richard Biener <rguenther@suse.de>
1514
1515 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1516 reallocate loop array if it is too small.
1517
eefe499f
GA
15182020-12-16 Martin Uecker <muecker@gwdg.de>
1519
1520 PR c/98047
1521 * c-typeck.c (build_modify_expr): Drop qualifiers.
1522
15232020-12-16 Martin Uecker <muecker@gwdg.de>
1524
1525 PR c/98260
1526 * c-parser.c (c_parser_expression): Look into
1527 nop expression when marking expressions as read.
1528
d52945ce
GA
15292020-12-14 Martin Liska <mliska@suse.cz>
1530
1531 PR sanitizer/98204
1532 * c-typeck.c (pointer_diff): Do not emit a top-level
1533 sanitization.
1534 (build_binary_op): Likewise.
1535
ca2bd949
GA
15362020-12-09 Tobias Burnus <tobias@codesourcery.com>
1537
1538 * c-parser.c (c_parser_omp_allocate): New.
1539 (c_parser_omp_construct): Call it.
1540
15412020-12-09 Richard Biener <rguenther@suse.de>
1542
1543 PR c/98200
1544 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1545 early on error.
1546
bc8a7013
GA
15472020-12-07 Martin Uecker <muecker@gwdg.de>
1548
1549 PR c/97981
1550 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1551 that drops qualifiers to the end of the function.
1552
d48df6f2
GA
15532020-11-26 Martin Uecker <muecker@gwdg.de>
1554
1555 PR c/65455
1556 PR c/92935
1557 * c-parser.c (c_parser_declaration_or_fndef): Remove
1558 redundant code to drop qualifiers of _Atomic types for __auto_type.
1559 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1560 types for __typeof__.
1561
1e2c9a27
GA
15622020-11-24 Jakub Jelinek <jakub@redhat.com>
1563
1564 PR c/97958
1565 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1566 expressions, use make_node instead of build2 to avoid checking build2
1567 performs.
1568
8e6198d0
GA
15692020-11-23 Joseph Myers <joseph@codesourcery.com>
1570
1571 PR c/95630
1572 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1573 for comparisons of complete and incomplete pointers.
1574
7a97e2fc
GA
15752020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1576
1577 * c-aux-info.c (gen_type): Support opaque types.
1578
82e5048e
GA
15792020-11-20 Martin Sebor <msebor@redhat.com>
1580
1581 PR middle-end/97879
1582 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1583
15842020-11-20 Jakub Jelinek <jakub@redhat.com>
1585
1586 PR other/97911
1587 * Make-lang.in (c.serial): Change from goal to a variable.
1588 (.PHONY): Drop c.serial.
1589
15902020-11-20 Martin Uecker <muecker@gwdg.de>
1591
1592 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1593
d62586ee
GA
15942020-11-19 Jakub Jelinek <jakub@redhat.com>
1595
1596 PR c/97860
1597 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1598 error_operand_p.
1599
25bb75f8
GA
16002020-11-18 Jakub Jelinek <jakub@redhat.com>
1601
1602 * Make-lang.in (c.serial): New goal.
1603 (.PHONY): Add c.serial c.prev.
1604 (cc1$(exeext)): Call LINK_PROGRESS.
1605
77f67db2
GA
16062020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1607
1608 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1609 goto too.
1610 * c-typeck.c (build_asm_expr): Remove an assert checking output
1611 absence for asm goto.
1612
16132020-11-13 Jakub Jelinek <jakub@redhat.com>
1614
1615 * c-typeck.c (c_finish_omp_clauses): Don't clear
1616 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1617
16182020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1619
1620 PR objc/77404
1621 * c-parser.c (c_parser_objc_class_definition): Pass the
1622 location of the class name to the interface declaration.
1623
bb622641
GA
16242020-11-10 Strager Neds <strager.nds@gmail.com>
1625
1626 * c-decl.c (merge_decls): Use new overload of
1627 set_decl_section_name.
1628
16292020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1630
1631 * c-parser.c (c_parser_omp_target_data): Add use of
1632 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1633 handled map clause kind.
1634 (c_parser_omp_target_enter_data): Likewise.
1635 (c_parser_omp_target_exit_data): Likewise.
1636 (c_parser_omp_target): Likewise.
1637 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1638 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1639 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1640 same struct field access to co-exist on OpenMP construct.
1641
2da7ee05
GA
16422020-11-07 Martin Uecker <muecker@gwdg.de>
1643
1644 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1645 (c_parser_all_labels): Likewise.
1646
44cab2d8
GA
16472020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1648
1649 * c-parser.c (c_parser_objc_at_property_declaration):
1650 Improve parsing fidelity. Associate better location info
1651 with @property attributes. Clean up the interface to
1652 objc_add_property_declaration ().
1653
16542020-11-06 Nathan Sidwell <nathan@acm.org>
1655
1656 * c-decl.c (diagnose_mismatched_decls): Rename
1657 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1658 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1659 (collect_source_refs): Likewise.
1660 * c-typeck.c (inform_declaration, inform_for_arg)
1661 (convert_for_assignment): Likewise.
1662
16632020-11-06 Tobias Burnus <tobias@codesourcery.com>
1664
1665 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1666 OpenACC matching.
1667 (c_parser_omp_construct): Update call.
1668
35c125cb
GA
16692020-11-04 Jakub Jelinek <jakub@redhat.com>
1670
1671 PR c++/97670
1672 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1673 find underlying decl to clear in the aligned_head bitmap.
1674
16752020-11-04 Joseph Myers <joseph@codesourcery.com>
1676
1677 * c-decl.c (handle_nodiscard_attribute): New.
1678 (std_attribute_table): Add nodiscard.
1679 * c-parser.c (c_parser_std_attribute): Expect argument to
1680 nodiscard attribute to be a string. Do not special-case ignoring
1681 nodiscard.
1682 * c-typeck.c (maybe_warn_nodiscard): New.
1683 (build_compound_expr, emit_side_effect_warnings): Call
1684 maybe_warn_nodiscard.
1685 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1686 emit_side_effect_warnings if warn_unused_result.
1687
4f0606fe
GA
16882020-10-29 Asher Gordon <AsDaGo@posteo.net>
1689
1690 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1691 with XDELETE.
1692 (finish_init): Likewise.
1693 (pop_init_level): Likewise.
1694
e93aae4a
GA
16952020-10-28 Joseph Myers <joseph@codesourcery.com>
1696
1697 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1698 error_at for omitted parameter name.
1699
17002020-10-28 Jakub Jelinek <jakub@redhat.com>
1701
1702 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1703 (c_parser_omp_clause_allocate): New function.
1704 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1705 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1706 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1707 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1708 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1709 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1710 PRAGMA_OMP_CLAUSE_ALLOCATE.
1711 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1712
89bb01e7
GA
17132020-10-27 Joseph Myers <joseph@codesourcery.com>
1714
1715 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1716 standard attributes.
1717
efe71fcc
GA
17182020-10-23 Marek Polacek <polacek@redhat.com>
1719
1720 PR c++/91741
1721 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1722 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1723 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1724 * c-tree.h (char_type_p): Declare.
1725 * c-typeck.c (char_type_p): No longer static.
1726
17272020-10-23 Martin Sebor <msebor@redhat.com>
1728
1729 PR middle-end/97552
1730 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1731
2fe5b7d1
GA
17322020-09-19 Martin Sebor <msebor@redhat.com>
1733
1734 PR c/50584
1735 * c-decl.c (lookup_last_decl): Define new function.
1736 (c_decl_attributes): Call it.
1737 (start_decl): Add argument and use it.
1738 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1739 (get_parm_array_spec): Define new function.
1740 (push_parm_decl): Call get_parm_array_spec.
1741 (start_function): Call warn_parm_array_mismatch. Build attribute
1742 access and add it to current function.
1743 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1744 in forms of array parameters.
1745 * c-tree.h (start_decl): Add argument.
1746
17472020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1748
1749 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1750 with...
1751 (in_statement): New.
1752 (start_function): Adjust for above change.
1753 (c_push_function_context, c_pop_function_context): Likewise.
1754 * c-lang.h (struct language_function): Likewise.
1755 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1756 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1757 New.
1758 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1759 (c_parser_switch_statement): Adjust break/switch context handling
1760 and calls to renamed functions.
1761 (c_parser_while_statement): Adjust break/switch context handling and
1762 build a WHILE_STMT.
1763 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1764 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1765 (c_parser_omp_for_loop): Adjust break/switch context handling.
1766 * c-tree.h (c_break_label, c_cont_label): Delete.
1767 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1768 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1769 (in_statement, switch_statement_break_seen_p): Declare.
1770 (c_start_case, c_finish_case): Renamed to...
1771 (c_start_switch, c_finish_switch).
1772 (c_finish_bc_stmt): Adjust arguments.
1773 * c-typeck.c (build_function_call_vec): Don't try to print
1774 statements with %qE format.
1775 (struct c_switch): Rename switch_expr field to switch_stmt.
1776 Add break_stmt_seen_p field.
1777 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1778 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1779 (do_case): Update for changes to struct c_switch.
1780 (c_finish_case): Rename to c_finish_switch. Update for changes to
1781 struct c_switch and change of representation from SWITCH_EXPR to
1782 SWITCH_STMT.
1783 (c_finish_loop): Delete.
1784 (c_finish_bc_stmt): Update to reflect changes to break/continue
1785 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1786 of a GOTO_EXPR except for objc foreach loops.
1787
e1a4a8a0
GA
17882020-09-01 Jakub Jelinek <jakub@redhat.com>
1789
1790 PR c++/96867
1791 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1792 only on PARM_DECLs.
1793
8f7ea26a
GA
17942020-08-28 Martin Sebor <msebor@redhat.com>
1795
1796 PR c/96596
1797 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1798 argument type.
1799
8b394f01
GA
18002020-08-27 Martin Liska <mliska@suse.cz>
1801
1802 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1803 growth function to true.
1804
db0f6efe
GA
18052020-08-25 Tobias Burnus <tobias@codesourcery.com>
1806
1807 PR c/96678
1808 * c-typeck.c (handle_omp_array_sections_1): Talk about
1809 array function parameter in the error message.
1810
5c265693
GA
18112020-08-18 Jakub Jelinek <jakub@redhat.com>
1812
1813 PR c/96571
1814 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1815 to int, holding index of the match. Call mark_exp_read on the selector
1816 expression and on expressions other than the selected one.
1817
4967ca2f
GA
18182020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1819
1820 PR c/96377
1821 * c-typeck.c (process_init_element): Split test for whether to
1822 recurse into a record, union or array into...
1823 (initialize_elementwise_p): ...this new function. Don't recurse
1824 into a vector type if the initialization value is also a vector.
1825
48cc2e46
GA
18262020-07-31 Richard Biener <rguenther@suse.de>
1827
1828 PR debug/96383
1829 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1830 Define to c_common_finalize_early_debug.
1831
3ea9abca
GA
18322020-07-22 Tobias Burnus <tobias@codesourcery.com>
1833
1834 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1835 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1836 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1837
30430061
GA
18382020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1839
1840 PR target/95237
1841 * c-decl.c (finish_decl): Call target hook
1842 lower_local_decl_alignment to lower local decl alignment.
1843
3f8ca9cb
GA
18442020-07-09 Julian Brown <julian@codesourcery.com>
1845 Thomas Schwinge <thomas@codesourcery.com>
1846
1847 PR middle-end/95270
1848 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1849 for standalone attach/detach clauses.
1850
a82c4c4c 18512020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1852
1853 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1854 set, warn for conversion between pointers that point to incompatible
1855 scalar storage orders.
1856
f60ee68d
GA
18572020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1858
1859 * c-parser.c (c_parser_statement_after_labels): Pass correct
1860 parameters to c_parser_do_statement.
1861
56638b9b
GA
18622020-06-16 Jakub Jelinek <jakub@redhat.com>
1863
1864 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1865 c_in_omp_for.
1866 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1867 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1868 c_finish_omp_for.
1869 * c-tree.h (c_in_omp_for): Declare.
1870 * c-typeck.c (c_in_omp_for): Define.
1871 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1872 (digest_init): Likewise.
1873 (build_binary_op): Likewise.
1874
18752020-06-16 Jakub Jelinek <jakub@redhat.com>
1876
1877 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1878 from kind by comma rather than colon.
1879
1a59f3db
GA
18802020-06-05 Mark Wielaard <mark@klomp.org>
1881
1882 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1883 an undeclared builtin, then add a fixit header hint, if found.
1884 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1885 warning_at about implicit builtin declaration type mismatch.
1886
9a5b7438
GA
18872020-06-03 Mark Wielaard <mark@klomp.org>
1888
1889 * c-parser.c (struct c_parser): Add seen_string_literal
1890 bitfield.
1891 (c_parser_consume_token): Reset seen_string_literal.
1892 (c_parser_error_richloc): Add name_hint if seen_string_literal
1893 and next token is a CPP_NAME and we have a missing header
1894 suggestion for the name.
1895 (c_parser_string_literal): Set seen_string_literal.
1896
18972020-06-03 Mark Wielaard <mark@klomp.org>
1898
1899 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1900 scope with matching_parens after CPP_OPEN_PAREN.
1901
19022020-06-03 Tobias Burnus <tobias@codesourcery.com>
1903
1904 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1905
53ffb43a
GA
19062020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1907
1908 * Make-lang.in: Remove extra slash.
1909
8f66f175
ML
19102020-05-19 Martin Liska <mliska@suse.cz>
1911
1912 * c-parser.c: Fix typo.
1913
49ddde69
JJ
19142020-05-14 Jakub Jelinek <jakub@redhat.com>
1915
1916 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1917
eb72dc66
RB
19182020-05-07 Richard Biener <rguenther@suse.de>
1919
1920 PR middle-end/94703
1921 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1922 DECL_GIMPLE_REG_P.
1923
bf915591
JJ
19242020-04-30 Jakub Jelinek <jakub@redhat.com>
1925
1926 PR c/94842
1927 * c-decl.c (set_labels_context_r): In addition to context-less
1928 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1929 parent function if any.
1930 (store_parm_decls): Adjust comment.
1931
e1113ffb
JJ
19322020-04-19 Jakub Jelinek <jakub@redhat.com>
1933
1934 PR objc/94637
1935 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1936 two CPP_COLON tokens.
1937
2e389749
JJ
19382020-04-17 Jakub Jelinek <jakub@redhat.com>
1939
1940 PR other/94629
1941 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1942 to data.clauses.
1943
2dc9294c
JJ
19442020-04-15 Jakub Jelinek <jakub@redhat.com>
1945
1946 PR c/94593
1947 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1948 requires directive when not at file scope.
1949
13e41d8b
TB
19502020-04-08 Tobias Burnus <tobias@codesourcery.com>
1951
1952 PR middle-end/94120
1953 * c-decl.c (c_check_in_current_scope): New function.
1954 * c-tree.h (c_check_in_current_scope): Declare it.
1955 * c-parser.c (c_parser_oacc_declare): Add check that variables
1956 are declared in the same scope as the directive. Fix handling
1957 of namespace vars.
1958
4df50a05
JJ
19592020-04-07 Jakub Jelinek <jakub@redhat.com>
1960
1961 PR c++/94512
1962 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1963 if c_parser_omp_master succeeded.
1964
5db9e893
JJ
19652020-03-23 Jakub Jelinek <jakub@redhat.com>
1966
1967 PR gcov-profile/94029
1968 PR c/94239
1969 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1970 the function_start_locus location. Don't do that afterwards for the
1971 __GIMPLE body parsing.
1972
9def91e9
JJ
19732020-03-19 Jakub Jelinek <jakub@redhat.com>
1974
1975 PR gcov-profile/94029
1976 * c-tree.h (finish_function): Add location_t argument defaulted to
1977 input_location.
1978 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1979 set it to the locus of closing } if non-NULL.
1980 (c_parser_compound_statement_nostart): Return locus of closing }.
1981 (c_parser_parse_rtl_body): Likewise.
1982 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1983 finish_function.
1984 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1985 input_location to set function_end_locus.
1986
046c5890
JJ
19872020-03-17 Jakub Jelinek <jakub@redhat.com>
1988
1989 PR c/94172
1990 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1991 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1992 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1993 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1994 ENUMERAL_TYPEs.
1995 (finish_incomplete_vars): New function, moved from finish_struct. Use
1996 relayout_decl instead of layout_decl.
1997 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1998 being TYPE_VFIELD. Use finish_incomplete_vars.
1999 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2000 finish_incomplete_vars.
2001 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2002 also on ENUMERAL_TYPEs.
2003
c015ff8c
JJ
20042020-03-16 Jakub Jelinek <jakub@redhat.com>
2005
2006 PR c/94179
2007 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2008
f2e9fe5f
MS
20092020-03-13 Martin Sebor <msebor@redhat.com>
2010
2011 PR c/94040
2012 * c-decl.c (builtin_structptr_type_count): New constant.
2013 (match_builtin_function_types): Reject decls that are incompatible
2014 in types pointed to by pointers.
2015 (diagnose_mismatched_decls): Adjust comments.
2016
c9d70946
JM
20172020-03-05 Joseph Myers <joseph@codesourcery.com>
2018
2019 PR c/93577
2020 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2021 empty when initialized type is error_mark_node.
2022 (set_designator, process_init_element): Ignore initializers for
2023 elements of a variable-size type or of error_mark_node.
2024
726e292d
MS
20252020-03-01 Martin Sebor <msebor@redhat.com>
2026
2027 PR middle-end/93926
2028 * c-decl.c (types_close_enough_to_match): New function.
2029 (match_builtin_function_types):
2030 (diagnose_mismatched_decls): Add missing inform call to a warning.
2031
a499c2f8
MS
20322020-03-01 Martin Sebor <msebor@redhat.com>
2033
2034 PR c/93812
2035 * c-typeck.c (build_functype_attribute_variant): New function.
2036 (composite_type): Call it.
2037
9c3da8cc
JJ
20382020-02-25 Jakub Jelinek <jakub@redhat.com>
2039
2040 PR other/93912
2041 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2042 Rename last argument from probablity to probability.
2043
bacdd5e9
JJ
20442020-02-13 Jakub Jelinek <jakub@redhat.com>
2045
2046 PR c/93576
2047 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2048 *expr if it has side effects.
2049
f9eb0973
JL
20502020-01-30 Jeff Law <law@redhat.com>
2051
2052 PR c/88660
2053 * c-parser.c (c_parser_switch_statement): Make sure to request
2054 marking the switch expr as used.
2055
ac68e287
JM
20562020-01-22 Joseph Myers <joseph@codesourcery.com>
2057
2058 PR c/93348
2059 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2060 argument with integer operands.
2061
852f0ae8
KK
20622020-01-16 Kerem Kat <keremkat@gmail.com>
2063
2064 PR c/92833
2065 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2066 to support 4 available tokens.
2067
e2346a33
JM
20682020-01-15 Joseph Myers <joseph@codesourcery.com>
2069
2070 PR c/93072
2071 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2072 determine whether to set DECL_CONTEXT.
2073
3d77686d
JM
20742020-01-13 Joseph Myers <joseph@codesourcery.com>
2075
2076 PR c/93241
2077 * c-typeck.c (build_c_cast): Check for expressions with integer
2078 operands that can occur in an unevaluated part of an integer
2079 constant expression and call note_integer_operands as needed.
2080
f74c4b2c
RB
20812019-01-08 Richard Biener <rguenther@suse.de>
2082
2083 PR middle-end/93199
2084 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2085 permanently.
2086
8d9254fc
JJ
20872020-01-01 Jakub Jelinek <jakub@redhat.com>
2088
2089 Update copyright years.
2090
39292e25
EB
20912019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2092
2093 * c-decl.c (collect_source_ref_cb): Delete.
2094 (for_each_global_decl): Rename into...
2095 (collect_source_refs): ...this. Call collect_source_ref directly.
2096 (c_parse_final_cleanups): Always call collect_source_ref on the main
2097 input filename.
2098
519d7496
JB
20992019-12-19 Julian Brown <julian@codesourcery.com>
2100 Cesar Philippidis <cesar@codesourcery.com>
2101
2102 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2103 detach clauses.
2104 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2105 Allow deref (->) in variable lists if true.
2106 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2107 Pass to c_parser_omp_variable_list.
2108 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2109 call to c_parser_omp_variable_list.
2110 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2111 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2112 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2113 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2114 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2115 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2116 and detach. Support deref.
2117 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2118 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2119 (c_oacc_check_attachments): New function.
2120 (c_finish_omp_clauses): Check attach/detach arguments for being
2121 pointers using above. Support deref.
2122
a6163563
JB
21232019-12-19 Julian Brown <julian@codesourcery.com>
2124 Maciej W. Rozycki <macro@codesourcery.com>
2125 Tobias Burnus <tobias@codesourcery.com>
2126 Thomas Schwinge <thomas@codesourcery.com>
2127
2128 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2129 (c_parser_oacc_data_clause): Likewise.
2130 (c_parser_oacc_all_clauses): Likewise.
2131 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2132 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2133 PRAGMA_OACC_CLAUSE_NO_CREATE.
2134 * c-typeck.c (handle_omp_array_sections): Support
2135 GOMP_MAP_NO_ALLOC.
2136
d68f5d45
DM
21372019-12-09 David Malcolm <dmalcolm@redhat.com>
2138
2139 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2140 Replace label_text ctor calls.
2141
4691bf46
JM
21422019-12-04 Joseph Myers <joseph@codesourcery.com>
2143
2144 PR c/36941
2145 PR c/88827
2146 * c-typeck.c (convert_lvalue_to_rvalue): Call
2147 require_complete_type for arguments not of void types.
2148 (build_indirect_ref): Do not diagnose dereferencing pointers to
2149 incomplete types.
2150 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2151
85d11957
JM
21522019-12-03 Joseph Myers <joseph@codesourcery.com>
2153
2154 PR c/88704
2155 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2156 old-style parameter definitions.
2157
4569f8b3
SL
21582019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2159
2160 PR target/92499
2161
2162 * c-decl.c (flexible_array_type_p): Move to common code.
2163
65ef05d0
RS
21642019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2165
2166 * c-decl.c (start_decl): Allow initialization of variables whose
2167 size is a POLY_INT_CST.
2168 (finish_decl): Use verify_type_context to check whether the target
2169 allows variables with a particular type to have static or thread-local
2170 storage duration. Don't raise a second error if such variables do
2171 not have a constant size.
2172 (grokdeclarator): Use verify_type_context to check whether the
2173 target allows fields or array elements to have a particular type.
2174 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2175 the target allows pointer difference for the types involved.
2176 (build_unary_op): Likewise for pointer increment and decrement.
2177
34b43828
JM
21782019-11-29 Joseph Myers <joseph@codesourcery.com>
2179
2180 * c-parser.c (struct c_parser): Add members raw_tokens and
2181 raw_tokens_used.
2182 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2183 using previously-lexed raw tokens.
2184 (c_parser_peek_nth_token_raw)
2185 (c_parser_check_balanced_raw_token_sequence): New functions.
2186 (c_parser_nth_token_starts_std_attributes): Use
2187 c_parser_check_balanced_raw_token_sequence for Objective-C.
2188
5b8d9367
JM
21892019-11-25 Joseph Myers <joseph@codesourcery.com>
2190
2191 PR c/91985
2192 * c-decl.c (finish_declspecs): Use int instead of decimal
2193 floating-point types if decimal floating-point not supported.
2194
1723e1be
JM
21952019-11-25 Joseph Myers <joseph@codesourcery.com>
2196
2197 * c-tree.h (struct c_declarator): Use a structure for id member.
2198 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2199 declarators at the start, not when handling individual declarators
2200 later. Use u.id.id instead of u.id.
2201 (grokfield): Use u.id.id instead of u.id.
2202 (build_id_declarator): Set u.id.id and u.id.attrs.
2203 (finish_declspecs): Handle postfix attributes in case of typedef
2204 name or typeof used.
2205 * c-parser.c (c_parser_direct_declarator)
2206 (c_parser_direct_declarator_inner): Place declarator for
2207 attributes inside that for function or array, not outside. Set
2208 u.id.attrs for identifiers.
2209 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2210 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2211 instead of u.id.
2212
bdaf8be1
JJ
22132019-11-22 Jakub Jelinek <jakub@redhat.com>
2214
2215 PR c/90677
2216 * c-decl.c (identifier_global_tag): Define.
2217
3e00ba47
RB
22182019-11-20 Richard Biener <rguenther@suse.de>
2219
2220 PR c/92088
2221 * c-decl.c (grokdeclarator): Prevent inlining of nested
2222 function with VLA arguments.
2223
8c5b727a
JM
22242019-11-20 Joseph Myers <joseph@codesourcery.com>
2225
2226 * c-decl.c (c_warn_type_attributes): New function.
2227 (groktypename, grokdeclarator, finish_declspecs): Call
2228 c_warn_type_attributes before applying attributes to types.
2229 * c-tree.h (c_warn_type_attributes): Declare.
2230
192961ff
JM
22312019-11-19 Joseph Myers <joseph@codesourcery.com>
2232
2233 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2234 standard attributes.
2235 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2236 pedwarn for unknown standard attributes and return error_mark_node
2237 for them.
2238
20a38017
MM
22392019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2240
2241 * c-parser.c (c_parser_parse_rtl_body): Always call
2242 run_rtl_passes, even if startwith pass is not provided.
2243
d5fbe5e0
JM
22442019-11-15 Joseph Myers <joseph@codesourcery.com>
2245
2246 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2247 duplicate standard attributes.
2248
97cc1187
JM
22492019-11-15 Joseph Myers <joseph@codesourcery.com>
2250
2251 * c-decl.c (std_attribute_table): Add maybe_unused.
2252
f8aea5e3
JM
22532019-11-15 Joseph Myers <joseph@codesourcery.com>
2254
2255 * c-decl.c (std_attribute_table): Add fallthrough.
2256 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2257 attribute at top level.
2258
2cc94aa8
JM
22592019-11-15 Joseph Myers <joseph@codesourcery.com>
2260
2261 * c-decl.c (std_attribute_table): New.
2262 (c_init_decl_processing): Register attributes from
2263 std_attribute_table.
2264 * c-parser.c (c_parser_attribute_arguments): Add arguments
2265 require_string and allow_empty_args. All callers changed.
2266 (c_parser_std_attribute): Set require_string argument for
2267 "deprecated" attribute.
2268
7c5890cc
JM
22692019-11-14 Joseph Myers <joseph@codesourcery.com>
2270
2271 * c-parser.c (c_parser_postfix_expression)
2272 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2273 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2274
e8738f4e
RS
22752019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2276
2277 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2278 of build_same_sized_truth_vector_type.
2279 (build_vec_cmp): Likewise.
2280
b2417b59
JJ
22812019-11-14 Jakub Jelinek <jakub@redhat.com>
2282
bedb7f04
JJ
2283 * c-parser.c (c_parser_omp_context_selector): Don't require score
2284 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2285 negative score.
2286
b2417b59
JJ
2287 * c-parser.c (c_parser_omp_context_selector): Rename
2288 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2289 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2290 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2291 and string literals.
2292
4e03c3a7
JM
22932019-11-14 Joseph Myers <joseph@codesourcery.com>
2294
2295 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2296 ctsk_tagfirstref_attrs.
2297 (struct c_declspecs): Update description of attrs. Add
2298 postfix_attrs and non_std_attrs_seen_p. Increase size of
2299 typespec_kind bit-field.
2300 (c_warn_unused_attributes): New declaration.
2301 (parser_xref_tag): Update prototype.
2302 * c-decl.c (c_warn_unused_attributes): New function.
2303 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2304 ctsk_tagref_attrs. Handle attribute declarations.
2305 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2306 (grokdeclarator): Handle standard attributes.
2307 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2308 attributes to incomplete type reference.
2309 (xref_tag): Update call to parser_xref_tag.
2310 (declspecs_add_addrspace, declspecs_add_type)
2311 (declspecs_add_scspec, declspecs_add_attrs): Set
2312 non_std_attrs_seen_p.
2313 (finish_declspecs): Apply postfix standard attributes to type.
2314 * c-parser.c (c_token_starts_declspecs)
2315 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2316 (c_parser_next_tokens_start_declaration): Update comments.
2317 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2318 parser->tokens[2] to parser->tokens[1].
2319 (c_parser_nth_token_starts_std_attributes)
2320 (c_parser_std_attribute_specifier_sequence): New functions.
2321 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2322 attrs. All callers changed. Handle standard attributes.
2323 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2324 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2325 All callers changed.
2326 (c_parser_declspecs): Add arguments start_std_attr_ok and
2327 end_std_attr_ok. All callers changed. Handle standard
2328 attributes.
2329 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2330 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2331 (c_parser_compound_statement_nostart, c_parser_all_labels)
2332 (c_parser_label, c_parser_statement, c_parser_for_statement):
2333 Handle standard attributes.
2334 * c-parser.h (c_parser_declspecs): Update prototype.
2335 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2336 c_parser_declspecs.
2337
0c29cac4
ML
23382019-11-12 Martin Liska <mliska@suse.cz>
2339
2340 * gimple-parser.c: Do not include params.h.
2341
028d4092
ML
23422019-11-12 Martin Liska <mliska@suse.cz>
2343
2344 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2345 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2346 macro.
2347
62aee289
MR
23482019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2349 Frederik Harwath <frederik@codesourcery.com>
2350
2351 gcc/c/
2352 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2353 (c_parser_oacc_kernels_parallel): Rename function to...
2354 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2355 (c_parser_omp_construct): Update accordingly.
2356
2357
7cec9588
JJ
23582019-11-11 Jakub Jelinek <jakub@redhat.com>
2359
2360 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2361 without corresponding end declare target.
2362
f486280c
RS
23632019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2364
2365 * c-convert.c (convert): Only handle vector conversions if one of
2366 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2367 allows it.
2368 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2369 vectors satisfy gnu_vector_type_p.
2370 (build_unary_op): Only allow unary operators to be applied to
2371 vectors if they satisfy gnu_vector_type_p.
2372 (digest_init): Only allow by-element initialization of vectors
2373 if they satisfy gnu_vector_type_p.
2374 (really_start_incremental_init): Likewise.
2375 (push_init_level): Likewise.
2376 (pop_init_level): Likewise.
2377 (process_init_element): Likewise.
2378 (build_binary_op): Only allow binary operators to be applied to
2379 vectors if they satisfy gnu_vector_type_p.
2380
017c6491
JM
23812019-11-08 Joseph Myers <joseph@codesourcery.com>
2382
2383 * c-decl.c (grokparms): Convert () in a function definition to
2384 (void) for C2x.
2385 (store_parm_decls_oldstyle): Pedwarn for C2x.
2386 (store_parm_decls): Update comment about () not generating a
2387 prototype.
2388
c01bd174
JM
23892019-11-07 Joseph Myers <joseph@codesourcery.com>
2390
2391 * c-parser.c (c_parser_attribute_arguments): New function.
2392 Factored out of c_parser_gnu_attribute.
2393 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2394 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2395 (c_parser_std_attribute_specifier): New functions.
2396 (c_parser_transaction_attributes): Use
2397 c_parser_std_attribute_specifier.
2398
471c5330
JM
23992019-11-07 Joseph Myers <joseph@codesourcery.com>
2400
2401 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2402 lex_joined_string and translate_strings_p.
2403 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2404 c_lex_with_flags.
2405 (c_parser_string_literal): New function.
2406 (c_parser_static_assert_declaration_no_semi): Use
2407 c_parser_string_literal. Do not set lex_untranslated_string.
2408 (c_parser_asm_string_literal): Use c_parser_string_literal.
2409 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2410 (c_parser_gnu_attributes): Set and restore translate_strings_p
2411 instead of lex_untranslated_string.
2412 (c_parser_asm_statement): Do not set lex_untranslated_string.
2413 (c_parser_asm_operands): Likewise.
2414 (c_parser_has_attribute_expression): Set and restore
2415 translate_strings_p instead of lex_untranslated_string.
2416 (c_parser_postfix_expression): Use c_parser_string_literal.
2417 (pragma_lex): Likewise.
2418 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2419 (c_parse_file): Set translate_strings_p.
2420 * gimple-parser.c (c_parser_gimple_postfix_expression)
2421 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2422 * c-parser.c (c_parser_string_literal): Declare function.
2423
d0c464d2
JJ
24242019-11-02 Jakub Jelinek <jakub@redhat.com>
2425
2426 * c-parser.c (c_finish_omp_declare_variant): Use
2427 omp_get_context_selector instead of c_omp_get_context_selector.
2428
ac2cfa6c
RS
24292019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2430
2431 * c-tree.h (c_simulate_enum_decl): Declare.
2432 * c-decl.c (c_simulate_enum_decl): New function.
2433 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2434
74078538
RS
24352019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2436
2437 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2438 * c-decl.c (c_simulate_builtin_function_decl): New function.
2439 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2440 to the above.
2441
ad1539d5
MS
24422019-10-28 Martin Sebor <msebor@redhat.com>
2443
2444 PR c/66970
2445 * c-decl.c (names_builtin_p): Define a new function.
2446
cb73e4e7
RB
24472019-10-28 Richard Biener <rguenther@suse.de>
2448
2449 PR c/92249
2450 * gimple-parser.c (c_parser_parse_gimple_body): Make
2451 current_bb the entry block initially to easier recover
2452 from errors.
2453 (c_parser_gimple_compound_statement): Adjust.
2454
135df52c
JJ
24552019-10-24 Jakub Jelinek <jakub@redhat.com>
2456
2457 * c-parser.c (c_finish_omp_declare_variant): Use
2458 omp_context_selector_matches instead of
2459 c_omp_context_selector_matches.
2460 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2461 attribute in between declare target and end declare target
2462 pragmas.
2463
783bfe5e
JM
24642019-10-15 Joseph Myers <joseph@codesourcery.com>
2465
2466 * c-parser.c (c_parser_attribute_any_word): Rename to
2467 c_parser_gnu_attribute_any_word. All callers changed.
2468 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2469 callers changed.
2470 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2471 callers changed.
2472 (c_parser_declaration_or_fndef, c_parser_declspecs)
2473 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2474 (c_parser_struct_declaration, c_parser_declarator)
2475 (c_parser_gnu_attribute, c_parser_compound_statement)
2476 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2477 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2478 attribute-related syntax productions.
2479
56898e43
RS
24802019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2481
2482 * c-objc-common.c (useful_aka_type_p): Replace with...
2483 (get_aka_type): ...this new function. Given the original type,
2484 decide which aka type to print (if any). Only look through typedefs
2485 if user_facing_original_type_p.
2486 (print_type): Update accordingly.
2487
b9424661
JJ
24882019-10-14 Jakub Jelinek <jakub@redhat.com>
2489
2490 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2491 into int NESTED, if it is 2, diagnose missing commas in between
2492 clauses.
2493 (c_parser_omp_context_selector): Pass 2 as last argument to
2494 c_parser_omp_all_clauses.
2495
20de9568
JJ
24962019-10-12 Jakub Jelinek <jakub@redhat.com>
2497
2498 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2499 For simd properties, put them directly into TREE_VALUE.
2500 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2501 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2502 add "omp declare variant base" attribute rather than
2503 "omp declare variant".
2504
fe2bc27c
JM
25052019-10-11 Joseph Myers <joseph@codesourcery.com>
2506
2507 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2508
94e7f906
JJ
25092019-10-10 Jakub Jelinek <jakub@redhat.com>
2510
2511 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2512 true, terminate processing on closing paren and don't skip to end of
2513 pragma line.
2514 (c_parser_omp_declare_simd): Handle also declare variant.
2515 (omp_construct_selectors, omp_device_selectors,
2516 omp_implementation_selectors, omp_user_selectors): New variables.
2517 (c_parser_omp_context_selector,
2518 c_parser_omp_context_selector_specification,
2519 c_finish_omp_declare_variant): New functions.
2520 (c_finish_omp_declare_simd): Handle both declare simd and
2521 declare variant.
2522 (c_parser_omp_declare): Handle declare variant.
2523
93313b94
JM
25242019-10-02 Joseph Myers <joseph@codesourcery.com>
2525
2526 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2527 CPP_COLON tokens.
2528
55879815
RS
25292019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2530
2531 * c-objc-common.c (useful_aka_type_p): New function.
2532 (print_type): Use it to decide whether an aka type is worth printing.
2533
59bc434a
JJ
25342019-09-27 Jakub Jelinek <jakub@redhat.com>
2535
2536 PR c++/88203
2537 * c-parser.c (c_parser_predefined_identifier): New function.
2538 (c_parser_postfix_expression): Use it.
2539 (c_parser_omp_variable_list): Parse predefined identifiers.
2540 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2541 in shared and firstprivate clauses, even when they are predetermined
2542 shared.
2543
c6447c20
RS
25442019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2545
2546 * c-typeck.c (build_function_call_vec): Take the original function
2547 decl as an optional final parameter. Pass all built-in calls to
2548 check_builtin_function_arguments.
2549
522da4c2
EB
25502019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2551
2552 PR c/91815
2553 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2554 of identifiers in the external scope only for variables and functions.
2555
68e2c199
PK
25562019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2557
2558 PR c/78736
2559 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2560
22f8849d
IS
25612019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2562
2563 PR pch/61250
2564 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2565 after determining that the first token is not
2566 PRAGMA_GCC_PCH_PREPROCESS.
2567
db376f45
EB
25682019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2569
2570 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2571 FUNCTION_DECL to the right value in the presence of nested declarators.
2572
4d732405
RS
25732019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2574
2575 PR middle-end/91421
2576 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2577
cb1180d5
RS
25782019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2579
2580 PR middle-end/91421
2581 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2582 of a built_in_function.
2583 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2584
77eb117f
JJ
25852019-08-10 Jakub Jelinek <jakub@redhat.com>
2586
2587 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2588 (c_parser_omp_clause_device_type): New function.
2589 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2590 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2591 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2592 diagnostics for declare target with clauses nested in clause-less
2593 declare target declaration-definition-seq.
2594 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2595
2c3b8bad
JJ
25962019-08-09 Jakub Jelinek <jakub@redhat.com>
2597
bb522e2e
JJ
2598 * c-parser.c (check_no_duplicate_clause): Simplify using
2599 omp_find_clause.
2600 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2601 directive name modifiers.
2602 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2603
2c3b8bad
JJ
2604 PR c/91401
2605 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2606 check_no_duplicate_clause call. Comment it out, instead emit a
2607 warning for duplicate dist_schedule clauses.
2608
99769e7f
RS
26092019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2610
2611 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2612
8860d270
JJ
26132019-08-08 Jakub Jelinek <jakub@redhat.com>
2614
2615 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2616 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2617 instead of generic_head to track duplicates.
2618
398e3feb
JJ
26192019-08-07 Jakub Jelinek <jakub@redhat.com>
2620
2621 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2622 (c_parser_omp_clause_use_device_addr): New function.
2623 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2624 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2625 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2626 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2627 map or use_device_* clauses.
2628 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2629 in OpenMP, require pointer type rather than pointer or array type.
2630 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2631
a28351e7
JJ
26322019-07-31 Jakub Jelinek <jakub@redhat.com>
2633
2634 PR c/91192
2635 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2636 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2637 case.
2638
6343b6bf
ML
26392019-07-25 Martin Liska <mliska@suse.cz>
2640 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2641
2642 PR c++/23383
2643 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2644
cb50701e
ML
26452019-07-25 Martin Liska <mliska@suse.cz>
2646
2647 * c-decl.c (merge_decls): Use new macros
2648 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2649
62e3e66f
RB
26502019-07-23 Richard Biener <rguenther@suse.de>
2651
2652 PR tree-optimization/83518
2653 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2654 a CFG also rebuild cgraph edges.
2655
554a530f
JJ
26562019-07-20 Jakub Jelinek <jakub@redhat.com>
2657
2658 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2659 (c_parser_omp_clause_bind): New function.
2660 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2661 (OMP_LOOP_CLAUSE_MASK): Define.
2662 (c_parser_omp_loop): New function.
2663 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2664 loop combined with parallel or teams.
2665 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2666 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2667
d119bf79
RS
26682019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2669
2670 PR c/53633
2671 * c-decl.c (finish_function): Check targetm.warn_func_return
2672 before issuing a -Wreturn-type warning.
2673
ab20d992 26742019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2675
2676 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2677 (c_parser_compound_statement): Call it.
2678
1fdd6f04
JJ
26792019-07-12 Jakub Jelinek <jakub@redhat.com>
2680
2681 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2682 (c_parser_omp_clause_order): New function.
2683 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2684 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2685 PRAGMA_OMP_CLAUSE_ORDER.
2686 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2687
8389386c
RB
26882019-07-10 Richard Biener <rguenther@suse.de>
2689
2690 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2691 _Literal (int *) &x for address literals.
2692
99b1c316
MS
26932019-07-09 Martin Sebor <msebor@redhat.com>
2694
2695 PR c++/61339
2696 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2697 to class.
2698 (field_decl_cmp): Same.
2699 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2700 * c-tree.h: Same.
2701 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2702
6c1dae73
MS
27032019-07-09 Martin Sebor <msebor@redhat.com>
2704
2705 PR c++/61339
2706 * c-decl.c: Change class-key from class to struct and vice versa
2707 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2708 * gimple-parser.c: Same.
2709
69b5279e
RB
27102019-07-01 Richard Biener <rguenther@suse.de>
2711
2712 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2713 _Literal (char *) &"foo" for address literals pointing to
2714 STRING_CSTs.
2715
ab20d992
JJ
27162019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2717
2718 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2719 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2720 C incompatibility if alternate "__intN__" form is used.
2721
1e3d475e
MS
27222019-06-24 Martin Sebor <msebor@redhat.com>
2723
2724 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2725
bf38f7e9
JJ
27262019-06-10 Jakub Jelinek <jakub@redhat.com>
2727
2728 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2729 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2730 (c_parser_omp_scan_loop_body): New function.
2731 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2732 inscan reduction clauses.
2733 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2734 non-inscan reductions on the same construct, or inscan reductions with
2735 ordered or schedule clauses, or inscan array reductions.
2736
65985d78
MS
27372019-06-05 Martin Sebor <msebor@redhat.com>
2738
2739 PR c/90737
2740 * c-typeck.c (c_finish_return): Only consider functions returning
2741 pointers as candidates for -Wreturn-local-addr.
2742
0ecf545c
MS
27432019-06-05 Martin Sebor <msebor@redhat.com>
2744
2745 * c-decl.c (start_decl): Adjust quoting and hyphenation
2746 in diagnostics.
2747 (finish_decl): Same.
2748 (finish_enum): Same.
2749 (start_function): Same.
2750 (declspecs_add_type): Same.
2751 * c-parser.c (warn_for_abs): Same.
2752 * c-typeck.c (build_binary_op): Same.
2753
e03436e7
TS
27542019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2755
b48f44bf
TS
2756 PR c/89433
2757 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2758 marked with an OpenACC 'routine' directive.
2759
5bf04509
TS
2760 PR c/89433
2761 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2762 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2763
e03436e7
TS
2764 PR c/89433
2765 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2766 clauses from "omp declare target" attribute.
2767
a9c697b8
MS
27682019-05-16 Martin Sebor <msebor@redhat.com>
2769
ab20d992
JJ
2770 * c-decl.c (start_decl): Quote keywords, operators, and
2771 types in diagnostics.
2772 (finish_decl): Same.
2773 * c-parser.c (c_parser_asm_statement): Same.
2774 (c_parser_conditional_expression): Same.
2775 (c_parser_transaction_cancel): Same.
2776 * c-typeck.c (c_common_type): Same.
2777 (build_conditional_expr): Same.
2778 (digest_init): Same.
2779 (process_init_element): Same.
2780 (build_binary_op): Same.
a9c697b8 2781
c4499192
RB
27822019-05-17 Richard Biener <rguenther@suse.de>
2783
2784 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2785 (c_parser_gimple_unary_expression): Likewise.
2786 (c_parser_gimple_parentized_ternary_expression): New function.
2787
adfe6e4b
RB
27882019-05-16 Richard Biener <rguenther@suse.de>
2789
2790 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2791 (c_parser_gimple_unary_expression): Likewise.
2792
186dabf2
RB
27932019-05-15 Richard Biener <rguenther@suse.de>
2794
2795 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2796 __BIT_FIELD_REF.
2797
1158c5b4
RB
27982019-05-14 Richard Biener <rguenther@suse.de>
2799
2800 * gimple-parser.c (c_parser_gimple_statement): Remove
2801 questionable auto-promotion to VIEW_CONVERT_EXPR.
2802 (c_parser_gimple_typespec): Split out from __MEM parsing.
2803 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2804 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2805 as __VIEW_CONVERT with -gimple.
2806
fd4485aa
ML
28072019-05-09 Martin Liska <mliska@suse.cz>
2808
2809 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2810 __MAX.
2811 (c_parser_gimple_unary_expression): Parse also binary expression
2812 __MIN and __MAX.
2813 (c_parser_gimple_parentized_binary_expression): New function.
2814
d276406a
ML
28152019-05-09 Martin Liska <mliska@suse.cz>
2816
2817 * gimple-parser.c (struct gimple_parser): Add probability.
2818 for gimple_parser_edge.
2819 (gimple_parser::push_edge): Add new argument probability.
2820 (c_parser_gimple_parse_bb_spec): Parse also probability
2821 if present.
2822 (c_parser_parse_gimple_body): Set edge probability.
2823 (c_parser_gimple_compound_statement): Consume token
2824 before calling c_parser_gimple_goto_stmt.
2825 Parse BB counts.
2826 (c_parser_gimple_statement): Pass new argument.
2827 (c_parser_gimple_goto_stmt): Likewise.
2828 (c_parser_gimple_if_stmt): Likewise.
2829 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2830 * c-parser.c (c_parser_declaration_or_fndef): Pass
2831 hot_bb_threshold argument.
2832 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2833 field.
2834 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2835
f179b64e
JJ
28362019-04-26 Jakub Jelinek <jakub@redhat.com>
2837
2838 PR debug/90197
2839 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2840 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2841 (c_parser_do_statement): Likewise.
2842 (c_parser_for_statement): Likewise. Formatting fixes.
2843 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2844 emit DEBUG_BEGIN_STMTs if needed.
2845
e7178413
JJ
28462019-04-19 Jakub Jelinek <jakub@redhat.com>
2847
c280b7ee
JJ
2848 PR c/89888
2849 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2850 (c_start_case): Don't clear it.
2851 (do_case): Adjust c_add_case_label caller.
2852 (c_finish_case): Adjust c_do_switch_warnings caller.
2853
e7178413
JJ
2854 PR c++/90108
2855 * c-decl.c (merge_decls): If remove is main variant and
2856 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2857 variant that has newdecl as TYPE_NAME if any.
2858
60a2c645
JJ
28592019-04-12 Jakub Jelinek <jakub@redhat.com>
2860
2861 PR c/89933
2862 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2863 don't try to remove it from the variant list, but instead assert
2864 it has no variants.
2865
2a82beaa
RB
28662019-04-01 Richard Biener <rguenther@suse.de>
2867
2868 PR c/71598
2869 * c-tree.h (c_get_alias_set): Declare.
2870 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2871 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2872 as the underlying integer type.
2873
bec1da64
MS
28742019-03-19 Martin Sebor <msebor@redhat.com>
2875
2876 PR tree-optimization/89688
2877 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2878 kinds of initializers.
2879
855cd9b1
JJ
28802019-03-19 Jakub Jelinek <jakub@redhat.com>
2881
2882 PR c/89734
2883 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2884 return type even if quals_used is 0. Formatting fixes.
2885
baa09dc5
RB
28862019-03-14 Richard Biener <rguenther@suse.de>
2887
2888 * c-tree.h (enum c_declspec_il): New.
2889 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2890 enum bitfield.
2891 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2892 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2893 (c_parser_declspecs): Adjust.
2894 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2895 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2896 and bitmap.h.
2897 (struct gimple_parser): New.
2898 (gimple_parser::push_edge): New method.
2899 (c_parser_gimple_parse_bb_spec): New helper.
2900 (c_parser_parse_gimple_body): Get start pass and IL specification.
2901 Initialize SSA and CFG.
2902 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2903 Build a gimple_parser parsing state and pass it along.
2904 (c_parser_gimple_statement): Change intermittend __PHI internal
2905 function argument for the edge.
2906 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2907 (c_parser_gimple_goto_stmt): Record edges to build.
2908 (c_parser_gimple_if_stmt): Likewise.
2909 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2910 (c_parser_gimple_or_rtl_pass_list): Likewise.
2911
a3f9f006
ML
29122019-03-11 Martin Liska <mliska@suse.cz>
2913
2914 * c-decl.c (check_for_loop_decls): Wrap an option name
2915 in a string format message and fix GNU coding style.
2916 * c-parser.c (c_parser_declspecs): Likewise.
2917
1db01ff9
JJ
29182019-03-08 Jakub Jelinek <jakub@redhat.com>
2919
2920 PR tree-optimization/89550
2921 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2922 returned true.
2923 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2924 or warning returned true.
2925
66dcb747
JJ
29262019-02-28 Jakub Jelinek <jakub@redhat.com>
2927
2928 PR c/89525
2929 * c-typeck.c (convert_arguments): Call inform_declaration only if
2930 the previous warning_at call returned true.
2931
2263c9f2
TS
29322019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2933
2934 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2935 parameter. Adjust all users.
2936 (c_parser_oacc_simple_clause): Replace parser with loc formal
2937 parameter. Adjust all users.
2938
ab20d992 29392019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2940
2941 PR c/87924
2942 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2943 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2944
5f88ba10
JJ
29452019-02-15 Jakub Jelinek <jakub@redhat.com>
2946
2947 PR c/89340
2948 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2949 before c_decl_attributes rather than after it.
2950
cfc30fd1
JJ
29512019-02-06 Jakub Jelinek <jakub@redhat.com>
2952
2953 PR c/89211
2954 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2955 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2956 instead of 3 nested ifs.
2957
fbe83e6b
JM
29582019-02-06 Joseph Myers <joseph@codesourcery.com>
2959
2960 PR c/88584
2961 * c-decl.c (finish_decl): Do not complete array types for arrays
2962 with external linkage not at file scope.
2963
f461f938
RB
29642019-02-05 Richard Biener <rguenther@suse.de>
2965
2966 PR c/88606
2967 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2968 all type variants when not supported.
2969
fe509359
JJ
29702019-01-30 Jakub Jelinek <jakub@redhat.com>
2971
2972 PR c/89061
2973 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2974 * c-decl.c (decl_jump_unsafe): Return false for
2975 C_DECL_COMPOUND_LITERAL_P decls.
2976 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2977
6a335b96
JJ
29782019-01-29 Jakub Jelinek <jakub@redhat.com>
2979
f4b7e754
JJ
2980 PR c/89045
2981 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2982 scope.
2983
6a335b96
JJ
2984 PR c/86125
2985 * c-decl.c (last_fileptr_type): Remove.
2986 (last_structptr_types): New variable.
2987 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2988 {old,new}rettype instead of the types themselves. Assert
2989 last_structptr_types array has the same number of elements
2990 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2991 argument oldtype and newtype. Instead of handling
2992 just fileptr_type_node specially, handle all builtin_structptr_types
2993 pointer nodes. Formatting fix.
2994
d8b5a1a0
MS
29952019-01-24 Martin Sebor <msebor@redhat.com>
2996
2997 PR c/86125
2998 PR c/88886
2999 PR middle-end/86308
3000 * c-decl.c (match_builtin_function_types): Add arguments.
3001 (diagnose_mismatched_decls): Diagnose mismatched declarations
3002 of built-ins more strictly.
3003
e21c4491
JJ
30042019-01-24 Jakub Jelinek <jakub@redhat.com>
3005
3006 PR c++/88976
3007 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3008 on #pragma omp cancel with different modifiers.
3009
420183d9
L
30102019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3011
3012 PR c/51628
3013 PR c/88664
3014 * c-typeck.c (convert_for_assignment): Upate the
3015 warn_for_address_or_pointer_of_packed_member call.
3016
17ad43dd
TH
30172019-01-16 Tom Honermann <tom@honermann.net>
3018 Jason Merrill <jason@redhat.com>
3019
3020 * c-typeck.c (digest_init): Revised the error message produced for
3021 ill-formed cases of array initialization with a string literal.
3022 (error_init): Make variadic.
3023
5f07d78a
JJ
30242019-01-12 Jakub Jelinek <jakub@redhat.com>
3025
3026 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3027
c4581bbf
JJ
30282019-01-07 Jakub Jelinek <jakub@redhat.com>
3029
3030 PR c/88701
3031 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3032 if current_function_decl is non-NULL.
3033
65c5b1eb
JM
30342019-01-07 Joseph Myers <joseph@codesourcery.com>
3035
3036 PR c/88720
3037 PR c/88726
3038 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3039 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3040 functions declared but never defined only for external scope, not
3041 for other scopes.
3042
d8fcab68
JJ
30432019-01-07 Jakub Jelinek <jakub@redhat.com>
3044
3045 PR c++/85052
3046 * c-parser.c (c_parser_postfix_expression): Parse
3047 __builtin_convertvector.
3048
a5544970
JJ
30492019-01-01 Jakub Jelinek <jakub@redhat.com>
3050
3051 Update copyright years.
3052
da77eace
L
30532018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3054
3055 PR c/51628
3056 * c-typeck.c (convert_for_assignment): Call
3057 warn_for_address_or_pointer_of_packed_member.
3058
1edf8866
SB
30592018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3060
3061 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3062 a more specific error message (instead of just falling through).
3063
db4fd626
SB
30642018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3065
3066 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3067 asm qualifier is first seen; use that to give nicer "duplicate asm
3068 qualifier" messages. Delete 'quals" variable, instead pass the
3069 "is_volatile_ flag to build_asm_stmt directly.
3070 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3071 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3072
9c9cfcbb
SB
30732018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3074
3075 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3076 "done" boolean variable.
3077
a14feb3c
DM
30782018-12-19 David Malcolm <dmalcolm@redhat.com>
3079
3080 PR c++/87504
3081 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3082 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3083 (build_binary_op): Use struct op_location_t and
3084 class binary_op_rich_location.
3085
6d939173
JJ
30862018-12-11 Jakub Jelinek <jakub@redhat.com>
3087
3088 PR sanitizer/88426
3089 * c-convert.c (convert): Call c_fully_fold before calling
3090 ubsan_instrument_float_cast.
3091
b7055028
SB
30922018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3093
3094 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3095 setting "quals".
3096
5b76e75f
SB
30972018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3098
3099 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3100 after asm. Pass a flag for it to build_asm_expr.
3101 * c-tree.h (build_asm_expr): Update declaration.
3102 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3103 set ASM_INLINE_P.
3104
30bd42b9
SB
31052018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3106
3107 PR inline-asm/55681
3108 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3109 combination of volatile and goto, in any order, without repetitions.
3110
9df6c0e4
JB
31112018-12-04 James Norris <jnorris@codesourcery.com>
3112 Cesar Philippidis <cesar@codesourcery.com>
3113 Julian Brown <julian@codesourcery.com>
3114
3115 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3116 code.
3117
f44697b7
RB
31182018-11-30 Richard Biener <rguenther@suse.de>
3119
3120 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3121 _Literal (type) { ... } as empty aggregate or vector constructor.
3122
550dfbdc
MS
31232018-11-29 Martin Sebor <msebor@redhat.com>
3124
3125 PR c/88091
3126 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3127 (convert_arguments): Add comments. Pass additional argument to
3128 the function above.
3129
673670da
MS
31302018-11-29 Martin Sebor <msebor@redhat.com>
3131
3132 PR c/88172
3133 PR testsuite/88208
3134 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3135
db1d09b0
MS
31362018-11-23 Martin Sebor <msebor@redhat.com>
3137
3138 PR testsuite/88098
3139 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3140 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3141
98f08eb8
MS
31422018-11-20 Martin Sebor <msebor@redhat.com>
3143
3144 * c-parser.c (c_parser_has_attribute_expression): New function.
3145 (c_parser_attribute): New function.
3146 (c_parser_attributes): Move code into c_parser_attribute.
3147 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3148
cd5da983
MS
31492018-11-15 Martin Sebor <msebor@redhat.com>
3150
3151 PR c/83656
3152 * c-decl.c (header_for_builtin_fn): Declare.
3153 (diagnose_mismatched_decls): Diagnose declarations of built-in
3154 functions without a prototype.
3155 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3156 (convert_argument): Same.
3157 (convert_arguments): Factor code out into convert_argument.
3158 Detect mismatches between built-in formal arguments in calls
3159 to built-in without prototype.
3160 (build_conditional_expr): Same.
3161 (type_or_builtin_type): New function.
3162 (convert_for_assignment): Add argument. Conditionally issue
3163 warnings instead of errors for mismatches.
3164
620e594b
DM
31652018-11-13 David Malcolm <dmalcolm@redhat.com>
3166
3167 * c-decl.c: Replace "source_location" with "location_t".
3168 * c-tree.h: Likewise.
3169 * c-typeck.c: Likewise.
3170 * gimple-parser.c: Likewise.
3171
3179ebae
JJ
31722018-11-09 Jakub Jelinek <jakub@redhat.com>
3173
81a227c6
JJ
3174 * c-parser.c (c_parser_omp_clause_final): Use
3175 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3176 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3177 parsing instead of c_parser_paren_condition.
3178 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3179 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3180 c_fully_fold instead of c_parser_condition.
3181 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3182 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3183 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3184 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3185 c_parser_expr_no_commas instead of c_parser_expression.
3186
98c91c56
JJ
3187 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3188 reduction clause with inscan modifier.
3189
3179ebae
JJ
3190 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3191 clauses other than atomic_default_mem_order.
3192
28567c40
JJ
31932018-11-08 Jakub Jelinek <jakub@redhat.com>
3194
3195 * c-parser.c: Include memmode.h.
3196 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3197 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3198 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3199 task_reduction clauses.
3200 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3201 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3202 section, or lvalue assignment expression.
3203 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3204 (c_parser_omp_clause_lastprivate): Parse optional
3205 conditional: modifier.
3206 (c_parser_omp_clause_hint): Require constant integer expression rather
3207 than just integer expression.
3208 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3209 clause.
3210 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3211 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3212 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3213 functions.
3214 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3215 iterators. Parse mutexinoutset and depobj kinds.
3216 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3217 callers.
3218 (c_parser_omp_all_clauses): Likewise. Handle
3219 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3220 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3221 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3222 default memory order from requires directive if any. Adjust
3223 c_finish_omp_atomic caller.
3224 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3225 (c_parser_omp_flush): Parse flush with memory-order-clause.
3226 (c_parser_omp_for_loop): Allow NE_EXPR even in
3227 OpenMP loops, adjust c_finish_omp_for caller.
3228 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3229 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3230 Allow to be called while parsing combined parallel master.
3231 Parse combined master taskloop{, simd}.
3232 (c_parser_omp_parallel): Parse combined
3233 parallel master{, taskloop{, simd}} constructs.
3234 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3235 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3236 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3237 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3238 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3239 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3240 around teams body. Use SET_EXPR_LOCATION.
3241 (c_parser_omp_target_data): Allow target data
3242 with only use_device_ptr clauses.
3243 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3244 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3245 (c_parser_omp_requires): New function.
3246 (c_finish_taskloop_clauses): New function.
3247 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3248 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3249 declaration. Disallow in_reduction clause when combined with parallel
3250 master.
3251 (c_parser_omp_construct): Adjust c_parser_omp_master and
3252 c_parser_omp_taskgroup callers.
3253 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3254 other than cancel.
3255 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3256 like OMP_CLAUSE_REDUCTION.
3257 (handle_omp_array_sections): Likewise. Call save_expr on array
3258 reductions before calling build_index_type. Handle depend clauses
3259 with iterators.
3260 (struct c_find_omp_var_s): New type.
3261 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3262 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3263 with static, runtime or auto schedule kinds. Call save_expr for whole
3264 array reduction sizes. Diagnose reductions with zero sized elements
3265 or variable length structures. Diagnose nogroup clause used with
3266 reduction clause(s). Handle depend clause with
3267 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3268 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3269 some different type for other kinds. Use build_unary_op with
3270 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3271 Handle depend clauses with iterators. Remove no longer needed special
3272 case that predetermined const qualified vars may be specified in
3273 firstprivate clause. Complain if const qualified vars are mentioned
3274 in data-sharing clauses other than firstprivate or shared. Use
3275 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3276 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3277 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3278 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3279
7e2de6df
DM
32802018-10-29 David Malcolm <dmalcolm@redhat.com>
3281
3282 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3283 logic for change to name_hint::operator bool.
3284 (undeclared_variable): Likewise.
3285 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3286 (c_parser_parameter_declaration): Likewise.
3287
9f936c86
JM
32882018-10-17 Joseph Myers <joseph@codesourcery.com>
3289
3290 * c-errors.c (pedwarn_c11): New function.
3291 * c-parser.c (disable_extension_diagnostics): Save
3292 warn_c11_c2x_compat and set it to 0.
3293 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3294 (c_parser_static_assert_declaration_no_semi): Handle
3295 _Static_assert without string constant.
3296 * c-tree.h (pedwarn_c11): New prototype.
3297
033eb567
DM
32982018-10-17 David Malcolm <dmalcolm@redhat.com>
3299
3300 * Make-lang.in (selftest-c): New.
3301 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3302 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3303 from gcc/Makefile.in.
3304
0edf3afe
RB
33052018-10-02 Richard Biener <rguenther@suse.de>
3306
3307 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3308
8313a764
JM
33092018-09-26 Joseph Myers <joseph@codesourcery.com>
3310
3311 PR c/87390
3312 * c-typeck.c (build_binary_op): Use excess precision for
3313 comparisons of integers and floating-point for C11 and later.
3314
ce6f0888
MJ
33152018-09-26 Martin Jambor <mjambor@suse.cz>
3316
3317 PR c/87347
3318 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 3319 comment.
ce6f0888 3320
9c4a4b3c
DM
33212018-09-17 David Malcolm <dmalcolm@redhat.com>
3322
3323 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3324 Update for new param.
3325 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3326 Likewise.
3327
80c6d1f4
MJ
33282018-09-17 Martin Jambor <mjambor@suse.cz>
3329
3330 PR c/63886
3331 * c-parser.c: (warn_for_abs): New function.
3332 (c_parser_postfix_expression_after_primary): Call it.
3333
4a426e36
BE
33342018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3335
3336 * c-typeck.c (digest_init): Shorten overlength strings.
3337
6d900107
BE
33382018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3339
3340 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3341
b5764229
BE
33422018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3343
3344 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3345 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3346
22eea6b2
AM
33472018-08-30 Alexander Monakov <amonakov@ispras.ru>
3348
3349 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3350 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3351
85204e23
DM
33522018-08-27 David Malcolm <dmalcolm@redhat.com>
3353
3354 PR 87091
3355 * c-decl.c (implicitly_declare): Update call to
3356 maybe_add_include_fixit to suggest overriding the location, as it
3357 is for a note.
3358 * c-objc-common.c (c_tree_printer): Update for conversion of
3359 show_caret_p to a tri-state.
3360
3d78e008
ML
33612018-08-27 Martin Liska <mliska@suse.cz>
3362
3363 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
3364 fndecl_built_in_p and remove check for FUNCTION_DECL if
3365 possible.
3d78e008
ML
3366 (diagnose_mismatched_decls): Likewise.
3367 (merge_decls): Likewise.
3368 (warn_if_shadowing): Likewise.
3369 (pushdecl): Likewise.
3370 (implicitly_declare): Likewise.
3371 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3372 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3373 * c-typeck.c (build_function_call_vec): Likewise.
3374 (convert_arguments): Likewise.
3375
097f82ec
DM
33762018-08-20 David Malcolm <dmalcolm@redhat.com>
3377
3378 PR other/84889
3379 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3380 (diagnose_mismatched_decls): Likewise, in various places.
3381 (warn_if_shadowing): Likewise.
3382 (implicit_decl_warning): Likewise.
3383 (implicitly_declare): Likewise.
3384 (undeclared_variable): Likewise.
3385 (declare_label): Likewise.
3386 (grokdeclarator): Likewise.
3387 (start_function): Likewise.
3388 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3389 (c_parser_parameter_declaration): Likewise.
3390 (c_parser_binary_expression): Likewise.
3391 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3392 (parser_build_binary_op): Likewise.
3393 (build_unary_op): Likewise.
3394 (error_init): Likewise.
3395 (pedwarn_init): Likewise.
3396 (warning_init): Likewise.
3397 (convert_for_assignment): Likewise.
3398
96e6ae57
DM
33992018-08-15 David Malcolm <dmalcolm@redhat.com>
3400
3401 * c-objc-common.c: Include "gcc-rich-location.h".
3402 (c_tree_printer): Move implemenation of '%T' to...
3403 (print_type): ...this new function.
3404 (range_label_for_type_mismatch::get_text): New function.
3405 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3406 range for the various ic_argpass cases.
3407 (class maybe_range_label_for_tree_type_mismatch): New class.
3408 (build_binary_op): Use it when calling binary_op_error.
3409
0cd020ae 34102018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3411
0cd020ae
PK
3412 * c-decl.c (start_decl): Do not warn if variables is named as main
3413 and is a local variable.
3414
72733314
IS
34152018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3416
3417 PR c/19315
3418 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3419 objects of unknown size.
3420
23aa9f7c
MS
34212018-08-13 Martin Sebor <msebor@redhat.com>
3422
3423 PR tree-optimization/71625
3424 * c-parser.c (c_parser_declaration_or_fndef): Call
3425 braced_list_to_string.
3426
e5e7e50d
BH
34272018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3428
3429 PR c/86690
3430 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3431 errors.
3432
8a45b051
MS
34332018-08-01 Martin Sebor <msebor@redhat.com>
3434
3435 PR tree-optimization/86650
3436 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3437 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3438
5922dcb5
JJ
34392018-08-01 Jakub Jelinek <jakub@redhat.com>
3440
3441 PR c/85704
3442 * c-typeck.c (init_field_decl_cmp): New function.
3443 (output_pending_init_elements): Use it for field comparisons
3444 instead of pure bit_position comparisons.
3445
9b452033
JJ
34462018-07-12 Jakub Jelinek <jakub@redhat.com>
3447
3448 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3449 type here, instead add "omp declare target implicit" attribute.
3450 (finish_decl): Diagnose vars without mappable type here.
3451
ab20d992
JJ
34522018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3453 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3454 Cesar Philippidis <cesar@codesourcery.com>
3455
3456 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3457 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3458 to their non-present_or_* counterparts. Make 'self' an alias to
3459 PRAGMA_OACC_CLAUSE_HOST.
3460 (c_parser_oacc_data_clause): Update GOMP mappings for
3461 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3462 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3463 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3464 Remove support for present_or_* clauses.
3465 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3466 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3467 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3468 (OACC_DATA_CLAUSE_MASK): Likewise.
3469 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3470 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3471 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3472 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3473 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3474
e197e64e
KV
34752018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3476
3477 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3478 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3479 (c_parser_gimple_unary_expression): Likewise.
3480
487f2f61
JJ
34812018-06-15 Jakub Jelinek <jakub@redhat.com>
3482
3483 PR c/86093
3484 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3485 before doing POINTER_DIFF_EXPR.
3486
e4d44a37
MP
34872018-06-07 Marek Polacek <polacek@redhat.com>
3488
3489 PR c/85318
3490 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3491 for loop initial declarations.
3492
b67b9225
DP
34932018-05-30 David Pagan <dave.pagan@oracle.com>
3494
3495 PR c/55976
3496 * c-decl.c (grokdeclarator): Update check for return type warnings.
3497 (start_function): Likewise.
3498 (finish_function): Likewise.
3499 * c-typeck.c (c_finish_return): Update check for return type warnings.
3500 Pass OPT_Wreturn_type to pedwarn when appropriate.
3501
c566cc9f
RS
35022018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3503
3504 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3505 __FMA_EXPR handlng.
3506
e4f81565
RS
35072018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3508
3509 * gimple-parser.c: Include internal-fn.h.
3510 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3511 (c_parser_gimple_call_internal): New function.
3512 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3513 Fix typos in comment.
3514
79e7b1fe
JJ
35152018-05-10 Jakub Jelinek <jakub@redhat.com>
3516
3517 PR c++/85662
3518 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3519 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3520 fold_convert_loc.
3521 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3522 fold_offsetof_1, pass argtype as TYPE to it and drop the
3523 fold_convert_loc.
3524
f7584c81
DP
35252018-05-02 David Pagan <dave.pagan@oracle.com>
3526
3527 PR c/30552
3528 * c-decl.c (old_style_parameter_scope): New function.
3529 * c-parser.c (c_parser_postfix_expression): Check for statement
3530 expressions in old-style function parameter list declarations.
3531 * c-parser.h (old_style_parameter_scope): New extern declaration.
3532
b33a0cb3
JJ
35332018-04-25 Jakub Jelinek <jakub@redhat.com>
3534
3535 PR sanitizer/84307
3536 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3537 it is not TREE_STATIC.
3538 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3539 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3540 its COMPOUND_LITERAL_EXPR_DECL.
3541
c5c5822a
JM
35422018-03-21 Joseph Myers <joseph@codesourcery.com>
3543
3544 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3545 where all functions return the same _FloatN or _FloatNx type,
3546 treat integer types as _Float64 instead of double.
3547
aa1c9429
JJ
35482018-03-21 Jakub Jelinek <jakub@redhat.com>
3549
3550 PR c/84999
3551 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3552 building vector comparison, diagnose it and return error_mark_node.
3553
9bb45a95
JJ
35542018-03-15 Jakub Jelinek <jakub@redhat.com>
3555
3556 PR c/84853
3557 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3558 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3559 INTEGER_TYPE element type.
3560
ada6bad9
DP
35612018-03-13 David Pagan <dave.pagan@oracle.com>
3562
3563 PR c/46921
3564 * c-typeck.c (output_init_element): Ensure field initializer
3565 expression is always evaluated if there are side effects.
3566
849bbdb9
JJ
35672018-03-06 Jakub Jelinek <jakub@redhat.com>
3568
3569 PR c/84721
3570 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3571 !building_stmt_list_p ().
3572
d74641bd
RS
35732018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3574
3575 PR c/84305
3576 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3577 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3578 and include the BIND_EXPR in the list of things that need to be
3579 pre-evaluated.
3580
0444aa9c
NS
35812018-02-09 Nathan Sidwell <nathan@acm.org>
3582
3583 PR c/84293
3584 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3585 to strict_aliasing_warning.
3586
7c30b12a
PC
35872018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3588
3589 * c-typeck.c (really_start_incremental_init, push_init_level,
3590 set_nonincremental_init, output_init_element, process_init_element):
3591 Use DECL_UNNAMED_BIT_FIELD.
3592
2be4dfcb
MP
35932018-01-31 Marek Polacek <polacek@redhat.com>
3594
3595 PR c/81779
3596 * c-parser.c (c_parser_compound_statement_nostart): Call
3597 expansion_point_location_if_in_system_header.
3598
bb9869d5
DM
35992018-01-17 David Malcolm <dmalcolm@redhat.com>
3600
3601 PR c++/83814
3602 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3603 the C part.
3604
b4923738
JJ
36052018-01-13 Jakub Jelinek <jakub@redhat.com>
3606
3607 PR c/83801
3608 * c-tree.h (decl_constant_value_1): Add a bool argument.
3609 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3610 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3611 (decl_constant_value): Adjust caller.
3612 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3613 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3614 decl_constant_value returns initializer that has BLKmode or
3615 array type.
3616 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3617
928686b1
RS
36182018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3619 Alan Hayward <alan.hayward@arm.com>
3620 David Sherwood <david.sherwood@arm.com>
3621
3622 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3623 TYPE_VECTOR_SUBPARTS.
3624
85ec4feb
JJ
36252018-01-03 Jakub Jelinek <jakub@redhat.com>
3626
3627 Update copyright years.
3628
913884f7
JJ
36292018-01-01 Jakub Jelinek <jakub@redhat.com>
3630
3631 PR c/83595
3632 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3633 c_parser_conditional_expression, c_parser_cast_expression,
3634 c_parser_sizeof_expression, c_parser_alignof_expression,
3635 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3636 c_parser_transaction_expression): Use set_error () method instead
3637 of setting value member to error_mark_node.
3638
c6cfa2bf
MM
36392017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3640
3641 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3642 and _Float<N>X built-in functions.
3643
11d29d63
JJ
36442017-12-22 Jakub Jelinek <jakub@redhat.com>
3645
14ec014e
JJ
3646 PR debug/83550
3647 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3648 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3649 incomplete vars rather than after it.
3650
11d29d63
JJ
3651 PR debug/83547
3652 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3653 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3654 and consider empty ones if there are no other stmts. For
3655 -Wunused-value walk all statements before the one only followed by
3656 DEBUG_BEGIN_STMTs.
3657
170a8bd6 36582017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3659 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3660
3661 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3662 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3663 (c_parser_do_statement): Likewise.
3664 (c_parser_for_statement): Likewise.
3665 (c_parser_statement_after_labels): Adjust calls to above.
3666 (c_parse_pragma_ivdep): New static function.
3667 (c_parser_pragma_unroll): Likewise.
3668 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3669 <PRAGMA_UNROLL>: New case.
3670
01512446
JJ
36712017-12-19 Jakub Jelinek <jakub@redhat.com>
3672
3673 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3674 perform_integral_promotions, digest_init): Replace Yoda conditions
3675 with typical order conditions.
3676 * c-decl.c (check_bitfield_type_and_width): Likewise.
3677
c65e18d3
BE
36782017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3679
3680 * c-typeck.c (c_safe_arg_type_equiv_p,
3681 c_safe_function_type_cast_p): New function.
3682 (build_c_cast): Implement -Wcast-function-type.
3683
b7280579
RB
36842017-12-14 Richard Biener <rguenther@suse.de>
3685
3686 PR c/83415
3687 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3688 like REALPART_EXPR for the behavior of whether its operand
3689 is an lvalue.
3690
49e6a6c0
MP
36912017-12-12 Marek Polacek <polacek@redhat.com>
3692
3693 PR c/82679
3694 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3695
ab20d992 36962017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3697
3698 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3699 * c-parser.c (add_debug_begin_stmt): New.
3700 (c_parser_declaration_or_fndef): Call it.
3701 (c_parser_compound_statement_nostart): Likewise.
3702 (c_parser_statement_after_labels): Likewise.
3703 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3704
4b2b493f
JM
37052017-12-07 Joseph Myers <joseph@codesourcery.com>
3706
3707 * c-decl.c (build_compound_literal): Add parameter alignas_align
3708 and set alignment of decl if nonzero.
3709 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3710 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3711 qualifier.
3712 (c_parser_struct_declaration): Update syntax comment.
3713 (c_parser_type_name): Add alignas_ok argument and pass it to
3714 c_parser_declspecs.
3715 (c_parser_cast_expression): Pass true to c_parser_type_name and
3716 give error if a cast used an _Alignas specifier.
3717 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3718 give error if sizeof (type-name) used an _Alignas specifier.
3719 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3720 give error if _Alignof (type-name) used an _Alignas specifier.
3721 (c_parser_postfix_expression_after_paren_type): Check specified
3722 alignment for a compound literal and pass it to
3723 build_compound_literal.
3724 * c-parser.h (c_parser_type_name): Update prototype.
3725 * c-tree.h (build_compound_literal): Update prototype.
3726
5d9ae53d
MS
37272017-12-07 Martin Sebor <msebor@redhat.com>
3728
3729 PR c/81544
3730 * c-decl.c (c_decl_attributes): Look up existing declaration and
3731 pass it to decl_attributes.
3732
c79144f8
DM
37332017-12-06 David Malcolm <dmalcolm@redhat.com>
3734
3735 PR c/83236
3736 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3737 reserved for use by the implementation.
3738
613bc14f
DM
37392017-12-06 David Malcolm <dmalcolm@redhat.com>
3740
3741 * c-decl.c: Include "c-family/c-spellcheck.h".
3742
05abad4c
ML
37432017-12-05 Martin Liska <mliska@suse.cz>
3744 Jakub Jelinek <jakub@redhat.com>
3745
3746 * c-typeck.c (pointer_diff): Add new argument and instrument
3747 pointer subtraction.
3748 (build_binary_op): Similar for pointer comparison.
3749
cc6534d4
JJ
37502017-12-01 Jakub Jelinek <jakub@redhat.com>
3751
65791f42
JJ
3752 PR c/79153
3753 * c-parser.c: Include tree-iterator.h.
3754 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3755 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3756 on it.
3757
cc6534d4
JJ
3758 PR c/83222
3759 * c-tree.h (decl_constant_value_1): Declare.
3760 * c-typeck.c (decl_constant_value_1): New function.
3761 (decl_constant_value): Use it.
3762 * c-fold.c (c_fully_fold_internal): If in_init, use
3763 decl_constant_value_1 instead of decl_constant_value.
3764
5de73c05
JJ
37652017-11-30 Jakub Jelinek <jakub@redhat.com>
3766
3767 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3768
058f0b9e
JJ
37692017-11-28 Jakub Jelinek <jakub@redhat.com>
3770
3771 PR sanitizer/81275
3772 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3773 c_switch_covers_all_cases_p returns true.
3774
5e9d6aa4 37752017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3776 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3777
3778 * Make-lang.in (c/c-array-notation.o): Remove.
3779 * c-array-notation.c: Delete.
3780 * c-decl.c: Remove cilkplus condition.
3781 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3782 c_parser_cilk_verify_simd, c_parser_array_notation,
3783 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3784 c_parser_cilk_simd_fn_vector_attrs,
3785 c_finish_cilk_simd_fn_tokens): Delete.
3786 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3787 (c_parser_direct_declarator_inner): Ditto.
3788 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3789 (c_parser_attributes, c_parser_compound_statement,
3790 c_parser_statement_after_labels, c_parser_if_statement,
3791 c_parser_switch_statement, c_parser_while_statement,
3792 c_parser_do_statement, c_parser_for_statement,
3793 c_parser_unary_expression, c_parser_postfix_expression,
3794 c_parser_postfix_expression_after_primary,
3795 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3796 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3797 support.
3798 * c-typeck.c (build_array_ref, build_function_call_vec,
3799 convert_arguments,
3800 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3801 c_finish_loop, build_binary_op): Remove cilkplus support.
3802
9e851845
JJ
38032017-11-28 Jakub Jelinek <jakub@redhat.com>
3804
3805 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3806 of build3.
3807
ab20d992 38082017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3809
3810 * Make-lang.in (c.install-plugin): Install backend import library.
3811
41521dee
JJ
38122017-11-23 Jakub Jelinek <jakub@redhat.com>
3813
3814 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3815 pragma_stmt context.
3816
ac9effed
EB
38172017-11-23 Mike Stump <mikestump@comcast.net>
3818 Eric Botcazou <ebotcazou@adacore.com>
3819
3820 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3821 ANNOTATE_EXPR.
3822 (c_parser_do_statement): Likewise.
3823 (c_parser_for_statement): Likewise.
3824
ce95abc4
DM
38252017-11-22 David Malcolm <dmalcolm@redhat.com>
3826
3827 PR c++/62170
3828 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3829 bool to bool *. Within '%T' handling, if showing an "aka", use
3830 "quoted" param to add appropriate quoting.
3831
974aedcc
MP
38322017-11-22 Marek Polacek <polacek@redhat.com>
3833
3834 PR c++/60336
3835 PR middle-end/67239
3836 PR target/68355
3837 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3838
d4300cc6
DM
38392017-11-21 David Malcolm <dmalcolm@redhat.com>
3840
3841 PR c/83056
3842 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3843 earlier failed lookups.
3844
1af4ebf5
MG
38452017-11-21 Marc Glisse <marc.glisse@inria.fr>
3846
3847 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3848 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3849
26edace6
DM
38502017-11-20 David Malcolm <dmalcolm@redhat.com>
3851
3852 PR c/81404
3853 * c-decl.c: Include "c-family/known-headers.h".
3854 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3855 to known-headers.cc.
3856 (class suggest_missing_header): Move to known-header.h.
3857 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3858 than get_c_name_hint.
3859
b1212255
DM
38602017-11-20 David Malcolm <dmalcolm@redhat.com>
3861
3862 * c-decl.c (get_c_name_hint): New function.
3863 (class suggest_missing_header): New class.
3864 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3865 suggest missing headers to the user.
3866
6c7a259b
DM
38672017-11-20 David Malcolm <dmalcolm@redhat.com>
3868
3869 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3870 Include "c-family/name-hint.h"
3871 (implicit_decl_warning): Convert "hint" from
3872 const char * to name_hint. Pass location to
3873 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3874 warning was not printed.
3875 (undeclared_variable): Likewise for "guessed_id".
3876 (lookup_name_fuzzy): Convert return type from const char *
3877 to name_hint. Add location_t param.
3878 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3879 Include "c-family/name-hint.h"
3880 (c_parser_declaration_or_fndef): Convert "hint" from
3881 const char * to name_hint. Pass location to lookup_name_fuzzy.
3882 (c_parser_parameter_declaration): Likewise.
3883
f9c59f7e
JJ
38842017-11-19 Jakub Jelinek <jakub@redhat.com>
3885
3886 PR c/66618
3887 PR c/69960
3888 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3889 where needed.
3890 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3891 handle_omp_array_sections): Likewise.
3892 (digest_init): Don't call decl_constant_value_for_optimization.
3893 * c-tree.h (decl_constant_value_for_optimization): Removed.
3894 * c-fold.c (c_fold_array_ref): New function.
3895 (c_fully_fold_internal): Add LVAL argument, propagate it through
3896 recursive calls. For VAR_P call decl_constant_value and
3897 unshare if not LVAL and either optimizing or IN_INIT. Remove
3898 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3899 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3900 (c_fully_fold): Add LVAL argument, pass it through to
3901 c_fully_fold_internal.
3902 (decl_constant_value_for_optimization): Removed.
3903
3ca0dc60
JM
39042017-11-15 Joseph Myers <joseph@codesourcery.com>
3905
3906 PR c/81156
3907 * c-parser.c (check_tgmath_function): New function.
3908 (enum tgmath_parm_kind): New enum.
3909 (c_parser_postfix_expression): Handle __builtin_tgmath.
3910
64a5912c
DM
39112017-10-31 David Malcolm <dmalcolm@redhat.com>
3912
3913 * c-decl.c (implicit_decl_warning): Update for renaming of
3914 pedwarn_at_rich_loc and warning_at_rich_loc.
3915 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3916 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3917 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3918 (c_parser_struct_or_union_specifier): Likewise for renaming of
3919 pedwarn_at_rich_loc.
3920 (c_parser_parameter_declaration): Likewise for renaming of
3921 error_at_rich_loc.
3922 * c-typeck.c (build_component_ref): Likewise.
3923 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3924 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3925 (set_init_label): Likewise for renaming of error_at_rich_loc.
3926
c1136864
RB
39272017-10-30 Richard Biener <rguenther@suse.de>
3928
3929 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3930 stmts.
3931
ee5fd23a
MM
39322017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3933
3934 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3935 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3936
1a59ccf2
DM
39372017-10-25 David Malcolm <dmalcolm@redhat.com>
3938
3939 PR c/7356
3940 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3941 semicolons.
3942
bc1a75dd
JJ
39432017-10-25 Jakub Jelinek <jakub@redhat.com>
3944
3945 PR libstdc++/81706
3946 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3947 newdecl to corresponding __builtin_ if any.
3948
ff1ff960
PC
39492017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3950
3951 PR c++/82466
3952 * c-decl.c (diagnose_mismatched_decls): Use
3953 OPT_Wbuiltin_declaration_mismatch.
3954
62e1c678
DM
39552017-10-12 David Malcolm <dmalcolm@redhat.com>
3956
3957 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3958 use it to guard calls to maybe_suggest_missing_token_insertion.
3959 (c_parser_parms_list_declarator): Override default value of new
3960 "type_is_unique" param to c_parser_require.
3961 (c_parser_asm_statement): Likewise.
3962 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3963 defaulting to true.
3964
a92f6726
NS
39652017-10-11 Nathan Sidwell <nathan@acm.org>
3966
3967 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3968
8e6cdc90
RS
39692017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3970
3971 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3972 operating on trees as wide_ints.
3973 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3974 (c_tree_equal): Likewise.
3975
8139a48e
DM
39762017-10-04 David Malcolm <dmalcolm@redhat.com>
3977
3978 * c-decl.c (push_parm_decl): Store c_parm's location into the
3979 PARAM_DECL.
3980 (build_c_parm): Add "loc" param and store it within the c_parm.
3981 * c-parser.c (struct c_parser): Add "last_token_location" field.
3982 (c_parser_consume_token): Store location of the token into the
3983 new field.
3984 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3985 when handling a FUNCTION_DECL, if it doesn't already have them.
3986 (c_parser_parameter_declaration): Generate a location for the
3987 parameter, and pass it to the call to build_c_parm.
3988 * c-tree.h (struct c_parm): Add field "loc".
3989 (build_c_parm): Add location_t param.
3990 * c-typeck.c (get_fndecl_argument_location): New function.
3991 (inform_for_arg): New function.
3992 (convert_for_assignment): Use inform_for_arg when dealing with
3993 ic_argpass.
3994
2a389958
JJ
39952017-09-29 Jakub Jelinek <jakub@redhat.com>
3996
7d386d45
JJ
3997 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3998 width is non-NULL.
3999 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4000 don't SET_DECL_C_BIT_FIELD here.
4001
2a389958
JJ
4002 PR c/82340
4003 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4004 instead of trying to set just TREE_READONLY manually.
4005
ebc6a85e
TV
40062017-09-16 Tom de Vries <tom@codesourcery.com>
4007
4008 PR c/81875
4009 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4010 cond itself.
4011
bb75facd
JM
40122017-09-15 Joseph Myers <joseph@codesourcery.com>
4013
4014 PR c/82071
4015 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4016 for C11.
4017 (build_conditional_expr): For C11, generate result with excess
4018 precision when one argument is an integer and the other is of a
4019 type using excess precision.
4020
1d933576
BE
40212017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4022
4023 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4024
267bbb6f
MP
40252017-09-13 Marek Polacek <polacek@redhat.com>
4026
4027 PR c/82167
4028 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4029 than expr.original_type.
4030
6836632e
NS
40312017-09-12 Nathan Sidwell <nathan@acm.org>
4032
4033 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4034 resort_sorted_fields): Moved from c-family/c-common.c.
4035 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4036
e035be33
JM
40372017-09-01 Joseph Myers <joseph@codesourcery.com>
4038
4039 PR c/82071
4040 * c-typeck.c (build_atomic_assign): Handle argument with excess
4041 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4042 argument passed to build_binary_op and convert_for_assignment but
4043 not for call to c_fully_fold.
4044 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4045 Ensure build_binary_op is called with argument with original
4046 semantic type. Avoid calling c_fully_fold with an
4047 EXCESS_PRECISION_EXPR from build_binary_op.
4048
d2e05fcb
JJ
40492017-09-01 Jakub Jelinek <jakub@redhat.com>
4050
4051 PR c/81887
4052 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4053
b397965c
RS
40542017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4055 Alan Hayward <alan.hayward@arm.com>
4056 David Sherwood <david.sherwood@arm.com>
4057
4058 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4059 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4060 m1 and m2 to the signed equivalent of a fixed-point
4061 SCALAR_TYPE_MODE.
4062
14e18d71
DM
40632017-08-24 David Malcolm <dmalcolm@redhat.com>
4064
4065 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4066 than CAN_HAVE_LOCATION_P when determining whether to use the
4067 location_t value within "value".
4068
7f204c0f
DM
40692017-08-21 David Malcolm <dmalcolm@redhat.com>
4070
4071 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4072 rather than peeking the location of the first token.
4073 * c-tree.h (c_expr::get_location): New method.
4074
2f687306
DM
40752017-08-21 David Malcolm <dmalcolm@redhat.com>
4076
4077 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4078 to check_function_arguments.
4079
3e7b80d7
MP
40802017-08-18 Marek Polacek <polacek@redhat.com>
4081
4082 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4083 commentary.
4084
00aa1fa2
L
40852017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4086
4087 PR c/53037
4088 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4089 (check_bitfield_type_and_width): Don't allow bit-field with
4090 warn_if_not_aligned type.
4091
da67acb9
MS
40922017-08-14 Martin Sebor <msebor@redhat.com>
4093
4094 PR c/81117
4095 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4096
bb85aa74
MP
40972017-08-11 Marek Polacek <polacek@redhat.com>
4098
4099 PR c/81795
4100 * c-decl.c (pushtag): Only print inform if the warning was printed.
4101 (grokdeclarator): Likewise.
4102
32129a17
DM
41032017-08-10 David Malcolm <dmalcolm@redhat.com>
4104
4105 * c-parser.c (c_parser_error): Rename to...
4106 (c_parser_error_richloc): ...this, making static, and adding
4107 "richloc" parameter, passing it to the c_parse_error call,
4108 rather than calling c_parser_set_source_position_from_token.
4109 (c_parser_error): Reintroduce, reimplementing in terms of the
4110 above, converting return type from void to bool.
4111 (class token_pair): New class.
4112 (struct matching_paren_traits): New struct.
4113 (matching_parens): New typedef.
4114 (struct matching_brace_traits): New struct.
4115 (matching_braces): New typedef.
4116 (get_matching_symbol): New function.
4117 (c_parser_require): Add param MATCHING_LOCATION, using it to
4118 highlight matching "opening" tokens for missing "closing" tokens.
4119 (c_parser_skip_until_found): Likewise.
4120 (c_parser_static_assert_declaration_no_semi): Convert explicit
4121 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4122 class matching_parens, so that the pertinent open parenthesis is
4123 highlighted when there are problems locating the close
4124 parenthesis.
4125 (c_parser_struct_or_union_specifier): Likewise.
4126 (c_parser_typeof_specifier): Likewise.
4127 (c_parser_alignas_specifier): Likewise.
4128 (c_parser_simple_asm_expr): Likewise.
4129 (c_parser_braced_init): Likewise, for matching_braces.
4130 (c_parser_paren_condition): Likewise, for matching_parens.
4131 (c_parser_switch_statement): Likewise.
4132 (c_parser_for_statement): Likewise.
4133 (c_parser_asm_statement): Likewise.
4134 (c_parser_asm_operands): Likewise.
4135 (c_parser_cast_expression): Likewise.
4136 (c_parser_sizeof_expression): Likewise.
4137 (c_parser_alignof_expression): Likewise.
4138 (c_parser_generic_selection): Likewise.
4139 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4140 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4141 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4142 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4143 c_parser_skip_until_found call.
4144 (c_parser_objc_class_definition): Use class matching_parens as
4145 above.
4146 (c_parser_objc_method_decl): Likewise.
4147 (c_parser_objc_try_catch_finally_statement): Likewise.
4148 (c_parser_objc_synchronized_statement): Likewise.
4149 (c_parser_objc_at_property_declaration): Likewise.
4150 (c_parser_oacc_wait_list): Likewise.
4151 (c_parser_omp_var_list_parens): Likewise.
4152 (c_parser_omp_clause_collapse): Likewise.
4153 (c_parser_omp_clause_default): Likewise.
4154 (c_parser_omp_clause_if): Likewise.
4155 (c_parser_omp_clause_num_threads): Likewise.
4156 (c_parser_omp_clause_num_tasks): Likewise.
4157 (c_parser_omp_clause_grainsize): Likewise.
4158 (c_parser_omp_clause_priority): Likewise.
4159 (c_parser_omp_clause_hint): Likewise.
4160 (c_parser_omp_clause_defaultmap): Likewise.
4161 (c_parser_oacc_single_int_clause): Likewise.
4162 (c_parser_omp_clause_ordered): Likewise.
4163 (c_parser_omp_clause_reduction): Likewise.
4164 (c_parser_omp_clause_schedule): Likewise.
4165 (c_parser_omp_clause_num_teams): Likewise.
4166 (c_parser_omp_clause_thread_limit): Likewise.
4167 (c_parser_omp_clause_aligned): Likewise.
4168 (c_parser_omp_clause_linear): Likewise.
4169 (c_parser_omp_clause_safelen): Likewise.
4170 (c_parser_omp_clause_simdlen): Likewise.
4171 (c_parser_omp_clause_depend): Likewise.
4172 (c_parser_omp_clause_map): Likewise.
4173 (c_parser_omp_clause_device): Likewise.
4174 (c_parser_omp_clause_dist_schedule): Likewise.
4175 (c_parser_omp_clause_proc_bind): Likewise.
4176 (c_parser_omp_clause_uniform): Likewise.
4177 (c_parser_omp_for_loop): Likewise.
4178 (c_parser_cilk_clause_vectorlength): Likewise.
4179 (c_parser_cilk_clause_linear): Likewise.
4180 (c_parser_transaction_expression): Likewise.
4181 * c-parser.h (c_parser_require): Add param matching_location with
4182 default UNKNOWN_LOCATION.
4183 (c_parser_error): Convert return type from void to bool.
4184 (c_parser_skip_until_found): Add param matching_location with
4185 default UNKNOWN_LOCATION.
4186
30af3a2b
MP
41872017-08-09 Marek Polacek <polacek@redhat.com>
4188
4189 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4190 * c-tree.h (build_external_ref): Update declaration.
4191 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4192 (build_external_ref): Change the type of a parameter to bool.
4193 (parser_build_binary_op): Use true/false instead of 1/0.
4194 (pointer_diff): Likewise.
4195 (build_modify_expr): Likewise.
4196 (set_designator): Change the type of a parameter to bool.
4197 (set_init_index): Use true/false instead of 1/0.
4198 (set_init_label): Likewise.
4199 (output_init_element): Change the type of a parameter to bool.
4200 (output_pending_init_elements): Use true/false instead of 1/0.
4201 (process_init_element): Likewise.
4202 (build_binary_op): Change the type of a parameter to bool.
4203
296c53ac
MP
42042017-08-09 Marek Polacek <polacek@redhat.com>
4205
4206 PR c/81233
4207 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4208 Call emit_diagnostic_valist instead of pedwarn.
4209 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4210 Print the relevant types in diagnostics.
4211
a32c8316
MP
42122017-08-09 Marek Polacek <polacek@redhat.com>
4213
4214 PR c/81417
4215 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 4216 build_conditional_expr.
a32c8316
MP
4217 * c-parser.c (c_parser_conditional_expression): Create locations for
4218 EXP1 and EXP2 from their source ranges. Pass the locations down to
4219 build_conditional_expr.
4220 * c-tree.h (build_conditional_expr): Update declaration.
4221 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4222 For -Wsign-compare, also print the types.
4223
314e6352
ML
42242017-08-08 Martin Liska <mliska@suse.cz>
4225
4226 * c-convert.c: Include header files.
4227 * c-typeck.c: Likewise.
4228
577eec56
ML
42292017-08-07 Martin Liska <mliska@suse.cz>
4230
4231 * c-parser.c (c_parser_attributes): Canonicalize name of an
4232 attribute.
4233
f7b6353a
MP
42342017-08-02 Marek Polacek <polacek@redhat.com>
4235
4236 PR c/81289
4237 * c-parser.c (c_parser_unary_expression): Use set_error.
4238
8a6eab34
MP
4239 PR c/81448
4240 PR c/81306
4241 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4242 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4243
ab20d992 42442017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
4245 Martin Liska <mliska@suse.cz>
4246
4247 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 4248 statement.
7fef86d3 4249
f34ebeb2
ML
42502017-07-31 Martin Liska <mliska@suse.cz>
4251
4252 PR sanitize/81530
4253 * c-convert.c (convert): Guard condition with flag_sanitize_p
4254 also with current_function_decl non-null equality.
4255 * c-decl.c (grokdeclarator): Likewise.
4256 * c-typeck.c (build_binary_op): Likewise.
4257
8595f67b
MP
42582017-07-25 Marek Polacek <polacek@redhat.com>
4259
4260 * c-decl.c (grokfield): Remove local variable.
4261
d49718d6
MP
42622017-07-25 Marek Polacek <polacek@redhat.com>
4263
4264 PR c/81364
4265 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4266 macro expansion if the body is in { }.
4267 (c_parser_while_statement): Likewise.
4268 (c_parser_for_statement): Likewise.
4269
ff22eb12
NS
42702017-07-18 Nathan Sidwell <nathan@acm.org>
4271
4272 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4273
eea77d1f
DM
42742017-07-14 David Malcolm <dmalcolm@redhat.com>
4275
4276 * c-decl.c (implicitly_declare): When suggesting a missing
4277 #include, provide a fix-it hint.
4278
b6f43128
DM
42792017-07-06 David Malcolm <dmalcolm@redhat.com>
4280
4281 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4282 and call that instead.
4283 * c-tree.h (selftest::run_c_tests): New decl.
4284
3e2becc4
MP
42852017-06-26 Marek Polacek <polacek@redhat.com>
4286
4287 PR c/80116
4288 * c-parser.c (c_parser_if_body): Set the location of the
4289 body of the conditional after parsing all the labels. Call
4290 warn_for_multistatement_macros.
4291 (c_parser_else_body): Likewise.
4292 (c_parser_switch_statement): Likewise.
4293 (c_parser_while_statement): Likewise.
4294 (c_parser_for_statement): Likewise.
4295 (c_parser_statement): Add a default argument. Save the location
4296 after labels have been parsed.
4297 (c_parser_c99_block_statement): Likewise.
4298
343ae898
RB
42992017-06-19 Richard Biener <rguenther@suse.de>
4300
4301 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4302 negated _Literals to parse _Literal (int) -1.
4303
45b2222a
ML
43042017-06-13 Martin Liska <mliska@suse.cz>
4305
4306 PR sanitize/78204
4307 * c-convert.c (convert): Use sanitize_flags_p.
4308 * c-decl.c (grokdeclarator): Likewise.
4309 * c-typeck.c (convert_for_assignment): Likewise.
4310 (c_finish_return): Likewise.
4311 (build_binary_op): Likewise.
4312
8ab7005b
JJ
43132017-06-08 Jakub Jelinek <jakub@redhat.com>
4314
4315 PR c/81006
4316 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4317 to sizetype before size_binop.
4318
363dc72c
JJ
43192017-06-07 Jakub Jelinek <jakub@redhat.com>
4320
4321 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4322 of TDI_generic.
4323
dc949728
MP
43242017-06-06 Marek Polacek <polacek@redhat.com>
4325
4326 PR c/79983
4327 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4328 ref.
4329 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4330
40ffd95f
BE
43312017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4332
4333 * c-parser.c (c_parser_binary_expression): Implement the
4334 -Wsizeof_pointer_div warning.
4335 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4336 from a parenthesized expression.
4337 (c_parser_expr_list): Use c_last_sizeof_loc.
4338 * c-tree.h (c_last_sizeof_loc): New external.
4339 * c-typeck.c (c_last_sizeof_loc): New variable.
4340 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4341
9fc5e7a4
MM
43422017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4343
4344 PR testsuite/80580
4345 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4346
f012c8ef
DM
43472017-05-30 David Malcolm <dmalcolm@redhat.com>
4348
4349 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4350 parameters.
4351
3cd211af
MS
43522017-05-24 Martin Sebor <msebor@redhat.com>
4353
4354 PR c/80731
4355 * c-fold.c (c_fully_fold_internal): Adjust.
4356 * c-typeck.c (parser_build_unary_op): Adjust.
4357
fd71a9a2
TS
43582017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4359
4360 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4361 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4362 "VECTOR_LENGTH".
4363
92fa0f9e
MP
43642017-05-23 Marek Polacek <polacek@redhat.com>
4365
4366 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4367 quotes.
4368
d11c168a
JJ
43692017-05-22 Jakub Jelinek <jakub@redhat.com>
4370
4371 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4372 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4373 it returned invariant. Call tree_invariant_p unconditionally
4374 afterwards to decide whether to return expr or op0.
4375
58aca9d9
NS
43762017-05-22 Nathan Sidwell <nathan@acm.org>
4377
4378 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4379
7fd549d2
TS
43802017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4381
4382 * c-parser.c (c_parser_omp_clause_default): Handle
4383 "OMP_CLAUSE_DEFAULT_PRESENT".
4384
6ecd2339
BE
43852017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4386
4387 * config-lang.in (gtfiles): Add c-family/c-format.c.
4388
8a57ecff
NS
43892017-05-18 Nathan Sidwell <nathan@acm.org>
4390
4391 * c-decl.c (pushdecl_top_level): Delete unused function.
4392
6574d78e
MP
43932017-05-18 Marek Polacek <polacek@redhat.com>
4394
4395 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4396 (check_earlier_gotos): Likewise.
4397 (define_label): Likewise.
4398 (pending_xref_error): Likewise.
4399 (smallest_type_quals_location): Likewise.
4400 (grokdeclarator): Likewise.
4401 (grokparms): Likewise.
4402 (identifier_global_value): Likewise.
4403 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4404 (find_init_member): Likewise.
4405
e3455240
MP
44062017-05-18 Marek Polacek <polacek@redhat.com>
4407
4408 * c-decl.c (start_decl): Use false/true instead of 0/1.
4409 (grokdeclarator): Likewise.
4410 (finish_struct): Likewise.
4411 (start_function): Change the return type to bool. Use false/true
4412 instead of 0/1.
4413 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4414 * c-tree.h (start_function): Update.
4415 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4416 (set_designator): Change the return type to bool. Use false/true
4417 instead of 0/1.
4418
3fa8871b
MP
44192017-05-17 Marek Polacek <polacek@redhat.com>
4420
4421 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4422 * c-typeck.c: Likewise.
4423
142473df
MP
44242017-05-17 Marek Polacek <polacek@redhat.com>
4425
4426 PR sanitizer/80659
4427 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4428 DECL_IGNORED_P even for non-static compound literals.
4429
1a817418
ML
44302017-05-17 Martin Liska <mliska@suse.cz>
4431
4432 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4433 use it instead of int type.
4434
b2fa0a8b
MP
44352017-05-17 Marek Polacek <polacek@redhat.com>
4436
4437 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4438 call c_fully_fold.
4439 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4440 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4441 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4442 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4443 save_expr.
4444 (c_parser_conditional_expression): Likewise.
4445 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4446 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4447 (process_init_element): Likewise.
4448 (build_binary_op): Likewise.
4449 (handle_omp_array_sections_1): Likewise.
4450
1e47f02b
TS
44512017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4452
4453 * c-parser.c (c_parser_omp_clause_num_gangs)
4454 (c_parser_omp_clause_num_workers)
4455 (c_parser_omp_clause_vector_length): Merge functions into...
4456 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4457 all users.
4458
c24e924f
NS
44592017-05-11 Nathan Sidwell <nathan@acm.org>
4460
4461 * gimple-parser.c: Don't #include tree-dump.h.
4462
c587104e
MM
44632017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4464
4465 PR testsuite/80580
4466 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4467
67ac9a9d
MM
44682017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4469
4470 PR testsuite/80580
4471 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4472 incorrect __MEM syntax.
4473
ac4eb40f
MM
44742017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4475
4476 PR testsuite/80580
4477 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4478 type of unary '*'.
4479
641da50a
NS
44802017-05-09 Nathan Sidwell <nathan@acm.org>
4481
4482 * c-tree.h (pushdecl): Declare.
4483
56d35585
DM
44842017-05-05 David Malcolm <dmalcolm@redhat.com>
4485
4486 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4487 with diagnostic_report_diagnostic.
4488 * c-errors.c (pedwarn_c99): Likewise.
4489 (pedwarn_c90): Likewise.
4490
815d9cc6
XR
44912017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4492
92a285c1 4493 PR c++/80038
815d9cc6
XR
4494 * c-gimplify.c (c_gimplify_expr): Remove calls to
4495 cilk_gimplifY_call_params_in_spawned_fn.
4496
1c4ea66f
DM
44972017-04-25 David Malcolm <dmalcolm@redhat.com>
4498
4499 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4500 hint for removing extra semicolon.
4501
666f7903
JJ
45022017-04-21 Jakub Jelinek <jakub@redhat.com>
4503
4504 PR c/80468
4505 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4506 enabled, set specs->type to integer_type_node.
4507
5764ee3c
JW
45082017-04-03 Jonathan Wakely <jwakely@redhat.com>
4509
4510 * c-array-notation.c: Fix typo in comment.
4511
10fa8dfb
MP
45122017-03-29 Marek Polacek <polacek@redhat.com>
4513
4514 PR c/79730
4515 * c-decl.c (finish_decl): Check VAR_P.
4516
a9e4a1a5
JJ
45172017-03-27 Jakub Jelinek <jakub@redhat.com>
4518
4519 PR middle-end/80162
4520 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4521 * c-typeck.c (c_mark_addressable): Likewise. Look through
4522 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4523 to ARRAY_TYPE.
4524 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4525
ee3ff394
MP
45262017-03-23 Marek Polacek <polacek@redhat.com>
4527
4528 * c-tree.h: Remove a C_RID_YYCODE reference.
4529
4d1b8e70
JJ
45302017-03-21 Jakub Jelinek <jakub@redhat.com>
4531
4532 PR c/80097
4533 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4534 optional COMPOUND_EXPR with ubsan instrumentation.
4535
31dc71a8
MP
45362017-03-17 Marek Polacek <polacek@redhat.com>
4537
4538 * c-parser.c: Add C11 references.
4539
d579c385
MP
45402017-03-15 Marek Polacek <polacek@redhat.com>
4541
4542 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4543
85059a38
MP
45442017-03-11 Marek Polacek <polacek@redhat.com>
4545
4546 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4547
2f6f187a
DM
45482017-03-10 David Malcolm <dmalcolm@redhat.com>
4549
4550 PR translation/79848
4551 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4552 "%qs".
4553 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4554
36618428
MP
45552017-03-09 Marek Polacek <polacek@redhat.com>
4556
4557 PR sanitizer/79757
4558 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4559 parameter declarations with initializers.
4560
01e5af5a
JJ
45612017-03-09 Jakub Jelinek <jakub@redhat.com>
4562
4563 PR c/79969
4564 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4565 TYPE_STUB_DECL.
4566
a71dbc63
JJ
45672017-03-07 Jakub Jelinek <jakub@redhat.com>
4568
4569 PR c/79834
4570 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4571 for "may only be used in compound statements" diagnostics, change it
4572 such that the same translatable string is used for all pragmas. For
4573 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4574 diagnostics.
4575 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4576 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4577 "may only be used in compound statements" diagnostics, such that the
4578 same translatable string is used for all pragmas.
4579
1ff4bae6
MP
45802017-03-04 Marek Polacek <polacek@redhat.com>
4581
4582 PR c/79847
4583 * c-decl.c (implicit_decl_warning): Add missing space.
4584
7f5a7d78
MP
45852017-03-03 Marek Polacek <polacek@redhat.com>
4586
4587 PR c/79758
4588 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4589 current_function_prototype_arg_types is error_mark_node. Fix
4590 formatting. Use TREE_VALUE instead of TREE_TYPE.
4591
883c8f06
JJ
45922017-03-03 Jakub Jelinek <jakub@redhat.com>
4593
79c9b7a8
JJ
4594 PR c/79837
4595 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4596 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4597 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4598 diagnostics.
4599
883c8f06
JJ
4600 PR c/79836
4601 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4602 instead of %<_Generic>.
4603 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4604 (c_parser_omp_target_exit_data): Use %<release%> instead of
4605 %<release>.
4606
324ff1a0
JJ
46072017-02-28 Jakub Jelinek <jakub@redhat.com>
4608
4609 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4610 instead of just cond ? "..." : "...".
4611 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4612 for "enter"/"exit" keyword.
4613 (c_finish_oacc_routine): Don't use %s to supply portions of the
4614 message.
4615
4227c9ad
JJ
46162017-02-24 Jakub Jelinek <jakub@redhat.com>
4617
4618 PR c++/79588
4619 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4620 handle -Wrestrict here.
4621 * c-typeck.c (build_function_call_vec): Adjust
4622 check_function_arguments caller.
4623
5d972e66
RB
46242017-02-23 Richard Biener <rguenther@suse.de>
4625
4626 PR c/79684
4627 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4628 to initialize c_exprs to return.
4629 (c_parser_gimple_binary_expression): Likewise.
4630 (c_parser_gimple_unary_expression): Likewise.
4631 (c_parser_gimple_postfix_expression): Likewise.
4632
61ac5ebe
MP
46332017-02-22 Marek Polacek <polacek@redhat.com>
4634
4635 PR c/79662
4636 * c-typeck.c (convert_arguments): Handle error_mark_node.
4637
41d1b0b1
PK
46382017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4639
4640 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4641 value of c_parser_parse_ssa_name against error_mark_node and emit
4642 error if ssa name is anonymous and written as default definition.
4643
eab1f169
PK
46442017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4645
4646 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4647 FMA_EXPR.
4648
bcac0b4d
JJ
46492017-02-16 Jakub Jelinek <jakub@redhat.com>
4650
4651 PR c++/79512
4652 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4653 ignore #pragma omp target even when not followed by identifier.
4654
1be33173
PK
46552017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4656
4657 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4658 (c_parser_gimple_unary_expression): Likewise.
4659
aa326bfb
JJ
46602017-02-13 Jakub Jelinek <jakub@redhat.com>
4661
4662 * c-parser.c (c_parser_oacc_declare): Add missing space in
4663 diagnostics.
4664
8a398bc5
PK
46652017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4666
4667 PR c/79478
4668 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4669 set_c_expr_source_range when parsing ssa-name.
4670
3dcde5ef 46712017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4672 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4673
4674 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4675 building IL when arguments are error_mark_node.
4676 (c_parser_gimple_unary_expression): Likewise.
4677 (c_parser_gimple_if_stmt): Likewise.
4678 (c_parser_gimple_switch_stmt): Likewise.
4679 (c_parser_gimple_return_stmt): Likewise.
4680 (c_parser_parse_ssa_name): When name lookup fails do not build
4681 an SSA name. Use undeclared rather than not declared in error
4682 reporting.
4683
192b048b
MP
46842017-02-09 Marek Polacek <polacek@redhat.com>
4685
4686 PR c/79428
4687 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4688 instead of c_parser_skip_until_found.
4689
56f71478
JJ
46902017-02-09 Jakub Jelinek <jakub@redhat.com>
4691
4692 PR c/79431
4693 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4694 symtab_node::get on automatic variables.
4695
02889d23
CLT
46962016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4697 Chung-Lin Tang <cltang@codesourcery.com>
4698
4699 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4700 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4701 semantic checking.
4702 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4703
7af4b20d
RB
47042017-02-07 Richard Biener <rguenther@suse.de>
4705
4706 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4707 (c_parser_gimple_postfix_expression_after_primary):
4708 Do not use c_build_function_call_vec to avoid folding and promotion.
4709 Simplify.
4710
e5e391d6
MO
47112017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4712
4713 PR lto/79061
4714 * c-decl.c (pop_scope): Pass main_input_filename to
4715 build_translation_unit_decl.
4716
c2e84327
DM
47172017-01-24 David Malcolm <dmalcolm@redhat.com>
4718
4719 * c-parser.c: Include "read-rtl-function.h" and
4720 "run-rtl-passes.h".
4721 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4722 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4723 production. Update for renaming of field "gimple_pass" to
4724 "gimple_or_rtl_pass". If __RTL was seen, call
4725 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4726 to an auto_timevar, to cope with early exit.
4727 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4728 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4729 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4730 Handle RID_RTL.
4731 (c_parser_parse_rtl_body): New function.
4732 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4733 (struct c_declspecs): Rename field "gimple_pass" to
4734 "gimple_or_rtl_pass". Add field "rtl_p".
4735 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4736 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4737 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4738 (c_parser_gimple_or_rtl_pass_list): ...this.
4739
2ebd93e1
MP
47402017-01-20 Marek Polacek <polacek@redhat.com>
4741
4742 PR c/64279
4743 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4744
b1c95bb5
RB
47452017-01-13 Richard Biener <rguenther@suse.de>
4746
4747 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4748 nops.
4749
25329913
RB
47502017-01-13 Richard Biener <rguenther@suse.de>
4751
4752 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4753 _Literal ( type-name ) number.
4754
6bb4ea5c
RB
47552017-01-12 Richard Biener <rguenther@suse.de>
4756
4757 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4758 __MEM.
4759
6b5b4e9c
JJ
47602017-01-11 Jakub Jelinek <jakub@redhat.com>
4761
4762 PR c++/72813
4763 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4764 PCH file.
4765
e3252775
RB
47662017-01-11 Richard Biener <rguenther@suse.de>
4767
4768 PR bootstrap/79052
4769 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4770 returns on parse errors.
4771
a9342885
MP
47722017-01-04 Marek Polacek <polacek@redhat.com>
4773
4774 PR c++/64767
4775 * c-parser.c (c_parser_postfix_expression): Mark zero character
4776 constants by setting original_type in c_expr.
4777 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4778 with a zero character constant.
4779 (char_type_p): New function.
4780
5dd9a9d0
DM
47812017-01-04 David Malcolm <dmalcolm@redhat.com>
4782
4783 * c-parser.c (c_parser_declaration_or_fndef): Create a
4784 rich_location at init_loc and parse it to start_init.
4785 (last_init_list_comma): New global.
4786 (c_parser_braced_init): Update last_init_list_comma when parsing
4787 commas. Pass it to pop_init_level. Pass location of closing
4788 brace to pop_init_level.
4789 (c_parser_postfix_expression_after_paren_type): Create a
4790 rich_location at type_loc and parse it to start_init.
4791 (c_parser_omp_declare_reduction): Likewise for loc.
4792 * c-tree.h (start_init): Add rich_location * param.
4793 (pop_init_level): Add location_t param.
4794 * c-typeck.c (struct initializer_stack): Add field
4795 "missing_brace_richloc".
4796 (start_init): Add richloc param, use it to initialize
4797 the stack node's missing_brace_richloc.
4798 (last_init_list_comma): New decl.
4799 (finish_implicit_inits): Pass last_init_list_comma to
4800 pop_init_level.
4801 (push_init_level): When finding missing open braces, add fix-it
4802 hints to the richloc.
4803 (pop_init_level): Add "insert_before" param and pass it
4804 when calling pop_init_level. Add fixits about missing
4805 close braces to any richloc. Use the richloc for the
4806 -Wmissing-braces warning.
4807 (set_designator): Pass last_init_list_comma to pop_init_level.
4808 (process_init_element): Likewise.
4809
cbe34bb5
JJ
48102017-01-01 Jakub Jelinek <jakub@redhat.com>
4811
4812 Update copyright years.
4813
d17680f3
JJ
48142016-12-21 Jakub Jelinek <jakub@redhat.com>
4815
0dba7960
JJ
4816 PR bootstrap/78817
4817 * c-typeck.c (build_function_call_vec): If check_function_arguments
4818 returns true, set TREE_NO_WARNING on CALL_EXPR.
4819
d17680f3
JJ
4820 PR c/77767
4821 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4822 to *expr instead of overwriting it.
4823
aa90531e
RB
48242016-12-20 Richard Biener <rguenther@suse.de>
4825
4826 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4827 error recovery.
4828 (c_parser_gimple_statement): Only build assigns for non-error
4829 stmts.
4830 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4831
629b3d75
MJ
48322016-12-14 Martin Jambor <mjambor@suse.cz>
4833
4834 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4835 omp-low.h.
4836 (c_finish_oacc_routine): Adjusted call to
4837 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4838 to use their new names.
4839 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4840 use its new name.
4841 (c_parser_oacc_update): Likewise.
4842 (c_parser_omp_simd): Likewise.
4843 (c_parser_omp_target_update): Likewise.
4844 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4845 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4846 name.
4847 (c_finish_omp_cancellation_point): Likewise.
4848 * gimple-parser.c: Do not include omp-low.h
4849
c5af52eb
CP
48502016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4851 James Norris <jnorris@codesourcery.com>
4852
4853 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4854 EXIT_DATA,WAIT} are not used in compound statements.
4855 (c_parser_oacc_enter_exit_data): Update diagnostics.
4856
48330c93
BE
48572016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4858
4859 PR c++/71973
4860 * c-decl.c (diagnose_mismatched_decls): Use
4861 OPT_Wbuiltin_declaration_mismatch here too.
4862
899ca90e 48632016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4864 Alan Hayward <alan.hayward@arm.com>
4865 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4866
4867 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4868 (make_label, finish_struct): Likewise.
4869
1ee62b92 48702016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4871 Richard Biener <rguenther@suse.de>
22b15758 4872
8e745a17
JJ
4873 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4874 * config-lang.in (gtfiles): Add c/c-parser.h.
4875 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4876 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4877 * c-parser.c (enum c_id_kind, struct c_token,
4878 c_parser_next_token_is, c_parser_next_token_is_not,
4879 c_parser_next_token_is_keyword,
4880 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4881 Split out to ...
4882 * c-parser.h: ... new header.
4883 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4884 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4885 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4886 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4887 c_parser_error, c_parser_require, c_parser_skip_until_found,
4888 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4889 c_parser_type_name): Export.
4890 (c_parser_tokens_buf): New function.
4891 (c_parser_error): Likewise.
4892 (c_parser_set_error): Likewise.
4893 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4894 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4895 via c_parser_parse_gimple_body.
8e745a17
JJ
4896 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4897 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4898 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4899 c_parser_error, c_parser_require, c_parser_skip_until_found,
4900 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4901 c_parser_type_name): Declare.
1ee62b92
PG
4902 (struct c_parser): Declare forward.
4903 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4904 (c_parser_error): Likewise.
4905 (c_parser_set_error): Likewise.
4906 * gimple-parser.c: New file.
4907 * gimple-parser.h: Likewise.
1ee62b92 4908
22b15758
UB
49092016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4910
4911 PR c/35503
4912 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4913 warn_for_restrict.
4914
84ff4775
LCW
49152016-09-11 Le-Chun Wu <lcwu@google.com>
4916 Mark Wielaard <mjw@redhat.com>
4917
4918 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4919 to the given -Wshadow= variant.
4920
4d0cdd0c
TP
49212016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4922
4923 * c-typeck.c: Include memmodel.h.
4924
1202f33e
JJ
49252016-10-13 Jakub Jelinek <jakub@redhat.com>
4926
4927 PR target/77957
4928 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4929 instead of lhd_return_null_tree_v.
4930
8a14afd0
BS
49312016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4932
4933 PR c++/69733
4934 * c-decl.c (smallest_type_quals_location): New static function.
4935 (grokdeclarator): Try to find the correct location for an ignored
4936 qualifier.
4937
81fea426
MP
49382016-09-26 Marek Polacek <polacek@redhat.com>
4939
4940 PR c/7652
4941 * c-decl.c (pop_scope): Add gcc_fallthrough.
4942
49432016-09-26 Marek Polacek <polacek@redhat.com>
4944
4945 PR c/7652
4946 * c-parser.c (struct c_token): Add flags field.
4947 (c_lex_one_token): Pass it to c_lex_with_flags.
4948 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4949 into IFN_FALLTHROUGH.
4950 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4951 attribute fallthrough after a case label or default label.
4952 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4953
9a2300e9
MP
49542016-09-24 Marek Polacek <polacek@redhat.com>
4955
4956 PR c/77490
4957 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4958 have boolean value. Warn about ++/-- on booleans.
4959
7de76362
JJ
49602016-09-23 Jakub Jelinek <jakub@redhat.com>
4961
4962 * c-parser.c (incomplete_record_decls): Remove unnecessary
4963 = vNULL initialization of file scope vec.
4964
5b73d2ab
MP
49652016-09-16 Marek Polacek <polacek@redhat.com>
4966
4967 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4968
e51fbec3
MP
49692016-09-14 Marek Polacek <polacek@redhat.com>
4970
4971 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4972 (fix_array_notation_expr): Likewise.
4973 * c-decl.c (finish_decl): Likewise.
4974 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4975 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4976 (function_to_pointer_conversion): Use false instead of 0.
4977 (convert_lvalue_to_rvalue): Likewise.
4978 (parser_build_unary_op): Likewise.
4979 (build_atomic_assign): Likewise.
4980 (build_unary_op): Change nonconvert parameter type to bool, use
4981 true/false instead of 1/0.
4982 (build_binary_op): Use true instead of 1.
4983
254830ba
DM
49842016-09-13 David Malcolm <dmalcolm@redhat.com>
4985
4986 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4987 of add_fixit_insert to add_fixit_insert_before.
4988
4c13ba17
MP
49892016-09-13 Marek Polacek <polacek@redhat.com>
4990
4991 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4992 it.
4993
54dcdb88
BE
49942016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4995
4996 PR c++/77496
4997 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4998 COMPOUND_EXPR to warn_for_omitted_condop.
4999
e5106e27
DM
50002016-09-07 David Malcolm <dmalcolm@redhat.com>
5001
5002 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5003 c_get_substring_location for this new langhook.
5004
9dc5773f
JJ
50052016-09-02 Jakub Jelinek <jakub@redhat.com>
5006
5007 PR c/65467
5008 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5009 flag_openmp.
5010 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5011 instead of mark_exp_read on low_bound/length expression.
5012 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5013 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5014 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5015 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5016 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5017 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5018 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5019 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5020 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5021 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5022 instead of mark_expr_read.
5023 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5024 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5025 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5026 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5027 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5028 array section bases outside of depend clause, for depend clause
5029 use convert_lvalue_to_rvalue on the base.
5030 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5031 linear, aligned, map, to and from clauses.
5032 (c_omp_clause_copy_ctor): New function.
5033
295844f6
MP
50342016-09-01 Marek Polacek <polacek@redhat.com>
5035
5036 PR c/7652
5037 * c-typeck.c (composite_type): Add FALLTHRU comment.
5038
089af25c
DM
50392016-08-31 David Malcolm <dmalcolm@redhat.com>
5040
5041 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5042 to the insertion fixits for "struct", "union", and "enum".
5043
f9087798
DM
50442016-08-30 David Malcolm <dmalcolm@redhat.com>
5045
5046 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5047 rather than add_fixit_misspelled_id.
5048 (undeclared_variable): Likewise.
5049 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5050 now-redundant "here" params from add_fixit_insert method calls.
5051 (c_parser_parameter_declaration): Likewise.
5052 * c-typeck.c (build_component_ref): Remove now-redundant range
5053 param from add_fixit_replace method calls.
5054
ebef225f
MP
50552016-08-25 Marek Polacek <polacek@redhat.com>
5056
5057 * c-typeck.c (parser_build_binary_op): Pass LHS to
5058 warn_logical_not_parentheses.
5059
fe377a48
MP
50602016-08-25 Marek Polacek <polacek@redhat.com>
5061
5062 PR c/77323
5063 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5064 or _FloatN or _FloatNx is not supported.
5065 (finish_declspecs): Set type to integer_type_node when _FloatN or
5066 _FloatNx is not supported.
5067
c65699ef
JM
50682016-08-19 Joseph Myers <joseph@codesourcery.com>
5069
5070 PR c/32187
5071 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5072 (struct c_declspecs): Add field floatn_nx_idx.
5073 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5074 and _FloatNx type specifiers.
5075 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5076 (c_parser_declspecs, c_parser_attribute_any_word)
5077 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5078 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5079 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5080 narrower than double.
5081
2f1364c2
JJ
50822016-08-12 Jakub Jelinek <jakub@redhat.com>
5083 Martin Liska <mliska@suse.cz>
5084
5085 PR c/67410
5086 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5087 % to determine val element to change. Assert that
5088 wchar_bytes * charwidth fits into val array.
5089
191816a3
MP
50902016-08-12 Marek Polacek <polacek@redhat.com>
5091
5092 PR c/7652
5093 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5094 (c_parser_postfix_expression): Likewise.
5095 * c-typeck.c (build_unary_op): Adjust fall through comment.
5096 (c_mark_addressable): Likewise.
5097
b95a64bb
JJ
50982016-08-11 Jakub Jelinek <jakub@redhat.com>
5099
5100 PR c/72816
5101 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5102 array member through typedef, for orig_qual_indirect == 0 clear
5103 orig_qual_type.
5104
895aa8e1
DM
51052016-08-08 David Malcolm <dmalcolm@redhat.com>
5106
5107 PR c/64955
5108 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5109 this up to selftest::run_c_tests.
5110 (selftest::run_c_tests): New function.
5111
0b212d8c
TS
51122016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5113
ae9281fc
TS
5114 * c-parser.c (struct oacc_routine_data): Add error_seen and
5115 fndecl_seen members.
5116 (c_finish_oacc_routine): Use these.
5117 (c_parser_declaration_or_fndef): Adjust.
5118 (c_parser_oacc_routine): Likewise. Support more C language
5119 constructs, and improve diagnostics. Move pragma context
5120 checking...
5121 (c_parser_pragma): ... here.
5122
0b212d8c
TS
5123 * c-parser.c (struct oacc_routine_data): New.
5124 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5125 Simplify code.
5126 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5127 declare target" attribute.
5128
76e2c821
JB
51292016-08-01 Jan Beulich <jbeulich@suse.com>
5130
5131 * c-fold.c (c_fully_fold_internal): Also emit shift count
5132 warnings for vector types.
5133 * c-typeck.c (build_binary_op): Likewise.
5134
f618a472
MP
51352016-07-29 Marek Polacek <polacek@redhat.com>
5136
5137 PR c/71742
5138 * c-decl.c (finish_struct): Rephrase an error message.
5139
efd0786f
MP
5140 PR c/71853
5141 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5142 to error node for invalid code.
5143
e00dceaf
MP
5144 PR c/71573
5145 * c-decl.c (implicitly_declare): Return decl early not only for
5146 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5147
673a107a
JJ
51482016-07-29 Jakub Jelinek <jakub@redhat.com>
5149
5150 PR c/71969
5151 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5152 on GNU extern inline functions.
5153
a5b5c8b6
MP
51542016-07-29 Marek Polacek <polacek@redhat.com>
5155
5156 PR c/71583
5157 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5158 check expr.value.
5159
e3fe09c1
UB
51602016-07-22 Uros Bizjak <ubizjak@gmail.com>
5161
5162 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5163
7c8f7eaa
DM
51642016-07-20 David Malcolm <dmalcolm@redhat.com>
5165
5166 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5167 spellcheck-tree.h
5168 (best_macro_match): Likewise, converting from a typedef to a
5169 subclass.
5170 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5171 (lookup_name_fuzzy): Update for change of best_macro_match to a
5172 subclass with a ctor that calls cpp_forall_identifiers.
5173
de6a69ee
DM
51742016-07-20 David Malcolm <dmalcolm@redhat.com>
5175
5176 * c-decl.c (implicit_decl_warning): Update for conversion of
5177 return type of lookup_name_fuzzy to const char *.
5178 (undeclared_variable): Likewise.
5179 (lookup_name_fuzzy): Convert return type from tree to
5180 const char *.
5181 * c-parser.c (c_parser_declaration_or_fndef): Update for
5182 conversion of return type of lookup_name_fuzzy to const char *.
5183 (c_parser_parameter_declaration): Likewise.
5184
b1c9c068
CP
51852016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5186
5187 * c-parser.c (c_parser_oacc_declare): Don't scan for
5188 GOMP_MAP_POINTER.
5189 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5190 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5191 zero-length subarrays.
5192
ddbbcb19
JJ
51932016-07-15 Jakub Jelinek <jakub@redhat.com>
5194
5195 PR c/71858
5196 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5197 instead of FUZZY_LOOKUP_NAME.
5198 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5199 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5200
dd36b877
JJ
52012016-07-14 Jakub Jelinek <jakub@redhat.com>
5202
5203 PR c/71858
5204 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5205
8c681247
TS
52062016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5207
5208 * c-parser.c (c_parser_generic_selection): Make type of variable
5209 auto_vec.
5210 (c_parser_omp_declare_simd): Likewise.
5211
bf4fa671
TS
52122016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5213
5214 * c-decl.c (struct c_struct_parse_info): Change member types
5215 from vec to auto_vec.
5216 (start_struct): Adjust.
5217 (finish_struct): Likewise.
5218
557e8c49
JJ
52192016-07-02 Jakub Jelinek <jakub@redhat.com>
5220
5221 PR c/71719
5222 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5223
54d19c3b
TS
52242016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5225
5226 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5227 Move pragma context checking into...
5228 (c_parser_omp_cancellation_point): ... here, and improve
5229 diagnostic messages.
5230 * c-typeck.c (c_finish_omp_cancel)
5231 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5232
152ef731
JJ
52332016-06-29 Jakub Jelinek <jakub@redhat.com>
5234
5235 PR c/71685
5236 * c-typeck.c (c_build_qualified_type): Don't clear
5237 C_TYPE_INCOMPLETE_VARS for the main variant.
5238
52392016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
5240
5241 PR c/71552
5242 * c-typeck.c (output_init_element): Diagnose incompatible types
5243 before non-constant initializers.
5244
e9ac1f86
JJ
52452016-06-28 Jakub Jelinek <jakub@redhat.com>
5246
5247 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5248
277d7ee0
AK
52492016-06-23 Andi Kleen <ak@linux.intel.com>
5250
5251 * Make-lang.in: Add support for autofdo.
5252
1a4f11c8
DM
52532016-06-22 David Malcolm <dmalcolm@redhat.com>
5254
5255 PR c/70339
5256 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5257 (implicit_decl_warning): When issuing warnings for implicit
5258 declarations, attempt to provide a suggestion via
5259 lookup_name_fuzzy.
5260 (undeclared_variable): Likewise when issuing errors.
5261 (lookup_name_in_scope): Likewise.
5262 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5263 (best_macro_match): New typedef.
5264 (find_closest_macro_cpp_cb): New function.
5265 (lookup_name_fuzzy): New function.
5266 * c-parser.c: Include gcc-rich-location.h.
5267 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5268 (c_keyword_starts_typename): ...this new function.
5269 (c_parser_declaration_or_fndef): When issuing errors about
5270 missing "struct" etc, add a fixit. For other kinds of errors,
5271 attempt to provide a suggestion via lookup_name_fuzzy.
5272 (c_parser_parms_declarator): When looking ahead to detect typos in
5273 type names, also reject CPP_KEYWORD.
5274 (c_parser_parameter_declaration): When issuing errors about
5275 unknown type names, attempt to provide a suggestion via
5276 lookup_name_fuzzy.
5277 * c-tree.h (c_keyword_starts_typename): New prototype.
5278
5a578671
JM
52792016-06-20 Joseph Myers <joseph@codesourcery.com>
5280
5281 PR c/71601
5282 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5283 c_common_type returns error_mark_node.
5284
3f8257db 52852016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
5286
5287 PR c/69507
5288 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5289 __alignof__ (expression).
5290
6a3f203c
DM
52912016-06-14 David Malcolm <dmalcolm@redhat.com>
5292
5293 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5294
264757fb
DM
52952016-06-14 David Malcolm <dmalcolm@redhat.com>
5296
5297 * c-typeck.c (build_component_ref): Simplify fixit code by
5298 using gcc_rich_location::add_fixit_misspelled_id.
5299 (set_init_label): Likewise.
5300
f7e4f2e3
DM
53012016-06-13 David Malcolm <dmalcolm@redhat.com>
5302
5303 * c-parser.c (c_parser_initelt): Provide location of name for new
5304 location_t param of set_init_label.
5305 * c-tree.h (set_init_label): Add location_t param.
5306 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5307 param and use it when issuing error messages about unrecognized
5308 field names. Attempt to provide a fixit hint if appropriate,
5309 otherwise update the error message to provide the type name.
5310
4b1ffdb1
TS
53112016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5312
5313 PR c/71381
5314 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5315 Loosen checking.
5316
44a845ca
MS
53172016-06-08 Martin Sebor <msebor@redhat.com>
5318 Jakub Jelinek <jakub@redhat.com>
5319
5320 PR c++/70507
5321 PR c/68120
5322 * c-typeck.c (convert_arguments): Don't promote last argument
5323 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5324
92a5f2ba
MP
53252016-06-08 Marek Polacek <polacek@redhat.com>
5326
5327 PR c/71418
5328 * c-decl.c (grokdeclarator): Check TYPE_P.
5329
08203f73
MP
5330 PR c/71426
5331 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5332 code.
5333
6ffd47b7
DM
53342016-06-07 David Malcolm <dmalcolm@redhat.com>
5335
5336 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5337 and structure element reference, capture the location of the
5338 element name token and pass it to build_component_ref.
5339 (c_parser_postfix_expression_after_primary): Likewise for
5340 structure element dereference.
5341 (c_parser_omp_variable_list): Likewise for
5342 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5343 * c-tree.h (build_component_ref): Add location_t param.
5344 * c-typeck.c (build_component_ref): Add location_t param
5345 COMPONENT_LOC. Use it, if available, when issuing hints about
5346 mispelled member names to provide a fixit replacement hint.
5347
1f40cff3
MP
53482016-06-06 Marek Polacek <polacek@redhat.com>
5349
5350 PR c/71362
5351 * c-parser.c (c_parser_direct_declarator): Set location.
5352
5545a907
MP
53532016-06-06 Marek Polacek <polacek@redhat.com>
5354
5355 * c-typeck.c (comptypes_internal): Handle comparisons of
5356 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5357 TYPE_REF_CAN_ALIAS_ALL.
5358
b605f663
CLT
53592016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5360
5361 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5362 arguments as addressable when async clause exists.
5363
00631022
JJ
53642016-05-30 Jakub Jelinek <jakub@redhat.com>
5365
5366 PR c++/71349
5367 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5368 when combined with target construct.
5369
7211a097
JJ
53702016-05-26 Jakub Jelinek <jakub@redhat.com>
5371
5372 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5373 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5374
95efe6b6
MP
53752016-05-25 Marek Polacek <polacek@redhat.com>
5376
5377 PR c/71265
5378 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5379
a23faf7a
MP
5380 PR c/71266
5381 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5382
e46c7770
CP
53832016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5384
5385 * c-parser.c (c_parser_oacc_declare): Add support for
5386 GOMP_MAP_FIRSTPRIVATE_POINTER.
5387 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5388 argument with enum c_omp_region_type ort.
5389 (handle_omp_array_sections): Likewise. Update call to
5390 handle_omp_array_sections_1.
5391 (c_finish_omp_clauses): Add specific errors and warning messages for
5392 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5393 call to handle_omp_array_sections.
5394
a04e69c0
TS
53952016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5396
5397 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5398
f17a223d
RB
53992016-05-24 Richard Biener <rguenther@suse.de>
5400
5401 PR middle-end/70434
5402 PR c/69504
5403 * c-typeck.c (build_array_ref): Do not complain about indexing
5404 non-lvalue vectors. Adjust for function name change.
5405
79063edd
MS
54062016-05-20 Martin Sebor <msebor@redhat.com>
5407
5408 PR c/71115
5409 * c-typeck.c (error_init): Use
5410 expansion_point_location_if_in_system_header.
5411 (warning_init): Same.
5412
8a40fef3
DM
54132016-05-19 David Malcolm <dmalcolm@redhat.com>
5414
5415 PR c/71171
5416 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5417 in error-handling.
5418 (c_parser_postfix_expression): Likewise.
5419 * c-tree.h (c_expr::set_error): New method.
5420 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5421 that result's range is initialized.
5422
e9892350
JG
54232016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5424
5425 * c-typeck.c (parser_build_unary_op): Fix formatting.
5426
8fad45f5
MW
54272016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5428
5429 * c-decl.c (grokdeclarator): Remove errmsg and use of
5430 targetm.invalid_return_type.
5431 (grokparms): Remove errmsg and use of
5432 targetm.invalid_parameter_type.
5433
aa4b467b
JM
54342016-05-13 Joseph Myers <joseph@codesourcery.com>
5435
5436 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5437 function return type.
5438
4f2e1536
MP
54392016-05-12 Marek Polacek <polacek@redhat.com>
5440
5441 PR c/70756
5442 * c-decl.c (build_compound_literal): Pass LOC down to
5443 c_incomplete_type_error.
5444 * c-tree.h (require_complete_type): Adjust declaration.
5445 (c_incomplete_type_error): Likewise.
5446 * c-typeck.c (require_complete_type): Add location parameter, pass it
5447 down to c_incomplete_type_error.
5448 (c_incomplete_type_error): Add location parameter, pass it down to
5449 error_at.
5450 (build_component_ref): Pass location down to c_incomplete_type_error.
5451 (default_conversion): Pass location down to require_complete_type.
5452 (build_array_ref): Likewise.
5453 (build_function_call_vec): Likewise.
5454 (convert_arguments): Likewise.
5455 (build_unary_op): Likewise.
5456 (build_c_cast): Likewise.
5457 (build_modify_expr): Likewise.
5458 (convert_for_assignment): Likewise.
5459 (c_finish_omp_clauses): Likewise.
5460
d6e83a8d
MM
54612016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5462
5463 PR c/43651
5464 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5465 is enabled.
5466 * c-errors.c (pedwarn_c90): Return true if warned.
5467 * c-tree.h (pedwarn_c90): Change return type to bool.
5468 (enum c_declspec_word): Add new enumerator cdw_atomic.
5469
5c3a10fb
MP
54702016-05-11 Marek Polacek <polacek@redhat.com>
5471
5472 PR c++/71024
5473 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5474 diagnose_mismatched_attributes and call it.
5475
cf68d92c
MP
54762016-05-10 Marek Polacek <polacek@redhat.com>
5477
5478 PR c/70255
5479 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5480 on a declaration following the definition.
5481
351f85c5
JJ
54822016-05-05 Jakub Jelinek <jakub@redhat.com>
5483
5484 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5485 parse it through to c_parser_c99_block_statement.
5486 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5487 caller.
5488
deef7113
MP
54892016-05-04 Marek Polacek <polacek@redhat.com>
5490
5491 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5492 OPT_Wdangling_else.
5493
de55efd5
MP
54942016-05-04 Marek Polacek <polacek@redhat.com>
5495
5496 PR c/48778
5497 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5498 for macro expansions.
5499
79ce98bc
MP
55002016-05-03 Marek Polacek <polacek@redhat.com>
5501
5502 PR c/70859
5503 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5504 check_builtin_function_arguments.
5505
fb2647aa
RB
55062016-05-03 Richard Biener <rguenther@suse.de>
5507
5508 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5509 the checksum from the previous stage.
5510
77886428
CP
55112016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5512
5513 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5514 c_finish_omp_clauses.
5515 (c_parser_omp_all_clauses): Likewise.
5516 (c_parser_oacc_cache): Likewise.
5517 (c_parser_oacc_loop): Likewise.
5518 (omp_split_clauses): Likewise.
5519 (c_parser_omp_declare_target): Likewise.
5520 (c_parser_cilk_all_clauses): Likewise.
5521 (c_parser_cilk_for): Likewise.
5522 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5523 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5524
7176a4a0
MP
55252016-05-02 Marek Polacek <polacek@redhat.com>
5526
5527 PR c/70851
5528 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5529 incomplete type.
5530
e7ff0319
CP
55312016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5532
5533 PR middle-end/70626
5534 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5535 OACC_LOOP_CLAUSE_MASK.
5536 (c_parser_oacc_kernels_parallel): Update call to
5537 c_oacc_split_loop_clauses.
5538
9f405ce1
AM
55392016-04-28 Andrew MacLeod <amacleod@redhat.com>
5540
5541 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5542 argument to build_modify_expr in two cases.
5543
c1e1f433
BS
55442016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5545
5546 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5547 warn_for_memset instead of warning directly here.
5548
2448a956
MP
55492016-04-26 Marek Polacek <polacek@redhat.com>
5550
5551 PR c/67784
5552 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5553 out of ...
5554 (c_parser_for_statement): ... here.
5555 (c_parser_if_statement): Use it.
5556 (c_parser_switch_statement): Use it.
5557 (c_parser_while_statement): Use it.
5558
b02a5e26
MP
5559 PR c/70791
5560 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5561
477d4906
IV
55622016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5563
5564 PR c++/69363
5565 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5566 instead of c_finish_cilk_clauses.
5567 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5568 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5569 floating-point variables in the linear clause for Cilk Plus.
5570
fe37c7af
MM
55712016-04-18 Michael Matz <matz@suse.de>
5572
5573 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5574 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5575
949505a9
MP
55762016-04-15 Marek Polacek <polacek@redhat.com>
5577
5578 PR c/70671
5579 * c-typeck.c (build_unary_op): Pass location down to error and
5580 warning call.
5581
dda1bf61
JJ
55822016-04-15 Jakub Jelinek <jakub@redhat.com>
5583
5584 PR c/70436
5585 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5586 where needed.
5587 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5588 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5589 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5590 Adjust c_parser_pragma callers.
5591 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5592 caller.
5593 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5594 c_parser_statement.
5595 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5596 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5597 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5598 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5599 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5600 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5601 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5602 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5603 down where needed.
5604 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5605 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5606 calls.
5607
99cd9857
MP
56082016-04-13 Marek Polacek <polacek@redhat.com>
5609
5610 PR c/70436
5611 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5612 adjust callers.
5613 (c_parser_statement): Likewise.
5614 (c_parser_c99_block_statement): Likewise.
5615 (c_parser_while_statement): Likewise.
5616 (c_parser_for_statement): Likewise.
5617 (c_parser_if_body): Don't set IF_P here.
5618 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5619 about dangling else here.
5620 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5621 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5622 warn about dangling else here.
5623
f13355da
MP
56242016-04-04 Marek Polacek <polacek@redhat.com>
5625
5626 PR c/70307
5627 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5628
5fde6a45
MP
56292016-03-31 Marek Polacek <polacek@redhat.com>
5630
5631 PR c/70297
5632 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5633
4bbf545b
DM
56342016-03-18 David Malcolm <dmalcolm@redhat.com>
5635
5636 PR c/70281
5637 * c-parser.c (c_parser_postfix_expression): Set the source range
5638 for uses of "__builtin_types_compatible_p".
5639
fcc2b74f
JJ
56402016-03-17 Jakub Jelinek <jakub@redhat.com>
5641
5642 PR c/70280
5643 * c-typeck.c (composite_type): Don't count void_list_node
5644 into len, if the list is terminated by void_list_node, start
5645 with void_list_node instead of NULL for newargs. Stop
5646 at void_list_node.
5647
ab4c578f
MP
56482016-03-16 Marek Polacek <polacek@redhat.com>
5649
5650 PR c/70093
5651 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5652 nested functions returning VM types.
5653
96b3c82d
CP
56542016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5655
5656 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5657 when calling c_finish_omp_clauses.
5658
29b9828f
BS
56592016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5660
5661 PR c/69824
5662 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5663 for later.
5664
7ff6ca38
MP
56652016-03-04 Marek Polacek <polacek@redhat.com>
5666
5667 PR c/69798
5668 * c-parser.c (c_parser_postfix_expression): Call
5669 c_parser_cast_expression rather than c_parser_postfix_expression.
5670
686e2237
JJ
56712016-03-01 Jakub Jelinek <jakub@redhat.com>
5672
5673 PR c/69796
5674 PR c/69974
5675 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5676 of incomplete decls to error_mark_node.
5677
0b05329b
MP
56782016-02-24 Marek Polacek <polacek@redhat.com>
5679
5680 PR c/69819
5681 * c-decl.c (finish_decl): Don't update the copy of the type of a
5682 different decl type.
5683
067fbd8b
JJ
56842016-02-23 Jakub Jelinek <jakub@redhat.com>
5685
5686 PR objc/69844
5687 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5688 in id_kind reclassification.
5689
bf14eba2
JJ
56902016-02-16 Jakub Jelinek <jakub@redhat.com>
5691
5692 PR c/69835
5693 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5694
ba539195
JN
56952016-02-16 James Norris <jnorris@codesourcery.com>
5696
5697 PR c/64748
5698 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5699
16595a1f
BS
57002016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5701
f48dfe98
BS
5702 * c-decl.c (build_null_declspecs): Zero the entire struct.
5703
16595a1f
BS
5704 PR c/69522
5705 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5706 callers changed. If nested_p is true, use it to call
5707 finish_implicit_inits.
5708 * c-tree.h (finish_implicit_inits): Declare.
5709 * c-typeck.c (finish_implicit_inits): New function. Move code
5710 from ...
5711 (push_init_level): ... here.
5712 (set_designator, process_init_element): Call finish_implicit_inits.
5713
66756373
JJ
57142016-02-11 Jakub Jelinek <jakub@redhat.com>
5715
5716 PR c/69768
5717 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5718 arguments for -Waddress warning.
5719
1066e9b5
JJ
57202016-02-04 Jakub Jelinek <jakub@redhat.com>
5721
5722 PR c/69669
5723 * c-decl.c (finish_enum): When honoring mode attribute,
5724 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5725
3a5d2ba4
JJ
57262016-01-29 Jakub Jelinek <jakub@redhat.com>
5727
5728 PR debug/69518
5729 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5730 all type variants, not just TYPE_MAIN_VARIANT.
5731
cbdd8ae0
JJ
57322016-01-27 Jakub Jelinek <jakub@redhat.com>
5733
5734 PR debug/66869
5735 * c-decl.c (c_write_global_declarations_1): Warn with
5736 warn_unused_function if static prototype without definition
5737 is not C_DECL_USED.
5738
fa74a4bc
MP
57392016-01-27 Marek Polacek <polacek@redhat.com>
5740
5741 PR c/68062
5742 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5743 to unsigned, if needed. Add -Wsign-compare warning.
5744
13f92e8d
JJ
57452016-01-26 Jakub Jelinek <jakub@redhat.com>
5746
5747 PR tree-optimization/69483
5748 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5749
cd8e73dc 57502016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5751
5752 PR c/24293
5753 * c-tree.h (incomplete_record_decls): Declare.
5754 * c-parser.c (incomplete_record_decls): Define.
5755 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5756 report error if any decl has zero size.
5757 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5758 or enum type to incomplete_record_decls.
5759
e6d6ec9e
TV
57602016-01-14 Tom de Vries <tom@codesourcery.com>
5761
5762 PR tree-optimization/68773
5763 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5764 set force_output.
5765
00083992
MP
57662016-01-14 Marek Polacek <polacek@redhat.com>
5767
5768 PR c/69262
5769 * c-decl.c (grokdeclarator): Provide more information for invalid
5770 array declarations.
5771
7443cf13
DM
57722016-01-06 David Malcolm <dmalcolm@redhat.com>
5773
5774 * c-parser.c (c_parser_unary_expression): For dereferences, build
5775 a combined location before calling build_indirect_ref, so that
5776 error reports cover the full range, manually updating the c_expr
5777 src_range.
5778
6b131d5b
MP
57792016-01-06 Marek Polacek <polacek@redhat.com>
5780
5781 PR sanitizer/69099
5782 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5783 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5784 NULL.
5785
818ab71a
JJ
57862016-01-04 Jakub Jelinek <jakub@redhat.com>
5787
5788 Update copyright years.
5789
2fe0a208
MP
57902016-01-04 Marek Polacek <polacek@redhat.com>
5791
5792 PR c/68908
5793 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5794 optimization to use __atomic_fetch_* built-in if possible.
5795
c7b48c8a
TS
57962015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5797
5798 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5799 into...
5800 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5801 all users.
5802
fda5652f
MP
58032015-12-22 Marek Polacek <polacek@redhat.com>
5804
5805 PR c/69002
5806 * c-typeck.c (build_component_ref): Warn when acessing elements of
5807 atomic structures or unions.
5808
745e411d
DM
58092015-12-21 David Malcolm <dmalcolm@redhat.com>
5810
5811 * c-typeck.c: Include "gcc-rich-location.h".
5812 (build_binary_op): In the two places that call binary_op_error,
5813 create a gcc_rich_location and populate it with the location of
5814 the binary op and its two operands.
5815
94c40e19
DM
58162015-12-16 David Malcolm <dmalcolm@redhat.com>
5817
5818 * c-parser.c (c_parser_statement_after_labels): When calling
5819 c_finish_return, Use the return expression's location if it has
5820 one, falling back to the location of the first token within it.
5821 * c-typeck.c (c_finish_return): When issuing warnings about
5822 the incorrect presence/absence of a return value, issue a note
5823 showing the declaration of the function.
5824
de67c4c3
DM
58252015-12-16 David Malcolm <dmalcolm@redhat.com>
5826
5827 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5828 to 4.
5829 (c_parser_peek_nth_token): New function.
5830 (c_parser_peek_conflict_marker): New function.
5831 (c_parser_error): Detect conflict markers and report them as such.
5832
a10704e1
DM
58332015-12-16 David Malcolm <dmalcolm@redhat.com>
5834
5835 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5836 to preserve range information for the primary expression
5837 in the call to c_parser_postfix_expression_after_primary.
5838
8062bca6
DM
58392015-12-16 David Malcolm <dmalcolm@redhat.com>
5840
5841 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5842 expression location, falling back on the first token location,
5843 rather than always using the latter.
5844
d06f8b75
MP
58452015-12-16 Marek Polacek <polacek@redhat.com>
5846
5847 PR c/64637
5848 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5849 available.
5850
2994fb91
MP
58512015-12-15 Marek Polacek <polacek@redhat.com>
5852
5853 PR c/68907
5854 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5855 artificial decl.
5856
a1b93f8d
DM
58572015-12-08 David Malcolm <dmalcolm@redhat.com>
5858
5859 * c-parser.c (c_parser_alignof_expression): Capture location of
5860 closing parenthesis (if any), or of end of unary expression, and
5861 use it to build a src_range for the expression.
5862
46c6e1e2
DM
58632015-12-08 David Malcolm <dmalcolm@redhat.com>
5864
5865 PR c/68757
5866 * c-parser.c (c_parser_get_builtin_args): Add
5867 "out_close_paren_loc" param, and write back to it.
5868 (c_parser_postfix_expression): Capture the closing
5869 parenthesis location for RID_CHOOSE_EXPR,
5870 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5871 RID_BUILTIN_SHUFFLE and use it to set the source range
5872 for such expressions; within RID_BUILTIN_COMPLEX set
5873 the underlying location.
5874
66189108
MP
58752015-12-07 Marek Polacek <polacek@redhat.com>
5876
5877 PR c/68668
5878 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5879 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5880
f187980b
EB
58812015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5882
5883 * c-tree.h (c_build_va_arg): Adjust prototype.
5884 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5885 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5886 parameter, adjust throughout and issue an error if EXPR is a component
5887 with reverse storage order.
5888
4250754e
JM
58892015-12-02 Jason Merrill <jason@redhat.com>
5890
5891 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5892 (c_fully_fold_internal, decl_constant_value_for_optimization):
5893 Move from c-common.c.
5894 * c-tree.h: Declare decl_constant_value_for_optimization.
5895 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5896
e9e32ee6
JM
58972015-12-02 Joseph Myers <joseph@codesourcery.com>
5898
5899 PR c/68162
5900 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5901 following link from declarator to next declarator. Track original
5902 qualified type and pass it to c_build_qualified_type.
5903 * c-typeck.c (c_build_qualified_type): Add arguments
5904 orig_qual_type and orig_qual_indirect.
5905
ff7a55bf
TS
59062015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5907
5908 * c-parser.c (c_parser_omp_clause_name)
5909 (c_parser_oacc_all_clauses): Alphabetical sorting.
5910
657e4e47
JJ
59112015-12-02 Jakub Jelinek <jakub@redhat.com>
5912
5913 PR c/68533
5914 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5915 for diagnostics.
5916
37d5ad46
JB
59172015-12-01 Julian Brown <julian@codesourcery.com>
5918 Cesar Philippidis <cesar@codesourcery.com>
5919 James Norris <James_Norris@mentor.com>
5920
5921 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5922 (c_parser_oacc_clause_use_device): New function.
5923 (c_parser_oacc_all_clauses): Add use_device support.
5924 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5925 (c_parser_oacc_host_data): New function.
5926 (c_parser_omp_construct): Add host_data support.
5927 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5928 * c-typeck.c (c_finish_oacc_host_data): New function.
5929 (c_finish_omp_clauses): Add use_device support.
5930
a4850ce9
JH
59312015-11-29 Jan Hubicka <hubicka@ucw.cz>
5932
5933 PR c/67106
5934 * c-decl.c: Set TYPE_PACKED in variants.
5935
b58d3df2
ML
59362015-11-27 Martin Liska <mliska@suse.cz>
5937
5938 PR c++/68312
5939 * c-array-notation.c (fix_builtin_array_notation_fn):
5940 Use release_vec_vec instead of vec::release.
5941 (build_array_notation_expr): Likewise.
5942 (fix_conditional_array_notations_1): Likewise.
5943 (fix_array_notation_expr): Likewise.
5944 (fix_array_notation_call_expr): Likewise.
5945
aec17bfe
JJ
59462015-11-27 Jakub Jelinek <jakub@redhat.com>
5947
5948 PR c/63326
5949 * c-parser.c (c_parser_compound_statement_nostart): If
5950 last_label is true, use pragma_stmt instead of pragma_compound
5951 as second c_parser_pragma argument.
5952 (c_parser_omp_ordered, c_parser_omp_target_update,
5953 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5954 false as second argument to c_parser_skip_to_pragma_eol after
5955 diagnosing standalone directives used in pragma_stmt context.
5956
688c4de0
IV
59572015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5958
5959 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5960 with "if (ENABLE_OFFLOADING)".
5961
cbd03aee
DM
59622015-11-23 David Malcolm <dmalcolm@redhat.com>
5963
5964 PR objc/68438
5965 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5966 for various Objective-C constructs: Class.name syntax,
5967 @selector(), @protocol(), @encode(), and [] message syntax.
5968
a87a86e1
DM
59692015-11-20 David Malcolm <dmalcolm@redhat.com>
5970
5971 PR 62314
5972 * c-typeck.c (should_suggest_deref_p): New function.
5973 (build_component_ref): Special-case POINTER_TYPE when
5974 generating a "not a structure of union" error message, and
5975 suggest a "->" rather than a ".", providing a fix-it hint.
5976
8ece8dfb
DM
59772015-11-19 David Malcolm <dmalcolm@redhat.com>
5978
5979 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5980 candidate into a new function, find_closest_identifier.
5981
433068cc
MP
59822015-11-19 Marek Polacek <polacek@redhat.com>
5983
5984 PR c/68412
5985 * c-typeck.c (parser_build_binary_op): Properly handle
5986 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5987
bef08b71
DM
59882015-11-17 David Malcolm <dmalcolm@redhat.com>
5989
5990 * c-parser.c (set_c_expr_source_range): Bulletproof both
5991 overloaded implementations against NULL expr->value.
5992 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5993 values.
5994 (c_parser_unary_expression): Likewise when handling addresses of
5995 labels.
5996 (c_parser_postfix_expression): Likewise for statement expressions,
5997 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5998 __builtin_va_arg, and for __builtin_offset_of.
5999 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6000 src_range using the range of the braced initializer.
6001 (c_parser_transaction_expression): Set src_range for "ret" to a
6002 sane pair of values.
6003
fff77217
KY
60042015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6005
6006 * c-parser.c (c_finish_omp_declare_simd): Look for
6007 "simd" attribute as well. Update error message.
6008
1d899da2
TS
60092015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6010
6011 * c-parser.c (c_parser_omp_declare_target): Adjust.
6012
e4606348
JJ
60132015-11-14 Jakub Jelinek <jakub@redhat.com>
6014
6015 * c-typeck.c (c_finish_omp_clauses): Don't mark
6016 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6017
3e636daf
MP
60182015-11-14 Marek Polacek <polacek@redhat.com>
6019
6020 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6021 * c-typeck.c: Likewise.
6022
ebedc9a3
DM
60232015-11-13 David Malcolm <dmalcolm@redhat.com>
6024
6025 * c-decl.c (warn_defaults_to): Pass line_table to
6026 rich_location ctor.
6027 * c-errors.c (pedwarn_c99): Likewise.
6028 (pedwarn_c90): Likewise.
6029 * c-parser.c (set_c_expr_source_range): New functions.
6030 (c_token::get_range): New method.
6031 (c_token::get_finish): New method.
6032 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6033 based on the range from the start of the LHS to the end of the
6034 RHS.
6035 (c_parser_conditional_expression): Likewise, based on the range
6036 from the start of the cond.value to the end of exp2.value.
6037 (c_parser_binary_expression): Call set_c_expr_source_range on
6038 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6039 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6040 based on the cast_loc through to the end of the expr.
6041 (c_parser_unary_expression): Likewise, based on the
6042 op_loc through to the end of op.
6043 (c_parser_sizeof_expression) Likewise, based on the start of the
6044 sizeof token through to either the closing paren or the end of
6045 expr.
6046 (c_parser_postfix_expression): Likewise, using the token range,
6047 or from the open paren through to the close paren for
6048 parenthesized expressions.
6049 (c_parser_postfix_expression_after_primary): Likewise, for
6050 various kinds of expression.
6051 * c-tree.h (struct c_expr): Add field "src_range".
6052 (c_expr::get_start): New method.
6053 (c_expr::get_finish): New method.
6054 (set_c_expr_source_range): New decls.
6055 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6056 on ret for prefix unary ops.
6057 (parser_build_binary_op): Likewise, running from the start of
6058 arg1.value through to the end of arg2.value.
6059
ec8b536f
MP
60602015-11-13 Marek Polacek <polacek@redhat.com>
6061
6062 PR c/68320
6063 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6064
277fe616
DM
60652015-11-13 David Malcolm <dmalcolm@redhat.com>
6066
6067 * c-typeck.c: Include spellcheck.h.
6068 (lookup_field_fuzzy_find_candidates): New function.
6069 (lookup_field_fuzzy): New function.
6070 (build_component_ref): If the field was not found, try using
6071 lookup_field_fuzzy and potentially offer a suggestion.
6072
6e232ba4
JN
60732015-11-12 James Norris <jnorris@codesourcery.com>
6074 Joseph Myers <joseph@codesourcery.com>
6075
6076 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6077 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6078 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6079 and PRAGMA_OMP_CLAUSE_LINK.
6080 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6081 and PRAGMA_OACC_CLAUSE_LINK.
6082 (OACC_DECLARE_CLAUSE_MASK): New definition.
6083 (c_parser_oacc_declare): New function.
6084
9be4f715
MP
60852015-11-12 Marek Polacek <polacek@redhat.com>
6086
6087 PR c/67784
6088 * c-parser.c (c_parser_for_statement): Reclassify the token in
6089 a correct scope.
6090
e78bede6
MP
60912015-11-11 Marek Polacek <polacek@redhat.com>
6092
6093 PR c/68107
6094 PR c++/68266
6095 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6096 checking the size of an array.
6097
69f293c9
AM
60982015-11-11 Andrew MacLeod <amacleod@redhat.com>
6099
6100 * c-array-notation.c: Remove unused header files.
6101 * c-aux-info.c: Likewise.
6102 * c-convert.c: Likewise.
6103 * c-decl.c: Likewise.
6104 * c-errors.c: Likewise.
6105 * c-lang.c: Likewise.
6106 * c-objc-common.c: Likewise.
6107 * c-parser.c: Likewise.
6108 * c-typeck.c: Likewise.
6109 * gccspec.c: Likewise.
6110
3a40d81d
NS
61112015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6112 Cesar Philippidis <cesar@codesourcery.com>
6113 James Norris <jnorris@codesourcery.com>
6114 Julian Brown <julian@codesourcery.com>
6115 Nathan Sidwell <nathan@codesourcery.com>
6116
3a40d81d
NS
6117 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6118 routine arg.
6119 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6120 (c_parser_pragma): Parse 'acc routine'.
6121 (OACC_ROUTINE_CLAUSE_MARK): Define.
6122 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6123
fc402eec
AA
61242015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6125
6126 PR debug/67192
6127 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6128 location of the backward-goto to the start of the loop body.
6129
f6b0b3db
AA
61302015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6131
6132 PR debug/67192
6133 * c-parser.c (c_parser_while_statement): Finish the loop before
6134 parsing ahead for misleading indentation.
6135 (c_parser_for_statement): Likewise.
6136
ee45a32d
EB
61372015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6138
6139 * c-decl.c (finish_struct): If the structure has reverse storage
6140 order, rewrite the type of array fields with scalar component. Call
6141 maybe_apply_pragma_scalar_storage_order on entry.
6142 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6143 errors on bit-fields and reverse SSO here and not...
6144 (c_mark_addressable): ...here.
6145 (output_init_element): Adjust call to initializer_constant_valid_p.
6146 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6147
8a645150
DM
61482015-11-06 David Malcolm <dmalcolm@redhat.com>
6149
6150 * c-decl.c (warn_defaults_to): Update for change in signature
6151 of diagnostic_set_info.
6152 * c-errors.c (pedwarn_c99): Likewise.
6153 (pedwarn_c90): Likewise.
6154 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6155 for textinfo::set_location.
6156
7a5e4956
CP
61572015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6158 Thomas Schwinge <thomas@codesourcery.com>
6159 James Norris <jnorris@codesourcery.com>
6160
6161 * c-parser.c (c_parser_omp_clause_name): Add support for
6162 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6163 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6164 default(none) in OpenACC.
6165 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6166 arguments.
6167 (c_parser_oacc_clause_tile): New function.
6168 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6169 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6170 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6171 TILE}.
6172 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6173 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6174 FIRSTPRIVATE}.
6175 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6176 (c_parser_oacc_update): Update the error message for missing clauses.
6177 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6178 and OMP_CLAUSE_INDEPENDENT.
6179
bfcfbfa0
MP
61802015-11-05 Marek Polacek <polacek@redhat.com>
6181
6182 PR c/68090
6183 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6184 deal with pre-evaluation on invalid types.
6185
e01d41e5
JJ
61862015-11-05 Jakub Jelinek <jakub@redhat.com>
6187 Ilya Verbin <ilya.verbin@intel.com>
6188
6189 * c-parser.c: Include context.h and gimple-expr.h.
6190 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6191 monotonic together with nonmonotonic.
6192 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6193 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6194 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6195 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6196 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6197 expressions on combined target teams before the target.
6198 (c_parser_omp_declare_target): If decl has "omp declare target" or
6199 "omp declare target link" attribute, and cgraph or varpool node already
6200 exists, then set corresponding flags. Call c_finish_omp_clauses
6201 in the parenthesized extended-list syntax case.
6202 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6203 declare target.
6204 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6205 on OMP_CLAUSE_REDUCTION array sections.
6206 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6207 into the constant offset, or for variable low-bound using
6208 POINTER_PLUS_EXPR. For structure element based array sections use
6209 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6210 (c_finish_omp_clauses): Drop generic_field_head, structure
6211 elements are now always mapped even as array section bases,
6212 diagnose same var in data sharing and mapping clauses. Diagnose if
6213 linear step on declare simd is neither a constant nor a uniform
6214 parameter. Look through POINTER_PLUS_EXPR for array section
6215 reductions. Diagnose the same var or function appearing multiple
6216 times on the same directive. Fix up wording for the to clause if t
6217 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6218 modifier on kinds other than dynamic or guided or nonmonotonic
6219 modifier together with ordered clause.
6220
4bf9e5a8
TS
62212015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6222 Chung-Lin Tang <cltang@codesourcery.com>
6223
6224 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6225
2adfab87
AM
62262015-10-29 Andrew MacLeod <amacleod@redhat.com>
6227
6228 * c-array-notation.c: Reorder #include's and remove duplicates.
6229 * c-aux-info.c: Likewise.
6230 * c-convert.c: Likewise.
6231 * c-decl.c: Likewise.
6232 * c-errors.c: Likewise.
6233 * c-lang.c: Likewise.
6234 * c-objc-common.c: Likewise.
6235 * c-parser.c: Likewise.
6236 * c-typeck.c: Likewise.
6237
e922069e
JW
62382015-10-26 Jim Wilson <jim.wilson@linaro.org>
6239
6240 PR debug/66068
6241 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6242 after calling build_qualified_type.
6243
765dd391
CP
62442015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6245 Thomas Schwinge <thomas@codesourcery.com>
6246 James Norris <jnorris@codesourcery.com>
6247 Joseph Myers <joseph@codesourcery.com>
6248 Julian Brown <julian@codesourcery.com>
6249 Bernd Schmidt <bschmidt@redhat.com>
6250
6251 * c-parser.c (c_parser_oacc_shape_clause): New.
6252 (c_parser_oacc_simple_clause): New.
6253 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6254 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6255
88bae6f4
TS
62562015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6257 James Norris <jnorris@codesourcery.com>
6258 Cesar Philippidis <cesar@codesourcery.com>
6259
6260 PR c/64765
6261 PR c/64880
6262 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6263 parameters, and handle these. Adjust all users.
6264 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6265 into...
6266 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6267 all users.
6268 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6269 declare functions.
6270 (c_finish_omp_construct): Declare function.
6271 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6272 Merge functions into...
6273 (c_finish_omp_construct): ... this new function.
6274
a8fc2579
RB
62752015-10-22 Richard Biener <rguenther@suse.de>
6276
6277 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6278 before folding a MINUS_EXPR.
6279
e9122ef6
MP
62802015-10-21 Marek Polacek <polacek@redhat.com>
6281
6282 PR c/68024
6283 * c-decl.c (start_function): Warn about vararg functions without
6284 a prototype.
6285
9f47c7e5
IE
62862015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6287
6288 * c-typeck.c (build_conditional_expr): Use boolean vector
6289 type for vector comparison.
6290 (build_vec_cmp): New.
6291 (build_binary_op): Use build_vec_cmp for comparison.
6292
fa60eeb9
MP
62932015-10-20 Marek Polacek <polacek@redhat.com>
6294
6295 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6296
2c7020eb
MP
62972015-10-20 Marek Polacek <polacek@redhat.com>
6298
6299 PR c/67964
6300 * c-parser.c (c_parser_attributes): Break out of the loop if the
6301 token after an attribute isn't a comma.
6302
d9a6bd32
JJ
63032015-10-13 Jakub Jelinek <jakub@redhat.com>
6304 Aldy Hernandez <aldyh@redhat.com>
6305
6306 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6307 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6308 (c_parser_omp_variable_list): Handle structure elements for
6309 map, to and from clauses. Handle array sections in reduction
6310 clause. Formatting fixes.
6311 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6312 if clause modifiers.
6313 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6314 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6315 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6316 c_parser_omp_clause_is_device_ptr): New functions.
6317 (c_parser_omp_clause_ordered): Parse optional parameter.
6318 (c_parser_omp_clause_reduction): Handle array reductions.
6319 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6320 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6321 functions.
6322 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6323 (c_parser_omp_clause_depend_sink): New function.
6324 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6325 (c_parser_omp_clause_map): Parse release/delete map kinds and
6326 optional always modifier.
6327 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6328 and c_finish_omp_clauses callers.
6329 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6330 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6331 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6332 (OMP_CRITICAL_CLAUSE_MASK): Define.
6333 (c_parser_omp_critical): Parse critical clauses.
6334 (c_parser_omp_for_loop): Handle doacross loops, adjust
6335 c_finish_omp_for and c_finish_omp_clauses callers.
6336 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6337 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6338 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6339 (c_parser_omp_for): Disallow ordered clause when combined with
6340 distribute. Disallow linear clause when combined with distribute
6341 and not combined with simd.
6342 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6343 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6344 parse clauses and if depend clause is found, don't parse a body.
6345 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6346 Allow target parallel without for after it.
6347 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6348 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6349 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6350 invalid kinds.
6351 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6352 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6353 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6354 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6355 functions.
6356 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6357 defaultmap and is_device_ptr clauses.
6358 (c_parser_omp_target): Parse target parallel and target simd. Set
6359 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6360 and target exit data. Diagnose invalid map kinds.
6361 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6362 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6363 construct.
6364 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6365 &omp_priv.
6366 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6367 (c_parser_omp_taskloop): New function.
6368 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6369 handle PRAGMA_OMP_TASKLOOP.
6370 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6371 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6372 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6373 Add IS_OMP argument, handle structure element bases, diagnose
6374 bitfields, pass IS_OMP recursively, diagnose known zero length
6375 array sections in depend clauses, handle array sections in reduction
6376 clause, diagnose negative length even for pointers.
6377 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6378 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6379 array sections in reduction clause, set
6380 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6381 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6382 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6383 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6384
21ba0cea
MP
63852015-10-06 Marek Polacek <polacek@redhat.com>
6386
6387 * c-parser.c (c_parser_statement_after_labels): Use
6388 protected_set_expr_location.
6389 (c_parser_omp_clause_num_gangs): Likewise.
6390 (c_parser_omp_clause_num_threads): Likewise.
6391 (c_parser_omp_clause_num_workers): Likewise.
6392 (c_parser_omp_clause_vector_length): Likewise.
6393 (c_parser_omp_clause_num_teams): Likewise.
6394 (c_parser_omp_clause_thread_limit): Likewise.
6395 * c-typeck.c (build_c_cast): Likewise.
6396 (c_cast_expr): Likewise.
6397
624d31fe
RS
63982015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6399
6400 * c-typeck.c (c_tree_equal): Use real_equal instead of
6401 REAL_VALUES_EQUAL.
6402
b8fd7909
JM
64032015-10-04 Jason Merrill <jason@redhat.com>
6404
6405 * c-parser.c (c_lex_one_token): Handle @synchronized.
6406 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6407 can change whether the function is transaction_safe.
6408
1c7485af
MP
64092015-10-02 Marek Polacek <polacek@redhat.com>
6410
6411 PR c/67730
6412 * c-typeck.c (convert_for_assignment): Use the expansion point
6413 location throughout.
6414
3e3b8d63
MP
64152015-10-02 Marek Polacek <polacek@redhat.com>
6416
6417 PR c/64249
6418 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6419 and pass it down to c_parser_if_statement.
6420 (c_parser_else_body): Add CHAIN parameter and pass it down to
6421 c_parser_statement_after_labels.
6422 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6423 duplicated if-else-if conditions.
6424
aabef2de
MP
64252015-10-01 Marek Polacek <polacek@redhat.com>
6426
6427 * c-typeck.c (convert_for_assignment): Improve commentary.
6428
de8ddd5f
MP
64292015-09-30 Marek Polacek <polacek@redhat.com>
6430
6431 PR c/67730
6432 * c-typeck.c (c_finish_return): Use the expansion point location for
6433 certain "return with value" warnings.
6434
c4914de6
MLI
64352015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6436
6437 * c-parser.c (pragma_lex): Add loc argument.
6438
0e36f5c7
MP
64392015-09-15 Marek Polacek <polacek@redhat.com>
6440
6441 PR c/67580
6442 * c-decl.c (tag_exists_p): New function.
6443 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6444 struct/union/enum keywords are missing.
6445 * c-tree.h (tag_exists_p): Declare.
6446
2f3bb934
MP
64472015-09-15 Marek Polacek <polacek@redhat.com>
6448
6449 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6450 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6451 Return NULL_TREE instead of 0.
6452 (lookup_name): Return NULL_TREE instead of 0.
6453 (lookup_name_in_scope): Likewise.
6454 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6455 (parser_xref_tag): Use false instead of 0.
6456 (start_struct): Use true instead of 1.
6457 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6458
aa256c4a
MP
64592015-09-14 Marek Polacek <polacek@redhat.com>
6460
6461 * c-typeck.c (set_nonincremental_init_from_string): Use
6462 HOST_WIDE_INT_M1U when shifting a negative value.
6463
dbb68221
MW
64642015-09-09 Mark Wielaard <mjw@redhat.com>
6465
6466 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6467 parm against NULL.
6468
a8a098ac
JJ
64692015-09-10 Jakub Jelinek <jakub@redhat.com>
6470
6471 PR c/67502
6472 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6473 into OMP_FOR_PRE_BODY rather than before the loop.
6474
f4b189d5
JJ
64752015-09-09 Jakub Jelinek <jakub@redhat.com>
6476
0bb99c11
JJ
6477 PR c/67501
6478 * c-parser.c (c_parser_oacc_all_clauses,
6479 c_parser_omp_all_clauses): Remove invalid clause from
6480 list of clauses even if parser->error is set.
6481
fce5e5e3
JJ
6482 PR c/67500
6483 * c-parser.c (c_parser_omp_clause_aligned,
6484 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6485 test for errors.
6486 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6487 error_mark_node.
6488
f4b189d5
JJ
6489 PR c/67495
6490 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6491 instead of c_parser_unary_expression. If the result is !lvalue_p,
6492 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6493
b2aaf235
MP
64942015-09-04 Marek Polacek <polacek@redhat.com>
6495
6496 PR sanitizer/67279
6497 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6498
1807ffc1
MS
64992015-09-03 Martin Sebor <msebor@redhat.com>
6500
6501 PR c/66516
8b652e65
JJ
6502 * c-typeck.c (convert_arguments, parser_build_unary_op,
6503 build_conditional_expr, c_cast_expr, convert_for_assignment,
6504 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6505 reject_gcc_builtin.
6506 (c_decl_implicit): Define.
6507
d04ff417
MP
65082015-09-02 Marek Polacek <polacek@redhat.com>
6509
6510 PR c/67432
6511 * c-parser.c (c_parser_enum_specifier): Give a better error for
6512 an empty enum.
6513
a79683d5
TS
65142015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6515
6516 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6517
191a6b94
MP
65182015-08-12 Marek Polacek <polacek@redhat.com>
6519
6520 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6521 LOC to it.
6522
420a9d9b
MP
65232015-08-03 Marek Polacek <polacek@redhat.com>
6524
6525 PR c/67088
6526 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6527 Use it.
6528 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6529
992118a1
PP
65302015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6531
6532 * c-parser.c (c_parser_if_body): Take token_indent_info
6533 argument. Call warn_for_misleading_indentation even when the
6534 body is a semicolon. Extract token_indent_infos corresponding
6535 to the guard, body and next tokens. Adjust call to
6536 warn_for_misleading_indentation accordingly.
6537 (c_parser_else_body): Likewise.
6538 (c_parser_if_statement): Likewise.
6539 (c_parser_while_statement): Likewise.
6540 (c_parser_for_statement): Likewise.
6541
46308474
LFSM
65422015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6543 Manuel López-Ibáñez <manu@gcc.gnu.org>
6544
6545 * c-decl.c (get_parm_info): Remove static var. Update warning
6546 message.
6547
05b28fd6
MP
65482015-07-27 Marek Polacek <polacek@redhat.com>
6549
6550 PR c++/66555
6551 PR c/54979
6552 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6553
451b5e48
MP
65542015-07-20 Marek Polacek <polacek@redhat.com>
6555
6556 PR c++/55095
6557 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6558 (build_binary_op): Warn about left shift overflows.
6559
1916bcb5
AM
65602015-07-09 Andrew MacLeod <amacleod@redhat.com>
6561
6562 * c-array-notation.c: Adjust includes for flags.h changes.
6563 * c-objc-common.c: Likewise.
6564
c7131fb2
AM
65652015-07-07 Andrew MacLeod <amacleod@redhat.com>
6566
6567 * c-array-notation.c: Adjust includes.
6568 * c-aux-info.c: Likewise.
6569 * c-convert.c: Likewise.
6570 * c-decl.c: Likewise.
6571 * c-errors.c: Likewise.
6572 * c-lang.c: Likewise.
6573 * c-objc-common.c: Likewise.
6574 * c-parser.c: Likewise.
6575 * c-typeck.c: Likewise.
6576
da2e71c9
MLI
65772015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6578
6579 PR fortran/66605
6580 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6581
b155cfd9
MP
65822015-06-29 Marek Polacek <polacek@redhat.com>
6583
6584 PR c/66322
6585 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6586 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6587 about -Wswitch-bool here.
6588 (do_case): Update c_add_case_label call.
6589 (c_finish_case): Update c_do_switch_warnings call.
6590
31521951
MP
65912015-06-27 Marek Polacek <polacek@redhat.com>
6592
6593 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6594
22d03525
MP
65952015-06-26 Marek Polacek <polacek@redhat.com>
6596
6597 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6598 INDIRECT_REF_P.
6599 * c-typeck.c (array_to_pointer_conversion): Likewise.
6600 (build_unary_op): Likewise.
6601 (c_finish_return): Likewise.
6602
f0889939
AM
66032015-06-25 Andrew MacLeod <amacleod@redhat.com>
6604
6605 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6606 * c-parser.c: Likewise.
6607
8d67ee55
RS
66082015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6609
6610 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6611 instead of pointer_hash.
6612 (detect_field_duplicates): Likewise.
6613
0ae9bd27
MP
66142015-06-25 Marek Polacek <polacek@redhat.com>
6615
6616 * c-array-notation.c: Use VAR_P throughout.
6617 * c-decl.c: Likewise.
6618 * c-objc-common.c: Likewise.
6619 * c-parser.c: Likewise.
6620 * c-typeck.c: Likewise.
6621
62f9079a
MP
66222015-06-25 Marek Polacek <polacek@redhat.com>
6623
6624 * c-decl.c: Use is_global_var throughout.
6625 * c-parser.c: Likewise.
6626 * c-typeck.c: Likewise.
6627
abb226c9
AM
66282015-06-17 Andrew MacLeod <amacleod@redhat.com>
6629
6630 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6631 * c-aux-info.c: Likewise.
6632 * c-convert.c: Likewise.
6633 * c-decl.c: Likewise.
6634 * c-errors.c: Likewise.
6635 * c-lang.c: Likewise.
6636 * c-objc-common.c: Likewise.
6637 * c-parser.c: Likewise.
6638 * c-typeck.c: Likewise.
6639
8cbababc
JH
66402015-06-11 Jan Hubicka <hubicka@ucw.cz>
6641
6642 PR middle-end/66325
6643 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6644 variants.
6645
a0349665
PMR
66462015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6647
6648 * c-decl.c (pop_scope): Register the main translation unit
6649 through the new debug hook.
6650
13fdf2e2
AM
66512015-06-08 Andrew MacLeod <amacleod@redhat.com>
6652
6653 * c-array-notation.c : Adjust include files.
6654 * c-aux-info.c : Likewise.
6655 * c-convert.c : Likewise.
6656 * c-decl.c : Likewise.
6657 * c-errors.c : Likewise.
6658 * c-lang.c : Likewise.
6659 * c-lang.h : Likewise.
6660 * c-objc-common.c : Likewise.
6661 * c-parser.c : Likewise.
6662 * c-typeck.c : Likewise.
6663
d7438551
AH
66642015-06-05 Aldy Hernandez <aldyh@redhat.com>
6665
6666 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6667 immediately clobber it.
6668 (c_write_global_declarations_1): Remove call to
6669 check_global_declaration_1.
6670 (c_write_global_declarations_2): Remove.
6671 (c_write_final_cleanups): Rename from c_write_global_declarations.
6672 Remove call to finalize_compilation_unit.
6673 Remove calls to debugging hooks.
6674 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6675 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6676 * c-tree.h: Remove c_write_global_declarations.
6677
ecb9f223
AM
66782015-06-04 Andrew MacLeod <amacleod@redhat.com>
6679
6680 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6681 * c-aux-info.c: Likewise.
6682 * c-convert.c: Likewise.
6683 * c-decl.c: Likewise.
6684 * c-errors.c: Likewise.
6685 * c-lang.c: Likewise.
6686 * c-objc-common.c: Likewise.
6687 * c-parser.c: Likewise.
6688 * c-typeck.c: Likewise.
6689
9482b620
MP
66902015-06-04 Marek Polacek <polacek@redhat.com>
6691
6692 PR c/66341
6693 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6694 it is a lvalue.
6695
bc51ace3
PK
66962015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6697
6698 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6699 Warn for empty struct.
6700 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6701
ea5b45b6
AT
67022015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6703
6704 * c-decl.c (start_function): Call plugin before parsing.
6705 (finish_function): Call plugin after parsing.
6706
c2d47482
PK
67072015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6708
6709 PR c/49551
6710 * c-decl.c (merge_decls): Merge DECL_COMMON.
6711
a95492ab
JW
67122015-05-22 Jim Wilson <jim.wilson@linaro.org>
6713
6714 * Make-lang.in (check_gcc_pallelize): Define.
6715
fd5c817a
MP
67162015-05-22 Marek Polacek <polacek@redhat.com>
6717
6718 PR c/47043
6719 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6720 attributes.
6721
c7b70a3c
MP
67222015-05-21 Marek Polacek <polacek@redhat.com>
6723
6724 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6725 DECL_BUILT_IN.
6726
21b634ae
MP
67272015-05-20 Marek Polacek <polacek@redhat.com>
6728
6729 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6730 * c-typeck.c: Likewise.
6731
296a8c2f
MP
67322015-05-19 Marek Polacek <polacek@redhat.com>
6733
6734 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6735
41b37d5e
JJ
67362015-05-19 Jakub Jelinek <jakub@redhat.com>
6737
6738 PR middle-end/66199
6739 * c-parser.c (c_parser_omp_for_loop): Don't add
6740 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6741 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6742 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6743 constructs.
6744
fab27f52
MM
67452015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6746
6747 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6748 swaps.
fab27f52 6749
40de31cf
MLI
67502015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6751
6752 PR fortran/44054
6753 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6754 accessor function.
6755
3aa3c9fc
MP
67562015-05-14 Marek Polacek <polacek@redhat.com>
6757
6758 PR c/66066
6759 PR c/66127
6760 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6761 rather than with 0.
6762
c3388e62
DM
67632015-05-12 David Malcolm <dmalcolm@redhat.com>
6764
6765 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6766 to add a call to warn_for_misleading_indentation.
6767 (c_parser_else_body): Likewise, adding param "else_loc".
6768 (c_parser_if_statement): Check for misleading indentation.
6769 (c_parser_while_statement): Likewise.
6770 (c_parser_for_statement): Likewise.
6771
755e528f
MP
67722015-05-08 Marek Polacek <polacek@redhat.com>
6773
6774 PR c/64918
6775 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6776 (output_init_element): Likewise.
6777
0173bd2a
MP
67782015-05-07 Marek Polacek <polacek@redhat.com>
6779
6780 PR c/65179
6781 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6782 value.
6783
9babc352
MP
67842015-04-30 Marek Polacek <polacek@redhat.com>
6785
6786 * c-typeck.c (set_init_label): Call error_at instead of error and
6787 pass LOC to it.
6788
ac9f18db
MP
6789 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6790 the type of a decl.
6791
ec3fba51
MP
6792 * c-typeck.c (c_build_va_arg): Clarify the error message.
6793
b811915d
TS
67942015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6795
6796 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6797 OMP_STANDALONE_CLAUSES.
6798
f3075008
MP
67992015-04-28 Marek Polacek <polacek@redhat.com>
6800
6801 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6802
4e81b788
MP
68032015-04-28 Marek Polacek <polacek@redhat.com>
6804
6805 PR c/65901
6806 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6807
6c1db78e
MP
68082015-04-25 Marek Polacek <polacek@redhat.com>
6809
6810 PR c/52085
6811 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6812 attribute.
6813
5c4abbb8
MP
68142015-04-23 Marek Polacek <polacek@redhat.com>
6815
6816 PR c/65345
6817 * c-decl.c (set_labels_context_r): New function.
6818 (store_parm_decls): Call it via walk_tree_without_duplicates.
6819 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6820 instead of create_tmp_var. Build TARGET_EXPR instead of
6821 COMPOUND_EXPR.
6822 (build_atomic_assign): Use create_tmp_var_raw instead of
6823 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6824
06aca1d5
IV
68252015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6826
6827 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6828 (c_parser_omp_target_update): Add missed %> to error_at ().
6829
8fba1830
BRF
68302015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6831
6832 PR target/55143
6833 * c-decl.c (c_default_pointer_mode): Remove definition.
6834 * c-tree.h (c_default_pointer_mode): Remove declaration.
6835
62021f64
TB
68362015-03-27 Tobias Burnus <burnus@net-b.de>
6837
6838 PR c/65586
6839 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6840 error out.
6841 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6842 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6843 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6844
9b65e171
JJ
68452015-03-19 Jakub Jelinek <jakub@redhat.com>
6846
6847 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6848 attribute for DECL_EXTERNAL VAR_DECLs.
6849
17958621
JJ
68502015-03-11 Jakub Jelinek <jakub@redhat.com>
6851
6852 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6853 argument.
6854
7ccb1a11
JJ
68552015-03-10 Jakub Jelinek <jakub@redhat.com>
6856
6857 PR c/65120
6858 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6859 before preparing arguments to warn_logical_not_parentheses.
6860
01177669
JJ
68612015-03-09 Jakub Jelinek <jakub@redhat.com>
6862
6863 PR c/65120
6864 * c-typeck.c (parser_build_binary_op): Don't warn for
6865 !!x == y or !b == y where b is _Bool.
6866
802ac282
MP
68672015-03-09 Marek Polacek <polacek@redhat.com>
6868
6869 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6870 * c-decl.c (grokdeclarator): Likewise.
6871 * c-typeck.c (build_binary_op): Likewise.
6872
e5165b60
MP
68732015-02-27 Marek Polacek <polacek@redhat.com>
6874
6875 PR c/65228
6876 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6877
065d214c
MP
68782015-02-14 Marek Polacek <polacek@redhat.com>
6879
6880 PR c/64768
6881 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6882 declared through a typedef name.
6883
e5d9235b
MP
68842015-02-13 Marek Polacek <polacek@redhat.com>
6885
6886 PR c/65050
6887 * c-decl.c (grokdeclarator): Print also the type when giving
6888 the error message about array's incomplete element type.
6889
fa01ffcc
JJ
68902015-02-11 Jakub Jelinek <jakub@redhat.com>
6891
6892 PR c/64824
6893 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6894 check in the POP macro.
6895
c3e38a03
MP
68962015-02-09 Marek Polacek <polacek@redhat.com>
6897
6898 PR c/64856
6899 * c-typeck.c (process_init_element): Don't always wrap
6900 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6901 initializing a range of elements.
6902
4886ec8e
JJ
69032015-02-04 Jakub Jelinek <jakub@redhat.com>
6904
6905 PR c/64824
6906 PR c/64868
6907 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6908
c3e38a03 69092015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6910
6911 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6912 processing enum declaration.
6913
7b33f0c8
MP
69142015-01-29 Marek Polacek <polacek@redhat.com>
6915
6916 PR c/64709
6917 * c-typeck.c (pop_init_level): If constructor_elements has
6918 exactly one element with integer_zerop value, set constructor_zeroinit
6919 to 1. Remove braces around warning_init call.
6920
dea63e49
JJ
69212015-01-27 Jakub Jelinek <jakub@redhat.com>
6922
6923 PR c/64766
6924 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6925 of FUNCTION_DECLs with error_mark_node.
6926
d38f7dce
JJ
69272015-01-26 Jakub Jelinek <jakub@redhat.com>
6928
6929 PR c/64778
6930 * c-typeck.c (convert_arguments): Return -1 if there are
6931 error_args, even if we've diagnosed too many arguments.
6932
cbf5d0e7
RB
69332015-01-21 Richard Biener <rguenther@suse.de>
6934
6935 PR middle-end/64313
6936 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6937 for builtins the user declared correctly.
6938
41dbbb37
TS
69392015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6940 Bernd Schmidt <bernds@codesourcery.com>
6941 Cesar Philippidis <cesar@codesourcery.com>
6942 James Norris <jnorris@codesourcery.com>
6943 Jakub Jelinek <jakub@redhat.com>
6944 Ilmir Usmanov <i.usmanov@samsung.com>
6945
6946 * c-parser.c: Include "gomp-constants.h".
6947 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6948 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6949 Use OMP_CLAUSE_SET_MAP_KIND.
6950 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6951 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6952 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6953 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6954 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6955 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6956 "copyout", "create", "delete", "deviceptr", "gang", "host",
6957 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6958 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6959 "present_or_create", "pcreate", "seq", "self", "vector",
6960 "vector_length", "wait", "worker".
6961 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6962 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6963 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6964 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6965 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6966 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6967 (c_parser_oacc_data_clause_deviceptr)
6968 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6969 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6970 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6971 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6972 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6973 (c_parser_oacc_parallel, c_parser_oacc_update)
6974 (c_parser_oacc_wait): New functions.
6975 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6976 (c_finish_oacc_data): New prototypes.
6977 * c-typeck.c: Include "gomp-constants.h".
6978 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6979 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6980 OMP_CLAUSE_SET_MAP_KIND.
6981 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6982 (c_finish_oacc_data): New functions.
6983 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6984 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6985 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6986 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6987 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6988 GOMP_MAP_FORCE_DEVICEPTR.
6989
adfac8df
JJ
69902015-01-09 Michael Collison <michael.collison@linaro.org>
6991
6992 * c-array-notation.c: Include hash-set.h, machmode.h,
6993 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6994 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6995 * c-aux-info.c: Ditto.
6996 * c-convert.c: Ditto.
6997 * c-decl.c: Ditto.
6998 * c-errors.c: Ditto.
6999 * c-lang.c: Dittoxs.
7000 * c-objc-common.c: Ditto.
7001 * c-parser.c: Ditto.
7002 * c-typeck.c: Include hash-set.h, machmode.h,
7003 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7004 fold-const.h, wide-int.h, inchash.h, real.h and
7005 fixed-value.h due to flattening of tree.h.
7006
2cc901dc
MP
70072015-01-07 Marek Polacek <polacek@redhat.com>
7008
7009 PR c/64417
7010 * c-typeck.c (process_init_element): Disallow initialization of
7011 a flexible array member with a string constant if the structure
7012 is in an array.
7013
5624e564
JJ
70142015-01-05 Jakub Jelinek <jakub@redhat.com>
7015
e5341100
JJ
7016 PR sanitizer/64344
7017 * c-typeck.c (convert_for_assignment, c_finish_return): For
7018 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7019 types also set in_late_binary_op around convert call.
7020 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7021 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7022 result on expr as last argument to ubsan_instrument_float_cast,
7023 if in_late_binary_op, don't use c_save_expr but save_expr.
7024
5624e564
JJ
7025 Update copyright years.
7026
5bd012f8
MP
70272015-01-05 Marek Polacek <polacek@redhat.com>
7028
7029 PR c/64423
7030 * c-typeck.c (build_array_ref): Pass loc down to
7031 warn_array_subscript_with_type_char.
7032
3f8257db 70332014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7034
7035 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 7036 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 7037 element type.
8e745a17 7038 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 7039 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 7040 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 7041 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 7042 to PEDWARN_FOR_QUALIFIERS.
768952be 7043
8f94a8c4
JJ
70442014-12-17 Jakub Jelinek <jakub@redhat.com>
7045
7046 PR sanitizer/64289
7047 * c-convert.c: Include ubsan.h.
7048 (convert): For real -> integral casts and
7049 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7050 instead instrument the float cast directly.
7051
b731b390
JJ
70522014-11-29 Jakub Jelinek <jakub@redhat.com>
7053
7054 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7055 c_finish_stmt_expr): Remove NULL last argument from
7056 create_tmp_var_raw and create_tmp_var calls.
7057 * c-array-notation.c (fix_builtin_array_notation_fn,
7058 build_array_notation_expr, fix_conditional_array_notations_1,
7059 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7060
541e35a6
MP
70612014-11-28 Marek Polacek <polacek@redhat.com>
7062
7063 PR c/63862
7064 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7065 convert the right operand to integer type.
7066
b286be94
MP
70672014-11-25 Marek Polacek <polacek@redhat.com>
7068
7069 PR c/63877
7070 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7071 for inline functions.
7072
aa7da51a
JJ
70732014-11-21 Jakub Jelinek <jakub@redhat.com>
7074
7075 PR target/63764
7076 * c-typeck.c (build_array_ref): Adjust
7077 convert_vector_to_pointer_for_subscript caller. If it returns true,
7078 call non_lvalue_loc on the result.
7079
d876207f
RB
70802014-11-11 Richard Biener <rguenther@suse.de>
7081
7082 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7083 to true.
7084
e5e44252
AK
70852014-11-10 Andi Kleen <ak@linux.intel.com>
7086
7087 PR c/60804
7088 * c-parser.c (c_parser_statement_after_labels): Call
7089 check_no_cilk.
7090 (c_parser_if_statement): Dito.
7091 (c_parser_switch_statement): Dito.
7092 (c_parser_while_statement): Dito.
7093 (c_parser_do_statement): Dito.
7094 (c_parser_for_statement): Dito.
7095 * c-typeck.c (c_finish_loop): Dito.
7096
13c21655
PC
70972014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7098
7099 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7100 OPT_Wshift_count_overflow in the warnings.
7101
2d51fcef
MP
71022014-10-30 Marek Polacek <polacek@redhat.com>
7103
7104 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7105 print the stripped version as well, if they're not the same.
7106
ef4bddc2
RS
71072014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7108
7109 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7110 machine_mode.
7111
c582198b
AM
71122014-10-28 Andrew MacLeod <amacleod@redhat.com>
7113
7114 * c-decl.c: Adjust include files.
7115 * c-parser.c: Ditto.
7116
ddc8de03
PM
71172014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7118 Tom Tromey <tromey@redhat.com>
7119
7120 * c-tree.h (enum c_oracle_request): New.
7121 (c_binding_oracle_function): New typedef.
7122 (c_binding_oracle, c_pushtag, c_bind): Declare.
7123 * c-decl.c (c_binding_oracle): New global.
7124 (I_SYMBOL_CHECKED): New macro.
7125 (i_symbol_binding): New function.
7126 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7127 (I_TAG_CHECKED): New macro.
7128 (i_tag_binding): New function.
7129 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7130 (I_LABEL_CHECKED): New macro.
7131 (i_label_binding): New function.
7132 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7133 (c_print_identifier): Save and restore c_binding_oracle.
7134 (c_pushtag, c_bind): New functions.
7135
60393bbc
AM
71362014-10-27 Andrew MacLeod <amacleod@redhat.com>
7137
7138 * c-typeck.c: Adjust include files.
7139
d723bb7c
MLI
71402014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7141
7142 PR c++/53061
7143 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7144 initialization here...
7145 (c_initialize_diagnostics): ... but here. Set defaults after
7146 building pretty-printer.
7147
1bc5a451
MP
71482014-10-23 Marek Polacek <polacek@redhat.com>
7149
7150 PR c/63626
7151 * c-decl.c (pop_scope): Don't print warning in external_scope.
7152
4435bb92
MP
71532014-10-19 Marek Polacek <polacek@redhat.com>
7154
7155 PR c/63567
7156 * c-typeck.c (output_init_element): Allow initializing objects with
7157 static storage duration with compound literals even in C99 and add
7158 pedwarn for it.
7159
7278465e
MP
71602014-10-17 Marek Polacek <polacek@redhat.com>
7161
7162 PR c/63567
7163 * c-typeck.c (digest_init): Allow initializing objects with static
7164 storage duration with compound literals even in C99 and add pedwarn
7165 for it.
7166
d9b7be2e
MP
71672014-10-17 Marek Polacek <polacek@redhat.com>
7168
7169 PR c/63543
7170 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7171 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7172 error multiple times. Print the type.
7173
f406ae1f
MP
71742014-10-17 Marek Polacek <polacek@redhat.com>
7175
7176 PR c/63549
7177 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7178 type.
7179
92574c7c
MP
71802014-10-17 Marek Polacek <polacek@redhat.com>
7181
7182 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7183 (start_function): Use OPT_Wimplicit_int instead of 0.
7184 (store_parm_decls_oldstyle): Likewise.
7185
1bc4a978
MT
71862014-10-17 Alan Modra <amodra@gmail.com>
7187
7188 PR middle-end/61848
7189 * c-decl.c (merge_decls): Don't merge section name or tls model
7190 to newdecl symtab node, instead merge to olddecl. Override
7191 existing olddecl section name. Set tls_model for all thread-local
7192 vars, not just OMP thread-private ones. Remove incorrect comment.
7193
83685514
AM
71942014-10-16 Andrew MacLeod <amacleod@redhat.com>
7195
7196 * c-decl.c: Adjust include files.
7197
78a7c317
DD
71982014-10-14 DJ Delorie <dj@redhat.com>
7199
7200 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7201 (c_token_starts_typename): Check all __intN, not just __int128.
7202 (c_token_starts_declspecs): Likewise.
7203 (c_parser_declspecs): Likewise.
7204 (c_parser_attribute_any_word): Likewise.
7205 (c_parser_objc_selector): Likewise.
7206 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7207 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7208 is specified.
7209 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7210 __int128.
7211 (finish_declspecs): Likewise.
7212
74d98c1e
AB
72132014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7214
8e745a17 7215 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 7216 the duplicate code.
8e745a17 7217 (c_parser_statement): Call the new function.
74d98c1e 7218
84937de2
MP
72192014-10-09 Marek Polacek <polacek@redhat.com>
7220
7221 PR c/63480
7222 * c-typeck.c (pop_init_level): Don't warn about initializing
7223 with { }.
7224
0382aaa0
MP
72252014-10-07 Marek Polacek <polacek@redhat.com>
7226
7227 PR c/59717
7228 * c-decl.c (header_for_builtin_fn): New function.
7229 (implicitly_declare): Suggest which header to include.
7230
7a0ca710
MP
72312014-10-07 Marek Polacek <polacek@redhat.com>
7232
7233 * c-convert.c (convert): Use error_operand_p.
7234 * c-typeck.c (require_complete_type): Likewise.
7235 (really_atomic_lvalue): Likewise.
7236 (digest_init): Likewise.
7237 (handle_omp_array_sections_1): Likewise.
7238
6bc8a126
MP
72392014-10-03 Marek Polacek <polacek@redhat.com>
7240
7241 PR c/63453
7242 * c-decl.c (pop_scope): Don't warn about "inline function declared
7243 but never defined" for functions marked with gnu_inline attribute.
7244
d90c0a59
JJ
72452014-09-25 Jakub Jelinek <jakub@redhat.com>
7246
7247 PR c++/63249
7248 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7249 on low_bound and length.
7250
083e891e
MP
72512014-09-24 Marek Polacek <polacek@redhat.com>
7252
7253 PR c/61405
7254 PR c/53874
7255 * c-parser.c: Don't define CPP_KEYWORD.
7256 (c_parser_switch_statement): Pass original type to c_finish_case.
7257 * c-tree.h (c_finish_case): Update declaration.
7258 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7259 conditionally to c_do_switch_warnings.
7260
8d95fe25
MP
72612014-09-03 Marek Polacek <polacek@redhat.com>
7262
7263 PR c/62024
7264 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7265 conversions.
7266
9a771876
JJ
72672014-09-02 Jakub Jelinek <jakub@redhat.com>
7268 Balaji V. Iyer <balaji.v.iyer@intel.com>
7269 Igor Zamyatin <igor.zamyatin@intel.com>
7270
7271 * c-parser.c (c_parser_cilk_for): New function.
7272 (c_parser_cilk_grainsize): Likewise.
7273 (c_get_temp_regvar): Likewise.
7274 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7275 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7276 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7277 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7278 case.
7279
b7679d96
CG
72802014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7281
7282 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7283 with using HOST_WIDE_INT without truncation to 'int'
7284
59ea0364
MP
72852014-08-22 Marek Polacek <polacek@redhat.com>
7286
7287 PR c++/62199
7288 * c-typeck.c (parser_build_binary_op): Adjust call to
7289 warn_logical_not_parentheses.
7290
671a475e
IZ
72912014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7292
7293 PR other/62008
7294 * c-parser.c (c_parser_array_notation): Check for correct
7295 type of an array added.
7296
04159acf
MP
72972014-08-19 Marek Polacek <polacek@redhat.com>
7298
7299 PR c++/62153
7300 * c-typeck.c (build_binary_op): If either operand of a comparison
7301 is a boolean expression, call maybe_warn_bool_compare.
7302
c77935ee
PP
73032014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7304
7305 PR c/45584
7306 * c-typeck.c (build_c_cast): Do a conversion even when the
7307 TYPE_MAIN_VARIANTs are the same.
7308
35aff4fb
MP
73092014-08-19 Marek Polacek <polacek@redhat.com>
7310
7311 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7312 pedwarn_c99 instead of pedwarn.
7313 (grokfield): Likewise.
7314 (warn_defaults_to): New function.
7315 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7316 Unconditionally call pedwarn_c99 instead of pedwarn.
7317 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7318 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7319 check flag_isoc11 before.
7320 * c-errors.c (pedwarn_c99): Change the return type to bool.
7321 Handle -Wc99-c11-compat.
7322 * c-parser.c (disable_extension_diagnostics): Handle
7323 warn_c99_c11_compat.
7324 (restore_extension_diagnostics): Likewise.
7325 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7326 instead of pedwarn, don't check flag_isoc11 before.
7327 (c_parser_declspecs): Likewise.
7328 (c_parser_alignas_specifier): Likewise.
7329 (c_parser_alignof_expression): Likewise.
7330 (c_parser_generic_selection): Likewise.
7331 * c-tree.h (pedwarn_c99): Update declaration.
7332 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7333 of pedwarn_c99.
7334
177cce46
MP
73352014-08-19 Marek Polacek <polacek@redhat.com>
7336
7337 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7338 to pedwarn_c90.
7339 * c-errors.c: Include "opts.h".
7340 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7341 * c-parser.c (disable_extension_diagnostics): Handle negative value
7342 of warn_c90_c99_compat, too.
7343 (restore_extension_diagnostics): Likewise.
7344 (c_parser_compound_statement_nostart): Pass
7345 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7346
6dc99c33
MP
73472014-08-12 Marek Polacek <polacek@redhat.com>
7348
7349 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7350 Add pedwarn.
7351 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7352 Likewise.
7353 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7354
3f8257db 73552014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
7356
7357 PR c/51849
7358 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7359 Call pedwarn_c90 instead of pedwarn.
7360 (check_bitfield_type_and_width): Likewise.
7361 (declspecs_add_qual): Likewise.
7362 (declspecs_add_type): Likewise.
7363 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7364 Adjust to only call pedwarn_c90.
7365 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7366 pedwarn_c90 instead of pedwarn.
7367 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7368 * c-parser.c (disable_extension_diagnostics): Handle
7369 warn_c90_c99_compat.
7370 (restore_extension_diagnostics): Likewise.
7371 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7372 pedwarn_c90 instead of pedwarn.
7373 (c_parser_initelt): Likewise.
7374 (c_parser_postfix_expression): Likewise.
7375 (c_parser_postfix_expression_after_paren_type): Likewise.
7376 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7377 * c-tree.h: Fix formatting.
7378 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7379 pedwarn_c90 instead of pedwarn.
7380
9f25a338
TS
73812014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7382
7383 * c-typeck.c: Remove include of pointer-set.h.
7384
044331a8
MP
73852014-08-07 Marek Polacek <polacek@redhat.com>
7386
7387 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7388
b787e7a2
TS
73892014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7390
7391 * c-typeck.c: Use hash_map instead of pointer_map.
7392
6e2830c3
TS
73932014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7394
7395 * c-decl.c: Use hash_set instead of pointer_set.
7396
a7ee52fb
IZ
73972014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7398
7399 PR middle-end/61455
7400 * c-array-notation.c (expand_array_notations): Handling
7401 of DECL_EXPR added.
7402
b4dfdc11
MG
74032014-07-31 Marc Glisse <marc.glisse@inria.fr>
7404
7405 PR c++/60517
7406 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7407 a local variable.
7408
976d5a22
TT
74092014-07-30 Tom Tromey <tromey@redhat.com>
7410
7411 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7412 field.
7413 (really_start_incremental_init, push_init_level): Initialize
7414 designator_depth.
7415 (pop_init_level): Set global designator_depth.
7416 (process_init_element): Check for designated_init attribute.
7417
30281de2
MP
74182014-07-20 Marek Polacek <polacek@redhat.com>
7419
7420 PR c/61852
7421 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7422 (implicitly_declare): Pass location to implicit_decl_warning.
7423
b108f48f
JJ
74242014-07-14 Jakub Jelinek <jakub@redhat.com>
7425
7426 PR middle-end/61294
7427 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7428 If non-NULL, call c_parser_check_literal_zero.
7429 (c_parser_check_literal_zero): New function.
7430 (c_parser_postfix_expression_after_primary): Adjust
7431 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7432
773ec47f
MP
74332014-07-06 Marek Polacek <polacek@redhat.com>
7434
7435 PR c/6940
7436 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7437 * c-tree.h (C_ARRAY_PARAMETER): Define.
7438 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7439 function parameter.
7440
22e1cf1c 74412014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7442 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7443
7444 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7445 releasing symbol.
7446
52ec0ea3
MP
74472014-07-01 Marek Polacek <polacek@redhat.com>
7448
7449 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7450 instead of 0 to WARN_FOR_ASSIGNMENT.
7451
d5c3d343
MP
74522014-07-01 Marek Polacek <polacek@redhat.com>
7453
7454 PR c/58286
7455 * c-typeck.c (convert_for_assignment): Pass
7456 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7457
6a7253a4
MP
74582014-06-30 Marek Polacek <polacek@redhat.com>
7459
7460 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7461 has no_sanitize_undefined attribute.
7462
5e88a8f4
IZ
74632014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7464
7465 PR middle-end/57541
7466 * c-array-notation.c (fix_builtin_array_notation_fn):
7467 Check for 0 arguments in builtin call. Check that bultin argument is
7468 correct.
7469 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7470 index.
7471
9698b078
SH
74722014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7473
7474 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7475 qualifiers in __auto_type for atomic types.
7476 (c_parser_typeof_specifier): Discard all type qualifiers in
7477 __typeof__ for atomic types.
7478
6e07c515
MP
74792014-06-25 Marek Polacek <polacek@redhat.com>
7480
7481 PR c/61162
7482 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7483 the return expression to c_finish_return.
7484
da6f124d
JJ
74852014-06-25 Jakub Jelinek <jakub@redhat.com>
7486
7487 * c-typeck.c (c_finish_omp_clauses): Make sure
7488 OMP_CLAUSE_LINEAR_STEP has correct type.
7489
c203e8a7
TS
74902014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7491
7492 * c-decl.c: Adjust.
7493
56ad0e38
JJ
74942014-06-24 Jakub Jelinek <jakub@redhat.com>
7495
7496 * c-parser.c (c_parser_omp_for_loop): For
7497 #pragma omp parallel for simd move lastprivate clause from parallel
7498 to for rather than simd.
7499
47c2554f
MP
75002014-06-23 Marek Polacek <polacek@redhat.com>
7501
7502 * c-typeck.c (parser_build_binary_op): Don't call
7503 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7504
56363ffd
JH
75052014-06-15 Jan Hubicka <hubicka@ucw.cz>
7506
7507 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7508 * c-decl.c (merge_decls): Likewise.
7509
d7ff7ae5
MP
75102014-06-09 Marek Polacek <polacek@redhat.com>
7511
7512 PR c/36446
7513 * c-typeck.c (error_init): Call inform instead of error_at.
7514 (pedwarn_init): Call inform instead of pedwarn.
7515 (warning_init): Call inform instead of warning_at.
7516
24d047a3
JH
75172014-06-07 Jan Hubicka <hubicka@ucw.cz>
7518
7519 * c-decl.c (merge_decls): Use set_decl_section_name.
7520 (duplicate_decls): Remove node if it exists.
7521
9bac5cbb
G
75222014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7523
7524 PR c/53119
7525 * c-typeck.c (push_init_level, process_init_element,
7526 pop_init_level): Correct check for zero initialization, move
7527 missing brace warning to respect zero initialization.
7528
8ffcdea8
MP
75292014-06-05 Marek Polacek <polacek@redhat.com>
7530
7531 PR c/56724
7532 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7533
742938c9
MP
75342014-06-05 Marek Polacek <polacek@redhat.com>
7535
7536 PR c/49706
7537 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7538 on the left hand side operand of a comparison.
742938c9 7539
6447c55d
MP
75402014-06-05 Marek Polacek <polacek@redhat.com>
7541
7542 PR c/48062
7543 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7544 Print note only if the warning was printed.
7545
9dc7743c
IZ
75462014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7547
7548 PR c/58942
7549 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7550 with a pointer.
7551
fedfecef
MP
75522014-06-03 Marek Polacek <polacek@redhat.com>
7553
7554 PR c/60439
7555 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7556 c_start_case.
7557 * c-tree.h (c_start_case): Update.
7558 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7559 switch condition has boolean value.
7560
9b2b7279
AM
75612014-06-02 Andrew MacLeod <amacleod@redhat.com>
7562
7563 * c-decl.c: Include builtins.h.
7564 * c-parser.c: Likewise.
7565
5c1bc275
MP
75662014-05-27 Marek Polacek <polacek@redhat.com>
7567
7568 PR c/56724
7569 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7570 error and warning calls to error_at and warning_at. Pass location of
7571 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7572 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7573 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7574
97563bc8
IZ
75752014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7576
7577 PR c/61191
7578 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7579 function parameters.
7580
aede2c10
JH
75812014-05-23 Jan Hubicka <hubicka@ucw.cz>
7582
7583 * c-decl.c (merge_decls): Preserve symtab node pointers.
7584 (duplicate_decls): Free new decl.
7585
edbba2ce
TS
75862014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7587
f3316c6d
TS
7588 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7589 initialization.
7590
edbba2ce
TS
7591 * c-parser.c (c_parser_omp_target): Return bool values.
7592
68c81f24
TS
75932014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7594
7595 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7596 num_teams_loc variable to num_thread_limit_loc.
7597
632f2871
RS
75982014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7599
7600 * c-array-notation.c (expand_array_notations): Use void_node
7601 instead of void_zero_node.
7602
766090c2
TS
76032014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7604
7605 * c-decl.c (finish_struct): Adjust.
7606 (finish_enum): Likewise.
7607 (bind): Adjust.
7608 (record_inline_static): Likewise.
7609 (push_scope): Likewise.
7610 (make_label): Likewise.
7611 (lookup_label_for_goto): Likewise.
7612 (finish_struct): Likewise.
7613 (finish_enum): Likewise.
7614 (store_parm_decls): Likewise.
7615 (c_push_function_context): Likewise.
7616 * c-lang.h: Remove usage of variable_size gty attribute.
7617 * c-parser.c (c_parse_init): Adjust.
7618 (c_parse_file): Likewise.
7619
2b107f6b
MP
76202014-05-13 Marek Polacek <polacek@redhat.com>
7621
7622 PR c/61162
7623 * c-typeck.c (convert_for_assignment): Pass location to
7624 WARN_FOR_ASSIGNMENT instead of input_location.
7625
d033409e
MP
76262014-05-10 Marek Polacek <polacek@redhat.com>
7627
7628 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7629 maybe_warn_string_init.
7630 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7631 maybe_warn_string_init.
7632 * c-tree.h (maybe_warn_string_init): Update declaration.
7633 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7634 Call pedwarn_init with loc instead of with input_location.
7635 (digest_init): Pass init_loc to maybe_warn_string_init.
7636 (pop_init_level): Call pedwarn_init with loc instead of with
7637 input_location.
7638 (set_init_index): Likewise.
7639 (process_init_element): Likewise.
7640
ea58ef42
MP
76412014-05-09 Marek Polacek <polacek@redhat.com>
7642
7643 PR c/61096
7644 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7645 (c_parser_initelt): Pass location to set_init_label. Pass array index
7646 location to set_init_index.
7647 * c-tree.h (push_init_level): Update declaration.
7648 (pop_init_level): Likewise.
7649 (set_init_index): Likewise.
7650 (set_init_label): Likewise.
7651 * c-typeck.c (error_init): Add location parameter. Call error_at
7652 instead of error.
7653 (digest_init): Pass init_loc to error_init.
7654 (really_start_incremental_init):
7655 (push_init_level): Add location parameter. Pass loc to pop_init_level
7656 and error_init.
7657 (pop_init_level): Likewise.
7658 (set_designator): Add location parameter. Pass loc to pop_init_level,
7659 push_init_level, and error_init.
7660 (set_init_index): Add location parameter. Pass loc to error_init and
7661 set_designator.
7662 (set_init_label): Likewise.
7663 (output_init_element): Pass loc to error_init.
7664 (process_init_element): Pass loc to error_init, pop_init_level,
7665 pedwarn_init, and push_init_level.
7666
661a0813
MP
76672014-05-09 Marek Polacek <polacek@redhat.com>
7668
7669 PR c/50459
7670 * c-parser.c (c_parser_attributes): Parse the arguments as an
7671 expression-list if the attribute takes identifier.
7672
2793eeab
MP
76732014-05-08 Marek Polacek <polacek@redhat.com>
7674
7675 PR c/61053
7676 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7677 TYPE_ALIGN_UNIT.
7678
f827930a
MP
76792014-05-08 Marek Polacek <polacek@redhat.com>
7680
7681 PR c/61077
7682 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7683 of main.
7684
1d60af08
KZ
76852014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7686 Mike Stump <mikestump@comcast.net>
7687 Richard Sandiford <rdsandiford@googlemail.com>
7688
7689 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7690 (finish_enum): Use wide-int interfaces.
7691 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7692 * c-typeck.c (build_c_cast): Likewise.
7693 (set_nonincremental_init_from_string): Likewise.
7694 (c_tree_equal): Likewise.
7695
a0e24419
MP
76962014-05-02 Marek Polacek <polacek@redhat.com>
7697
7698 PR c/25801
7699 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7700 Return size_one_node when the type is not complete.
7701 (pointer_diff): Remove comment.
7702 (build_unary_op): Improve error messages.
7703
19fc9faa
MP
77042014-05-02 Marek Polacek <polacek@redhat.com>
7705
7706 * c-typeck.c (c_finish_return): Separate warning_at calls.
7707
63bc4e87
MP
77082014-05-02 Marek Polacek <polacek@redhat.com>
7709
7710 * c-tree.h (error_init): Remove declaration.
7711 (pedwarn_init): Likewise.
7712 * c-typeck.c (error_init): Make static and move above.
7713 (pedwarn_init): Likewise.
7714 (warning_init): Move above.
7715 (maybe_warn_string_init): Likewise.
7716
4bd2511b
JL
77172014-05-01 Jeff Law <law@redhat.com>
7718
7719 Revert:
7720
7721 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7722 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7723 avoid goto.
7724
6a358dcb
MP
77252014-05-02 Marek Polacek <polacek@redhat.com>
7726
7727 PR c/60784
7728 * c-typeck.c (push_init_level): Set constructor_designated to
7729 p->designated for structures.
7730
ae5ebda4
MP
77312014-05-01 Marek Polacek <polacek@redhat.com>
7732
7733 PR c/60915
7734 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7735 function-definition has an attribute after the declarator.
7736
96b40f8d
MP
77372014-05-01 Marek Polacek <polacek@redhat.com>
7738
7739 PR c/60257
7740 * c-typeck.c (warning_init): Add location_t parameter. Call
7741 warning_at instead of warning.
7742 (push_init_level): Pass input_location to warning_init.
7743 (add_pending_init): Add location_t parameter. Pass loc to
7744 warning_init.
7745 (set_nonincremental_init): Pass input_location to add_pending_init.
7746 (set_nonincremental_init_from_string): Likewise.
7747 (output_init_element): Pass loc to warning_init and to
7748 add_pending_init.
7749
32e00768
MP
77502014-05-01 Marek Polacek <polacek@redhat.com>
7751
7752 PR c/43395
7753 * c-typeck.c (c_finish_return): Distinguish between label and variable
7754 when warning about returning local address.
7755
c9379ce2
MP
77562014-05-01 Marek Polacek <polacek@redhat.com>
7757
7758 PR c/29467
7759 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7760 in C89 mode.
7761
d00887e8
MP
77622014-05-01 Marek Polacek <polacek@redhat.com>
7763
7764 PR c/43245
7765 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7766 instead of 0 to WARN_FOR_QUALIFIERS.
7767
5436fa2e
MP
77682014-05-01 Marek Polacek <polacek@redhat.com>
7769
7770 PR c/56989
7771 * c-typeck.c (default_conversion): Use better location for
7772 error call.
7773
f8ed5150
MP
77742014-04-30 Marek Polacek <polacek@redhat.com>
7775
7776 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7777 also when SANITIZE_FLOAT_DIVIDE is on.
7778
8337d1db
MP
77792014-04-30 Marek Polacek <polacek@redhat.com>
7780
7781 PR c/60139
7782 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7783 and pedwarn_init. Use loc insted of input_location.
7784
c4bdc42f
MP
77852014-04-30 Marek Polacek <polacek@redhat.com>
7786
7787 PR c/60351
7788 * c-typeck.c (build_binary_op): Use location when warning about
7789 shift count.
7790
45484dcf
MP
77912014-04-25 Marek Polacek <polacek@redhat.com>
7792
7793 PR c/18079
7794 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7795 always_inline/noinline and hot/cold attributes.
7796
34cf811f
MP
77972014-04-25 Marek Polacek <polacek@redhat.com>
7798
7799 PR c/60114
7800 * c-parser.c (c_parser_initelt): Pass input_location to
7801 process_init_element.
7802 (c_parser_initval): Pass loc to process_init_element.
7803 * c-tree.h (process_init_element): Adjust declaration.
7804 * c-typeck.c (push_init_level): Pass input_location to
7805 process_init_element.
7806 (pop_init_level): Likewise.
7807 (set_designator): Likewise.
7808 (output_init_element): Add location_t parameter. Pass loc to
7809 digest_init.
7810 (output_pending_init_elements): Pass input_location to
7811 output_init_element.
7812 (process_init_element): Add location_t parameter. Pass loc to
7813 output_init_element.
7814
42056eac
JJ
78152014-04-24 Jakub Jelinek <jakub@redhat.com>
7816
7817 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7818 atomic-clause, allow comma in between atomic-clause and
7819 seq_cst.
7820
e162a134
JJ
78212014-04-22 Jakub Jelinek <jakub@redhat.com>
7822
7823 PR c/59073
7824 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7825 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7826
2f6babac
IZ
78272014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7828
7829 PR middle-end/60469
7830 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7831 create_tmp_var instead build_decl for creating temps.
7832 (build_array_notation_expr): Likewise.
7833 (fix_conditional_array_notations_1): Likewise.
7834 (fix_array_notation_expr): Likewise.
7835 (fix_array_notation_call_expr): Likewise.
7836
8edbfaa6
JJ
78372014-03-28 Jakub Jelinek <jakub@redhat.com>
7838
7839 PR c++/60689
7840 * c-tree.h (c_build_function_call_vec): New prototype.
7841 * c-typeck.c (build_function_call_vec): Don't call
7842 resolve_overloaded_builtin here.
7843 (c_build_function_call_vec): New wrapper function around
7844 build_function_call_vec. Call resolve_overloaded_builtin here.
7845 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7846 Call c_build_function_call_vec instead of build_function_call_vec.
7847 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7848 * c-decl.c (finish_decl): Likewise.
7849
7485aeea
MLI
78502014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7851
7852 PR c/55383
7853 * c-typeck.c: Use correct format string in cast-qual warning
7854
b17a8b07
TS
78552014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7856
7857 * c-decl.c (c_decl_attributes): Use
7858 lang_hooks.types.omp_mappable_type.
7859 * c-typeck.c (c_finish_omp_clauses): Likewise.
7860
3af9c5e9
MP
78612014-03-06 Marek Polacek <polacek@redhat.com>
7862
7863 PR c/60197
7864 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7865 of checking tree code.
7866
1c9f5f33
PK
78672014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7868
7869 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7870 (c_parser_parameter_declaration): Likewise.
7871
cc28fc7f
MP
78722014-02-19 Marek Polacek <polacek@redhat.com>
7873
7874 PR c/60195
7875 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7876 Call mark_exp_read on exp.value.
7877 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7878 TREE_ADDRESSABLE on old instead of val.
7879 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7880
b581c05c
PK
78812014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7882
7883 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7884 C_EXPR_APPEND by vec_safe_push.
7885 * c-tree.h (C_EXPR_APPEND): Remove.
7886
81e5eca8
MP
78872014-01-31 Marek Polacek <polacek@redhat.com>
7888
7889 PR c/59963
7890 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7891 build_function_call_vec.
7892 (build_function_call): Likewise.
7893 (build_atomic_assign): Likewise.
7894 (build_function_call_vec): Add arg_loc parameter. Use it.
7895 (convert_arguments): Likewise.
7896 (convert_for_assignment): Rename rhs_loc to expr_loc.
7897 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7898 (c_parser_objc_keywordexpr): Likewise.
7899 (c_parser_postfix_expression_after_primary): Call
7900 build_function_call_vec with expr_loc rather than op_loc.
7901 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7902 build_function_call_vec.
7903 (c_parser_expr_list): Add locations parameter. Fill it with locations
7904 of function arguments.
7905 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7906
68fca595
MP
79072014-01-30 Marek Polacek <polacek@redhat.com>
7908
7909 PR c/59940
7910 * c-typeck.c (build_function_call_vec): Use loc parameter.
7911 (convert_arguments): Add location parameter. Use it.
7912 (ep_convert_and_check): Likewise.
7913 (build_atomic_assign): Adjust convert_for_assignment call.
7914 (build_modify_expr): Likewise.
7915 (digest_init): Likewise.
7916 (c_finish_return): Likewise.
7917 (build_conditional_expr): Adjust ep_convert_and_check calls.
7918 (convert_for_assignment): Add rhs_loc parameter. Use it.
7919 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7920 calls.
7921
fa337f3a
RB
79222014-01-30 Richard Biener <rguenther@suse.de>
7923
7924 PR c/59905
7925 * c-typeck.c (build_function_call_vec): Do not replace calls
7926 to a function via an incompatible type with a runtime abort.
7927
b72271b9
BI
79282014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7929
7930 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7931 flag_enable_cilkplus with flag_cilkplus.
7932 (c_parser_direct_declarator_inner): Likewise.
7933 (c_parser_attribute_any_word): Likewise.
7934 (c_parser_attributes): Likewise.
7935 (c_parser_compound_statement): Likewise.
7936 (c_parser_statement_after_labels): Likewise.
7937 (c_parser_if_statement): Likewise.
7938 (c_parser_switch_statement): Likewise.
7939 (c_parser_do_statement): Likewise.
7940 (c_parser_for_statement): Likewise.
7941 (c_parser_unary_expression): Likewise.
7942 (c_parser_postfix_expression): Likewise.
7943 (c_parser_postfix_expression_after_primary): Likewise.
7944 (c_parser_postfix_expression_after_primary): Likewise.
7945 (c_parser_omp_clause_name): Likewise.
7946 (c_finish_omp_declare_simd): Likewise.
7947 (c_parser_cilk_verify_simd): Likewise.
7948 * c-typeck.c (build_array_ref): Likewise.
7949 (build_function_call_vec): Likewise.
7950 (convert_arguments): Likewise.
7951 (build_compound_expr): Likewise.
7952 (c_finish_return): Likewise.
7953 (c_finish_if_stmt): Likewise.
7954 (c_finish_loop): Likewise.
7955 (build_binary_op): Likewise.
7956
393e8e8b
MP
79572014-01-23 Marek Polacek <polacek@redhat.com>
7958
7959 PR c/59846
7960 * c-typeck.c (parser_build_binary_op): Use location instead of
7961 input_location.
7962 (build_binary_op): Pass location to shorten_compare.
7963
f04dda30
MP
79642014-01-23 Marek Polacek <polacek@redhat.com>
7965
7966 PR c/58346
7967 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7968 an empty aggregate.
7969
789eadcd
MP
79702014-01-23 Marek Polacek <polacek@redhat.com>
7971
7972 PR c/59871
7973 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7974 of a comma expression.
7975 (emit_side_effect_warnings): Likewise.
7976
40f14e9f
BI
79772014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7978
7979 PR c/59825
7980 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7981 function to use walk_tree and moved a lot of its functionality to
7982 expand_array_notations.
7983 (expand_array_notations): New function.
7984
74558dd9
BI
79852014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7986
7987 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7988 attribute an attribute without value.
7989
652fea39
JJ
79902014-01-23 Jakub Jelinek <jakub@redhat.com>
7991
7992 PR middle-end/58809
7993 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7994 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7995
f34f1c87
MP
79962014-01-22 Marek Polacek <polacek@redhat.com>
7997
7998 PR c/59891
7999 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8000 of remove_c_maybe_const_expr on op1 and op2.
8001
241f845a
JJ
80022014-01-15 Jakub Jelinek <jakub@redhat.com>
8003
8004 PR c/58943
8005 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8006 effects, preevaluate rhs using SAVE_EXPR first.
8007
9a74f20c
BI
80082014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8009
8010 PR c++/59631
8011 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8012 statements with if-elseif statements.
8013
96066ce1
MP
80142014-01-06 Marek Polacek <polacek@redhat.com>
8015
8016 PR c/57773
8017 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8018 defined bit-field types only in ISO C.
8019
23a5b65a
RS
80202014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8021
8022 Update copyright years
8023
f9030485
RS
80242014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8025
8026 * c-array-notation.c: Use the standard form for the copyright notice.
8027
41958c28
BI
80282013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8029
8030 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8031 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8032 field in parser is not empty. If not-empty, call the function
8033 c_parser_finish_omp_declare_simd.
8034 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8035 between SIMD-enabled functions and #pragma simd. Added new parameter.
8036 (c_parser_cilk_all_clauses): Modified the usage of the function
8037 c_parser_cilk_clause_vectorlength as mentioned above.
8038 (c_parser_cilk_simd_fn_vector_attrs): New function.
8039 (c_finish_cilk_simd_fn_tokens): Likewise.
8040 (is_cilkplus_vector_p): Likewise.
8041 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8042 "nomask," and "mask" strings in clause name.
8043 (c_parser_omp_all_clauses): Added 3 new case statements:
8044 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8045 PRAGMA_CILK_CLAUSE_NOMASK.
8046 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8047 check for vector attribute and if so call the function
8048 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8049 called the function c_finish_cilk_simd_fn_tokens.
8050 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8051 parser field is non-empty. If so, parse them as you would parse
8052 the omp declare simd pragma.
8053 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8054 Added a check when step is a parameter and flag it as error.
8055 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8056 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8057 pragma_omp_clause.
8058
cef0fd0e
TS
80592013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8060
8061 * c-parser.c (c_parser_omp_parallel): Fix description.
8062
12893402
BI
80632013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8064
8065 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8066 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8067 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8068 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8069
296674db
JM
80702013-12-04 Joseph Myers <joseph@codesourcery.com>
8071
8072 PR c/52023
8073 * c-parser.c (c_parser_alignas_specifier): Use
8074 c_sizeof_or_alignof_type instead of c_alignof.
8075 (c_parser_alignof_expression): Likewise, with min_alignof
8076 parameter depending on alignof spelling used.
8077
edd28054
MP
80782013-12-04 Marek Polacek <polacek@redhat.com>
8079
8080 PR c/54113
8081 * c-decl.c (start_function): Don't warn for missing prototype for
8082 inline functions.
8083
da0fc454
MP
80842013-12-03 Marek Polacek <polacek@redhat.com>
8085
8086 PR c/59351
8087 * c-decl.c (build_compound_literal): Allow compound literals with
8088 empty initial value.
8089
4c2ecab0
JM
80902013-12-02 Joseph Myers <joseph@codesourcery.com>
8091
8092 PR c/58235
8093 * c-typeck.c (build_modify_expr): Diagnose assignment to
8094 expression with array type.
8095
340baef7
JM
80962013-11-29 Joseph Myers <joseph@codesourcery.com>
8097
8098 PR c/42262
8099 * c-typeck.c (process_init_element): Do not treat a string as
8100 initializing a whole array when used with a designator for an
8101 individual element.
8102
6763b9f7
JM
81032013-11-29 Joseph Myers <joseph@codesourcery.com>
8104
8105 PR c/57574
8106 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8107 an inline function following a static declaration.
8108
e7bd1de1
JJ
81092013-11-28 Jakub Jelinek <jakub@redhat.com>
8110
8111 PR c/59310
8112 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8113 to p_name before calling c_parser_omp_teams instead of after.
8114 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8115 argument. Remove unused p_name variable.
8116
0136f8f0
AH
81172013-11-27 Aldy Hernandez <aldyh@redhat.com>
8118 Jakub Jelinek <jakub@redhat.com>
8119
8120 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8121 external_scope is NULL.
8122
241b71bb
TV
81232013-11-27 Tom de Vries <tom@codesourcery.com>
8124 Marc Glisse <marc.glisse@inria.fr>
8125
8126 PR c++/59032
8127 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8128
2fb9a547
AM
81292013-11-22 Andrew MacLeod <amacleod@redhat.com>
8130
8131 * c-typeck.c: Add required include files from gimple.h.
8132
8400e75e
DM
81332013-11-22 David Malcolm <dmalcolm@redhat.com>
8134
8135 * c-decl.c (define_label, shadow_tag_warned)
8136 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8137 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8138 (declspecs_add_type): Remove use of in_system_header macro.
8139 * c-parser.c (c_parser_unary_expression): Likewise.
8140 * c-typeck.c (store_init_value, process_init_element)
8141 (c_start_case): Likewise.
8142
8143 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8144 macro.
8145
8146 * c-parser.c (c_parser_set_source_position_from_token): Remove
8147 reference to in_system_header from comment.
8148
386b1f1f
RS
81492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8150
8151 * c-decl.c (grokdeclarator): Update comment to refer to
8152 tree_to_[su]hwi rather than tree_low_cst.
8153
ae7e9ddd
RS
81542013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8155
8156 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8157 tree_to_uhwi throughout.
8158
9439e9a1
RS
81592013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8160
8161 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8162 throughout.
8163
9541ffee
RS
81642013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8165
8166 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8167 throughout.
8168
c02065fc
AH
81692013-11-15 Aldy Hernandez <aldyh@redhat.com>
8170
8171 * c-parser.c (c_parser_cilk_simd): New.
8172 (c_parser_cilk_verify_simd): New.
8173 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8174 (c_parser_omp_for_loop): Add case for NE_EXPR.
8175 Set c_break_label for CILK_SIMD.
8176 (c_parser_cilk_clause_vectorlength): New.
8177 (c_parser_cilk_clause_linear): New.
8178 (c_parser_cilk_clause_name): New.
8179 (c_parser_cilk_all_clauses): New.
8180 * c-typeck.c (build_unary_op): Pass location argument to
8181 readonly_error.
8182 (build_modify_expr): Same.
8183 (build_asm_expr): Same.
8184 (c_finish_bc_stmt): Error on break/continue in loops.
8185
18f429e2
AM
81862013-11-14 Andrew MacLeod <amacleod@redhat.com>
8187
8188 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8189
d8a2d370
DN
81902013-11-14 Diego Novillo <dnovillo@google.com>
8191
8192 * c-decl.c: Include print-tree.h.
8193 Include stor-layout.h.
8194 Include varasm.h.
8195 Include attribs.h.
8196 Include stringpool.h.
8197 * c-lang.c: Include fold-const.h.
8198 * c-parser.c: Include stringpool.h.
8199 Include attribs.h.
8200 Include stor-layout.h.
8201 Include varasm.h.
8202 Include trans-mem.h.
8203 * c-typeck.c: Include stor-layout.h.
8204 Include trans-mem.h.
8205 Include varasm.h.
8206 Include stmt.h.
8207
38b7bc7f
JM
82082013-11-13 Joseph Myers <joseph@codesourcery.com>
8209
8210 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8211 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8212 __auto_type.
8213 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8214 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8215 RID_AUTO_TYPE.
8216 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8217 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8218 (c_parser_declarator, c_parser_direct_declarator_inner)
8219 (c_parser_parameter_declaration, c_parser_type_name): All callers
8220 changed.
8221 (c_parser_declaration_or_fndef): Handle declarations with type
8222 determined from the initializer.
8223
45b0be94
AM
82242013-11-12 Andrew MacLeod <amacleod@redhat.com>
8225
18f429e2 8226 * c-typeck.c: Include gimplify.h.
45b0be94 8227
582d9b50
JM
82282013-11-12 Joseph Myers <joseph@codesourcery.com>
8229
8230 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8231 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8232 comment.
8233 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8234 or _Thread_local as appropriate in diagnostics.
8235 (build_null_declspecs): Initialize ret->thread_gnu_p.
8236 (declspecs_add_scspec): Handle either __thread or _Thread_local
8237 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8238 pedantic. Do not disallow _Thread_local extern and _Thread_local
8239 static.
8240
267bac10
JM
82412013-11-07 Joseph Myers <joseph@codesourcery.com>
8242 Andrew MacLeod <amacleod@redhat.com>
8243
8244 * c-aux-info.c (gen_type): Handle atomic qualifier.
8245 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8246 qualifiers when compating types.
8247 (shadow_tag_warned): Handle atomic_p in declspecs.
8248 (quals_from_declspecs): Likewise.
8249 (start_decl): Use c_type_promotes_to when promoting argument
8250 types.
8251 (grokdeclarator): Handle _Atomic.
8252 (get_parm_info): Diagnose any qualifier on "void" as only
8253 parameter.
8254 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8255 comparing types. Use c_type_promotes_to when promoting argument
8256 types.
8257 (finish_function): Use c_type_promotes_to when promoting argument
8258 types.
8259 (build_null_declspecs): Handle atomic_p in declspecs.
8260 (declspecs_add_qual): Handle RID_ATOMIC.
8261 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8262 (c_token_starts_declspecs): Handle RID_ATOMIC.
8263 (c_parser_declspecs): Handle atomic type specifiers and
8264 qualifiers.
8265 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8266 from types of expressions with atomic type.
8267 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8268 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8269 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8270 (c_parser_statement_after_labels, c_parser_switch_statement)
8271 (c_parser_for_statement, c_parser_expr_no_commas)
8272 (c_parser_conditional_expression, c_parser_binary_expression)
8273 (c_parser_cast_expression, c_parser_unary_expression)
8274 (c_parser_postfix_expression)
8275 (c_parser_postfix_expression_after_primary, c_parser_expression):
8276 Use convert_lvalue_to_rvalue.
8277 (c_parser_expression_conv, c_parser_expr_list): Document
8278 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8279 (c_parser_objc_synchronized_statement): Use
8280 convert_lvalue_to_rvalue.
8281 (c_parser_objc_selector): Handle RID_ATOMIC.
8282 (c_parser_objc_receiver, c_parser_array_notation): Use
8283 convert_lvalue_to_rvalue.
8284 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8285 _Atomic (type-name).
8286 (struct c_declspecs): Add atomic_p field.
8287 (convert_lvalue_to_rvalue): Declare.
8288 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8289 corresponding atomic types.
8290 (qualify_type): Don't add _Atomic qualifiers from second argument.
8291 (comp_target_types): Do not allow _Atomic mismatches.
8292 (type_lists_compatible_p): Do not remove atomic qualifiers when
8293 comparing types.
8294 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8295 (build_atomic_assign): New functions.
8296 (build_unary_op): Use build_atomic_assign for atomic increment and
8297 decrement.
8298 (build_conditional_expr): Do not treat _Atomic void as a qualified
8299 version of void.
8300 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8301 (find_anonymous_field_with_type, convert_to_anonymous_field)
8302 (convert_for_assignment): Do not remove atomic qualifiers when
8303 comparing types.
8304 (digest_init): Do not accept initialization of arrays of atomic
8305 elements by string constants.
8306 (build_asm_expr): Use convert_lvalue_to_rvalue.
8307 (build_binary_op): Do not treat _Atomic void as a qualified
8308 version of void.
8309
0c249d4b
DD
83102013-11-06 DJ Delorie <dj@redhat.com>
8311
8312 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8313 both explicit and builtin, print the location of the explicit one.
8314
6d7f7e0a
TB
83152013-11-05 Tobias Burnus <burnus@net-b.de>
8316
8317 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8318 c_parser_omp_distribute, c_parser_omp_teams,
8319 c_parser_omp_target, c_parser_omp_declare): Handle
8320 -fopenmp-simd.
8321
b906f4ca
MP
83222013-11-03 Marek Polacek <polacek@redhat.com>
8323
8324 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8325
ee1d5a02
JJ
83262013-11-01 Jakub Jelinek <jakub@redhat.com>
8327
8328 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8329 check_dup_generic at the end, unless remove is true.
8330 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8331 remove = true;.
8332 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8333
5a9785fb
JJ
83342013-10-31 Jakub Jelinek <jakub@redhat.com>
8335
8336 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8337 with decl that is not pointer nor array.
8338
939b37da
BI
83392013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8340
8341 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8342 a spawning function is found.
8343 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8344 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8345 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8346 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8347 case.
8348 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8349 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8350 expr.
8351 (c_finish_return): Added a check to reject _Cilk_spawn in return
8352 expression.
8353 (build_cilk_spawn): New function.
8354 (build_cilk_sync): Likewise.
8355 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 8356
d4af74d4
TB
83572013-10-27 Tobias Burnus <burnus@net-b.de>
8358
8359 PR other/33426
8360 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8361 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8362 (c_parser_statement_after_labels): Update calls.
8363
d73749df 83642013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8365
8366 PR other/33426
8367 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8368 Handle PRAGMA_IVDEP.
8369 (c_parser_statement_after_labels): Update call.
8370
f28aa681
MP
83712013-10-24 Marek Polacek <polacek@redhat.com>
8372
8373 * c-parser.c (c_parser_struct_declaration): Add a comment.
8374 (c_parser_declarator): Don't allow _Alignas here.
8375
0645c1a2
AM
83762013-10-17 Andrew MacLeod <amacleod@redhat.com>
8377
8378 * c-parser.c: Include omp-low.h.
8379 * c-typeck.c: Likewise.
8380
568a31f2
MP
83812013-10-17 Marek Polacek <polacek@redhat.com>
8382
8383 PR c/58267
8384 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8385 Document syntax of the array-declarator.
8386 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8387 are not permitted.
8388 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8389 (c_parser_struct_declaration): Likewise.
8390 (c_parser_declarator): Likewise.
8391 (c_parser_direct_declarator_inner): Likewise.
8392 (c_parser_parameter_declaration): Likewise.
8393 (c_parser_type_name): Likewise.
8394
acf0174b
JJ
83952013-10-11 Jakub Jelinek <jakub@redhat.com>
8396
8397 * c-lang.h (current_omp_declare_target_attribute): New extern
8398 decl.
8399 * c-parser.c: Include c-lang.h.
8400 (struct c_parser): Change tokens to c_token *.
8401 Add tokens_buf field. Change tokens_avail type to unsigned int.
8402 (c_parser_consume_token): If parser->tokens isn't
8403 &parser->tokens_buf[0], increment parser->tokens.
8404 (c_parser_consume_pragma): Likewise.
8405 (enum pragma_context): Add pragma_struct and pragma_param.
8406 (c_parser_external_declaration): Adjust
8407 c_parser_declaration_or_fndef caller.
8408 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8409 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8410 Adjust recursive call.
8411 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8412 of pragma_external.
8413 (c_parser_parameter_declaration): Use pragma_param instead of
8414 pragma_external.
8415 (c_parser_compound_statement_nostart, c_parser_label,
8416 c_parser_for_statement): Adjust
8417 c_parser_declaration_or_fndef callers.
8418 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8419 it through to c_parser_conditional_expression.
8420 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8421 pass it through to c_parser_binary_expression. Adjust recursive
8422 call.
8423 (c_parser_binary_expression): Remove prec argument, add
8424 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8425 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8426 binop matches it, use build2 instead of parser_build_binary_op.
8427 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8428 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8429 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8430 Handle pragma_struct and pragma_param the same as pragma_external.
8431 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8432 (c_parser_omp_variable_list): Parse array sections for
8433 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8434 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8435 (c_parser_omp_clause_reduction): Handle user defined reductions.
8436 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8437 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8438 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8439 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8440 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8441 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8442 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8443 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8444 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8445 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8446 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8447 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8448 (c_parser_omp_for_loop): Add CODE argument, pass it through
8449 to c_finish_omp_for. Change last argument to cclauses,
8450 and adjust uses to grab parallel clauses from the array of all
8451 the split clauses. Adjust c_parser_binary_expression,
8452 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8453 (omp_split_clauses): New function.
8454 (c_parser_omp_simd): New function.
8455 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8456 Allow the function to be called also when parsing combined constructs,
8457 and call c_parser_omp_simd when parsing for simd.
8458 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8459 #pragma omp section, require exactly one structured-block instead of
8460 sequence of statements.
8461 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8462 Allow the function to be called also when parsing combined constructs.
8463 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8464 Allow the function to be called also when parsing combined
8465 constructs.
8466 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8467 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8468 c_parser_omp_teams, c_parser_omp_target_data,
8469 c_parser_omp_target_update, c_parser_omp_target,
8470 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8471 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8472 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8473 (c_parser_omp_construct): Add p_name and mask vars. Handle
8474 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8475 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8476 and c_parser_omp_sections callers.
8477 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8478 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8479 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8480 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8481 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8482 OMP_CLAUSE_DEPEND.
8483 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8484 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8485 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8486 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8487 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8488 * c-typeck.c: Include tree-inline.h.
8489 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8490 handle_omp_array_sections_1, handle_omp_array_sections,
8491 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8492 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8493 user defined reductions.
8494 (c_tree_equal): New function.
8495 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8496 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8497 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8498 c_check_omp_declare_reduction_r): New prototypes.
8499 * c-decl.c (current_omp_declare_target_attribute): New variable.
8500 (c_decl_attributes): New function.
8501 (start_decl, start_function): Use it instead of decl_attributes.
8502 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8503 c_omp_reduction_decl, c_omp_reduction_lookup,
8504 c_check_omp_declare_reduction_r): New functions.
8505
0a6c2227
TT
85062013-09-25 Tom Tromey <tromey@redhat.com>
8507
8508 * Make-lang.in (c/gccspec.o): Remove.
8509 (CFLAGS-c/gccspec.o): New variable.
8510 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8511 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8512 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8513
f3bc55f0
TT
85142013-09-25 Tom Tromey <tromey@redhat.com>
8515
8516 * Make-lang.in (c/gccspec.o): Don't use subshell.
8517
a24d975c
MP
85182013-09-18 Marek Polacek <polacek@redhat.com>
8519
8520 PR sanitize/58443
8521 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8522 Remove unnecessary check.
8523
ce6923c5
MP
85242013-09-18 Marek Polacek <polacek@redhat.com>
8525
8526 PR sanitizer/58411
8527 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8528 no_sanitize_undefined attribute.
8529
a1e51df9
KT
85302013-09-13 Kai Tietz <ktietz@redhat.com>
8531
8532 PR target/57848
8533 * c-decl.c (c_builtin_function_ext_scope): Remove
8534 wrong assumption that it is never called on prexisting
8535 symbol.
8536
0af94e6f
JR
85372013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8538
8539 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8540
20059c8b
GDR
85412013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8542
8543 * c-objc-common.c (c_tree_printer): Tidy.
8544
de5a5fa1
MP
85452013-08-30 Marek Polacek <polacek@redhat.com>
8546
8547 * c-typeck.c (build_binary_op): Add division by zero and shift
8548 instrumentation.
8549
2531a1d9 85502013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8551 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8552
6e2bcc98 8553 PR c/35649
2531a1d9
JR
8554 * c-typeck.c (c_common_type): Prefer double_type_node over
8555 other REAL_TYPE types with the same precision.
8556 (convert_arguments): Likewise.
8557
025311c4
GDR
85582013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8559
8560 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8561 (c_initialize_diagnostics): Call a destructor for the early printer.
8562
da6ca2b5
GDR
85632013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8564
8565 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8566 printer initialization.
8567
318cda85 85682013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8569
318cda85
BI
8570 PR c/57490
8571 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8572 check for truth values.
8573 (expand_array_notation_exprs): Added truth values case. Removed an
8574 unwanted else. Added for-loop to walk through subtrees in default
8575 case.
8576
b066401f
GDR
85772013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8578
8579 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8580
fb48aadc
JM
85812013-07-23 Joseph Myers <joseph@codesourcery.com>
8582
8583 * c-parser.c (struct c_generic_association): Fix typo.
8584
433cc7b0
TT
85852013-07-23 Tom Tromey <tromey@redhat.com>
8586 Joseph Myers <joseph@codesourcery.com>
8587
8588 * c-parser.c (struct c_generic_association): New.
8589 (c_generic_association_d): New typedef.
8590 (c_parser_generic_selection): New function.
8591 (c_parser_postfix_expression): Handle RID_GENERIC.
8592
26d40c3d
JM
85932013-07-13 Jason Merrill <jason@redhat.com>
8594
8595 PR c++/57793
8596 * c-decl.c (finish_struct): Check for too-large class.
8597
ecdbd01a 85982013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8599
8600 PR c/57821
8601 * c-typeck.c (set_init_index): When folding, check for index overflow.
8602
1141ed3f
BI
86032013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8604
8605 * c-parser.c (c_parser_array_notation): Removed rejection of array
8606 notations in an array of function pointers.
8607
713b46fa
BI
86082013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8609
8610 * c-array-notation.c (make_triplet_val_inv): New function.
8611 (create_cmp_incr): Likewise.
8612 (create_array_refs): Likewise.
8613 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8614 Also modularized common parts between functions and called the function.
8615 (build_array_notation_expr): Likewise.
8616 (fix_conditional_array_notations_1): Likewise.
8617 (fix_array_notation_expr): Likewise.
8618 (fix_array_notation_call_expr): Likewise.
8619
92f20202
MP
86202013-06-18 Marek Polacek <polacek@redhat.com>
8621
8622 PR c/57630
8623 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8624
73a23b06
BI
86252013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8626
8627 * c-array-notation.c (build_array_notation_expr): Reject array notation
8628 mismatch between LHS and RHS even inside a call_expr. Also, removed
8629 a couple while statements that were dead code.
8630
00b8517d
BI
86312013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8632
8633 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8634 excessive precision expressions in function parameters. Also removed
8635 couple unwanted while statements.
8636
1509bdda
BI
86372013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8638
8639 * c-array-notation.c (expand_array_notation_exprs): Added
8640 ARRAY_NOTATION_REF case.
ab20d992 8641
d60f1706
BI
86422013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8643
8644 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8645 function to c-family/array-notation-common.c.
8646 (is_cilkplus_reduce_builtin): Likewise.
8647 (find_rank): Likewise.
8648 (extract_array_notation_exprs): Likewise.
8649 (replace_array_notations): Likewise.
8650 (find_inv_trees): Likewise.
8651 (replace_inv_trees): Likewise.
8652 (contains_array_notation_expr): Likewise.
8653 (find_correct_array_notation_type): Likewise.
8654 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8655 (struct inv_list): Moved this to c-family/array-notation-common.c.
8656 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8657
6d6efbb3
BI
86582013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8659
8660 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8661 reduction functions outside the for-loop. Added a check if the fundecl
8662 is non-NULL. Finally, removed an unwanted if-statement, and made the
8663 body unconditional.
8664
25c22937
BI
86652013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8666
8667 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8668 condition of the if-statement matches the rank of else-block and then-
8669 block when array notations are used.
8670 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8671 expression after the entire function body is parsed.
8672 (c_parser_expr_no_commas): Delayed creating array notation expressions
8673 to the end of function parsing.
8674 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8675 whole if-statement instead of just the condition.
ab20d992 8676 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8677
edd25645
BI
86782013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8679
8680 PR c/57474
8681 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8682 array to NULL_TREE if they are unused. Also added a check for the
8683 field to be NULL before its fields are used in future.
ab20d992 8684
065ce7f1
RO
86852013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8686
8687 PR bootstrap/57450
8688 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8689 (build_array_notation_expr): Likewise.
8690
36536d79
BI
86912013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8692
8693 * c-typeck.c (build_array_ref): Added a check to see if array's
8694 index is greater than one. If true, then emit an error.
8695 (build_function_call_vec): Exclude error reporting and checking
8696 for builtin array-notation functions.
8697 (convert_arguments): Likewise.
8698 (c_finish_return): Added a check for array notations as a return
8699 expression. If true, then emit an error.
8700 (c_finish_loop): Added a check for array notations in a loop
8701 condition. If true then emit an error.
8702 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8703 (build_binary_op): Added a check for array notation expr inside
8704 op1 and op0. If present, we call another function to find correct
8705 type.
8706 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8707 * c-parser.c (c_parser_compound_statement): Check if array
8708 notation code is used in tree, if so, then transform them into
8709 appropriate C code.
8710 (c_parser_expr_no_commas): Check if array notation is used in LHS
8711 or RHS, if so, then build array notation expression instead of
8712 regular modify.
8713 (c_parser_postfix_expression_after_primary): Added a check for
8714 colon(s) after square braces, if so then handle it like an array
8715 notation. Also, break up array notations in unary op if found.
8716 (c_parser_direct_declarator_inner): Added a check for array
8717 notation.
8718 (c_parser_compound_statement): Added a check for array notation in
8719 a stmt. If one is present, then expand array notation expr.
8720 (c_parser_if_statement): Likewise.
8721 (c_parser_switch_statement): Added a check for array notations in
8722 a switch statement's condition. If true, then output an error.
8723 (c_parser_while_statement): Similarly, but for a while.
8724 (c_parser_do_statement): Similarly, but for a do-while.
8725 (c_parser_for_statement): Similarly, but for a for-loop.
8726 (c_parser_unary_expression): Check if array notation is used in a
8727 pre-increment or pre-decrement expression. If true, then expand
8728 them.
8729 (c_parser_array_notation): New function.
8730 * c-array-notation.c: New file.
8731 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8732
cd192ccc
MS
87332013-05-23 Mike Stump <mikestump@comcast.net>
8734
8735 * c-typeck.c (convert_for_assignment): Handle references to memory
8736 spaces better.
8737
427b248d
JM
87382013-05-16 Jason Merrill <jason@redhat.com>
8739
8740 * Make-lang.in (cc1$(exeext)): Use link mutex.
8741
44d90fe1
PC
87422013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8743
8744 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8745 to simply use OPT_Wpointer_arith.
8746 (build_unary_op): Likewise.
8747
4e7d7b3d
JJ
87482013-04-03 Jakub Jelinek <jakub@redhat.com>
8749
8750 PR c/19449
8751 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8752 argument. If set, or it temporarily for parsing of the first
8753 argument into force_folding_builtin_constant_p.
8754 (c_parser_postfix_expression): Adjust callers.
8755
839b422f
RB
87562013-03-21 Richard Biener <rguenther@suse.de>
8757
8758 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8759 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8760
2ee028f1
MP
87612013-02-12 Marek Polacek <polacek@redhat.com>
8762
8763 PR c/44938
8764 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8765 origtypes to NULL.
8766
8824edff
JJ
87672013-01-24 Jakub Jelinek <jakub@redhat.com>
8768
8769 PR c/56078
8770 * c-typeck.c (set_nonincremental_init_from_string): If
8771 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8772 returned false.
8773 (process_init_element): Likewise.
8774
eadd3d0d
JJ
87752012-12-20 Jakub Jelinek <jakub@redhat.com>
8776
8777 PR c++/55619
8778 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8779 argument, don't call default_function_array_conversion
8780 nor c_fully_fold here.
8781 (c_parser_asm_statement): Adjust callers.
8782 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8783 and outputs here, and call default_function_array_conversion
8784 on inputs that don't need to be addressable.
8785
f8a93a2e
JJ
87862012-12-18 Jakub Jelinek <jakub@redhat.com>
8787
8788 PR c/39464
8789 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8790 warning require that both c_common_unsigned_type as well as
8791 c_common_signed_type is the same for both mvl and mvr types.
8792
9771b263
DN
87932012-11-16 Diego Novillo <dnovillo@google.com>
8794
8795 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8796
8797 * c-common.c: Use new vec API in vec.h.
8798 * c-common.h: Likewise.
8799 * c-gimplify.c: Likewise.
8800 * c-pragma.c: Likewise.
8801 * c-pretty-print.c: Likewise.
8802 * c-pretty-print.h: Likewise.
8803 * c-semantics.c: Likewise.
8804 * c-decl.c: Likewise.
8805 * c-parser.c: Likewise.
8806 * c-tree.h: Likewise.
8807 * c-typeck.c: Likewise.
8808
880661a4
JW
88092012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8810
8811 PR c++/54930
8812 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8813
077d1abe
MLI
88142012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8815
8816 PR c/53066
8817 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8818 shadows a function, unless the variable is a function or a
8819 pointer-to-function.
8820
3a785c97
JJ
88212012-10-12 Jakub Jelinek <jakub@redhat.com>
8822
8823 PR c/54381
8824 * c-parser.c (struct c_tree_loc_pair): Removed.
8825 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8826 add location_t * and tree * arguments, fill in array of 3
8827 sizeof_arg trees and corresponding locs.
8828 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8829 c_parser_expr_list callers.
8830 (c_parser_postfix_expression_after_primary): Likewise. Pass
8831 array of 3 sizeof_arg trees and locs (corresponding to first
8832 3 arguments) to sizeof_pointer_memaccess_warning.
8833
703c8606
LC
88342012-10-09 Lawrence Crowl <crowl@google.com>
8835
8836 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8837 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8838 hash table.
8839
5d9de0d0
PC
88402012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8841
8842 PR c++/54194
8843 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8844 call.
8845
a212e43f
MG
88462012-10-09 Marc Glisse <marc.glisse@inria.fr>
8847
8848 PR c++/54427
8849 * c-typeck.c: Include c-common.h.
8850 (enum stv_conv): Moved to c-common.h.
8851 (scalar_to_vector): Moved to c-common.c.
8852 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8853 * Make-lang.in: c-typeck.c depends on c-common.h.
8854
3b78de56
AC
88552012-10-04 Arnaud Charlet <charlet@adacore.com>
8856
8857 * c-decl.c (c_write_global_declarations): Fix handling of
8858 -fdump-ada-spec*.
8859
78c60e3d
SS
88602012-09-30 Sharad Singhai <singhai@google.com>
8861
8862 * c-decl.c (c_write_global_declarations): Use a different method
8863 to determine if the dump has ben initialized.
8864
9f33203d
JM
88652012-09-14 Joseph Myers <joseph@codesourcery.com>
8866
8867 PR c/54552
8868 * c-typeck.c (c_cast_expr): When casting to a type requiring
8869 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8870 c_fully_fold first.
8871
a27d595d
JM
88722012-09-14 Joseph Myers <joseph@codesourcery.com>
8873
8874 PR c/54103
8875 * c-typeck.c (build_unary_op): Pass original argument of
8876 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8877 any C_MAYBE_CONST_EXPR, if it has integer operands.
8878 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8879 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8880 to c_objc_common_truthvalue_conversion, then remove any
8881 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8882 c_objc_common_truthvalue_conversion not
8883 c_common_truthvalue_conversion.
8884 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8885 call note_integer_operands for arguments with integer operands
8886 that are not integer constants.
8887
9feb29df
JJ
88882012-09-13 Jakub Jelinek <jakub@redhat.com>
8889
8890 PR c/54559
8891 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8892 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8893
d409320c
JJ
88942012-08-31 Jakub Jelinek <jakub@redhat.com>
8895
8896 PR c/54428
8897 * c-convert.c (convert): Don't call fold_convert_loc if
8898 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8899 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8900 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8901
6265d07c
JJ
89022012-08-24 Jakub Jelinek <jakub@redhat.com>
8903
8904 PR c/54355
8905 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8906 for nested and empty_ok arguments in the call to
8907 c_parser_declaration_or_fndef.
8908
1a4049e7
JJ
89092012-08-17 Jakub Jelinek <jakub@redhat.com>
8910
8911 * c-tree.h (c_last_sizeof_arg): Declare.
8912 * c-parser.c (struct c_tree_loc_pair): New type.
8913 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8914 non-NULL.
8915 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8916 (c_parser_postfix_expression_after_primary): Likewise. Call
8917 sizeof_pointer_memaccess_warning if needed.
8918 (sizeof_ptr_memacc_comptypes): New function.
8919 * c-typeck.c (c_last_sizeof_arg): New global variable.
8920 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8921
0229aee9
UB
89222012-07-24 Uros Bizjak <ubizjak@gmail.com>
8923
8924 * c-lang.h (lang_decl): Add variable_size GTY option.
8925
7ee2468b
SB
89262012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8927
8928 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8929 * Make-lang.in: Fix dependencies.
8930
d4a10d0a
SB
89312012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8932
8933 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8934 and add language Makefile hooks.
8935 * config-lang.in: New file.
8936 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8937 add the required "normal" config-lang.in rules.
8938 * c-lang.h: Moved from gcc/ to here.
8939 * c-tree.h: Likewise.
8940 * c-objc-common.c: Likewise.
8941 * c-objc-common.h: Likewise.
8942 * c-typeck.c: Likewise.
8943 * c-convert.c: Likewise.
8944 * c-lang.c: Likewise.
8945 * c-aux-info.c: Likewise.
8946 * c-errors.c: Likewise.
8947 * gccspec.c: Likewise.
8948 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8949 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8950\f
877e3c2a 8951Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8952
8953Copying and distribution of this file, with or without modification,
8954are permitted in any medium without royalty provided the copyright
8955notice and this notice are preserved.