]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
d2ef2327
GA
12022-12-19 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/108043
4 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
5 compound literals with function type.
6
4bc2d9f6
GA
72022-12-07 Joseph Myers <joseph@codesourcery.com>
8
9 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
10 auto, constexpr and a type used together.
11
3fe66f7f
GA
122022-12-06 Qing Zhao <qing.zhao@oracle.com>
13
14 * c-decl.cc (is_flexible_array_member_p): Call new function
15 strict_flex_array_level_of.
16
9a1b4f1d
GA
172022-11-24 Florian Weimer <fweimer@redhat.com>
18
19 PR c/107805
20 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
21 from type to specs.
22
add89840
GA
232022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
24
25 * c-decl.cc (start_function): Set the result decl source
26 location to the location of the typespec.
27
282022-11-17 David Malcolm <dmalcolm@redhat.com>
29
30 PR analyzer/107711
31 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
32 to cpp_create_reader, rather than ident_hash, so that the new
33 reader gets its own hash table.
34
cdc34229
GA
352022-11-15 David Malcolm <dmalcolm@redhat.com>
36
37 PR analyzer/106302
38 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
39 (class ana::c_translation_unit): New.
40 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
41
30d77d49
GA
422022-11-12 Joseph Myers <joseph@codesourcery.com>
43
44 * c-decl.cc (start_underspecified_init)
45 (finish_underspecified_init): Handle name == NULL_TREE for
46 compound literals.
47 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
48 (shadow_tag_warned): Check for constexpr.
49 (start_decl): Add parameter do_push.
50 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
51 (grokdeclarator): Handle constexpr.
52 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
53 (declspecs_add_scspec): Handle constexpr.
54 * c-parser.cc (c_token_starts_compound_literal)
55 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
56 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
57 (c_parser_compound_literal_scspecs)
58 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
59 Update calls to start_init.
60 (c_parser_declaration_or_fndef, c_parser_initializer)
61 (c_parser_initval): Pass true for new argument of
62 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
63 constexpr compound literals.
64 (c_parser_static_assert_declaration_no_semi)
65 (c_parser_enum_specifier, c_parser_struct_declaration)
66 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
67 Call convert_lvalue_to_rvalue on expressions required to be
68 integer constant expressions.
69 (c_parser_omp_declare_reduction): Update call to start_init.
70 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
71 (C_DECL_DECLARED_CONSTEXPR): New macros.
72 (struct c_declspecs): Add constexpr_p.
73 (start_decl, convert_lvalue_to_rvalue, start_init): Update
74 prototypes.
75 * c-typeck.cc (require_constant_value, require_constant_elements):
76 Change to bool.
77 (require_constexpr_value, maybe_get_constexpr_init)
78 (constexpr_init_fits_real_type, check_constexpr_init): New.
79 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
80 maybe_get_constexpr_init.
81 (store_init_value): Update call to digest_init.
82 (digest_init): Add parameters int_const_expr, arith_const_expr and
83 require_constexpr. Check constexpr initializers.
84 (constructor_top_level): Remove.
85 (struct initializer_stack): Remove top_level. Add
86 require_constexpr_value.
87 (start_init): Remove parameter top_level. Add parameters
88 init_require_constant and init_require_constexpr. Save
89 require_constexpr_value on stack.
90 (pop_init_level): Use a null pointer constant for zero initializer
91 of pointer initialized with {}.
92 (output_init_element): Update call to digest_init. Avoid passing
93 null pointer constants of pointer type through digest_init a
94 second time when initializing a constexpr object.
95
d29260ce
GA
962022-11-03 Joseph Myers <joseph@codesourcery.com>
97
98 * c-decl.cc (in_underspecified_init, start_underspecified_init)
99 (finish_underspecified_init): New.
100 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
101 Give errors inside initializers of underspecified declarations.
102 (grokdeclarator): Handle (erroneous) case of C2X auto on a
103 parameter.
104 (declspecs_add_type): Handle c2x_auto_p case.
105 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
106 C2X mode.
107 (finish_declspecs): Handle c2x_auto_p.
108 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
109 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
110 (struct c_declspecs): Add c2x_auto_p.
111 (start_underspecified_init, finish_underspecified_init): New
112 prototypes.
113 * c-typeck.cc (build_external_ref): Give error for underspecified
114 declaration referenced in its initializer.
115
3055829a
GA
1162022-10-28 Joseph Myers <joseph@codesourcery.com>
117
118 * c-decl.cc (grokdeclarator): Pass
119 arg_info->no_named_args_stdarg_p to build_function_type.
120 (grokparms): Check arg_info->no_named_args_stdarg_p before
121 converting () to (void).
122 (build_arg_info): Initialize no_named_args_stdarg_p.
123 (get_parm_info): Set no_named_args_stdarg_p.
124 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
125 build_function_type.
126 (store_parm_decls): Count (...) functions as prototyped.
127 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
128 parenthesis to start parameter list.
129 (c_parser_parms_list_declarator): Always allow '...' with no
130 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
131 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
132 * c-typeck.cc (composite_type): Handle
133 TYPE_NO_NAMED_ARGS_STDARG_P.
134 (function_types_compatible_p): Compare
135 TYPE_NO_NAMED_ARGS_STDARG_P.
136
1372022-10-28 Jakub Jelinek <jakub@redhat.com>
138
139 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
140 comma before the first clause.
141 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
142 c_parser_omp_flush, c_parser_omp_scan_loop_body,
143 c_parser_omp_ordered, c_finish_omp_declare_variant,
144 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
145 c_parser_omp_requires, c_parser_omp_error,
146 c_parser_omp_assumption_clauses): Likewise.
147
1482022-10-28 Joseph Myers <joseph@codesourcery.com>
149
150 PR c/61469
151 * c-convert.cc (c_convert): Handle enums with underlying boolean
152 type like bool.
153 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
154 enums with enum type specifier, but give errors for storage class
155 specifiers, qualifiers or alignment specifiers in non-definition
156 declarations of such enums.
157 (grokdeclarator): Give error for non-definition use of type
158 specifier with an enum type specifier.
159 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
160 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
161 (xref_tag): Update call to parser_xref_tag.
162 (start_enum): Add argument fixed_underlying_type. Complete enum
163 type with a fixed underlying type given in the definition. Give
164 error for defining without a fixed underlying type in the
165 definition if one was given in a prior declaration. Do not mark
166 enums with fixed underlying type as packed for -fshort-enums.
167 Store the enum type in the_enum.
168 (finish_enum): Do not adjust types of values or check their range
169 for an enum with a fixed underlying type. Set underlying type of
170 enum and variants.
171 (build_enumerator): Check enumeration constants for enum with
172 fixed underlying type against that type and convert to that type.
173 Increment in the underlying integer type, with handling for bool.
174 (c_simulate_enum_decl): Update call to start_enum.
175 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
176 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
177 rather than recomputing an underlying type based on size.
178 * c-parser.cc (c_parser_declspecs)
179 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
180 Set has_enum_type_specifier for type specifiers.
181 (c_parser_enum_specifier): Handle enum type specifiers.
182 (c_parser_struct_or_union_specifier): Update call to
183 parser_xref_tag.
184 (c_parser_omp_atomic): Check for boolean increment or decrement
185 using C_BOOLEAN_TYPE_P.
186 * c-tree.h (C_BOOLEAN_TYPE_P): New.
187 (struct c_typespec): Add has_enum_type_specifier.
188 (struct c_declspecs): Add enum_type_specifier_ref_p.
189 (struct c_enum_contents): Add enum_type.
190 (start_enum, parser_xref_tag): Update prototypes.
191 * c-typeck.cc (composite_type): Allow for enumerated types
192 compatible with bool.
193 (common_type, comptypes_internal, perform_integral_promotions):
194 Use ENUM_UNDERLYING_TYPE.
195 (parser_build_binary_op, build_unary_op, convert_for_assignment)
196 (c_finish_return, c_start_switch, build_binary_op): Check for
197 boolean types using C_BOOLEAN_TYPE_P.
198
4e939ae1
GA
1992022-10-24 Jakub Jelinek <jakub@redhat.com>
200
201 PR c++/107358
202 * c-typeck.cc (build_binary_op): Pass operands before excess precision
203 promotions to scalar_to_vector call.
204
2052022-10-24 Arsen Arsenović <arsen@aarsen.me>
206
207 * c-decl.cc (finish_function): Ignore hosted when deciding
208 whether to implicitly return zero, but check noreturn.
209 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
210 requirements to just MAIN_NAME_P when hosted, or `int main'
211 otherwise.
212
47a6ae56
GA
2132022-10-20 Richard Biener <rguenther@suse.de>
214
215 PR c/107305
216 PR c/107306
217 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
218 the parsed IL and zap the body on error.
219
21de009f
GA
2202022-10-18 Joseph Myers <joseph@codesourcery.com>
221
222 PR c/107164
223 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
224 with previous declaration visible.
225
2262022-10-18 Joseph Myers <joseph@codesourcery.com>
227
228 PR c/36113
229 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
230 convert all to the type of the enumeration. pedwarn if no integer
231 type fits all enumerators and default to
232 widest_integer_literal_type_node in that case. Otherwise pedwarn
233 for type wider than intmax_t.
234 (build_enumerator): pedwarn for enumerators outside the range of
235 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
236 enumerators outside the range of int. On overflow, attempt to
237 find a wider type that can hold the value of the next enumerator.
238 Do not convert value to type determined with
239 c_common_type_for_size.
240
baeec7cc
GA
2412022-10-14 Jakub Jelinek <jakub@redhat.com>
242
243 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
244 double.
245
2462022-10-14 Joseph Myers <joseph@codesourcery.com>
247
248 * c-decl.cc (build_compound_literal): Add parameter scspecs.
249 Handle storage class specifiers.
250 * c-parser.cc (c_token_starts_compound_literal)
251 (c_parser_compound_literal_scspecs): New.
252 (c_parser_postfix_expression_after_paren_type): Add parameter
253 scspecs. Call pedwarn_c11 for use of storage class specifiers.
254 Update call to build_compound_literal.
255 (c_parser_cast_expression, c_parser_sizeof_expression)
256 (c_parser_alignof_expression): Handle storage class specifiers for
257 compound literals. Update calls to
258 c_parser_postfix_expression_after_paren_type.
259 (c_parser_postfix_expression): Update syntax comment.
260 * c-tree.h (build_compound_literal): Update prototype.
261 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
262 register compound literal.
263
9ff6c33e
GA
2642022-10-07 Qing Zhao <qing.zhao@oracle.com>
265
266 * c-decl.cc (flexible_array_member_type_p): New function.
267 (one_element_array_type_p): Likewise.
268 (zero_length_array_type_p): Likewise.
269 (add_flexible_array_elts_to_size): Call new utility
270 routine flexible_array_member_type_p.
271 (is_flexible_array_member_p): New function.
272 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
273
629d04d3
GA
2742022-10-06 Joseph Myers <joseph@codesourcery.com>
275
276 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
277 and not C2x.
278 (c_keyword_starts_typename, c_token_starts_declspecs)
279 (c_parser_declspecs, c_parser_objc_selector): Handle
280 RID_TYPEOF_UNQUAL.
281 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
282 Distinguish typeof for C2x from __typeof__ for all standard
283 versions and typeof before C2x.
284 * c-typeck.cc (build_function_call_vec): Use unqualified version
285 of non-void return type.
286 (build_unary_op): Use unqualified type for increment and
287 decrement.
288
2892022-10-06 Jakub Jelinek <jakub@redhat.com>
290
291 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
292 call for holds clause on assume construct.
293
2942022-10-06 Jakub Jelinek <jakub@redhat.com>
295
296 PR c++/106654
297 * c-parser.cc (handle_assume_attribute): New function.
298 (c_parser_declaration_or_fndef): Handle assume attribute.
299 (c_parser_attribute_arguments): Add assume_attr argument,
300 if true, parse first argument as conditional expression.
301 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
302 c_parser_attribute_arguments callers.
303 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
304 assume attribute.
305
85872a69
GA
3062022-10-04 Jakub Jelinek <jakub@redhat.com>
307
308 * c-lang.h (struct c_omp_declare_target_attr): New type.
309 (current_omp_declare_target_attribute): Change type from
310 int to vec<c_omp_declare_target_attr, va_gc> *.
311 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
312 If last pushed directive was begin declare target, use different
313 wording and simplify format strings for easier translations.
314 (c_parser_omp_clause_device_type): Uncomment
315 check_no_duplicate_clause call.
316 (c_parser_omp_declare_target): Adjust for the
317 current_omp_declare_target_attribute type change, push { -1 }.
318 Use error_at rather than warning_at for declare target with
319 only device_type clauses.
320 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
321 (c_parser_omp_begin): Add begin declare target support.
322 (c_parser_omp_end): Adjust for the
323 current_omp_declare_target_attribute type change, adjust
324 diagnostics wording and simplify format strings for easier
325 translations.
326 * c-decl.cc (current_omp_declare_target_attribute): Change type from
327 int to vec<c_omp_declare_target_attr, va_gc> *.
328 (c_decl_attributes): Adjust for the
329 current_omp_declare_target_attribute type change. If device_type
330 was present on begin declare target, add "omp declare target host"
331 and/or "omp declare target nohost" attributes.
332
bbdcdf5c
GA
3332022-09-29 Joseph Myers <joseph@codesourcery.com>
334
335 * c-decl.cc (handle_std_noreturn_attribute): New function.
336 (std_attribute_table): Add _Noreturn and noreturn.
337
1f16a020
GA
3382022-09-27 Jakub Jelinek <jakub@redhat.com>
339
340 * c-lang.h (current_omp_begin_assumes): Declare.
341 * c-parser.cc: Include bitmap.h.
342 (c_parser_omp_end_declare_target): Rename to ...
343 (c_parser_omp_end): ... this. Handle also end assumes.
344 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
345 c_parser_omp_assumes, c_parser_omp_assume): New functions.
346 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
347 without corresponding #pragma omp end assumes.
348 (c_parser_pragma): Use %s in may only be used at file scope
349 diagnostics to decrease number of translatable messages. Handle
350 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
351 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
352 for it rather than c_parser_omp_end_declare_target.
353 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
354 * c-decl.cc (current_omp_begin_assumes): Define.
355
28a61ecd
GA
3562022-09-24 Jakub Jelinek <jakub@redhat.com>
357
358 PR c/106981
359 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
360 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
361 t2 have different types.
362
279c6715
GA
3632022-09-22 David Malcolm <dmalcolm@redhat.com>
364
365 PR c/106830
366 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
367 (c_parser_cast_expression): Likewise.
368 (c_parser_alignof_expression): Likewise.
369 (c_parser_postfix_expression_after_paren_type): Likewise.
370 (c_parser_postfix_expression_after_primary): Likewise.
371 (c_parser_expression): Likewise.
372 (c_parser_omp_variable_list): Likewise.
373 (c_parser_transaction_expression): Likewise.
374 * c-tree.h (c_expr::set_error): Likewise.
375 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
376 (parser_build_unary_op): Likewise.
377 (parser_build_binary_op): Likewise.
378 (digest_init): Likewise.
379 (pop_init_level): Likewise.
380 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
381
43be56c4
GA
3822022-09-19 Marek Polacek <polacek@redhat.com>
383
384 PR c/106947
385 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
386 notes.
387
d0fc05e8
GA
3882022-09-15 Richard Biener <rguenther@suse.de>
389
390 * c-decl.cc (build_void_list_node): Remove.
391
ff822367
GA
3922022-09-14 Julian Brown <julian@codesourcery.com>
393
394 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
395 on error.
396
fe2a8ce9
GA
3972022-09-07 Joseph Myers <joseph@codesourcery.com>
398
399 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
400 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
401 for C2x spellings of keywords.
402 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
403
25aeb922
GA
4042022-09-06 Jakub Jelinek <jakub@redhat.com>
405
406 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
407 in omp_cur_iteration - 1 has integer_type_node type.
408
83f2f228
GA
4092022-09-03 Jakub Jelinek <jakub@redhat.com>
410
411 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
412 (c_parser_omp_clause_depend_sink): Renamed to ...
413 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
414 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
415 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
416 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
417 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
418 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
419 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
420 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
421 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
422 (c_parser_omp_clause_doacross): New function.
423 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
424 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
425 OMP_CLAUSE_DEPEND_SOURCE.
426 (c_parser_omp_for_loop): Don't diagnose here linear clause together
427 with ordered with argument.
428 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
429 for simd.
430 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
431 (c_parser_omp_ordered): Handle also doacross and adjust for it
432 diagnostic wording.
433 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
434 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
435
c64b0947
GA
4362022-09-02 David Malcolm <dmalcolm@redhat.com>
437
438 PR c/90885
439 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
440 (c_parser_expr_no_commas): Likewise.
441 (c_parser_conditional_expression): Likewise.
442 (c_parser_binary_expression): Clear m_decimal when popping the
443 stack.
444 (c_parser_unary_expression): Clear ret.m_decimal.
445 (c_parser_has_attribute_expression): Likewise for result.
446 (c_parser_predefined_identifier): Likewise for expr.
447 (c_parser_postfix_expression): Likewise for expr.
448 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
449 token.
450 * c-tree.h (c_expr::m_decimal): New bitfield.
451 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
452 (parser_build_binary_op): Call check_for_xor_used_as_pow.
453
bb0a1556
GA
4542022-09-01 Joseph Myers <joseph@codesourcery.com>
455
456 * c-decl.cc (grokparms): Handle () in a function declaration the
457 same as (void) for C2X.
458
542c60c4
GA
4592022-08-31 Joseph Myers <joseph@codesourcery.com>
460
461 * c-parser.cc (c_parser_label): Pass attributes to do_case.
462 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
463 c_add_case_label.
464
16f542d6
GA
4652022-08-26 Jakub Jelinek <jakub@redhat.com>
466
467 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
468
5d4389dc
GA
4692022-08-25 Marek Polacek <polacek@redhat.com>
470
471 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
472 Give a better diagnostic when converting to nullptr_t.
473 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
474 initialization.
475 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
476 (c_parser_postfix_expression): Handle RID_NULLPTR.
477 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
478 nullptr_node.
479 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
480 (build_conditional_expr): Handle the case when the second/third operand
481 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
482 (convert_for_assignment): Handle converting an expression of type
483 nullptr_t to pointer/bool.
484 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
485 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
486
4872022-08-25 Joseph Myers <joseph@codesourcery.com>
488
489 * c-decl.cc (start_decl): Do not diagnose initialization of
490 variable-sized objects here.
491 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
492 callers changed.
493 (c_parser_initializer): Diagnose initialization of variable-sized
494 objects other than with braced initializer.
495 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
496 braces and update diagnostic text. Diagnose initialization of
497 variable-sized objects with nonempty braces.
498 * c-typeck.cc (digest_init): Update diagnostic for initialization
499 of variable-sized objects.
500 (really_start_incremental_init, set_designator)
501 (process_init_element): Update comments.
502 (pop_init_level): Allow scalar empty initializers.
503
0342f034
GA
5042022-08-17 Tobias Burnus <tobias@codesourcery.com>
505 Chung-Lin Tang <cltang@codesourcery.com>
506
507 PR c++/104493
508 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
509 instead of removed langhook.
510 * c-typeck.cc (c_finish_omp_clauses): Likewise.
511
5cd525f0
GA
5122022-08-11 Marek Polacek <polacek@redhat.com>
513
514 PR middle-end/102633
515 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
516 Call suppress_warning.
517 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
518 (c_parser_omp_declare_reduction): Pass omp_priv down to
519 c_parser_initializer.
520
5f17badb
GA
5212022-08-08 Tom Honermann <tom@honermann.net>
522
523 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
524 of CPP_UTF8STRING when char8_t support is enabled.
525 * c-typeck.cc (digest_init): Allow initialization of an array
526 of character type by a string literal with type array of
527 char8_t.
528
32510382
GA
5292022-08-01 David Malcolm <dmalcolm@redhat.com>
530
531 * c-typeck.cc (build_c_cast): Quote names of address spaces in
532 diagnostics.
533 (convert_for_assignment): Add a note to address space mismatch
534 diagnostics, specifying the expected and actual types.
535
b53ebbc5
GA
5362022-07-10 Lewis Hyatt <lhyatt@gmail.com>
537
538 PR preprocessor/97498
539 * c-parser.cc (c_parser_pragma): Set input_location to the
540 location of the pragma, rather than the start of the line.
541
8467574d
GA
5422022-07-04 Tobias Burnus <tobias@codesourcery.com>
543 Chung-Lin Tang <cltang@codesourcery.com>
544 Thomas Schwinge <thomas@codesourcery.com>
545
546 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
547 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
548 OMP_REQUIRES_TARGET_USED.
549 (c_parser_omp_requires): Remove sorry.
550
ed974488
GA
5512022-07-01 Tobias Burnus <tobias@codesourcery.com>
552
553 * c-parser.cc (c_parser_omp_target_enter_data,
554 c_parser_omp_target_exit_data): Accept tofrom
555 map-type modifier but use 'to' / 'from' internally.
556
bc7e9f76
GA
5572022-06-16 David Malcolm <dmalcolm@redhat.com>
558
559 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
560 group the warning with any note.
561 (warn_about_goto): Likewise to group error or warning with note.
562 Bail out if the warning wasn't emitted, to avoid emitting orphan
563 notes.
564 (lookup_label_for_goto): Add auto_diagnostic_group to
565 group the error with the note.
566 (check_earlier_gotos): Likewise.
567 (c_check_switch_jump_warnings): Likewise for any error/warning.
568 Conditionalize emission of the notes.
569 (diagnose_uninitialized_cst_member): Likewise for warning,
570 conditionalizing emission of the note.
571 (grokdeclarator): Add auto_diagnostic_group to group the "array
572 type has incomplete element type" error with any note.
573 (parser_xref_tag): Add auto_diagnostic_group to group warnings
574 with their notes. Conditionalize emission of notes.
575 (start_struct): Add auto_diagnostic_group to group the
576 "redefinition of" errors with any note.
577 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
578 (check_for_loop_decls): Likewise for pre-C99 error.
579
445ba599
GA
5802022-06-07 Jakub Jelinek <jakub@redhat.com>
581
582 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
583 style linear clause modifiers. Set
584 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
585 old style modifiers are used.
586 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
587 with val modifier on simd or for if the old style modifiers are
588 used.
589
b168441c
GA
5902022-06-02 David Malcolm <dmalcolm@redhat.com>
591
592 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
593 (c_get_sarif_source_language): New.
594 * c-tree.h (c_get_sarif_source_language): New decl.
595
820ead45
GA
5962022-05-31 Jason Merrill <jason@redhat.com>
597
598 * Make-lang.in (c.tags): Look at *.cc.
599
6002022-05-31 Jakub Jelinek <jakub@redhat.com>
601
602 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
603 clauses.
604
37b3b5da
GA
6052022-05-28 Jakub Jelinek <jakub@redhat.com>
606
607 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
608 seen first, use "%<to%>" or "%<enter%>" depending on
609 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
610 "%<to%> or %<enter%>" wording.
611
d9176e64
GA
6122022-05-27 Jakub Jelinek <jakub@redhat.com>
613
614 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
615 (c_parser_omp_all_clauses): For to clause on declare target, use
616 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
617 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
618 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
619 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
620 OMP_CLAUSE_TO_DECLARE.
621 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
622 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
623 name in diagnostics instead of
624 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
625
3dff965c
GA
6262022-05-25 Jakub Jelinek <jakub@redhat.com>
627
628 PR c/91134
629 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
630 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
631 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
632 diagnostic and fixit hint if DATUM has pointer type.
633 * c-parser.cc (c_parser_postfix_expression,
634 c_parser_omp_variable_list): Adjust build_component_ref callers.
635 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
636 Likewise.
637
768f49a2
GA
6382022-05-24 Jakub Jelinek <jakub@redhat.com>
639
640 PR c/105378
641 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
642
1cda629f
GA
6432022-05-18 Marek Polacek <polacek@redhat.com>
644
645 PR c/105131
646 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
647 mismatches.
648 * c-tree.h (comptypes_check_enum_int): Declare.
649 * c-typeck.cc (comptypes): No longer static.
650
3d9439b1
GA
6512022-05-17 Marek Polacek <polacek@redhat.com>
652
653 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
654 its value.
655
6562022-05-17 Jakub Jelinek <jakub@redhat.com>
657
658 * c-parser.cc (c_parser_omp_clause_depend): Parse
659 inoutset depend-kind.
660 (c_parser_omp_depobj): Likewise.
661
702bd11f
GA
6622022-05-16 Martin Liska <mliska@suse.cz>
663
664 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
665
49ace834
GA
6662022-05-12 Jakub Jelinek <jakub@redhat.com>
667
668 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
669 if flag_openmp.
670 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
671 in postfix expressions.
672 (c_parser_omp_variable_list): Handle omp_all_memory in depend
673 clause.
674 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
675 keyword in depend clause as null_pointer_node, diagnose invalid
676 uses.
677
bd022ff9
GA
6782022-05-09 Martin Liska <mliska@suse.cz>
679
680 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
681 macros.
682 (c_parser_binary_expression): Likewise.
683
a1947c92
GA
6842022-05-07 Marek Polacek <polacek@redhat.com>
685
686 PR c++/101833
687 PR c++/47634
688 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
689
405eda0d
GA
6902022-04-08 Jakub Jelinek <jakub@redhat.com>
691
692 PR c/105149
693 * c-typeck.cc (c_build_va_arg): Reject function types.
694
a2287813
GA
6952022-03-22 Marek Polacek <polacek@redhat.com>
696
697 PR c/82283
698 PR c/84685
699 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
700 (start_init): Set it.
701 (finish_init): Restore constructor_designated.
702 (push_init_level): Set constructor_designated to the value of
703 constructor_designated in the upper constructor_stack.
704
57eeedda
GA
7052022-03-12 Thomas Schwinge <thomas@codesourcery.com>
706
707 PR other/65095
708 * c-typeck.cc (handle_omp_array_sections_1)
709 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
710 instead of 'c_omp_map_clause_name'.
711
8cc4f9cd
GA
7122022-03-09 Joseph Myers <joseph@codesourcery.com>
713
714 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
715 differently from earlier standards for unprototyped function type
716 compatibility.
717
7182022-03-09 Jakub Jelinek <jakub@redhat.com>
719
720 PR c/104711
721 * c-fold.cc (c_fully_fold_internal): Don't emit
722 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
723 * c-typeck.cc (build_binary_op): Likewise.
724
e6533e2e
GA
7252022-03-07 Jakub Jelinek <jakub@redhat.com>
726
727 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
728 literal.
729
4bf3bac1
GA
7302022-02-23 Richard Biener <rguenther@suse.de>
731
732 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
733 SSA names without definition.
734 (c_parser_gimple_declaration): Handle pointer typed SSA names.
735
0bdb0498
GA
7362022-02-17 Jakub Jelinek <jakub@redhat.com>
737
738 PR c/104532
739 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
740 convert_lvalue_to_rvalue and build_indirect_ref instead of
741 build_simple_mem_ref.
742
e8d68f0a
GA
7432022-02-11 Richard Biener <rguenther@suse.de>
744
745 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
746 VEC_COND_EXPRs.
747
a645583d
GA
7482022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
749
750 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
751 clause.
752 (c_parser_omp_variable_list): Handle array sections.
753 (c_parser_omp_clause_has_device_addr): Added.
754 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
755 case.
756 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
757 OMP_CLAUSE_MASK.
758 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
759 (c_finish_omp_clauses): Handle array sections.
760
3adf509f
GA
7612022-02-09 Jakub Jelinek <jakub@redhat.com>
762
763 PR c/104427
764 * c-parser.cc (c_parser_postfix_expression)
765 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
766 instead of build1_loc to build PAREN_EXPR.
767 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
768 * c-fold.cc (c_fully_fold_internal): Likewise.
769
fc829782
GA
7702022-01-17 Martin Liska <mliska@suse.cz>
771
772 * Make-lang.in: Rename .c names to .cc.
773 * c-convert.cc: Likewise.
774 * c-decl.cc (struct lang_identifier): Likewise.
775 (pop_scope): Likewise.
776 (finish_decl): Likewise.
777 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
778 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
779 * c-parser.h (GCC_C_PARSER_H): Likewise.
780 * c-tree.h (c_keyword_starts_typename): Likewise.
781 (finish_declspecs): Likewise.
782 (c_get_alias_set): Likewise.
783 (enum c_oracle_request): Likewise.
784 (tag_exists_p): Likewise.
785 (set_c_expr_source_range): Likewise.
786 * c-typeck.cc (c_common_type): Likewise.
787 (c_finish_omp_clauses): Likewise.
788 * config-lang.in: Likewise.
789
7902022-01-17 Martin Liska <mliska@suse.cz>
791
792 * c-aux-info.c: Moved to...
793 * c-aux-info.cc: ...here.
794 * c-convert.c: Moved to...
795 * c-convert.cc: ...here.
796 * c-decl.c: Moved to...
797 * c-decl.cc: ...here.
798 * c-errors.c: Moved to...
799 * c-errors.cc: ...here.
800 * c-fold.c: Moved to...
801 * c-fold.cc: ...here.
802 * c-lang.c: Moved to...
803 * c-lang.cc: ...here.
804 * c-objc-common.c: Moved to...
805 * c-objc-common.cc: ...here.
806 * c-parser.c: Moved to...
807 * c-parser.cc: ...here.
808 * c-typeck.c: Moved to...
809 * c-typeck.cc: ...here.
810 * gccspec.c: Moved to...
811 * gccspec.cc: ...here.
812 * gimple-parser.c: Moved to...
813 * gimple-parser.cc: ...here.
814
8152022-01-17 Andrew Stubbs <ams@codesourcery.com>
816
817 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
818
617db51d
GA
8192022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
820
821 PR c++/103705
822 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
823 outer node for ARRAY_REFs.
824
62eb5308
GA
8252022-01-01 Jakub Jelinek <jakub@redhat.com>
826
827 PR objc/103639
828 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
829 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
830
2554e2da
GA
8312021-12-17 Marek Polacek <polacek@redhat.com>
832
833 PR c/103649
834 * c-decl.c (c_warn_unused_attributes): Don't warn for
835 attribute_ignored_p.
836 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
837 arguments when the attribute is ignored.
838
9c6586bc
GA
8392021-12-14 Jakub Jelinek <jakub@redhat.com>
840
841 PR c/103587
842 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
843 consume the pragma and silently skip to the pragma eol.
844
c8dcf64b
GA
8452021-12-12 Jonathan Wakely <jwakely@redhat.com>
846
847 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
848 * c-parser.c: Likewise.
849
4b4839e3
GA
8502021-12-09 Jakub Jelinek <jakub@redhat.com>
851
852 PR pch/71934
853 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
854 to resort_data.new_value.
855
641ff219
GA
8562021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
857
858 * c-parser.c (struct omp_dim): New struct type for use inside
859 c_parser_omp_variable_list.
860 (c_parser_omp_variable_list): Allow multiple levels of array and
861 component accesses in array section base-pointer expression.
862 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
863 c_parser_omp_var_list_parens.
864 (c_parser_omp_clause_from): Likewise.
865 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
866 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
867 POINTER_PLUS_EXPR.
868 (c_finish_omp_clauses): Extend allowed ranged of expressions
869 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
870
8712021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
872
873 PR middle-end/92120
874 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
875 call to c_parser_omp_variable_list to 'true'.
876 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
877 array base handling.
878 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
879
c177e806
GA
8802021-11-30 Thomas Schwinge <thomas@codesourcery.com>
881
882 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
883 orphan loop" checking.
884
8852021-11-30 Cesar Philippidis <cesar@codesourcery.com>
886 Thomas Schwinge <thomas@codesourcery.com>
887
888 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
889 OpenACC gang reductions.
890
8912021-11-30 Richard Biener <rguenther@suse.de>
892
893 * gimple-parser.c (c_parser_gimple_postfix_expression):
894 avoid unreachable code after break.
895
87cd82c8
GA
8962021-11-29 Eric Gallager <egallager@gcc.gnu.org>
897
898 PR other/103021
899 * Make-lang.in: Use ETAGS variable in TAGS target.
900
9012021-11-29 Richard Biener <rguenther@suse.de>
902
903 * c-typeck.c (c_tree_equal): Remove unreachable return.
904 * c-parser.c (get_matching_symbol): Likewise.
905
e1d43592
GA
9062021-11-23 Jakub Jelinek <jakub@redhat.com>
907
908 * c-typeck.c (c_clone_omp_udr): Don't initialize
909 id.transform_lang_insert_block.
910
9c077398
GA
9112021-11-19 Martin Sebor <msebor@redhat.com>
912
913 PR c++/33925
914 PR c/102867
915 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
916 code resulting from macro expansion.
917
9182021-11-19 Martin Liska <mliska@suse.cz>
919
920 Revert:
921 2021-11-19 Martin Liska <mliska@suse.cz>
922
923 * c-parser.c (add_debug_begin_stmt): Use option directly.
924
483092d3
GA
9252021-11-18 Matthias Kretz <m.kretz@gsi.de>
926
927 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
928 * c-parser.c (c_parser_postfix_expression): Likewise.
929
9302021-11-18 Martin Liska <mliska@suse.cz>
931
932 * c-parser.c (add_debug_begin_stmt): Use option directly.
933
280d2838
GA
9342021-11-17 Martin Sebor <msebor@redhat.com>
935
936 PR c/101702
937 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
938 bounds before deciding if they're constant.
939
e2b57363
GA
9402021-11-15 Jakub Jelinek <jakub@redhat.com>
941
942 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
943 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
944
b39265d4
GA
9452021-11-11 Jakub Jelinek <jakub@redhat.com>
946
947 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
948 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
949 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
950 OMP_CLAUSE_NUM_TEAMS_EXPR.
951 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
952 combined target teams even lower-bound expression.
953
9542021-11-11 Richard Biener <rguenther@suse.de>
955
956 * gimple-parser.c: Shuffle bitmap.h include.
957
18ae471f
GA
9582021-11-03 Joseph Myers <joseph@codesourcery.com>
959
960 PR c/103031
961 * c-convert.c (c_convert): New function, based on convert.
962 (convert): Make into wrapper of c_convert.
963 (convert_init): New function.
964 * c-typeck.c (enum impl_conv): Add ic_init_const.
965 (convert_for_assignment): Handle ic_init_const like ic_init. Add
966 new argument to convert_and_check call.
967 (digest_init): Pass ic_init_const to convert_for_assignment for
968 initializers required to be constant.
969
b4df2dd3
GA
9702021-11-02 Richard Sandiford <richard.sandiford@arm.com>
971
972 * c-tree.h (c_simulate_record_decl): Declare.
973 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
974 * c-decl.c (c_simulate_record_decl): New function.
975
c2bd5d8a
GA
9762021-10-22 Eric Gallager <egallager@gcc.gnu.org>
977
978 PR other/102663
979 * Make-lang.in: Add dummy c.install-dvi target.
980
93d183a5
GA
9812021-10-15 Richard Biener <rguenther@suse.de>
982
983 PR c/102763
984 * gimple-parser.c
985 (c_parser_gimple_postfix_expression_after_primary): Check
986 for a pointer do be dereferenced by ->.
987
5d5885c9
GA
9882021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
989
990 * c-parser.c (c_finish_omp_declare_variant): Change call from
991 c_omp_check_context_selector to omp_check_context_selector. Change
992 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
993
c9db17b8
GA
9942021-10-09 Jakub Jelinek <jakub@redhat.com>
995
996 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
997 (c_parser_omp_scan_loop_body): Use it.
998 (c_parser_omp_sections_scope): Likewise.
999
50e20ee6
GA
10002021-10-07 Richard Biener <rguenther@suse.de>
1001
1002 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1003
bb6194e0
GA
10042021-10-05 Richard Biener <rguenther@suse.de>
1005
1006 PR c/102605
1007 * gimple-parser.c (c_parser_gimple_postfix_expression):
1008 Accept more address _Literals.
1009
da9c5f78
GA
10102021-10-04 Marek Polacek <polacek@redhat.com>
1011
1012 PR c++/97573
1013 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1014
9d116bcc
GA
10152021-10-01 Martin Sebor <msebor@redhat.com>
1016
1017 PR c/102103
1018 * c-typeck.c (maybe_warn_for_null_address): New function.
1019 (build_binary_op): Call it.
1020
10212021-10-01 Jakub Jelinek <jakub@redhat.com>
1022 Richard Biener <rguenther@suse.de>
1023
1024 PR sanitizer/102515
1025 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1026 for division even for SANITIZE_SI_OVERFLOW.
1027
10282021-10-01 Jakub Jelinek <jakub@redhat.com>
1029
1030 * c-parser.c (c_parser_omp_clause_order): Set
1031 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1032
fd133479
GA
10332021-09-28 Andrew Pinski <apinski@marvell.com>
1034
1035 PR c/32122
1036 * c-parser.c (c_parser_statement_after_labels): Pass
1037 the c_expr instead of the tree to c_finish_goto_ptr.
1038 * c-typeck.c (c_finish_goto_ptr): Change the second
1039 argument type to c_expr.
1040 * c-tree.h (c_finish_goto_ptr): Likewise.
1041 Error out if the expression was not of a pointer type.
1042
e4777439
GA
10432021-09-22 Jakub Jelinek <jakub@redhat.com>
1044
1045 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1046 modifiers.
1047
cf74e7b5
GA
10482021-09-18 Jakub Jelinek <jakub@redhat.com>
1049
1050 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1051 and reproducible modifiers.
1052 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1053
10542021-09-18 Jakub Jelinek <jakub@redhat.com>
1055
1056 * c-parser.c (c_parser_omp_clause_default): Handle private and
1057 firstprivate arguments, adjust diagnostics on unknown argument.
1058
0a4cb439
GA
10592021-09-17 Jakub Jelinek <jakub@redhat.com>
1060
1061 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1062 is true.
1063
a26206ec
GA
10642021-09-10 Jakub Jelinek <jakub@redhat.com>
1065
1066 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1067 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1068 don't call build_conditional_expr, instead build a COND_EXPR directly.
1069 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1070 if omp_atomic_lhs even in more cases for >, < or ==.
1071 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1072 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1073 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1074 * c-typeck.c (build_binary_op): For flag_openmp only handle
1075 MIN_EXPR/MAX_EXPR.
1076
b2748138
GA
10772021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1078
1079 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1080 directive.
1081
e11c6046
GA
10822021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1083
1084 * c-decl.c (enum deprecated_states): Add unavailable state.
1085 (merge_decls): Copy unavailability.
1086 (quals_from_declspecs): Handle unavailable case.
1087 (start_decl): Amend the logic handling suppression of nested
1088 deprecation states to include unavailability.
1089 (smallest_type_quals_location): Amend comment.
1090 (grokdeclarator): Handle the unavailable deprecation state.
1091 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1092 * c-tree.h (struct c_declspecs): Add unavailable_p.
1093 * c-typeck.c (build_component_ref): Handle unavailability.
1094 (build_external_ref): Likewise.
1095
10962021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1097 Joseph Myers <joseph@codesourcery.com>
1098
1099 PR c/79412
1100 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1101 types of both (non-function) decls as error_mark_node, so that the
1102 middle-end can see the code is malformed.
1103 (free_attr_access_data): Don't process if the type has been set to
1104 error_mark_node.
1105
6d51ee43
GA
11062021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1107
1108 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1109 and 'ancestor' in 'target device' clauses.
1110
38b19c5b
GA
11112021-08-23 Jakub Jelinek <jakub@redhat.com>
1112
1113 * c-parser.c (c_parser_omp_clause_num_tasks,
1114 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1115
5b2876f9
GA
11162021-08-22 Martin Uecker <muecker@gwdg.de>
1117
1118 PR c/98397
1119 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1120 for pointers to arrays with qualifiers.
1121 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1122 to arrays when the other pointer is a void pointer. Update warnings.
1123 (convert_for_assignment): Update warnings for C2X when converting from
1124 void* with qualifiers to a pointer to array with the same qualifiers.
1125
7c9e1645
GA
11262021-08-20 Jakub Jelinek <jakub@redhat.com>
1127
1128 * c-parser.c (c_parser_omp_error): New function.
1129 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1130
11312021-08-20 Jakub Jelinek <jakub@redhat.com>
1132
1133 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1134 comma at the end of list.
1135 (c_parser_omp_requires): Likewise.
1136
b57fba5e
GA
11372021-08-19 Jakub Jelinek <jakub@redhat.com>
1138
1139 * c-parser.c (c_parser_omp_requires): Don't call
1140 c_parser_peek_2nd_token and optionally consume token if current
1141 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1142
6e529985
GA
11432021-08-18 Jakub Jelinek <jakub@redhat.com>
1144
1145 * c-parser.c (c_parser_omp_nothing): New function.
1146 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1147
11482021-08-18 Jakub Jelinek <jakub@redhat.com>
1149
1150 * c-parser.c (c_parser_statement_after_labels): Add restart label
1151 near the start of the function. If c_parser_pragma returns false,
1152 goto restart.
1153 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1154 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1155 return what c_parser_omp_declare returned. Return true instead of
1156 false after emitting errors that the directive is not allowed in
1157 pragma_stmt context.
1158 (c_parser_omp_ordered): Return true instead of
1159 false after emitting errors that the directive is not allowed in
1160 pragma_stmt context.
1161 (c_parser_omp_target_update): Likewise.
1162 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1163 Change return type from tree to bool, return false if the
1164 directive should be ignored in pragma_stmt contexts.
1165 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1166 return their result directly.
1167 (c_parser_omp_cancellation_point): Change return type from void to
1168 bool, return false if the directive should be ignored in pragma_stmt
1169 contexts.
1170 (c_parser_omp_declare): Likewise.
1171
2d14d64b
GA
11722021-08-17 Jakub Jelinek <jakub@redhat.com>
1173
1174 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1175 (c_parser_omp_scope): New function.
1176 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1177
72be20e2
GA
11782021-08-12 Jakub Jelinek <jakub@redhat.com>
1179
1180 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1181 (c_parser_omp_clause_filter): New function.
1182 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1183 (OMP_MASKED_CLAUSE_MASK): Define.
1184 (c_parser_omp_masked): New function.
1185 (c_parser_omp_parallel): Handle parallel masked.
1186 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1187 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1188
11892021-08-12 Martin Uecker <muecker@gwdg.de>
1190
1191 PR c/101838
1192 PR c/29970
1193 * c-typeck.c (c_expr_sizeof_type): Evaluate
1194 size expressions for structs of variable size.
1195
11962021-08-12 Tobias Burnus <tobias@codesourcery.com>
1197
1198 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1199 'primary' as alias for 'master'.
1200
3ae564ea
GA
12012021-08-10 Martin Uecker <muecker@gwdg.de>
1202
1203 PR c/29970
1204 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1205 size expressions for structs of variable size.
1206
f92f4778
GA
12072021-08-06 Tamar Christina <tamar.christina@arm.com>
1208
1209 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1210 * c-tree.h (c_simulate_enum_decl): Likewise.
1211
12122021-08-06 Martin Sebor <msebor@redhat.com>
1213
1214 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1215 vec arguments to by-reference.
1216 (c_finish_omp_declare_simd): Same.
1217 (c_parser_compound_statement_nostart): Same.
1218 (c_parser_for_statement): Same.
1219 (c_parser_objc_methodprotolist): Same.
1220 (c_parser_oacc_routine): Same.
1221 (c_parser_omp_for_loop): Same.
1222 (c_parser_omp_declare_simd): Same.
1223
419c6c68
GA
12242021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1225 Joseph Myers <joseph@codesourcery.com>
1226 Cesar Philippidis <cesar@codesourcery.com>
1227
1228 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1229 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1230 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1231 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1232
92d45509
GA
12332021-07-20 Martin Sebor <msebor@redhat.com>
1234
1235 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1236 by-const-reference.
1237 * c-typeck.c (c_build_function_call_vec): Same.
1238
d97d71a1
GA
12392021-07-15 Martin Sebor <msebor@redhat.com>
1240
1241 PR c/101289
1242 PR c/97548
1243 * c-decl.c (get_parm_array_spec): Strip nops.
1244
6fba0eea
GA
12452021-07-06 Martin Sebor <msebor@redhat.com>
1246
1247 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1248
7a60a6e8
GA
12492021-07-02 Jakub Jelinek <jakub@redhat.com>
1250
1251 PR c/101297
1252 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1253 appears before a CPP_NAME.
1254
90708f87
GA
12552021-06-25 Martin Sebor <msebor@redhat.com>
1256
1257 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1258 warning_suppressed_p, suppress_warning, and copy_no_warning.
1259 (diagnose_mismatched_decls): Same.
1260 (duplicate_decls): Same.
1261 (grokdeclarator): Same.
1262 (finish_function): Same.
1263 (c_write_global_declarations_1): Same.
1264 * c-fold.c (c_fully_fold_internal): Same.
1265 * c-parser.c (c_parser_expr_no_commas): Same.
1266 (c_parser_postfix_expression): Same.
1267 * c-typeck.c (array_to_pointer_conversion): Same.
1268 (function_to_pointer_conversion): Same.
1269 (default_function_array_conversion): Same.
1270 (convert_lvalue_to_rvalue): Same.
1271 (default_conversion): Same.
1272 (build_indirect_ref): Same.
1273 (build_function_call_vec): Same.
1274 (build_atomic_assign): Same.
1275 (build_unary_op): Same.
1276 (c_finish_return): Same.
1277 (emit_side_effect_warnings): Same.
1278 (c_finish_stmt_expr): Same.
1279 (c_omp_clause_copy_ctor): Same.
1280
9aa8327e
GA
12812021-06-24 Jakub Jelinek <jakub@redhat.com>
1282
1283 PR c/101176
1284 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1285 the result.
1286
12872021-06-24 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR c/101171
1290 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1291 error_mark_node.
1292
12932021-06-24 Jakub Jelinek <jakub@redhat.com>
1294
1295 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1296 C_ORT_OMP for clauses on target construct.
1297 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1298 (c_parser_omp_target): For non-combined target add
1299 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1300 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1301 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1302 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1303 never present on C_ORT_*DECLARE_SIMD.
1304 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1305 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1306 corresponding map clauses.
1307
2f080224
GA
13082021-06-21 Jakub Jelinek <jakub@redhat.com>
1309
1310 PR inline-asm/100785
1311 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1312 bit-fields addressable.
1313
ede6c356
GA
13142021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1315
1316 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1317 similar.
1318
8dc48181
GA
13192021-06-14 Tobias Burnus <tobias@codesourcery.com>
1320
1321 PR c/100913
1322 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1323 var in the error case.
1324
438aac59
GA
13252021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1326
1327 PR c/100920
1328 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1329 spot built-in functions.
1330
7d6987e9
GA
13312021-06-06 Jakub Jelinek <jakub@redhat.com>
1332
1333 PR c/100902
1334 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1335 even when target is combined with other constructs.
1336
13372021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1338
1339 PR c/100920
1340 * c-decl.c (finish_struct): Fix thinko in previous change.
1341 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1342 assignment and initialization for storage order purposes if the
1343 RHS is a call to a DECL_IS_MALLOC function.
1344
600f90cb
GA
13452021-06-04 Martin Sebor <msebor@redhat.com>
1346
1347 PR c/100783
1348 * c-objc-common.c (print_type): Handle erroneous types.
1349
440c8a0a
GA
13502021-06-03 Jakub Jelinek <jakub@redhat.com>
1351
1352 PR c++/100859
1353 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1354 after depend only cases.
1355
ee682192
GA
13562021-05-31 Richard Biener <rguenther@suse.de>
1357
1358 PR c++/88601
1359 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1360 * c-parser.c (c_parser_postfix_expression): Likewise.
1361
48166757
GA
13622021-05-28 Richard Biener <rguenther@suse.de>
1363
1364 PR c/100803
1365 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1366 invalid if conditions.
1367
13682021-05-28 Jakub Jelinek <jakub@redhat.com>
1369
1370 PR middle-end/99928
1371 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1372 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1373 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1374 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1375 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1376 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1377 if present in map_head, map_field_head or map_firstprivate_head
1378 bitmaps.
1379
13802021-05-28 Tobias Burnus <tobias@codesourcery.com>
1381
1382 * c-parser.c (c_parser_omp_clause_affinity): New.
1383 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1384 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1385 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1386 c_finish_omp_clauses): Likewise.
1387
01c59ef2
GA
13882021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1389
1390 PR c/100653
1391 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1392 field with a differing scalar storage order.
1393
2832d51b
GA
13942021-05-21 Jakub Jelinek <jakub@redhat.com>
1395
1396 PR middle-end/99928
1397 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1398 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1399 if a decl is mentioned both in map clause and in such firstprivate
1400 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1401
65f32e5d
GA
14022021-05-19 Jakub Jelinek <jakub@redhat.com>
1403
1404 PR middle-end/99928
1405 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1406 master when combined with taskloop.
1407 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1408 parallel master when not combined with taskloop.
1409
a8daf9a1
GA
14102021-05-18 Richard Biener <rguenther@suse.de>
1411
1412 PR c/100522
1413 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1414 Diagnose calls to non-functions.
1415 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1416
a7ffc1ef
GA
14172021-05-17 Richard Biener <rguenther@suse.de>
1418
1419 PR c/100625
1420 * gimple-parser.c (c_parser_gimple_label): Avoid building
1421 a GIMPLE label with NULL label decl.
1422
f9af11c7
GA
14232021-05-13 Martin Sebor <msebor@redhat.com>
1424
1425 PR c/100550
1426 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1427
0ff3a0f2
GA
14282021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1429
1430 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1431 'close'.
1432
aa891c56
GA
14332021-05-10 Martin Liska <mliska@suse.cz>
1434
1435 * c-aux-info.c (affix_data_type): Use startswith
1436 function instead of strncmp.
1437 * c-typeck.c (build_function_call_vec): Likewise.
1438 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1439
62d87a32
GA
14402021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1441
1442 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1443 on the address of a pointer field in a record with reverse SSO.
1444
99e8df7a
GA
14452021-05-04 Tobias Burnus <tobias@codesourcery.com>
1446
1447 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1448 for || and && reductions.
1449
3c8e539d
GA
14502021-04-29 Joseph Myers <joseph@codesourcery.com>
1451
1452 * c-typeck.c (function_types_compatible_p): For C2X, treat
1453 unprototyped function as compatible with non-variadic prototyped
1454 function even if some argument types are changed by the default
1455 argument promotions.
1456
ee351f7f
GA
14572021-04-15 Martin Sebor <msebor@redhat.com>
1458
1459 PR c/99420
1460 PR c/99972
1461 * c-decl.c (pushdecl): Always propagate type attribute.
1462
14632021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1464
1465 PR c/98852
1466 * c-typeck.c (c_common_type): Do not drop attributes that
1467 affect type identity.
1468
1d54b138
GA
14692021-04-10 Jakub Jelinek <jakub@redhat.com>
1470
1471 PR c/99990
1472 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1473 error_mark_node.
1474
4493b1c1
GA
14752021-03-25 Jakub Jelinek <jakub@redhat.com>
1476
1477 PR c++/99565
1478 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1479 to operand_equal_p.
1480
5f256a70
GA
14812021-03-19 Jakub Jelinek <jakub@redhat.com>
1482
1483 PR c/99588
1484 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1485 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1486 if found.
1487 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1488 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1489 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1490
3c5b6d24
GA
14912021-03-15 Tobias Burnus <tobias@codesourcery.com>
1492
1493 PR c++/99509
1494 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1495 ensure that the varpool node is marked as offloadable.
1496
ceae9533
GA
14972021-03-05 Tobias Burnus <tobias@codesourcery.com>
1498
1499 PR c/99137
1500 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1501
4028d01a
GA
15022021-02-24 Martin Sebor <msebor@redhat.com>
1503
1504 PR middle-end/97172
1505 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1506
bf81237e
GA
15072021-02-18 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c/99136
1510 * c-typeck.c (c_finish_return): Don't wrap retval into
1511 EXCESS_PRECISION_EXPR in functions that return void.
1512
0c5cdb31
GA
15132021-02-11 Marek Polacek <polacek@redhat.com>
1514
1515 * c-parser.c (c_parser_if_statement): Use vec_free.
1516
a19dd5e6
GA
15172021-02-04 Martin Sebor <msebor@redhat.com>
1518
1519 PR c/97882
1520 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1521 (diagnose_mismatched_decls): Same.
1522 (start_function): Introduce temporaries for better readability.
1523 * c-typeck.c (comptypes_internal): Only consider complete enum
1524 types in comparisons with integers.
1525
f7884fb1
GA
15262021-02-01 Martin Sebor <msebor@redhat.com>
1527
1528 PR middle-end/97172
1529 * c-decl.c (free_attr_access_data): New function.
1530 (c_parse_final_cleanups): Call free_attr_access_data.
1531
59cf67d1
GA
15322021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1533
1534 * c-parser.c (c_parser_omp_clause_detach): New.
1535 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1536 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1537 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1538 clause. Prevent use of detach with mergeable and overriding the
1539 data sharing mode of the event handle.
1540
2f7f0d32
GA
15412021-01-15 Jakub Jelinek <jakub@redhat.com>
1542
1543 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1544 unqualified element type and then call c_build_qualified_type on the
1545 ARRAY_TYPE.
1546
7d187e4f
GA
15472021-01-07 Richard Biener <rguenther@suse.de>
1548
1549 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1550 reallocate loop array if it is too small.
1551
eefe499f
GA
15522020-12-16 Martin Uecker <muecker@gwdg.de>
1553
1554 PR c/98047
1555 * c-typeck.c (build_modify_expr): Drop qualifiers.
1556
15572020-12-16 Martin Uecker <muecker@gwdg.de>
1558
1559 PR c/98260
1560 * c-parser.c (c_parser_expression): Look into
1561 nop expression when marking expressions as read.
1562
d52945ce
GA
15632020-12-14 Martin Liska <mliska@suse.cz>
1564
1565 PR sanitizer/98204
1566 * c-typeck.c (pointer_diff): Do not emit a top-level
1567 sanitization.
1568 (build_binary_op): Likewise.
1569
ca2bd949
GA
15702020-12-09 Tobias Burnus <tobias@codesourcery.com>
1571
1572 * c-parser.c (c_parser_omp_allocate): New.
1573 (c_parser_omp_construct): Call it.
1574
15752020-12-09 Richard Biener <rguenther@suse.de>
1576
1577 PR c/98200
1578 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1579 early on error.
1580
bc8a7013
GA
15812020-12-07 Martin Uecker <muecker@gwdg.de>
1582
1583 PR c/97981
1584 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1585 that drops qualifiers to the end of the function.
1586
d48df6f2
GA
15872020-11-26 Martin Uecker <muecker@gwdg.de>
1588
1589 PR c/65455
1590 PR c/92935
1591 * c-parser.c (c_parser_declaration_or_fndef): Remove
1592 redundant code to drop qualifiers of _Atomic types for __auto_type.
1593 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1594 types for __typeof__.
1595
1e2c9a27
GA
15962020-11-24 Jakub Jelinek <jakub@redhat.com>
1597
1598 PR c/97958
1599 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1600 expressions, use make_node instead of build2 to avoid checking build2
1601 performs.
1602
8e6198d0
GA
16032020-11-23 Joseph Myers <joseph@codesourcery.com>
1604
1605 PR c/95630
1606 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1607 for comparisons of complete and incomplete pointers.
1608
7a97e2fc
GA
16092020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1610
1611 * c-aux-info.c (gen_type): Support opaque types.
1612
82e5048e
GA
16132020-11-20 Martin Sebor <msebor@redhat.com>
1614
1615 PR middle-end/97879
1616 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1617
16182020-11-20 Jakub Jelinek <jakub@redhat.com>
1619
1620 PR other/97911
1621 * Make-lang.in (c.serial): Change from goal to a variable.
1622 (.PHONY): Drop c.serial.
1623
16242020-11-20 Martin Uecker <muecker@gwdg.de>
1625
1626 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1627
d62586ee
GA
16282020-11-19 Jakub Jelinek <jakub@redhat.com>
1629
1630 PR c/97860
1631 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1632 error_operand_p.
1633
25bb75f8
GA
16342020-11-18 Jakub Jelinek <jakub@redhat.com>
1635
1636 * Make-lang.in (c.serial): New goal.
1637 (.PHONY): Add c.serial c.prev.
1638 (cc1$(exeext)): Call LINK_PROGRESS.
1639
77f67db2
GA
16402020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1641
1642 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1643 goto too.
1644 * c-typeck.c (build_asm_expr): Remove an assert checking output
1645 absence for asm goto.
1646
16472020-11-13 Jakub Jelinek <jakub@redhat.com>
1648
1649 * c-typeck.c (c_finish_omp_clauses): Don't clear
1650 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1651
16522020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1653
1654 PR objc/77404
1655 * c-parser.c (c_parser_objc_class_definition): Pass the
1656 location of the class name to the interface declaration.
1657
bb622641
GA
16582020-11-10 Strager Neds <strager.nds@gmail.com>
1659
1660 * c-decl.c (merge_decls): Use new overload of
1661 set_decl_section_name.
1662
16632020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1664
1665 * c-parser.c (c_parser_omp_target_data): Add use of
1666 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1667 handled map clause kind.
1668 (c_parser_omp_target_enter_data): Likewise.
1669 (c_parser_omp_target_exit_data): Likewise.
1670 (c_parser_omp_target): Likewise.
1671 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1672 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1673 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1674 same struct field access to co-exist on OpenMP construct.
1675
2da7ee05
GA
16762020-11-07 Martin Uecker <muecker@gwdg.de>
1677
1678 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1679 (c_parser_all_labels): Likewise.
1680
44cab2d8
GA
16812020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1682
1683 * c-parser.c (c_parser_objc_at_property_declaration):
1684 Improve parsing fidelity. Associate better location info
1685 with @property attributes. Clean up the interface to
1686 objc_add_property_declaration ().
1687
16882020-11-06 Nathan Sidwell <nathan@acm.org>
1689
1690 * c-decl.c (diagnose_mismatched_decls): Rename
1691 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1692 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1693 (collect_source_refs): Likewise.
1694 * c-typeck.c (inform_declaration, inform_for_arg)
1695 (convert_for_assignment): Likewise.
1696
16972020-11-06 Tobias Burnus <tobias@codesourcery.com>
1698
1699 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1700 OpenACC matching.
1701 (c_parser_omp_construct): Update call.
1702
35c125cb
GA
17032020-11-04 Jakub Jelinek <jakub@redhat.com>
1704
1705 PR c++/97670
1706 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1707 find underlying decl to clear in the aligned_head bitmap.
1708
17092020-11-04 Joseph Myers <joseph@codesourcery.com>
1710
1711 * c-decl.c (handle_nodiscard_attribute): New.
1712 (std_attribute_table): Add nodiscard.
1713 * c-parser.c (c_parser_std_attribute): Expect argument to
1714 nodiscard attribute to be a string. Do not special-case ignoring
1715 nodiscard.
1716 * c-typeck.c (maybe_warn_nodiscard): New.
1717 (build_compound_expr, emit_side_effect_warnings): Call
1718 maybe_warn_nodiscard.
1719 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1720 emit_side_effect_warnings if warn_unused_result.
1721
4f0606fe
GA
17222020-10-29 Asher Gordon <AsDaGo@posteo.net>
1723
1724 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1725 with XDELETE.
1726 (finish_init): Likewise.
1727 (pop_init_level): Likewise.
1728
e93aae4a
GA
17292020-10-28 Joseph Myers <joseph@codesourcery.com>
1730
1731 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1732 error_at for omitted parameter name.
1733
17342020-10-28 Jakub Jelinek <jakub@redhat.com>
1735
1736 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1737 (c_parser_omp_clause_allocate): New function.
1738 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1739 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1740 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1741 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1742 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1743 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1744 PRAGMA_OMP_CLAUSE_ALLOCATE.
1745 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1746
89bb01e7
GA
17472020-10-27 Joseph Myers <joseph@codesourcery.com>
1748
1749 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1750 standard attributes.
1751
efe71fcc
GA
17522020-10-23 Marek Polacek <polacek@redhat.com>
1753
1754 PR c++/91741
1755 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1756 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1757 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1758 * c-tree.h (char_type_p): Declare.
1759 * c-typeck.c (char_type_p): No longer static.
1760
17612020-10-23 Martin Sebor <msebor@redhat.com>
1762
1763 PR middle-end/97552
1764 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1765
2fe5b7d1
GA
17662020-09-19 Martin Sebor <msebor@redhat.com>
1767
1768 PR c/50584
1769 * c-decl.c (lookup_last_decl): Define new function.
1770 (c_decl_attributes): Call it.
1771 (start_decl): Add argument and use it.
1772 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1773 (get_parm_array_spec): Define new function.
1774 (push_parm_decl): Call get_parm_array_spec.
1775 (start_function): Call warn_parm_array_mismatch. Build attribute
1776 access and add it to current function.
1777 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1778 in forms of array parameters.
1779 * c-tree.h (start_decl): Add argument.
1780
17812020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1782
1783 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1784 with...
1785 (in_statement): New.
1786 (start_function): Adjust for above change.
1787 (c_push_function_context, c_pop_function_context): Likewise.
1788 * c-lang.h (struct language_function): Likewise.
1789 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1790 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1791 New.
1792 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1793 (c_parser_switch_statement): Adjust break/switch context handling
1794 and calls to renamed functions.
1795 (c_parser_while_statement): Adjust break/switch context handling and
1796 build a WHILE_STMT.
1797 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1798 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1799 (c_parser_omp_for_loop): Adjust break/switch context handling.
1800 * c-tree.h (c_break_label, c_cont_label): Delete.
1801 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1802 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1803 (in_statement, switch_statement_break_seen_p): Declare.
1804 (c_start_case, c_finish_case): Renamed to...
1805 (c_start_switch, c_finish_switch).
1806 (c_finish_bc_stmt): Adjust arguments.
1807 * c-typeck.c (build_function_call_vec): Don't try to print
1808 statements with %qE format.
1809 (struct c_switch): Rename switch_expr field to switch_stmt.
1810 Add break_stmt_seen_p field.
1811 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1812 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1813 (do_case): Update for changes to struct c_switch.
1814 (c_finish_case): Rename to c_finish_switch. Update for changes to
1815 struct c_switch and change of representation from SWITCH_EXPR to
1816 SWITCH_STMT.
1817 (c_finish_loop): Delete.
1818 (c_finish_bc_stmt): Update to reflect changes to break/continue
1819 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1820 of a GOTO_EXPR except for objc foreach loops.
1821
e1a4a8a0
GA
18222020-09-01 Jakub Jelinek <jakub@redhat.com>
1823
1824 PR c++/96867
1825 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1826 only on PARM_DECLs.
1827
8f7ea26a
GA
18282020-08-28 Martin Sebor <msebor@redhat.com>
1829
1830 PR c/96596
1831 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1832 argument type.
1833
8b394f01
GA
18342020-08-27 Martin Liska <mliska@suse.cz>
1835
1836 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1837 growth function to true.
1838
db0f6efe
GA
18392020-08-25 Tobias Burnus <tobias@codesourcery.com>
1840
1841 PR c/96678
1842 * c-typeck.c (handle_omp_array_sections_1): Talk about
1843 array function parameter in the error message.
1844
5c265693
GA
18452020-08-18 Jakub Jelinek <jakub@redhat.com>
1846
1847 PR c/96571
1848 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1849 to int, holding index of the match. Call mark_exp_read on the selector
1850 expression and on expressions other than the selected one.
1851
4967ca2f
GA
18522020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1853
1854 PR c/96377
1855 * c-typeck.c (process_init_element): Split test for whether to
1856 recurse into a record, union or array into...
1857 (initialize_elementwise_p): ...this new function. Don't recurse
1858 into a vector type if the initialization value is also a vector.
1859
48cc2e46
GA
18602020-07-31 Richard Biener <rguenther@suse.de>
1861
1862 PR debug/96383
1863 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1864 Define to c_common_finalize_early_debug.
1865
3ea9abca
GA
18662020-07-22 Tobias Burnus <tobias@codesourcery.com>
1867
1868 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1869 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1870 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1871
30430061
GA
18722020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1873
1874 PR target/95237
1875 * c-decl.c (finish_decl): Call target hook
1876 lower_local_decl_alignment to lower local decl alignment.
1877
3f8ca9cb
GA
18782020-07-09 Julian Brown <julian@codesourcery.com>
1879 Thomas Schwinge <thomas@codesourcery.com>
1880
1881 PR middle-end/95270
1882 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1883 for standalone attach/detach clauses.
1884
a82c4c4c 18852020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1886
1887 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1888 set, warn for conversion between pointers that point to incompatible
1889 scalar storage orders.
1890
f60ee68d
GA
18912020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1892
1893 * c-parser.c (c_parser_statement_after_labels): Pass correct
1894 parameters to c_parser_do_statement.
1895
56638b9b
GA
18962020-06-16 Jakub Jelinek <jakub@redhat.com>
1897
1898 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1899 c_in_omp_for.
1900 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1901 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1902 c_finish_omp_for.
1903 * c-tree.h (c_in_omp_for): Declare.
1904 * c-typeck.c (c_in_omp_for): Define.
1905 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1906 (digest_init): Likewise.
1907 (build_binary_op): Likewise.
1908
19092020-06-16 Jakub Jelinek <jakub@redhat.com>
1910
1911 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1912 from kind by comma rather than colon.
1913
1a59f3db
GA
19142020-06-05 Mark Wielaard <mark@klomp.org>
1915
1916 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1917 an undeclared builtin, then add a fixit header hint, if found.
1918 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1919 warning_at about implicit builtin declaration type mismatch.
1920
9a5b7438
GA
19212020-06-03 Mark Wielaard <mark@klomp.org>
1922
1923 * c-parser.c (struct c_parser): Add seen_string_literal
1924 bitfield.
1925 (c_parser_consume_token): Reset seen_string_literal.
1926 (c_parser_error_richloc): Add name_hint if seen_string_literal
1927 and next token is a CPP_NAME and we have a missing header
1928 suggestion for the name.
1929 (c_parser_string_literal): Set seen_string_literal.
1930
19312020-06-03 Mark Wielaard <mark@klomp.org>
1932
1933 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1934 scope with matching_parens after CPP_OPEN_PAREN.
1935
19362020-06-03 Tobias Burnus <tobias@codesourcery.com>
1937
1938 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1939
53ffb43a
GA
19402020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1941
1942 * Make-lang.in: Remove extra slash.
1943
8f66f175
ML
19442020-05-19 Martin Liska <mliska@suse.cz>
1945
1946 * c-parser.c: Fix typo.
1947
49ddde69
JJ
19482020-05-14 Jakub Jelinek <jakub@redhat.com>
1949
1950 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1951
eb72dc66
RB
19522020-05-07 Richard Biener <rguenther@suse.de>
1953
1954 PR middle-end/94703
1955 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1956 DECL_GIMPLE_REG_P.
1957
bf915591
JJ
19582020-04-30 Jakub Jelinek <jakub@redhat.com>
1959
1960 PR c/94842
1961 * c-decl.c (set_labels_context_r): In addition to context-less
1962 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1963 parent function if any.
1964 (store_parm_decls): Adjust comment.
1965
e1113ffb
JJ
19662020-04-19 Jakub Jelinek <jakub@redhat.com>
1967
1968 PR objc/94637
1969 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1970 two CPP_COLON tokens.
1971
2e389749
JJ
19722020-04-17 Jakub Jelinek <jakub@redhat.com>
1973
1974 PR other/94629
1975 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1976 to data.clauses.
1977
2dc9294c
JJ
19782020-04-15 Jakub Jelinek <jakub@redhat.com>
1979
1980 PR c/94593
1981 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1982 requires directive when not at file scope.
1983
13e41d8b
TB
19842020-04-08 Tobias Burnus <tobias@codesourcery.com>
1985
1986 PR middle-end/94120
1987 * c-decl.c (c_check_in_current_scope): New function.
1988 * c-tree.h (c_check_in_current_scope): Declare it.
1989 * c-parser.c (c_parser_oacc_declare): Add check that variables
1990 are declared in the same scope as the directive. Fix handling
1991 of namespace vars.
1992
4df50a05
JJ
19932020-04-07 Jakub Jelinek <jakub@redhat.com>
1994
1995 PR c++/94512
1996 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1997 if c_parser_omp_master succeeded.
1998
5db9e893
JJ
19992020-03-23 Jakub Jelinek <jakub@redhat.com>
2000
2001 PR gcov-profile/94029
2002 PR c/94239
2003 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2004 the function_start_locus location. Don't do that afterwards for the
2005 __GIMPLE body parsing.
2006
9def91e9
JJ
20072020-03-19 Jakub Jelinek <jakub@redhat.com>
2008
2009 PR gcov-profile/94029
2010 * c-tree.h (finish_function): Add location_t argument defaulted to
2011 input_location.
2012 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2013 set it to the locus of closing } if non-NULL.
2014 (c_parser_compound_statement_nostart): Return locus of closing }.
2015 (c_parser_parse_rtl_body): Likewise.
2016 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2017 finish_function.
2018 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2019 input_location to set function_end_locus.
2020
046c5890
JJ
20212020-03-17 Jakub Jelinek <jakub@redhat.com>
2022
2023 PR c/94172
2024 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2025 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2026 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2027 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2028 ENUMERAL_TYPEs.
2029 (finish_incomplete_vars): New function, moved from finish_struct. Use
2030 relayout_decl instead of layout_decl.
2031 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2032 being TYPE_VFIELD. Use finish_incomplete_vars.
2033 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2034 finish_incomplete_vars.
2035 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2036 also on ENUMERAL_TYPEs.
2037
c015ff8c
JJ
20382020-03-16 Jakub Jelinek <jakub@redhat.com>
2039
2040 PR c/94179
2041 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2042
f2e9fe5f
MS
20432020-03-13 Martin Sebor <msebor@redhat.com>
2044
2045 PR c/94040
2046 * c-decl.c (builtin_structptr_type_count): New constant.
2047 (match_builtin_function_types): Reject decls that are incompatible
2048 in types pointed to by pointers.
2049 (diagnose_mismatched_decls): Adjust comments.
2050
c9d70946
JM
20512020-03-05 Joseph Myers <joseph@codesourcery.com>
2052
2053 PR c/93577
2054 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2055 empty when initialized type is error_mark_node.
2056 (set_designator, process_init_element): Ignore initializers for
2057 elements of a variable-size type or of error_mark_node.
2058
726e292d
MS
20592020-03-01 Martin Sebor <msebor@redhat.com>
2060
2061 PR middle-end/93926
2062 * c-decl.c (types_close_enough_to_match): New function.
2063 (match_builtin_function_types):
2064 (diagnose_mismatched_decls): Add missing inform call to a warning.
2065
a499c2f8
MS
20662020-03-01 Martin Sebor <msebor@redhat.com>
2067
2068 PR c/93812
2069 * c-typeck.c (build_functype_attribute_variant): New function.
2070 (composite_type): Call it.
2071
9c3da8cc
JJ
20722020-02-25 Jakub Jelinek <jakub@redhat.com>
2073
2074 PR other/93912
2075 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2076 Rename last argument from probablity to probability.
2077
bacdd5e9
JJ
20782020-02-13 Jakub Jelinek <jakub@redhat.com>
2079
2080 PR c/93576
2081 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2082 *expr if it has side effects.
2083
f9eb0973
JL
20842020-01-30 Jeff Law <law@redhat.com>
2085
2086 PR c/88660
2087 * c-parser.c (c_parser_switch_statement): Make sure to request
2088 marking the switch expr as used.
2089
ac68e287
JM
20902020-01-22 Joseph Myers <joseph@codesourcery.com>
2091
2092 PR c/93348
2093 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2094 argument with integer operands.
2095
852f0ae8
KK
20962020-01-16 Kerem Kat <keremkat@gmail.com>
2097
2098 PR c/92833
2099 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2100 to support 4 available tokens.
2101
e2346a33
JM
21022020-01-15 Joseph Myers <joseph@codesourcery.com>
2103
2104 PR c/93072
2105 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2106 determine whether to set DECL_CONTEXT.
2107
3d77686d
JM
21082020-01-13 Joseph Myers <joseph@codesourcery.com>
2109
2110 PR c/93241
2111 * c-typeck.c (build_c_cast): Check for expressions with integer
2112 operands that can occur in an unevaluated part of an integer
2113 constant expression and call note_integer_operands as needed.
2114
f74c4b2c
RB
21152019-01-08 Richard Biener <rguenther@suse.de>
2116
2117 PR middle-end/93199
2118 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2119 permanently.
2120
8d9254fc
JJ
21212020-01-01 Jakub Jelinek <jakub@redhat.com>
2122
2123 Update copyright years.
2124
39292e25
EB
21252019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2126
2127 * c-decl.c (collect_source_ref_cb): Delete.
2128 (for_each_global_decl): Rename into...
2129 (collect_source_refs): ...this. Call collect_source_ref directly.
2130 (c_parse_final_cleanups): Always call collect_source_ref on the main
2131 input filename.
2132
519d7496
JB
21332019-12-19 Julian Brown <julian@codesourcery.com>
2134 Cesar Philippidis <cesar@codesourcery.com>
2135
2136 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2137 detach clauses.
2138 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2139 Allow deref (->) in variable lists if true.
2140 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2141 Pass to c_parser_omp_variable_list.
2142 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2143 call to c_parser_omp_variable_list.
2144 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2145 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2146 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2147 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2148 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2149 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2150 and detach. Support deref.
2151 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2152 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2153 (c_oacc_check_attachments): New function.
2154 (c_finish_omp_clauses): Check attach/detach arguments for being
2155 pointers using above. Support deref.
2156
a6163563
JB
21572019-12-19 Julian Brown <julian@codesourcery.com>
2158 Maciej W. Rozycki <macro@codesourcery.com>
2159 Tobias Burnus <tobias@codesourcery.com>
2160 Thomas Schwinge <thomas@codesourcery.com>
2161
2162 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2163 (c_parser_oacc_data_clause): Likewise.
2164 (c_parser_oacc_all_clauses): Likewise.
2165 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2166 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2167 PRAGMA_OACC_CLAUSE_NO_CREATE.
2168 * c-typeck.c (handle_omp_array_sections): Support
2169 GOMP_MAP_NO_ALLOC.
2170
d68f5d45
DM
21712019-12-09 David Malcolm <dmalcolm@redhat.com>
2172
2173 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2174 Replace label_text ctor calls.
2175
4691bf46
JM
21762019-12-04 Joseph Myers <joseph@codesourcery.com>
2177
2178 PR c/36941
2179 PR c/88827
2180 * c-typeck.c (convert_lvalue_to_rvalue): Call
2181 require_complete_type for arguments not of void types.
2182 (build_indirect_ref): Do not diagnose dereferencing pointers to
2183 incomplete types.
2184 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2185
85d11957
JM
21862019-12-03 Joseph Myers <joseph@codesourcery.com>
2187
2188 PR c/88704
2189 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2190 old-style parameter definitions.
2191
4569f8b3
SL
21922019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2193
2194 PR target/92499
2195
2196 * c-decl.c (flexible_array_type_p): Move to common code.
2197
65ef05d0
RS
21982019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2199
2200 * c-decl.c (start_decl): Allow initialization of variables whose
2201 size is a POLY_INT_CST.
2202 (finish_decl): Use verify_type_context to check whether the target
2203 allows variables with a particular type to have static or thread-local
2204 storage duration. Don't raise a second error if such variables do
2205 not have a constant size.
2206 (grokdeclarator): Use verify_type_context to check whether the
2207 target allows fields or array elements to have a particular type.
2208 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2209 the target allows pointer difference for the types involved.
2210 (build_unary_op): Likewise for pointer increment and decrement.
2211
34b43828
JM
22122019-11-29 Joseph Myers <joseph@codesourcery.com>
2213
2214 * c-parser.c (struct c_parser): Add members raw_tokens and
2215 raw_tokens_used.
2216 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2217 using previously-lexed raw tokens.
2218 (c_parser_peek_nth_token_raw)
2219 (c_parser_check_balanced_raw_token_sequence): New functions.
2220 (c_parser_nth_token_starts_std_attributes): Use
2221 c_parser_check_balanced_raw_token_sequence for Objective-C.
2222
5b8d9367
JM
22232019-11-25 Joseph Myers <joseph@codesourcery.com>
2224
2225 PR c/91985
2226 * c-decl.c (finish_declspecs): Use int instead of decimal
2227 floating-point types if decimal floating-point not supported.
2228
1723e1be
JM
22292019-11-25 Joseph Myers <joseph@codesourcery.com>
2230
2231 * c-tree.h (struct c_declarator): Use a structure for id member.
2232 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2233 declarators at the start, not when handling individual declarators
2234 later. Use u.id.id instead of u.id.
2235 (grokfield): Use u.id.id instead of u.id.
2236 (build_id_declarator): Set u.id.id and u.id.attrs.
2237 (finish_declspecs): Handle postfix attributes in case of typedef
2238 name or typeof used.
2239 * c-parser.c (c_parser_direct_declarator)
2240 (c_parser_direct_declarator_inner): Place declarator for
2241 attributes inside that for function or array, not outside. Set
2242 u.id.attrs for identifiers.
2243 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2244 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2245 instead of u.id.
2246
bdaf8be1
JJ
22472019-11-22 Jakub Jelinek <jakub@redhat.com>
2248
2249 PR c/90677
2250 * c-decl.c (identifier_global_tag): Define.
2251
3e00ba47
RB
22522019-11-20 Richard Biener <rguenther@suse.de>
2253
2254 PR c/92088
2255 * c-decl.c (grokdeclarator): Prevent inlining of nested
2256 function with VLA arguments.
2257
8c5b727a
JM
22582019-11-20 Joseph Myers <joseph@codesourcery.com>
2259
2260 * c-decl.c (c_warn_type_attributes): New function.
2261 (groktypename, grokdeclarator, finish_declspecs): Call
2262 c_warn_type_attributes before applying attributes to types.
2263 * c-tree.h (c_warn_type_attributes): Declare.
2264
192961ff
JM
22652019-11-19 Joseph Myers <joseph@codesourcery.com>
2266
2267 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2268 standard attributes.
2269 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2270 pedwarn for unknown standard attributes and return error_mark_node
2271 for them.
2272
20a38017
MM
22732019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2274
2275 * c-parser.c (c_parser_parse_rtl_body): Always call
2276 run_rtl_passes, even if startwith pass is not provided.
2277
d5fbe5e0
JM
22782019-11-15 Joseph Myers <joseph@codesourcery.com>
2279
2280 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2281 duplicate standard attributes.
2282
97cc1187
JM
22832019-11-15 Joseph Myers <joseph@codesourcery.com>
2284
2285 * c-decl.c (std_attribute_table): Add maybe_unused.
2286
f8aea5e3
JM
22872019-11-15 Joseph Myers <joseph@codesourcery.com>
2288
2289 * c-decl.c (std_attribute_table): Add fallthrough.
2290 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2291 attribute at top level.
2292
2cc94aa8
JM
22932019-11-15 Joseph Myers <joseph@codesourcery.com>
2294
2295 * c-decl.c (std_attribute_table): New.
2296 (c_init_decl_processing): Register attributes from
2297 std_attribute_table.
2298 * c-parser.c (c_parser_attribute_arguments): Add arguments
2299 require_string and allow_empty_args. All callers changed.
2300 (c_parser_std_attribute): Set require_string argument for
2301 "deprecated" attribute.
2302
7c5890cc
JM
23032019-11-14 Joseph Myers <joseph@codesourcery.com>
2304
2305 * c-parser.c (c_parser_postfix_expression)
2306 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2307 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2308
e8738f4e
RS
23092019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2310
2311 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2312 of build_same_sized_truth_vector_type.
2313 (build_vec_cmp): Likewise.
2314
b2417b59
JJ
23152019-11-14 Jakub Jelinek <jakub@redhat.com>
2316
bedb7f04
JJ
2317 * c-parser.c (c_parser_omp_context_selector): Don't require score
2318 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2319 negative score.
2320
b2417b59
JJ
2321 * c-parser.c (c_parser_omp_context_selector): Rename
2322 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2323 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2324 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2325 and string literals.
2326
4e03c3a7
JM
23272019-11-14 Joseph Myers <joseph@codesourcery.com>
2328
2329 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2330 ctsk_tagfirstref_attrs.
2331 (struct c_declspecs): Update description of attrs. Add
2332 postfix_attrs and non_std_attrs_seen_p. Increase size of
2333 typespec_kind bit-field.
2334 (c_warn_unused_attributes): New declaration.
2335 (parser_xref_tag): Update prototype.
2336 * c-decl.c (c_warn_unused_attributes): New function.
2337 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2338 ctsk_tagref_attrs. Handle attribute declarations.
2339 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2340 (grokdeclarator): Handle standard attributes.
2341 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2342 attributes to incomplete type reference.
2343 (xref_tag): Update call to parser_xref_tag.
2344 (declspecs_add_addrspace, declspecs_add_type)
2345 (declspecs_add_scspec, declspecs_add_attrs): Set
2346 non_std_attrs_seen_p.
2347 (finish_declspecs): Apply postfix standard attributes to type.
2348 * c-parser.c (c_token_starts_declspecs)
2349 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2350 (c_parser_next_tokens_start_declaration): Update comments.
2351 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2352 parser->tokens[2] to parser->tokens[1].
2353 (c_parser_nth_token_starts_std_attributes)
2354 (c_parser_std_attribute_specifier_sequence): New functions.
2355 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2356 attrs. All callers changed. Handle standard attributes.
2357 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2358 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2359 All callers changed.
2360 (c_parser_declspecs): Add arguments start_std_attr_ok and
2361 end_std_attr_ok. All callers changed. Handle standard
2362 attributes.
2363 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2364 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2365 (c_parser_compound_statement_nostart, c_parser_all_labels)
2366 (c_parser_label, c_parser_statement, c_parser_for_statement):
2367 Handle standard attributes.
2368 * c-parser.h (c_parser_declspecs): Update prototype.
2369 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2370 c_parser_declspecs.
2371
0c29cac4
ML
23722019-11-12 Martin Liska <mliska@suse.cz>
2373
2374 * gimple-parser.c: Do not include params.h.
2375
028d4092
ML
23762019-11-12 Martin Liska <mliska@suse.cz>
2377
2378 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2379 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2380 macro.
2381
62aee289
MR
23822019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2383 Frederik Harwath <frederik@codesourcery.com>
2384
2385 gcc/c/
2386 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2387 (c_parser_oacc_kernels_parallel): Rename function to...
2388 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2389 (c_parser_omp_construct): Update accordingly.
2390
2391
7cec9588
JJ
23922019-11-11 Jakub Jelinek <jakub@redhat.com>
2393
2394 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2395 without corresponding end declare target.
2396
f486280c
RS
23972019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2398
2399 * c-convert.c (convert): Only handle vector conversions if one of
2400 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2401 allows it.
2402 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2403 vectors satisfy gnu_vector_type_p.
2404 (build_unary_op): Only allow unary operators to be applied to
2405 vectors if they satisfy gnu_vector_type_p.
2406 (digest_init): Only allow by-element initialization of vectors
2407 if they satisfy gnu_vector_type_p.
2408 (really_start_incremental_init): Likewise.
2409 (push_init_level): Likewise.
2410 (pop_init_level): Likewise.
2411 (process_init_element): Likewise.
2412 (build_binary_op): Only allow binary operators to be applied to
2413 vectors if they satisfy gnu_vector_type_p.
2414
017c6491
JM
24152019-11-08 Joseph Myers <joseph@codesourcery.com>
2416
2417 * c-decl.c (grokparms): Convert () in a function definition to
2418 (void) for C2x.
2419 (store_parm_decls_oldstyle): Pedwarn for C2x.
2420 (store_parm_decls): Update comment about () not generating a
2421 prototype.
2422
c01bd174
JM
24232019-11-07 Joseph Myers <joseph@codesourcery.com>
2424
2425 * c-parser.c (c_parser_attribute_arguments): New function.
2426 Factored out of c_parser_gnu_attribute.
2427 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2428 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2429 (c_parser_std_attribute_specifier): New functions.
2430 (c_parser_transaction_attributes): Use
2431 c_parser_std_attribute_specifier.
2432
471c5330
JM
24332019-11-07 Joseph Myers <joseph@codesourcery.com>
2434
2435 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2436 lex_joined_string and translate_strings_p.
2437 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2438 c_lex_with_flags.
2439 (c_parser_string_literal): New function.
2440 (c_parser_static_assert_declaration_no_semi): Use
2441 c_parser_string_literal. Do not set lex_untranslated_string.
2442 (c_parser_asm_string_literal): Use c_parser_string_literal.
2443 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2444 (c_parser_gnu_attributes): Set and restore translate_strings_p
2445 instead of lex_untranslated_string.
2446 (c_parser_asm_statement): Do not set lex_untranslated_string.
2447 (c_parser_asm_operands): Likewise.
2448 (c_parser_has_attribute_expression): Set and restore
2449 translate_strings_p instead of lex_untranslated_string.
2450 (c_parser_postfix_expression): Use c_parser_string_literal.
2451 (pragma_lex): Likewise.
2452 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2453 (c_parse_file): Set translate_strings_p.
2454 * gimple-parser.c (c_parser_gimple_postfix_expression)
2455 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2456 * c-parser.c (c_parser_string_literal): Declare function.
2457
d0c464d2
JJ
24582019-11-02 Jakub Jelinek <jakub@redhat.com>
2459
2460 * c-parser.c (c_finish_omp_declare_variant): Use
2461 omp_get_context_selector instead of c_omp_get_context_selector.
2462
ac2cfa6c
RS
24632019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2464
2465 * c-tree.h (c_simulate_enum_decl): Declare.
2466 * c-decl.c (c_simulate_enum_decl): New function.
2467 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2468
74078538
RS
24692019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2470
2471 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2472 * c-decl.c (c_simulate_builtin_function_decl): New function.
2473 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2474 to the above.
2475
ad1539d5
MS
24762019-10-28 Martin Sebor <msebor@redhat.com>
2477
2478 PR c/66970
2479 * c-decl.c (names_builtin_p): Define a new function.
2480
cb73e4e7
RB
24812019-10-28 Richard Biener <rguenther@suse.de>
2482
2483 PR c/92249
2484 * gimple-parser.c (c_parser_parse_gimple_body): Make
2485 current_bb the entry block initially to easier recover
2486 from errors.
2487 (c_parser_gimple_compound_statement): Adjust.
2488
135df52c
JJ
24892019-10-24 Jakub Jelinek <jakub@redhat.com>
2490
2491 * c-parser.c (c_finish_omp_declare_variant): Use
2492 omp_context_selector_matches instead of
2493 c_omp_context_selector_matches.
2494 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2495 attribute in between declare target and end declare target
2496 pragmas.
2497
783bfe5e
JM
24982019-10-15 Joseph Myers <joseph@codesourcery.com>
2499
2500 * c-parser.c (c_parser_attribute_any_word): Rename to
2501 c_parser_gnu_attribute_any_word. All callers changed.
2502 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2503 callers changed.
2504 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2505 callers changed.
2506 (c_parser_declaration_or_fndef, c_parser_declspecs)
2507 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2508 (c_parser_struct_declaration, c_parser_declarator)
2509 (c_parser_gnu_attribute, c_parser_compound_statement)
2510 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2511 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2512 attribute-related syntax productions.
2513
56898e43
RS
25142019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2515
2516 * c-objc-common.c (useful_aka_type_p): Replace with...
2517 (get_aka_type): ...this new function. Given the original type,
2518 decide which aka type to print (if any). Only look through typedefs
2519 if user_facing_original_type_p.
2520 (print_type): Update accordingly.
2521
b9424661
JJ
25222019-10-14 Jakub Jelinek <jakub@redhat.com>
2523
2524 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2525 into int NESTED, if it is 2, diagnose missing commas in between
2526 clauses.
2527 (c_parser_omp_context_selector): Pass 2 as last argument to
2528 c_parser_omp_all_clauses.
2529
20de9568
JJ
25302019-10-12 Jakub Jelinek <jakub@redhat.com>
2531
2532 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2533 For simd properties, put them directly into TREE_VALUE.
2534 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2535 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2536 add "omp declare variant base" attribute rather than
2537 "omp declare variant".
2538
fe2bc27c
JM
25392019-10-11 Joseph Myers <joseph@codesourcery.com>
2540
2541 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2542
94e7f906
JJ
25432019-10-10 Jakub Jelinek <jakub@redhat.com>
2544
2545 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2546 true, terminate processing on closing paren and don't skip to end of
2547 pragma line.
2548 (c_parser_omp_declare_simd): Handle also declare variant.
2549 (omp_construct_selectors, omp_device_selectors,
2550 omp_implementation_selectors, omp_user_selectors): New variables.
2551 (c_parser_omp_context_selector,
2552 c_parser_omp_context_selector_specification,
2553 c_finish_omp_declare_variant): New functions.
2554 (c_finish_omp_declare_simd): Handle both declare simd and
2555 declare variant.
2556 (c_parser_omp_declare): Handle declare variant.
2557
93313b94
JM
25582019-10-02 Joseph Myers <joseph@codesourcery.com>
2559
2560 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2561 CPP_COLON tokens.
2562
55879815
RS
25632019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2564
2565 * c-objc-common.c (useful_aka_type_p): New function.
2566 (print_type): Use it to decide whether an aka type is worth printing.
2567
59bc434a
JJ
25682019-09-27 Jakub Jelinek <jakub@redhat.com>
2569
2570 PR c++/88203
2571 * c-parser.c (c_parser_predefined_identifier): New function.
2572 (c_parser_postfix_expression): Use it.
2573 (c_parser_omp_variable_list): Parse predefined identifiers.
2574 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2575 in shared and firstprivate clauses, even when they are predetermined
2576 shared.
2577
c6447c20
RS
25782019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2579
2580 * c-typeck.c (build_function_call_vec): Take the original function
2581 decl as an optional final parameter. Pass all built-in calls to
2582 check_builtin_function_arguments.
2583
522da4c2
EB
25842019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2585
2586 PR c/91815
2587 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2588 of identifiers in the external scope only for variables and functions.
2589
68e2c199
PK
25902019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2591
2592 PR c/78736
2593 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2594
22f8849d
IS
25952019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2596
2597 PR pch/61250
2598 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2599 after determining that the first token is not
2600 PRAGMA_GCC_PCH_PREPROCESS.
2601
db376f45
EB
26022019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2603
2604 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2605 FUNCTION_DECL to the right value in the presence of nested declarators.
2606
4d732405
RS
26072019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2608
2609 PR middle-end/91421
2610 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2611
cb1180d5
RS
26122019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2613
2614 PR middle-end/91421
2615 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2616 of a built_in_function.
2617 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2618
77eb117f
JJ
26192019-08-10 Jakub Jelinek <jakub@redhat.com>
2620
2621 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2622 (c_parser_omp_clause_device_type): New function.
2623 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2624 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2625 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2626 diagnostics for declare target with clauses nested in clause-less
2627 declare target declaration-definition-seq.
2628 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2629
2c3b8bad
JJ
26302019-08-09 Jakub Jelinek <jakub@redhat.com>
2631
bb522e2e
JJ
2632 * c-parser.c (check_no_duplicate_clause): Simplify using
2633 omp_find_clause.
2634 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2635 directive name modifiers.
2636 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2637
2c3b8bad
JJ
2638 PR c/91401
2639 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2640 check_no_duplicate_clause call. Comment it out, instead emit a
2641 warning for duplicate dist_schedule clauses.
2642
99769e7f
RS
26432019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2644
2645 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2646
8860d270
JJ
26472019-08-08 Jakub Jelinek <jakub@redhat.com>
2648
2649 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2650 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2651 instead of generic_head to track duplicates.
2652
398e3feb
JJ
26532019-08-07 Jakub Jelinek <jakub@redhat.com>
2654
2655 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2656 (c_parser_omp_clause_use_device_addr): New function.
2657 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2658 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2659 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2660 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2661 map or use_device_* clauses.
2662 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2663 in OpenMP, require pointer type rather than pointer or array type.
2664 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2665
a28351e7
JJ
26662019-07-31 Jakub Jelinek <jakub@redhat.com>
2667
2668 PR c/91192
2669 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2670 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2671 case.
2672
6343b6bf
ML
26732019-07-25 Martin Liska <mliska@suse.cz>
2674 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2675
2676 PR c++/23383
2677 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2678
cb50701e
ML
26792019-07-25 Martin Liska <mliska@suse.cz>
2680
2681 * c-decl.c (merge_decls): Use new macros
2682 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2683
62e3e66f
RB
26842019-07-23 Richard Biener <rguenther@suse.de>
2685
2686 PR tree-optimization/83518
2687 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2688 a CFG also rebuild cgraph edges.
2689
554a530f
JJ
26902019-07-20 Jakub Jelinek <jakub@redhat.com>
2691
2692 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2693 (c_parser_omp_clause_bind): New function.
2694 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2695 (OMP_LOOP_CLAUSE_MASK): Define.
2696 (c_parser_omp_loop): New function.
2697 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2698 loop combined with parallel or teams.
2699 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2700 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2701
d119bf79
RS
27022019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2703
2704 PR c/53633
2705 * c-decl.c (finish_function): Check targetm.warn_func_return
2706 before issuing a -Wreturn-type warning.
2707
ab20d992 27082019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2709
2710 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2711 (c_parser_compound_statement): Call it.
2712
1fdd6f04
JJ
27132019-07-12 Jakub Jelinek <jakub@redhat.com>
2714
2715 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2716 (c_parser_omp_clause_order): New function.
2717 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2718 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2719 PRAGMA_OMP_CLAUSE_ORDER.
2720 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2721
8389386c
RB
27222019-07-10 Richard Biener <rguenther@suse.de>
2723
2724 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2725 _Literal (int *) &x for address literals.
2726
99b1c316
MS
27272019-07-09 Martin Sebor <msebor@redhat.com>
2728
2729 PR c++/61339
2730 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2731 to class.
2732 (field_decl_cmp): Same.
2733 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2734 * c-tree.h: Same.
2735 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2736
6c1dae73
MS
27372019-07-09 Martin Sebor <msebor@redhat.com>
2738
2739 PR c++/61339
2740 * c-decl.c: Change class-key from class to struct and vice versa
2741 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2742 * gimple-parser.c: Same.
2743
69b5279e
RB
27442019-07-01 Richard Biener <rguenther@suse.de>
2745
2746 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2747 _Literal (char *) &"foo" for address literals pointing to
2748 STRING_CSTs.
2749
ab20d992
JJ
27502019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2751
2752 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2753 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2754 C incompatibility if alternate "__intN__" form is used.
2755
1e3d475e
MS
27562019-06-24 Martin Sebor <msebor@redhat.com>
2757
2758 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2759
bf38f7e9
JJ
27602019-06-10 Jakub Jelinek <jakub@redhat.com>
2761
2762 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2763 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2764 (c_parser_omp_scan_loop_body): New function.
2765 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2766 inscan reduction clauses.
2767 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2768 non-inscan reductions on the same construct, or inscan reductions with
2769 ordered or schedule clauses, or inscan array reductions.
2770
65985d78
MS
27712019-06-05 Martin Sebor <msebor@redhat.com>
2772
2773 PR c/90737
2774 * c-typeck.c (c_finish_return): Only consider functions returning
2775 pointers as candidates for -Wreturn-local-addr.
2776
0ecf545c
MS
27772019-06-05 Martin Sebor <msebor@redhat.com>
2778
2779 * c-decl.c (start_decl): Adjust quoting and hyphenation
2780 in diagnostics.
2781 (finish_decl): Same.
2782 (finish_enum): Same.
2783 (start_function): Same.
2784 (declspecs_add_type): Same.
2785 * c-parser.c (warn_for_abs): Same.
2786 * c-typeck.c (build_binary_op): Same.
2787
e03436e7
TS
27882019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2789
b48f44bf
TS
2790 PR c/89433
2791 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2792 marked with an OpenACC 'routine' directive.
2793
5bf04509
TS
2794 PR c/89433
2795 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2796 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2797
e03436e7
TS
2798 PR c/89433
2799 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2800 clauses from "omp declare target" attribute.
2801
a9c697b8
MS
28022019-05-16 Martin Sebor <msebor@redhat.com>
2803
ab20d992
JJ
2804 * c-decl.c (start_decl): Quote keywords, operators, and
2805 types in diagnostics.
2806 (finish_decl): Same.
2807 * c-parser.c (c_parser_asm_statement): Same.
2808 (c_parser_conditional_expression): Same.
2809 (c_parser_transaction_cancel): Same.
2810 * c-typeck.c (c_common_type): Same.
2811 (build_conditional_expr): Same.
2812 (digest_init): Same.
2813 (process_init_element): Same.
2814 (build_binary_op): Same.
a9c697b8 2815
c4499192
RB
28162019-05-17 Richard Biener <rguenther@suse.de>
2817
2818 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2819 (c_parser_gimple_unary_expression): Likewise.
2820 (c_parser_gimple_parentized_ternary_expression): New function.
2821
adfe6e4b
RB
28222019-05-16 Richard Biener <rguenther@suse.de>
2823
2824 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2825 (c_parser_gimple_unary_expression): Likewise.
2826
186dabf2
RB
28272019-05-15 Richard Biener <rguenther@suse.de>
2828
2829 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2830 __BIT_FIELD_REF.
2831
1158c5b4
RB
28322019-05-14 Richard Biener <rguenther@suse.de>
2833
2834 * gimple-parser.c (c_parser_gimple_statement): Remove
2835 questionable auto-promotion to VIEW_CONVERT_EXPR.
2836 (c_parser_gimple_typespec): Split out from __MEM parsing.
2837 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2838 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2839 as __VIEW_CONVERT with -gimple.
2840
fd4485aa
ML
28412019-05-09 Martin Liska <mliska@suse.cz>
2842
2843 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2844 __MAX.
2845 (c_parser_gimple_unary_expression): Parse also binary expression
2846 __MIN and __MAX.
2847 (c_parser_gimple_parentized_binary_expression): New function.
2848
d276406a
ML
28492019-05-09 Martin Liska <mliska@suse.cz>
2850
2851 * gimple-parser.c (struct gimple_parser): Add probability.
2852 for gimple_parser_edge.
2853 (gimple_parser::push_edge): Add new argument probability.
2854 (c_parser_gimple_parse_bb_spec): Parse also probability
2855 if present.
2856 (c_parser_parse_gimple_body): Set edge probability.
2857 (c_parser_gimple_compound_statement): Consume token
2858 before calling c_parser_gimple_goto_stmt.
2859 Parse BB counts.
2860 (c_parser_gimple_statement): Pass new argument.
2861 (c_parser_gimple_goto_stmt): Likewise.
2862 (c_parser_gimple_if_stmt): Likewise.
2863 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2864 * c-parser.c (c_parser_declaration_or_fndef): Pass
2865 hot_bb_threshold argument.
2866 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2867 field.
2868 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2869
f179b64e
JJ
28702019-04-26 Jakub Jelinek <jakub@redhat.com>
2871
2872 PR debug/90197
2873 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2874 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2875 (c_parser_do_statement): Likewise.
2876 (c_parser_for_statement): Likewise. Formatting fixes.
2877 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2878 emit DEBUG_BEGIN_STMTs if needed.
2879
e7178413
JJ
28802019-04-19 Jakub Jelinek <jakub@redhat.com>
2881
c280b7ee
JJ
2882 PR c/89888
2883 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2884 (c_start_case): Don't clear it.
2885 (do_case): Adjust c_add_case_label caller.
2886 (c_finish_case): Adjust c_do_switch_warnings caller.
2887
e7178413
JJ
2888 PR c++/90108
2889 * c-decl.c (merge_decls): If remove is main variant and
2890 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2891 variant that has newdecl as TYPE_NAME if any.
2892
60a2c645
JJ
28932019-04-12 Jakub Jelinek <jakub@redhat.com>
2894
2895 PR c/89933
2896 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2897 don't try to remove it from the variant list, but instead assert
2898 it has no variants.
2899
2a82beaa
RB
29002019-04-01 Richard Biener <rguenther@suse.de>
2901
2902 PR c/71598
2903 * c-tree.h (c_get_alias_set): Declare.
2904 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2905 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2906 as the underlying integer type.
2907
bec1da64
MS
29082019-03-19 Martin Sebor <msebor@redhat.com>
2909
2910 PR tree-optimization/89688
2911 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2912 kinds of initializers.
2913
855cd9b1
JJ
29142019-03-19 Jakub Jelinek <jakub@redhat.com>
2915
2916 PR c/89734
2917 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2918 return type even if quals_used is 0. Formatting fixes.
2919
baa09dc5
RB
29202019-03-14 Richard Biener <rguenther@suse.de>
2921
2922 * c-tree.h (enum c_declspec_il): New.
2923 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2924 enum bitfield.
2925 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2926 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2927 (c_parser_declspecs): Adjust.
2928 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2929 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2930 and bitmap.h.
2931 (struct gimple_parser): New.
2932 (gimple_parser::push_edge): New method.
2933 (c_parser_gimple_parse_bb_spec): New helper.
2934 (c_parser_parse_gimple_body): Get start pass and IL specification.
2935 Initialize SSA and CFG.
2936 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2937 Build a gimple_parser parsing state and pass it along.
2938 (c_parser_gimple_statement): Change intermittend __PHI internal
2939 function argument for the edge.
2940 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2941 (c_parser_gimple_goto_stmt): Record edges to build.
2942 (c_parser_gimple_if_stmt): Likewise.
2943 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2944 (c_parser_gimple_or_rtl_pass_list): Likewise.
2945
a3f9f006
ML
29462019-03-11 Martin Liska <mliska@suse.cz>
2947
2948 * c-decl.c (check_for_loop_decls): Wrap an option name
2949 in a string format message and fix GNU coding style.
2950 * c-parser.c (c_parser_declspecs): Likewise.
2951
1db01ff9
JJ
29522019-03-08 Jakub Jelinek <jakub@redhat.com>
2953
2954 PR tree-optimization/89550
2955 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2956 returned true.
2957 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2958 or warning returned true.
2959
66dcb747
JJ
29602019-02-28 Jakub Jelinek <jakub@redhat.com>
2961
2962 PR c/89525
2963 * c-typeck.c (convert_arguments): Call inform_declaration only if
2964 the previous warning_at call returned true.
2965
2263c9f2
TS
29662019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2967
2968 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2969 parameter. Adjust all users.
2970 (c_parser_oacc_simple_clause): Replace parser with loc formal
2971 parameter. Adjust all users.
2972
ab20d992 29732019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2974
2975 PR c/87924
2976 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2977 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2978
5f88ba10
JJ
29792019-02-15 Jakub Jelinek <jakub@redhat.com>
2980
2981 PR c/89340
2982 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2983 before c_decl_attributes rather than after it.
2984
cfc30fd1
JJ
29852019-02-06 Jakub Jelinek <jakub@redhat.com>
2986
2987 PR c/89211
2988 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2989 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2990 instead of 3 nested ifs.
2991
fbe83e6b
JM
29922019-02-06 Joseph Myers <joseph@codesourcery.com>
2993
2994 PR c/88584
2995 * c-decl.c (finish_decl): Do not complete array types for arrays
2996 with external linkage not at file scope.
2997
f461f938
RB
29982019-02-05 Richard Biener <rguenther@suse.de>
2999
3000 PR c/88606
3001 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3002 all type variants when not supported.
3003
fe509359
JJ
30042019-01-30 Jakub Jelinek <jakub@redhat.com>
3005
3006 PR c/89061
3007 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3008 * c-decl.c (decl_jump_unsafe): Return false for
3009 C_DECL_COMPOUND_LITERAL_P decls.
3010 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3011
6a335b96
JJ
30122019-01-29 Jakub Jelinek <jakub@redhat.com>
3013
f4b7e754
JJ
3014 PR c/89045
3015 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3016 scope.
3017
6a335b96
JJ
3018 PR c/86125
3019 * c-decl.c (last_fileptr_type): Remove.
3020 (last_structptr_types): New variable.
3021 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3022 {old,new}rettype instead of the types themselves. Assert
3023 last_structptr_types array has the same number of elements
3024 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3025 argument oldtype and newtype. Instead of handling
3026 just fileptr_type_node specially, handle all builtin_structptr_types
3027 pointer nodes. Formatting fix.
3028
d8b5a1a0
MS
30292019-01-24 Martin Sebor <msebor@redhat.com>
3030
3031 PR c/86125
3032 PR c/88886
3033 PR middle-end/86308
3034 * c-decl.c (match_builtin_function_types): Add arguments.
3035 (diagnose_mismatched_decls): Diagnose mismatched declarations
3036 of built-ins more strictly.
3037
e21c4491
JJ
30382019-01-24 Jakub Jelinek <jakub@redhat.com>
3039
3040 PR c++/88976
3041 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3042 on #pragma omp cancel with different modifiers.
3043
420183d9
L
30442019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3045
3046 PR c/51628
3047 PR c/88664
3048 * c-typeck.c (convert_for_assignment): Upate the
3049 warn_for_address_or_pointer_of_packed_member call.
3050
17ad43dd
TH
30512019-01-16 Tom Honermann <tom@honermann.net>
3052 Jason Merrill <jason@redhat.com>
3053
3054 * c-typeck.c (digest_init): Revised the error message produced for
3055 ill-formed cases of array initialization with a string literal.
3056 (error_init): Make variadic.
3057
5f07d78a
JJ
30582019-01-12 Jakub Jelinek <jakub@redhat.com>
3059
3060 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3061
c4581bbf
JJ
30622019-01-07 Jakub Jelinek <jakub@redhat.com>
3063
3064 PR c/88701
3065 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3066 if current_function_decl is non-NULL.
3067
65c5b1eb
JM
30682019-01-07 Joseph Myers <joseph@codesourcery.com>
3069
3070 PR c/88720
3071 PR c/88726
3072 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3073 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3074 functions declared but never defined only for external scope, not
3075 for other scopes.
3076
d8fcab68
JJ
30772019-01-07 Jakub Jelinek <jakub@redhat.com>
3078
3079 PR c++/85052
3080 * c-parser.c (c_parser_postfix_expression): Parse
3081 __builtin_convertvector.
3082
a5544970
JJ
30832019-01-01 Jakub Jelinek <jakub@redhat.com>
3084
3085 Update copyright years.
3086
da77eace
L
30872018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3088
3089 PR c/51628
3090 * c-typeck.c (convert_for_assignment): Call
3091 warn_for_address_or_pointer_of_packed_member.
3092
1edf8866
SB
30932018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3094
3095 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3096 a more specific error message (instead of just falling through).
3097
db4fd626
SB
30982018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3099
3100 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3101 asm qualifier is first seen; use that to give nicer "duplicate asm
3102 qualifier" messages. Delete 'quals" variable, instead pass the
3103 "is_volatile_ flag to build_asm_stmt directly.
3104 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3105 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3106
9c9cfcbb
SB
31072018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3108
3109 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3110 "done" boolean variable.
3111
a14feb3c
DM
31122018-12-19 David Malcolm <dmalcolm@redhat.com>
3113
3114 PR c++/87504
3115 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3116 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3117 (build_binary_op): Use struct op_location_t and
3118 class binary_op_rich_location.
3119
6d939173
JJ
31202018-12-11 Jakub Jelinek <jakub@redhat.com>
3121
3122 PR sanitizer/88426
3123 * c-convert.c (convert): Call c_fully_fold before calling
3124 ubsan_instrument_float_cast.
3125
b7055028
SB
31262018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3127
3128 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3129 setting "quals".
3130
5b76e75f
SB
31312018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3132
3133 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3134 after asm. Pass a flag for it to build_asm_expr.
3135 * c-tree.h (build_asm_expr): Update declaration.
3136 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3137 set ASM_INLINE_P.
3138
30bd42b9
SB
31392018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3140
3141 PR inline-asm/55681
3142 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3143 combination of volatile and goto, in any order, without repetitions.
3144
9df6c0e4
JB
31452018-12-04 James Norris <jnorris@codesourcery.com>
3146 Cesar Philippidis <cesar@codesourcery.com>
3147 Julian Brown <julian@codesourcery.com>
3148
3149 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3150 code.
3151
f44697b7
RB
31522018-11-30 Richard Biener <rguenther@suse.de>
3153
3154 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3155 _Literal (type) { ... } as empty aggregate or vector constructor.
3156
550dfbdc
MS
31572018-11-29 Martin Sebor <msebor@redhat.com>
3158
3159 PR c/88091
3160 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3161 (convert_arguments): Add comments. Pass additional argument to
3162 the function above.
3163
673670da
MS
31642018-11-29 Martin Sebor <msebor@redhat.com>
3165
3166 PR c/88172
3167 PR testsuite/88208
3168 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3169
db1d09b0
MS
31702018-11-23 Martin Sebor <msebor@redhat.com>
3171
3172 PR testsuite/88098
3173 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3174 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3175
98f08eb8
MS
31762018-11-20 Martin Sebor <msebor@redhat.com>
3177
3178 * c-parser.c (c_parser_has_attribute_expression): New function.
3179 (c_parser_attribute): New function.
3180 (c_parser_attributes): Move code into c_parser_attribute.
3181 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3182
cd5da983
MS
31832018-11-15 Martin Sebor <msebor@redhat.com>
3184
3185 PR c/83656
3186 * c-decl.c (header_for_builtin_fn): Declare.
3187 (diagnose_mismatched_decls): Diagnose declarations of built-in
3188 functions without a prototype.
3189 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3190 (convert_argument): Same.
3191 (convert_arguments): Factor code out into convert_argument.
3192 Detect mismatches between built-in formal arguments in calls
3193 to built-in without prototype.
3194 (build_conditional_expr): Same.
3195 (type_or_builtin_type): New function.
3196 (convert_for_assignment): Add argument. Conditionally issue
3197 warnings instead of errors for mismatches.
3198
620e594b
DM
31992018-11-13 David Malcolm <dmalcolm@redhat.com>
3200
3201 * c-decl.c: Replace "source_location" with "location_t".
3202 * c-tree.h: Likewise.
3203 * c-typeck.c: Likewise.
3204 * gimple-parser.c: Likewise.
3205
3179ebae
JJ
32062018-11-09 Jakub Jelinek <jakub@redhat.com>
3207
81a227c6
JJ
3208 * c-parser.c (c_parser_omp_clause_final): Use
3209 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3210 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3211 parsing instead of c_parser_paren_condition.
3212 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3213 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3214 c_fully_fold instead of c_parser_condition.
3215 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3216 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3217 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3218 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3219 c_parser_expr_no_commas instead of c_parser_expression.
3220
98c91c56
JJ
3221 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3222 reduction clause with inscan modifier.
3223
3179ebae
JJ
3224 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3225 clauses other than atomic_default_mem_order.
3226
28567c40
JJ
32272018-11-08 Jakub Jelinek <jakub@redhat.com>
3228
3229 * c-parser.c: Include memmode.h.
3230 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3231 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3232 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3233 task_reduction clauses.
3234 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3235 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3236 section, or lvalue assignment expression.
3237 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3238 (c_parser_omp_clause_lastprivate): Parse optional
3239 conditional: modifier.
3240 (c_parser_omp_clause_hint): Require constant integer expression rather
3241 than just integer expression.
3242 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3243 clause.
3244 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3245 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3246 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3247 functions.
3248 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3249 iterators. Parse mutexinoutset and depobj kinds.
3250 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3251 callers.
3252 (c_parser_omp_all_clauses): Likewise. Handle
3253 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3254 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3255 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3256 default memory order from requires directive if any. Adjust
3257 c_finish_omp_atomic caller.
3258 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3259 (c_parser_omp_flush): Parse flush with memory-order-clause.
3260 (c_parser_omp_for_loop): Allow NE_EXPR even in
3261 OpenMP loops, adjust c_finish_omp_for caller.
3262 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3263 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3264 Allow to be called while parsing combined parallel master.
3265 Parse combined master taskloop{, simd}.
3266 (c_parser_omp_parallel): Parse combined
3267 parallel master{, taskloop{, simd}} constructs.
3268 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3269 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3270 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3271 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3272 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3273 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3274 around teams body. Use SET_EXPR_LOCATION.
3275 (c_parser_omp_target_data): Allow target data
3276 with only use_device_ptr clauses.
3277 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3278 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3279 (c_parser_omp_requires): New function.
3280 (c_finish_taskloop_clauses): New function.
3281 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3282 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3283 declaration. Disallow in_reduction clause when combined with parallel
3284 master.
3285 (c_parser_omp_construct): Adjust c_parser_omp_master and
3286 c_parser_omp_taskgroup callers.
3287 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3288 other than cancel.
3289 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3290 like OMP_CLAUSE_REDUCTION.
3291 (handle_omp_array_sections): Likewise. Call save_expr on array
3292 reductions before calling build_index_type. Handle depend clauses
3293 with iterators.
3294 (struct c_find_omp_var_s): New type.
3295 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3296 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3297 with static, runtime or auto schedule kinds. Call save_expr for whole
3298 array reduction sizes. Diagnose reductions with zero sized elements
3299 or variable length structures. Diagnose nogroup clause used with
3300 reduction clause(s). Handle depend clause with
3301 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3302 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3303 some different type for other kinds. Use build_unary_op with
3304 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3305 Handle depend clauses with iterators. Remove no longer needed special
3306 case that predetermined const qualified vars may be specified in
3307 firstprivate clause. Complain if const qualified vars are mentioned
3308 in data-sharing clauses other than firstprivate or shared. Use
3309 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3310 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3311 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3312 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3313
7e2de6df
DM
33142018-10-29 David Malcolm <dmalcolm@redhat.com>
3315
3316 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3317 logic for change to name_hint::operator bool.
3318 (undeclared_variable): Likewise.
3319 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3320 (c_parser_parameter_declaration): Likewise.
3321
9f936c86
JM
33222018-10-17 Joseph Myers <joseph@codesourcery.com>
3323
3324 * c-errors.c (pedwarn_c11): New function.
3325 * c-parser.c (disable_extension_diagnostics): Save
3326 warn_c11_c2x_compat and set it to 0.
3327 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3328 (c_parser_static_assert_declaration_no_semi): Handle
3329 _Static_assert without string constant.
3330 * c-tree.h (pedwarn_c11): New prototype.
3331
033eb567
DM
33322018-10-17 David Malcolm <dmalcolm@redhat.com>
3333
3334 * Make-lang.in (selftest-c): New.
3335 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3336 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3337 from gcc/Makefile.in.
3338
0edf3afe
RB
33392018-10-02 Richard Biener <rguenther@suse.de>
3340
3341 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3342
8313a764
JM
33432018-09-26 Joseph Myers <joseph@codesourcery.com>
3344
3345 PR c/87390
3346 * c-typeck.c (build_binary_op): Use excess precision for
3347 comparisons of integers and floating-point for C11 and later.
3348
ce6f0888
MJ
33492018-09-26 Martin Jambor <mjambor@suse.cz>
3350
3351 PR c/87347
3352 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 3353 comment.
ce6f0888 3354
9c4a4b3c
DM
33552018-09-17 David Malcolm <dmalcolm@redhat.com>
3356
3357 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3358 Update for new param.
3359 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3360 Likewise.
3361
80c6d1f4
MJ
33622018-09-17 Martin Jambor <mjambor@suse.cz>
3363
3364 PR c/63886
3365 * c-parser.c: (warn_for_abs): New function.
3366 (c_parser_postfix_expression_after_primary): Call it.
3367
4a426e36
BE
33682018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3369
3370 * c-typeck.c (digest_init): Shorten overlength strings.
3371
6d900107
BE
33722018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3373
3374 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3375
b5764229
BE
33762018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3377
3378 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3379 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3380
22eea6b2
AM
33812018-08-30 Alexander Monakov <amonakov@ispras.ru>
3382
3383 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3384 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3385
85204e23
DM
33862018-08-27 David Malcolm <dmalcolm@redhat.com>
3387
3388 PR 87091
3389 * c-decl.c (implicitly_declare): Update call to
3390 maybe_add_include_fixit to suggest overriding the location, as it
3391 is for a note.
3392 * c-objc-common.c (c_tree_printer): Update for conversion of
3393 show_caret_p to a tri-state.
3394
3d78e008
ML
33952018-08-27 Martin Liska <mliska@suse.cz>
3396
3397 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
3398 fndecl_built_in_p and remove check for FUNCTION_DECL if
3399 possible.
3d78e008
ML
3400 (diagnose_mismatched_decls): Likewise.
3401 (merge_decls): Likewise.
3402 (warn_if_shadowing): Likewise.
3403 (pushdecl): Likewise.
3404 (implicitly_declare): Likewise.
3405 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3406 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3407 * c-typeck.c (build_function_call_vec): Likewise.
3408 (convert_arguments): Likewise.
3409
097f82ec
DM
34102018-08-20 David Malcolm <dmalcolm@redhat.com>
3411
3412 PR other/84889
3413 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3414 (diagnose_mismatched_decls): Likewise, in various places.
3415 (warn_if_shadowing): Likewise.
3416 (implicit_decl_warning): Likewise.
3417 (implicitly_declare): Likewise.
3418 (undeclared_variable): Likewise.
3419 (declare_label): Likewise.
3420 (grokdeclarator): Likewise.
3421 (start_function): Likewise.
3422 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3423 (c_parser_parameter_declaration): Likewise.
3424 (c_parser_binary_expression): Likewise.
3425 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3426 (parser_build_binary_op): Likewise.
3427 (build_unary_op): Likewise.
3428 (error_init): Likewise.
3429 (pedwarn_init): Likewise.
3430 (warning_init): Likewise.
3431 (convert_for_assignment): Likewise.
3432
96e6ae57
DM
34332018-08-15 David Malcolm <dmalcolm@redhat.com>
3434
3435 * c-objc-common.c: Include "gcc-rich-location.h".
3436 (c_tree_printer): Move implemenation of '%T' to...
3437 (print_type): ...this new function.
3438 (range_label_for_type_mismatch::get_text): New function.
3439 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3440 range for the various ic_argpass cases.
3441 (class maybe_range_label_for_tree_type_mismatch): New class.
3442 (build_binary_op): Use it when calling binary_op_error.
3443
0cd020ae 34442018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3445
0cd020ae
PK
3446 * c-decl.c (start_decl): Do not warn if variables is named as main
3447 and is a local variable.
3448
72733314
IS
34492018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3450
3451 PR c/19315
3452 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3453 objects of unknown size.
3454
23aa9f7c
MS
34552018-08-13 Martin Sebor <msebor@redhat.com>
3456
3457 PR tree-optimization/71625
3458 * c-parser.c (c_parser_declaration_or_fndef): Call
3459 braced_list_to_string.
3460
e5e7e50d
BH
34612018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3462
3463 PR c/86690
3464 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3465 errors.
3466
8a45b051
MS
34672018-08-01 Martin Sebor <msebor@redhat.com>
3468
3469 PR tree-optimization/86650
3470 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3471 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3472
5922dcb5
JJ
34732018-08-01 Jakub Jelinek <jakub@redhat.com>
3474
3475 PR c/85704
3476 * c-typeck.c (init_field_decl_cmp): New function.
3477 (output_pending_init_elements): Use it for field comparisons
3478 instead of pure bit_position comparisons.
3479
9b452033
JJ
34802018-07-12 Jakub Jelinek <jakub@redhat.com>
3481
3482 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3483 type here, instead add "omp declare target implicit" attribute.
3484 (finish_decl): Diagnose vars without mappable type here.
3485
ab20d992
JJ
34862018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3487 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3488 Cesar Philippidis <cesar@codesourcery.com>
3489
3490 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3491 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3492 to their non-present_or_* counterparts. Make 'self' an alias to
3493 PRAGMA_OACC_CLAUSE_HOST.
3494 (c_parser_oacc_data_clause): Update GOMP mappings for
3495 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3496 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3497 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3498 Remove support for present_or_* clauses.
3499 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3500 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3501 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3502 (OACC_DATA_CLAUSE_MASK): Likewise.
3503 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3504 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3505 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3506 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3507 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3508
e197e64e
KV
35092018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3510
3511 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3512 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3513 (c_parser_gimple_unary_expression): Likewise.
3514
487f2f61
JJ
35152018-06-15 Jakub Jelinek <jakub@redhat.com>
3516
3517 PR c/86093
3518 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3519 before doing POINTER_DIFF_EXPR.
3520
e4d44a37
MP
35212018-06-07 Marek Polacek <polacek@redhat.com>
3522
3523 PR c/85318
3524 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3525 for loop initial declarations.
3526
b67b9225
DP
35272018-05-30 David Pagan <dave.pagan@oracle.com>
3528
3529 PR c/55976
3530 * c-decl.c (grokdeclarator): Update check for return type warnings.
3531 (start_function): Likewise.
3532 (finish_function): Likewise.
3533 * c-typeck.c (c_finish_return): Update check for return type warnings.
3534 Pass OPT_Wreturn_type to pedwarn when appropriate.
3535
c566cc9f
RS
35362018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3537
3538 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3539 __FMA_EXPR handlng.
3540
e4f81565
RS
35412018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3542
3543 * gimple-parser.c: Include internal-fn.h.
3544 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3545 (c_parser_gimple_call_internal): New function.
3546 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3547 Fix typos in comment.
3548
79e7b1fe
JJ
35492018-05-10 Jakub Jelinek <jakub@redhat.com>
3550
3551 PR c++/85662
3552 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3553 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3554 fold_convert_loc.
3555 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3556 fold_offsetof_1, pass argtype as TYPE to it and drop the
3557 fold_convert_loc.
3558
f7584c81
DP
35592018-05-02 David Pagan <dave.pagan@oracle.com>
3560
3561 PR c/30552
3562 * c-decl.c (old_style_parameter_scope): New function.
3563 * c-parser.c (c_parser_postfix_expression): Check for statement
3564 expressions in old-style function parameter list declarations.
3565 * c-parser.h (old_style_parameter_scope): New extern declaration.
3566
b33a0cb3
JJ
35672018-04-25 Jakub Jelinek <jakub@redhat.com>
3568
3569 PR sanitizer/84307
3570 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3571 it is not TREE_STATIC.
3572 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3573 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3574 its COMPOUND_LITERAL_EXPR_DECL.
3575
c5c5822a
JM
35762018-03-21 Joseph Myers <joseph@codesourcery.com>
3577
3578 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3579 where all functions return the same _FloatN or _FloatNx type,
3580 treat integer types as _Float64 instead of double.
3581
aa1c9429
JJ
35822018-03-21 Jakub Jelinek <jakub@redhat.com>
3583
3584 PR c/84999
3585 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3586 building vector comparison, diagnose it and return error_mark_node.
3587
9bb45a95
JJ
35882018-03-15 Jakub Jelinek <jakub@redhat.com>
3589
3590 PR c/84853
3591 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3592 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3593 INTEGER_TYPE element type.
3594
ada6bad9
DP
35952018-03-13 David Pagan <dave.pagan@oracle.com>
3596
3597 PR c/46921
3598 * c-typeck.c (output_init_element): Ensure field initializer
3599 expression is always evaluated if there are side effects.
3600
849bbdb9
JJ
36012018-03-06 Jakub Jelinek <jakub@redhat.com>
3602
3603 PR c/84721
3604 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3605 !building_stmt_list_p ().
3606
d74641bd
RS
36072018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3608
3609 PR c/84305
3610 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3611 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3612 and include the BIND_EXPR in the list of things that need to be
3613 pre-evaluated.
3614
0444aa9c
NS
36152018-02-09 Nathan Sidwell <nathan@acm.org>
3616
3617 PR c/84293
3618 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3619 to strict_aliasing_warning.
3620
7c30b12a
PC
36212018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3622
3623 * c-typeck.c (really_start_incremental_init, push_init_level,
3624 set_nonincremental_init, output_init_element, process_init_element):
3625 Use DECL_UNNAMED_BIT_FIELD.
3626
2be4dfcb
MP
36272018-01-31 Marek Polacek <polacek@redhat.com>
3628
3629 PR c/81779
3630 * c-parser.c (c_parser_compound_statement_nostart): Call
3631 expansion_point_location_if_in_system_header.
3632
bb9869d5
DM
36332018-01-17 David Malcolm <dmalcolm@redhat.com>
3634
3635 PR c++/83814
3636 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3637 the C part.
3638
b4923738
JJ
36392018-01-13 Jakub Jelinek <jakub@redhat.com>
3640
3641 PR c/83801
3642 * c-tree.h (decl_constant_value_1): Add a bool argument.
3643 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3644 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3645 (decl_constant_value): Adjust caller.
3646 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3647 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3648 decl_constant_value returns initializer that has BLKmode or
3649 array type.
3650 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3651
928686b1
RS
36522018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3653 Alan Hayward <alan.hayward@arm.com>
3654 David Sherwood <david.sherwood@arm.com>
3655
3656 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3657 TYPE_VECTOR_SUBPARTS.
3658
85ec4feb
JJ
36592018-01-03 Jakub Jelinek <jakub@redhat.com>
3660
3661 Update copyright years.
3662
913884f7
JJ
36632018-01-01 Jakub Jelinek <jakub@redhat.com>
3664
3665 PR c/83595
3666 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3667 c_parser_conditional_expression, c_parser_cast_expression,
3668 c_parser_sizeof_expression, c_parser_alignof_expression,
3669 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3670 c_parser_transaction_expression): Use set_error () method instead
3671 of setting value member to error_mark_node.
3672
c6cfa2bf
MM
36732017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3674
3675 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3676 and _Float<N>X built-in functions.
3677
11d29d63
JJ
36782017-12-22 Jakub Jelinek <jakub@redhat.com>
3679
14ec014e
JJ
3680 PR debug/83550
3681 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3682 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3683 incomplete vars rather than after it.
3684
11d29d63
JJ
3685 PR debug/83547
3686 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3687 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3688 and consider empty ones if there are no other stmts. For
3689 -Wunused-value walk all statements before the one only followed by
3690 DEBUG_BEGIN_STMTs.
3691
170a8bd6 36922017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3693 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3694
3695 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3696 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3697 (c_parser_do_statement): Likewise.
3698 (c_parser_for_statement): Likewise.
3699 (c_parser_statement_after_labels): Adjust calls to above.
3700 (c_parse_pragma_ivdep): New static function.
3701 (c_parser_pragma_unroll): Likewise.
3702 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3703 <PRAGMA_UNROLL>: New case.
3704
01512446
JJ
37052017-12-19 Jakub Jelinek <jakub@redhat.com>
3706
3707 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3708 perform_integral_promotions, digest_init): Replace Yoda conditions
3709 with typical order conditions.
3710 * c-decl.c (check_bitfield_type_and_width): Likewise.
3711
c65e18d3
BE
37122017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3713
3714 * c-typeck.c (c_safe_arg_type_equiv_p,
3715 c_safe_function_type_cast_p): New function.
3716 (build_c_cast): Implement -Wcast-function-type.
3717
b7280579
RB
37182017-12-14 Richard Biener <rguenther@suse.de>
3719
3720 PR c/83415
3721 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3722 like REALPART_EXPR for the behavior of whether its operand
3723 is an lvalue.
3724
49e6a6c0
MP
37252017-12-12 Marek Polacek <polacek@redhat.com>
3726
3727 PR c/82679
3728 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3729
ab20d992 37302017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3731
3732 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3733 * c-parser.c (add_debug_begin_stmt): New.
3734 (c_parser_declaration_or_fndef): Call it.
3735 (c_parser_compound_statement_nostart): Likewise.
3736 (c_parser_statement_after_labels): Likewise.
3737 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3738
4b2b493f
JM
37392017-12-07 Joseph Myers <joseph@codesourcery.com>
3740
3741 * c-decl.c (build_compound_literal): Add parameter alignas_align
3742 and set alignment of decl if nonzero.
3743 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3744 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3745 qualifier.
3746 (c_parser_struct_declaration): Update syntax comment.
3747 (c_parser_type_name): Add alignas_ok argument and pass it to
3748 c_parser_declspecs.
3749 (c_parser_cast_expression): Pass true to c_parser_type_name and
3750 give error if a cast used an _Alignas specifier.
3751 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3752 give error if sizeof (type-name) used an _Alignas specifier.
3753 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3754 give error if _Alignof (type-name) used an _Alignas specifier.
3755 (c_parser_postfix_expression_after_paren_type): Check specified
3756 alignment for a compound literal and pass it to
3757 build_compound_literal.
3758 * c-parser.h (c_parser_type_name): Update prototype.
3759 * c-tree.h (build_compound_literal): Update prototype.
3760
5d9ae53d
MS
37612017-12-07 Martin Sebor <msebor@redhat.com>
3762
3763 PR c/81544
3764 * c-decl.c (c_decl_attributes): Look up existing declaration and
3765 pass it to decl_attributes.
3766
c79144f8
DM
37672017-12-06 David Malcolm <dmalcolm@redhat.com>
3768
3769 PR c/83236
3770 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3771 reserved for use by the implementation.
3772
613bc14f
DM
37732017-12-06 David Malcolm <dmalcolm@redhat.com>
3774
3775 * c-decl.c: Include "c-family/c-spellcheck.h".
3776
05abad4c
ML
37772017-12-05 Martin Liska <mliska@suse.cz>
3778 Jakub Jelinek <jakub@redhat.com>
3779
3780 * c-typeck.c (pointer_diff): Add new argument and instrument
3781 pointer subtraction.
3782 (build_binary_op): Similar for pointer comparison.
3783
cc6534d4
JJ
37842017-12-01 Jakub Jelinek <jakub@redhat.com>
3785
65791f42
JJ
3786 PR c/79153
3787 * c-parser.c: Include tree-iterator.h.
3788 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3789 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3790 on it.
3791
cc6534d4
JJ
3792 PR c/83222
3793 * c-tree.h (decl_constant_value_1): Declare.
3794 * c-typeck.c (decl_constant_value_1): New function.
3795 (decl_constant_value): Use it.
3796 * c-fold.c (c_fully_fold_internal): If in_init, use
3797 decl_constant_value_1 instead of decl_constant_value.
3798
5de73c05
JJ
37992017-11-30 Jakub Jelinek <jakub@redhat.com>
3800
3801 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3802
058f0b9e
JJ
38032017-11-28 Jakub Jelinek <jakub@redhat.com>
3804
3805 PR sanitizer/81275
3806 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3807 c_switch_covers_all_cases_p returns true.
3808
5e9d6aa4 38092017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3810 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3811
3812 * Make-lang.in (c/c-array-notation.o): Remove.
3813 * c-array-notation.c: Delete.
3814 * c-decl.c: Remove cilkplus condition.
3815 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3816 c_parser_cilk_verify_simd, c_parser_array_notation,
3817 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3818 c_parser_cilk_simd_fn_vector_attrs,
3819 c_finish_cilk_simd_fn_tokens): Delete.
3820 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3821 (c_parser_direct_declarator_inner): Ditto.
3822 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3823 (c_parser_attributes, c_parser_compound_statement,
3824 c_parser_statement_after_labels, c_parser_if_statement,
3825 c_parser_switch_statement, c_parser_while_statement,
3826 c_parser_do_statement, c_parser_for_statement,
3827 c_parser_unary_expression, c_parser_postfix_expression,
3828 c_parser_postfix_expression_after_primary,
3829 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3830 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3831 support.
3832 * c-typeck.c (build_array_ref, build_function_call_vec,
3833 convert_arguments,
3834 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3835 c_finish_loop, build_binary_op): Remove cilkplus support.
3836
9e851845
JJ
38372017-11-28 Jakub Jelinek <jakub@redhat.com>
3838
3839 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3840 of build3.
3841
ab20d992 38422017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3843
3844 * Make-lang.in (c.install-plugin): Install backend import library.
3845
41521dee
JJ
38462017-11-23 Jakub Jelinek <jakub@redhat.com>
3847
3848 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3849 pragma_stmt context.
3850
ac9effed
EB
38512017-11-23 Mike Stump <mikestump@comcast.net>
3852 Eric Botcazou <ebotcazou@adacore.com>
3853
3854 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3855 ANNOTATE_EXPR.
3856 (c_parser_do_statement): Likewise.
3857 (c_parser_for_statement): Likewise.
3858
ce95abc4
DM
38592017-11-22 David Malcolm <dmalcolm@redhat.com>
3860
3861 PR c++/62170
3862 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3863 bool to bool *. Within '%T' handling, if showing an "aka", use
3864 "quoted" param to add appropriate quoting.
3865
974aedcc
MP
38662017-11-22 Marek Polacek <polacek@redhat.com>
3867
3868 PR c++/60336
3869 PR middle-end/67239
3870 PR target/68355
3871 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3872
d4300cc6
DM
38732017-11-21 David Malcolm <dmalcolm@redhat.com>
3874
3875 PR c/83056
3876 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3877 earlier failed lookups.
3878
1af4ebf5
MG
38792017-11-21 Marc Glisse <marc.glisse@inria.fr>
3880
3881 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3882 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3883
26edace6
DM
38842017-11-20 David Malcolm <dmalcolm@redhat.com>
3885
3886 PR c/81404
3887 * c-decl.c: Include "c-family/known-headers.h".
3888 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3889 to known-headers.cc.
3890 (class suggest_missing_header): Move to known-header.h.
3891 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3892 than get_c_name_hint.
3893
b1212255
DM
38942017-11-20 David Malcolm <dmalcolm@redhat.com>
3895
3896 * c-decl.c (get_c_name_hint): New function.
3897 (class suggest_missing_header): New class.
3898 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3899 suggest missing headers to the user.
3900
6c7a259b
DM
39012017-11-20 David Malcolm <dmalcolm@redhat.com>
3902
3903 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3904 Include "c-family/name-hint.h"
3905 (implicit_decl_warning): Convert "hint" from
3906 const char * to name_hint. Pass location to
3907 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3908 warning was not printed.
3909 (undeclared_variable): Likewise for "guessed_id".
3910 (lookup_name_fuzzy): Convert return type from const char *
3911 to name_hint. Add location_t param.
3912 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3913 Include "c-family/name-hint.h"
3914 (c_parser_declaration_or_fndef): Convert "hint" from
3915 const char * to name_hint. Pass location to lookup_name_fuzzy.
3916 (c_parser_parameter_declaration): Likewise.
3917
f9c59f7e
JJ
39182017-11-19 Jakub Jelinek <jakub@redhat.com>
3919
3920 PR c/66618
3921 PR c/69960
3922 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3923 where needed.
3924 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3925 handle_omp_array_sections): Likewise.
3926 (digest_init): Don't call decl_constant_value_for_optimization.
3927 * c-tree.h (decl_constant_value_for_optimization): Removed.
3928 * c-fold.c (c_fold_array_ref): New function.
3929 (c_fully_fold_internal): Add LVAL argument, propagate it through
3930 recursive calls. For VAR_P call decl_constant_value and
3931 unshare if not LVAL and either optimizing or IN_INIT. Remove
3932 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3933 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3934 (c_fully_fold): Add LVAL argument, pass it through to
3935 c_fully_fold_internal.
3936 (decl_constant_value_for_optimization): Removed.
3937
3ca0dc60
JM
39382017-11-15 Joseph Myers <joseph@codesourcery.com>
3939
3940 PR c/81156
3941 * c-parser.c (check_tgmath_function): New function.
3942 (enum tgmath_parm_kind): New enum.
3943 (c_parser_postfix_expression): Handle __builtin_tgmath.
3944
64a5912c
DM
39452017-10-31 David Malcolm <dmalcolm@redhat.com>
3946
3947 * c-decl.c (implicit_decl_warning): Update for renaming of
3948 pedwarn_at_rich_loc and warning_at_rich_loc.
3949 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3950 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3951 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3952 (c_parser_struct_or_union_specifier): Likewise for renaming of
3953 pedwarn_at_rich_loc.
3954 (c_parser_parameter_declaration): Likewise for renaming of
3955 error_at_rich_loc.
3956 * c-typeck.c (build_component_ref): Likewise.
3957 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3958 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3959 (set_init_label): Likewise for renaming of error_at_rich_loc.
3960
c1136864
RB
39612017-10-30 Richard Biener <rguenther@suse.de>
3962
3963 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3964 stmts.
3965
ee5fd23a
MM
39662017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3967
3968 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3969 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3970
1a59ccf2
DM
39712017-10-25 David Malcolm <dmalcolm@redhat.com>
3972
3973 PR c/7356
3974 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3975 semicolons.
3976
bc1a75dd
JJ
39772017-10-25 Jakub Jelinek <jakub@redhat.com>
3978
3979 PR libstdc++/81706
3980 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3981 newdecl to corresponding __builtin_ if any.
3982
ff1ff960
PC
39832017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3984
3985 PR c++/82466
3986 * c-decl.c (diagnose_mismatched_decls): Use
3987 OPT_Wbuiltin_declaration_mismatch.
3988
62e1c678
DM
39892017-10-12 David Malcolm <dmalcolm@redhat.com>
3990
3991 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3992 use it to guard calls to maybe_suggest_missing_token_insertion.
3993 (c_parser_parms_list_declarator): Override default value of new
3994 "type_is_unique" param to c_parser_require.
3995 (c_parser_asm_statement): Likewise.
3996 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3997 defaulting to true.
3998
a92f6726
NS
39992017-10-11 Nathan Sidwell <nathan@acm.org>
4000
4001 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4002
8e6cdc90
RS
40032017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4004
4005 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4006 operating on trees as wide_ints.
4007 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4008 (c_tree_equal): Likewise.
4009
8139a48e
DM
40102017-10-04 David Malcolm <dmalcolm@redhat.com>
4011
4012 * c-decl.c (push_parm_decl): Store c_parm's location into the
4013 PARAM_DECL.
4014 (build_c_parm): Add "loc" param and store it within the c_parm.
4015 * c-parser.c (struct c_parser): Add "last_token_location" field.
4016 (c_parser_consume_token): Store location of the token into the
4017 new field.
4018 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4019 when handling a FUNCTION_DECL, if it doesn't already have them.
4020 (c_parser_parameter_declaration): Generate a location for the
4021 parameter, and pass it to the call to build_c_parm.
4022 * c-tree.h (struct c_parm): Add field "loc".
4023 (build_c_parm): Add location_t param.
4024 * c-typeck.c (get_fndecl_argument_location): New function.
4025 (inform_for_arg): New function.
4026 (convert_for_assignment): Use inform_for_arg when dealing with
4027 ic_argpass.
4028
2a389958
JJ
40292017-09-29 Jakub Jelinek <jakub@redhat.com>
4030
7d386d45
JJ
4031 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4032 width is non-NULL.
4033 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4034 don't SET_DECL_C_BIT_FIELD here.
4035
2a389958
JJ
4036 PR c/82340
4037 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4038 instead of trying to set just TREE_READONLY manually.
4039
ebc6a85e
TV
40402017-09-16 Tom de Vries <tom@codesourcery.com>
4041
4042 PR c/81875
4043 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4044 cond itself.
4045
bb75facd
JM
40462017-09-15 Joseph Myers <joseph@codesourcery.com>
4047
4048 PR c/82071
4049 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4050 for C11.
4051 (build_conditional_expr): For C11, generate result with excess
4052 precision when one argument is an integer and the other is of a
4053 type using excess precision.
4054
1d933576
BE
40552017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4056
4057 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4058
267bbb6f
MP
40592017-09-13 Marek Polacek <polacek@redhat.com>
4060
4061 PR c/82167
4062 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4063 than expr.original_type.
4064
6836632e
NS
40652017-09-12 Nathan Sidwell <nathan@acm.org>
4066
4067 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4068 resort_sorted_fields): Moved from c-family/c-common.c.
4069 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4070
e035be33
JM
40712017-09-01 Joseph Myers <joseph@codesourcery.com>
4072
4073 PR c/82071
4074 * c-typeck.c (build_atomic_assign): Handle argument with excess
4075 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4076 argument passed to build_binary_op and convert_for_assignment but
4077 not for call to c_fully_fold.
4078 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4079 Ensure build_binary_op is called with argument with original
4080 semantic type. Avoid calling c_fully_fold with an
4081 EXCESS_PRECISION_EXPR from build_binary_op.
4082
d2e05fcb
JJ
40832017-09-01 Jakub Jelinek <jakub@redhat.com>
4084
4085 PR c/81887
4086 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4087
b397965c
RS
40882017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4089 Alan Hayward <alan.hayward@arm.com>
4090 David Sherwood <david.sherwood@arm.com>
4091
4092 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4093 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4094 m1 and m2 to the signed equivalent of a fixed-point
4095 SCALAR_TYPE_MODE.
4096
14e18d71
DM
40972017-08-24 David Malcolm <dmalcolm@redhat.com>
4098
4099 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4100 than CAN_HAVE_LOCATION_P when determining whether to use the
4101 location_t value within "value".
4102
7f204c0f
DM
41032017-08-21 David Malcolm <dmalcolm@redhat.com>
4104
4105 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4106 rather than peeking the location of the first token.
4107 * c-tree.h (c_expr::get_location): New method.
4108
2f687306
DM
41092017-08-21 David Malcolm <dmalcolm@redhat.com>
4110
4111 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4112 to check_function_arguments.
4113
3e7b80d7
MP
41142017-08-18 Marek Polacek <polacek@redhat.com>
4115
4116 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4117 commentary.
4118
00aa1fa2
L
41192017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4120
4121 PR c/53037
4122 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4123 (check_bitfield_type_and_width): Don't allow bit-field with
4124 warn_if_not_aligned type.
4125
da67acb9
MS
41262017-08-14 Martin Sebor <msebor@redhat.com>
4127
4128 PR c/81117
4129 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4130
bb85aa74
MP
41312017-08-11 Marek Polacek <polacek@redhat.com>
4132
4133 PR c/81795
4134 * c-decl.c (pushtag): Only print inform if the warning was printed.
4135 (grokdeclarator): Likewise.
4136
32129a17
DM
41372017-08-10 David Malcolm <dmalcolm@redhat.com>
4138
4139 * c-parser.c (c_parser_error): Rename to...
4140 (c_parser_error_richloc): ...this, making static, and adding
4141 "richloc" parameter, passing it to the c_parse_error call,
4142 rather than calling c_parser_set_source_position_from_token.
4143 (c_parser_error): Reintroduce, reimplementing in terms of the
4144 above, converting return type from void to bool.
4145 (class token_pair): New class.
4146 (struct matching_paren_traits): New struct.
4147 (matching_parens): New typedef.
4148 (struct matching_brace_traits): New struct.
4149 (matching_braces): New typedef.
4150 (get_matching_symbol): New function.
4151 (c_parser_require): Add param MATCHING_LOCATION, using it to
4152 highlight matching "opening" tokens for missing "closing" tokens.
4153 (c_parser_skip_until_found): Likewise.
4154 (c_parser_static_assert_declaration_no_semi): Convert explicit
4155 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4156 class matching_parens, so that the pertinent open parenthesis is
4157 highlighted when there are problems locating the close
4158 parenthesis.
4159 (c_parser_struct_or_union_specifier): Likewise.
4160 (c_parser_typeof_specifier): Likewise.
4161 (c_parser_alignas_specifier): Likewise.
4162 (c_parser_simple_asm_expr): Likewise.
4163 (c_parser_braced_init): Likewise, for matching_braces.
4164 (c_parser_paren_condition): Likewise, for matching_parens.
4165 (c_parser_switch_statement): Likewise.
4166 (c_parser_for_statement): Likewise.
4167 (c_parser_asm_statement): Likewise.
4168 (c_parser_asm_operands): Likewise.
4169 (c_parser_cast_expression): Likewise.
4170 (c_parser_sizeof_expression): Likewise.
4171 (c_parser_alignof_expression): Likewise.
4172 (c_parser_generic_selection): Likewise.
4173 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4174 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4175 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4176 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4177 c_parser_skip_until_found call.
4178 (c_parser_objc_class_definition): Use class matching_parens as
4179 above.
4180 (c_parser_objc_method_decl): Likewise.
4181 (c_parser_objc_try_catch_finally_statement): Likewise.
4182 (c_parser_objc_synchronized_statement): Likewise.
4183 (c_parser_objc_at_property_declaration): Likewise.
4184 (c_parser_oacc_wait_list): Likewise.
4185 (c_parser_omp_var_list_parens): Likewise.
4186 (c_parser_omp_clause_collapse): Likewise.
4187 (c_parser_omp_clause_default): Likewise.
4188 (c_parser_omp_clause_if): Likewise.
4189 (c_parser_omp_clause_num_threads): Likewise.
4190 (c_parser_omp_clause_num_tasks): Likewise.
4191 (c_parser_omp_clause_grainsize): Likewise.
4192 (c_parser_omp_clause_priority): Likewise.
4193 (c_parser_omp_clause_hint): Likewise.
4194 (c_parser_omp_clause_defaultmap): Likewise.
4195 (c_parser_oacc_single_int_clause): Likewise.
4196 (c_parser_omp_clause_ordered): Likewise.
4197 (c_parser_omp_clause_reduction): Likewise.
4198 (c_parser_omp_clause_schedule): Likewise.
4199 (c_parser_omp_clause_num_teams): Likewise.
4200 (c_parser_omp_clause_thread_limit): Likewise.
4201 (c_parser_omp_clause_aligned): Likewise.
4202 (c_parser_omp_clause_linear): Likewise.
4203 (c_parser_omp_clause_safelen): Likewise.
4204 (c_parser_omp_clause_simdlen): Likewise.
4205 (c_parser_omp_clause_depend): Likewise.
4206 (c_parser_omp_clause_map): Likewise.
4207 (c_parser_omp_clause_device): Likewise.
4208 (c_parser_omp_clause_dist_schedule): Likewise.
4209 (c_parser_omp_clause_proc_bind): Likewise.
4210 (c_parser_omp_clause_uniform): Likewise.
4211 (c_parser_omp_for_loop): Likewise.
4212 (c_parser_cilk_clause_vectorlength): Likewise.
4213 (c_parser_cilk_clause_linear): Likewise.
4214 (c_parser_transaction_expression): Likewise.
4215 * c-parser.h (c_parser_require): Add param matching_location with
4216 default UNKNOWN_LOCATION.
4217 (c_parser_error): Convert return type from void to bool.
4218 (c_parser_skip_until_found): Add param matching_location with
4219 default UNKNOWN_LOCATION.
4220
30af3a2b
MP
42212017-08-09 Marek Polacek <polacek@redhat.com>
4222
4223 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4224 * c-tree.h (build_external_ref): Update declaration.
4225 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4226 (build_external_ref): Change the type of a parameter to bool.
4227 (parser_build_binary_op): Use true/false instead of 1/0.
4228 (pointer_diff): Likewise.
4229 (build_modify_expr): Likewise.
4230 (set_designator): Change the type of a parameter to bool.
4231 (set_init_index): Use true/false instead of 1/0.
4232 (set_init_label): Likewise.
4233 (output_init_element): Change the type of a parameter to bool.
4234 (output_pending_init_elements): Use true/false instead of 1/0.
4235 (process_init_element): Likewise.
4236 (build_binary_op): Change the type of a parameter to bool.
4237
296c53ac
MP
42382017-08-09 Marek Polacek <polacek@redhat.com>
4239
4240 PR c/81233
4241 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4242 Call emit_diagnostic_valist instead of pedwarn.
4243 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4244 Print the relevant types in diagnostics.
4245
a32c8316
MP
42462017-08-09 Marek Polacek <polacek@redhat.com>
4247
4248 PR c/81417
4249 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 4250 build_conditional_expr.
a32c8316
MP
4251 * c-parser.c (c_parser_conditional_expression): Create locations for
4252 EXP1 and EXP2 from their source ranges. Pass the locations down to
4253 build_conditional_expr.
4254 * c-tree.h (build_conditional_expr): Update declaration.
4255 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4256 For -Wsign-compare, also print the types.
4257
314e6352
ML
42582017-08-08 Martin Liska <mliska@suse.cz>
4259
4260 * c-convert.c: Include header files.
4261 * c-typeck.c: Likewise.
4262
577eec56
ML
42632017-08-07 Martin Liska <mliska@suse.cz>
4264
4265 * c-parser.c (c_parser_attributes): Canonicalize name of an
4266 attribute.
4267
f7b6353a
MP
42682017-08-02 Marek Polacek <polacek@redhat.com>
4269
4270 PR c/81289
4271 * c-parser.c (c_parser_unary_expression): Use set_error.
4272
8a6eab34
MP
4273 PR c/81448
4274 PR c/81306
4275 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4276 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4277
ab20d992 42782017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
4279 Martin Liska <mliska@suse.cz>
4280
4281 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 4282 statement.
7fef86d3 4283
f34ebeb2
ML
42842017-07-31 Martin Liska <mliska@suse.cz>
4285
4286 PR sanitize/81530
4287 * c-convert.c (convert): Guard condition with flag_sanitize_p
4288 also with current_function_decl non-null equality.
4289 * c-decl.c (grokdeclarator): Likewise.
4290 * c-typeck.c (build_binary_op): Likewise.
4291
8595f67b
MP
42922017-07-25 Marek Polacek <polacek@redhat.com>
4293
4294 * c-decl.c (grokfield): Remove local variable.
4295
d49718d6
MP
42962017-07-25 Marek Polacek <polacek@redhat.com>
4297
4298 PR c/81364
4299 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4300 macro expansion if the body is in { }.
4301 (c_parser_while_statement): Likewise.
4302 (c_parser_for_statement): Likewise.
4303
ff22eb12
NS
43042017-07-18 Nathan Sidwell <nathan@acm.org>
4305
4306 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4307
eea77d1f
DM
43082017-07-14 David Malcolm <dmalcolm@redhat.com>
4309
4310 * c-decl.c (implicitly_declare): When suggesting a missing
4311 #include, provide a fix-it hint.
4312
b6f43128
DM
43132017-07-06 David Malcolm <dmalcolm@redhat.com>
4314
4315 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4316 and call that instead.
4317 * c-tree.h (selftest::run_c_tests): New decl.
4318
3e2becc4
MP
43192017-06-26 Marek Polacek <polacek@redhat.com>
4320
4321 PR c/80116
4322 * c-parser.c (c_parser_if_body): Set the location of the
4323 body of the conditional after parsing all the labels. Call
4324 warn_for_multistatement_macros.
4325 (c_parser_else_body): Likewise.
4326 (c_parser_switch_statement): Likewise.
4327 (c_parser_while_statement): Likewise.
4328 (c_parser_for_statement): Likewise.
4329 (c_parser_statement): Add a default argument. Save the location
4330 after labels have been parsed.
4331 (c_parser_c99_block_statement): Likewise.
4332
343ae898
RB
43332017-06-19 Richard Biener <rguenther@suse.de>
4334
4335 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4336 negated _Literals to parse _Literal (int) -1.
4337
45b2222a
ML
43382017-06-13 Martin Liska <mliska@suse.cz>
4339
4340 PR sanitize/78204
4341 * c-convert.c (convert): Use sanitize_flags_p.
4342 * c-decl.c (grokdeclarator): Likewise.
4343 * c-typeck.c (convert_for_assignment): Likewise.
4344 (c_finish_return): Likewise.
4345 (build_binary_op): Likewise.
4346
8ab7005b
JJ
43472017-06-08 Jakub Jelinek <jakub@redhat.com>
4348
4349 PR c/81006
4350 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4351 to sizetype before size_binop.
4352
363dc72c
JJ
43532017-06-07 Jakub Jelinek <jakub@redhat.com>
4354
4355 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4356 of TDI_generic.
4357
dc949728
MP
43582017-06-06 Marek Polacek <polacek@redhat.com>
4359
4360 PR c/79983
4361 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4362 ref.
4363 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4364
40ffd95f
BE
43652017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4366
4367 * c-parser.c (c_parser_binary_expression): Implement the
4368 -Wsizeof_pointer_div warning.
4369 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4370 from a parenthesized expression.
4371 (c_parser_expr_list): Use c_last_sizeof_loc.
4372 * c-tree.h (c_last_sizeof_loc): New external.
4373 * c-typeck.c (c_last_sizeof_loc): New variable.
4374 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4375
9fc5e7a4
MM
43762017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4377
4378 PR testsuite/80580
4379 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4380
f012c8ef
DM
43812017-05-30 David Malcolm <dmalcolm@redhat.com>
4382
4383 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4384 parameters.
4385
3cd211af
MS
43862017-05-24 Martin Sebor <msebor@redhat.com>
4387
4388 PR c/80731
4389 * c-fold.c (c_fully_fold_internal): Adjust.
4390 * c-typeck.c (parser_build_unary_op): Adjust.
4391
fd71a9a2
TS
43922017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4393
4394 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4395 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4396 "VECTOR_LENGTH".
4397
92fa0f9e
MP
43982017-05-23 Marek Polacek <polacek@redhat.com>
4399
4400 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4401 quotes.
4402
d11c168a
JJ
44032017-05-22 Jakub Jelinek <jakub@redhat.com>
4404
4405 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4406 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4407 it returned invariant. Call tree_invariant_p unconditionally
4408 afterwards to decide whether to return expr or op0.
4409
58aca9d9
NS
44102017-05-22 Nathan Sidwell <nathan@acm.org>
4411
4412 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4413
7fd549d2
TS
44142017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4415
4416 * c-parser.c (c_parser_omp_clause_default): Handle
4417 "OMP_CLAUSE_DEFAULT_PRESENT".
4418
6ecd2339
BE
44192017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4420
4421 * config-lang.in (gtfiles): Add c-family/c-format.c.
4422
8a57ecff
NS
44232017-05-18 Nathan Sidwell <nathan@acm.org>
4424
4425 * c-decl.c (pushdecl_top_level): Delete unused function.
4426
6574d78e
MP
44272017-05-18 Marek Polacek <polacek@redhat.com>
4428
4429 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4430 (check_earlier_gotos): Likewise.
4431 (define_label): Likewise.
4432 (pending_xref_error): Likewise.
4433 (smallest_type_quals_location): Likewise.
4434 (grokdeclarator): Likewise.
4435 (grokparms): Likewise.
4436 (identifier_global_value): Likewise.
4437 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4438 (find_init_member): Likewise.
4439
e3455240
MP
44402017-05-18 Marek Polacek <polacek@redhat.com>
4441
4442 * c-decl.c (start_decl): Use false/true instead of 0/1.
4443 (grokdeclarator): Likewise.
4444 (finish_struct): Likewise.
4445 (start_function): Change the return type to bool. Use false/true
4446 instead of 0/1.
4447 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4448 * c-tree.h (start_function): Update.
4449 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4450 (set_designator): Change the return type to bool. Use false/true
4451 instead of 0/1.
4452
3fa8871b
MP
44532017-05-17 Marek Polacek <polacek@redhat.com>
4454
4455 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4456 * c-typeck.c: Likewise.
4457
142473df
MP
44582017-05-17 Marek Polacek <polacek@redhat.com>
4459
4460 PR sanitizer/80659
4461 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4462 DECL_IGNORED_P even for non-static compound literals.
4463
1a817418
ML
44642017-05-17 Martin Liska <mliska@suse.cz>
4465
4466 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4467 use it instead of int type.
4468
b2fa0a8b
MP
44692017-05-17 Marek Polacek <polacek@redhat.com>
4470
4471 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4472 call c_fully_fold.
4473 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4474 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4475 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4476 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4477 save_expr.
4478 (c_parser_conditional_expression): Likewise.
4479 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4480 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4481 (process_init_element): Likewise.
4482 (build_binary_op): Likewise.
4483 (handle_omp_array_sections_1): Likewise.
4484
1e47f02b
TS
44852017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4486
4487 * c-parser.c (c_parser_omp_clause_num_gangs)
4488 (c_parser_omp_clause_num_workers)
4489 (c_parser_omp_clause_vector_length): Merge functions into...
4490 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4491 all users.
4492
c24e924f
NS
44932017-05-11 Nathan Sidwell <nathan@acm.org>
4494
4495 * gimple-parser.c: Don't #include tree-dump.h.
4496
c587104e
MM
44972017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4498
4499 PR testsuite/80580
4500 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4501
67ac9a9d
MM
45022017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4503
4504 PR testsuite/80580
4505 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4506 incorrect __MEM syntax.
4507
ac4eb40f
MM
45082017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4509
4510 PR testsuite/80580
4511 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4512 type of unary '*'.
4513
641da50a
NS
45142017-05-09 Nathan Sidwell <nathan@acm.org>
4515
4516 * c-tree.h (pushdecl): Declare.
4517
56d35585
DM
45182017-05-05 David Malcolm <dmalcolm@redhat.com>
4519
4520 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4521 with diagnostic_report_diagnostic.
4522 * c-errors.c (pedwarn_c99): Likewise.
4523 (pedwarn_c90): Likewise.
4524
815d9cc6
XR
45252017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4526
92a285c1 4527 PR c++/80038
815d9cc6
XR
4528 * c-gimplify.c (c_gimplify_expr): Remove calls to
4529 cilk_gimplifY_call_params_in_spawned_fn.
4530
1c4ea66f
DM
45312017-04-25 David Malcolm <dmalcolm@redhat.com>
4532
4533 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4534 hint for removing extra semicolon.
4535
666f7903
JJ
45362017-04-21 Jakub Jelinek <jakub@redhat.com>
4537
4538 PR c/80468
4539 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4540 enabled, set specs->type to integer_type_node.
4541
5764ee3c
JW
45422017-04-03 Jonathan Wakely <jwakely@redhat.com>
4543
4544 * c-array-notation.c: Fix typo in comment.
4545
10fa8dfb
MP
45462017-03-29 Marek Polacek <polacek@redhat.com>
4547
4548 PR c/79730
4549 * c-decl.c (finish_decl): Check VAR_P.
4550
a9e4a1a5
JJ
45512017-03-27 Jakub Jelinek <jakub@redhat.com>
4552
4553 PR middle-end/80162
4554 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4555 * c-typeck.c (c_mark_addressable): Likewise. Look through
4556 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4557 to ARRAY_TYPE.
4558 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4559
ee3ff394
MP
45602017-03-23 Marek Polacek <polacek@redhat.com>
4561
4562 * c-tree.h: Remove a C_RID_YYCODE reference.
4563
4d1b8e70
JJ
45642017-03-21 Jakub Jelinek <jakub@redhat.com>
4565
4566 PR c/80097
4567 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4568 optional COMPOUND_EXPR with ubsan instrumentation.
4569
31dc71a8
MP
45702017-03-17 Marek Polacek <polacek@redhat.com>
4571
4572 * c-parser.c: Add C11 references.
4573
d579c385
MP
45742017-03-15 Marek Polacek <polacek@redhat.com>
4575
4576 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4577
85059a38
MP
45782017-03-11 Marek Polacek <polacek@redhat.com>
4579
4580 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4581
2f6f187a
DM
45822017-03-10 David Malcolm <dmalcolm@redhat.com>
4583
4584 PR translation/79848
4585 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4586 "%qs".
4587 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4588
36618428
MP
45892017-03-09 Marek Polacek <polacek@redhat.com>
4590
4591 PR sanitizer/79757
4592 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4593 parameter declarations with initializers.
4594
01e5af5a
JJ
45952017-03-09 Jakub Jelinek <jakub@redhat.com>
4596
4597 PR c/79969
4598 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4599 TYPE_STUB_DECL.
4600
a71dbc63
JJ
46012017-03-07 Jakub Jelinek <jakub@redhat.com>
4602
4603 PR c/79834
4604 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4605 for "may only be used in compound statements" diagnostics, change it
4606 such that the same translatable string is used for all pragmas. For
4607 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4608 diagnostics.
4609 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4610 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4611 "may only be used in compound statements" diagnostics, such that the
4612 same translatable string is used for all pragmas.
4613
1ff4bae6
MP
46142017-03-04 Marek Polacek <polacek@redhat.com>
4615
4616 PR c/79847
4617 * c-decl.c (implicit_decl_warning): Add missing space.
4618
7f5a7d78
MP
46192017-03-03 Marek Polacek <polacek@redhat.com>
4620
4621 PR c/79758
4622 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4623 current_function_prototype_arg_types is error_mark_node. Fix
4624 formatting. Use TREE_VALUE instead of TREE_TYPE.
4625
883c8f06
JJ
46262017-03-03 Jakub Jelinek <jakub@redhat.com>
4627
79c9b7a8
JJ
4628 PR c/79837
4629 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4630 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4631 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4632 diagnostics.
4633
883c8f06
JJ
4634 PR c/79836
4635 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4636 instead of %<_Generic>.
4637 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4638 (c_parser_omp_target_exit_data): Use %<release%> instead of
4639 %<release>.
4640
324ff1a0
JJ
46412017-02-28 Jakub Jelinek <jakub@redhat.com>
4642
4643 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4644 instead of just cond ? "..." : "...".
4645 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4646 for "enter"/"exit" keyword.
4647 (c_finish_oacc_routine): Don't use %s to supply portions of the
4648 message.
4649
4227c9ad
JJ
46502017-02-24 Jakub Jelinek <jakub@redhat.com>
4651
4652 PR c++/79588
4653 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4654 handle -Wrestrict here.
4655 * c-typeck.c (build_function_call_vec): Adjust
4656 check_function_arguments caller.
4657
5d972e66
RB
46582017-02-23 Richard Biener <rguenther@suse.de>
4659
4660 PR c/79684
4661 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4662 to initialize c_exprs to return.
4663 (c_parser_gimple_binary_expression): Likewise.
4664 (c_parser_gimple_unary_expression): Likewise.
4665 (c_parser_gimple_postfix_expression): Likewise.
4666
61ac5ebe
MP
46672017-02-22 Marek Polacek <polacek@redhat.com>
4668
4669 PR c/79662
4670 * c-typeck.c (convert_arguments): Handle error_mark_node.
4671
41d1b0b1
PK
46722017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4673
4674 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4675 value of c_parser_parse_ssa_name against error_mark_node and emit
4676 error if ssa name is anonymous and written as default definition.
4677
eab1f169
PK
46782017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4679
4680 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4681 FMA_EXPR.
4682
bcac0b4d
JJ
46832017-02-16 Jakub Jelinek <jakub@redhat.com>
4684
4685 PR c++/79512
4686 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4687 ignore #pragma omp target even when not followed by identifier.
4688
1be33173
PK
46892017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4690
4691 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4692 (c_parser_gimple_unary_expression): Likewise.
4693
aa326bfb
JJ
46942017-02-13 Jakub Jelinek <jakub@redhat.com>
4695
4696 * c-parser.c (c_parser_oacc_declare): Add missing space in
4697 diagnostics.
4698
8a398bc5
PK
46992017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4700
4701 PR c/79478
4702 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4703 set_c_expr_source_range when parsing ssa-name.
4704
3dcde5ef 47052017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4706 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4707
4708 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4709 building IL when arguments are error_mark_node.
4710 (c_parser_gimple_unary_expression): Likewise.
4711 (c_parser_gimple_if_stmt): Likewise.
4712 (c_parser_gimple_switch_stmt): Likewise.
4713 (c_parser_gimple_return_stmt): Likewise.
4714 (c_parser_parse_ssa_name): When name lookup fails do not build
4715 an SSA name. Use undeclared rather than not declared in error
4716 reporting.
4717
192b048b
MP
47182017-02-09 Marek Polacek <polacek@redhat.com>
4719
4720 PR c/79428
4721 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4722 instead of c_parser_skip_until_found.
4723
56f71478
JJ
47242017-02-09 Jakub Jelinek <jakub@redhat.com>
4725
4726 PR c/79431
4727 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4728 symtab_node::get on automatic variables.
4729
02889d23
CLT
47302016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4731 Chung-Lin Tang <cltang@codesourcery.com>
4732
4733 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4734 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4735 semantic checking.
4736 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4737
7af4b20d
RB
47382017-02-07 Richard Biener <rguenther@suse.de>
4739
4740 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4741 (c_parser_gimple_postfix_expression_after_primary):
4742 Do not use c_build_function_call_vec to avoid folding and promotion.
4743 Simplify.
4744
e5e391d6
MO
47452017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4746
4747 PR lto/79061
4748 * c-decl.c (pop_scope): Pass main_input_filename to
4749 build_translation_unit_decl.
4750
c2e84327
DM
47512017-01-24 David Malcolm <dmalcolm@redhat.com>
4752
4753 * c-parser.c: Include "read-rtl-function.h" and
4754 "run-rtl-passes.h".
4755 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4756 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4757 production. Update for renaming of field "gimple_pass" to
4758 "gimple_or_rtl_pass". If __RTL was seen, call
4759 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4760 to an auto_timevar, to cope with early exit.
4761 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4762 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4763 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4764 Handle RID_RTL.
4765 (c_parser_parse_rtl_body): New function.
4766 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4767 (struct c_declspecs): Rename field "gimple_pass" to
4768 "gimple_or_rtl_pass". Add field "rtl_p".
4769 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4770 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4771 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4772 (c_parser_gimple_or_rtl_pass_list): ...this.
4773
2ebd93e1
MP
47742017-01-20 Marek Polacek <polacek@redhat.com>
4775
4776 PR c/64279
4777 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4778
b1c95bb5
RB
47792017-01-13 Richard Biener <rguenther@suse.de>
4780
4781 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4782 nops.
4783
25329913
RB
47842017-01-13 Richard Biener <rguenther@suse.de>
4785
4786 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4787 _Literal ( type-name ) number.
4788
6bb4ea5c
RB
47892017-01-12 Richard Biener <rguenther@suse.de>
4790
4791 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4792 __MEM.
4793
6b5b4e9c
JJ
47942017-01-11 Jakub Jelinek <jakub@redhat.com>
4795
4796 PR c++/72813
4797 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4798 PCH file.
4799
e3252775
RB
48002017-01-11 Richard Biener <rguenther@suse.de>
4801
4802 PR bootstrap/79052
4803 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4804 returns on parse errors.
4805
a9342885
MP
48062017-01-04 Marek Polacek <polacek@redhat.com>
4807
4808 PR c++/64767
4809 * c-parser.c (c_parser_postfix_expression): Mark zero character
4810 constants by setting original_type in c_expr.
4811 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4812 with a zero character constant.
4813 (char_type_p): New function.
4814
5dd9a9d0
DM
48152017-01-04 David Malcolm <dmalcolm@redhat.com>
4816
4817 * c-parser.c (c_parser_declaration_or_fndef): Create a
4818 rich_location at init_loc and parse it to start_init.
4819 (last_init_list_comma): New global.
4820 (c_parser_braced_init): Update last_init_list_comma when parsing
4821 commas. Pass it to pop_init_level. Pass location of closing
4822 brace to pop_init_level.
4823 (c_parser_postfix_expression_after_paren_type): Create a
4824 rich_location at type_loc and parse it to start_init.
4825 (c_parser_omp_declare_reduction): Likewise for loc.
4826 * c-tree.h (start_init): Add rich_location * param.
4827 (pop_init_level): Add location_t param.
4828 * c-typeck.c (struct initializer_stack): Add field
4829 "missing_brace_richloc".
4830 (start_init): Add richloc param, use it to initialize
4831 the stack node's missing_brace_richloc.
4832 (last_init_list_comma): New decl.
4833 (finish_implicit_inits): Pass last_init_list_comma to
4834 pop_init_level.
4835 (push_init_level): When finding missing open braces, add fix-it
4836 hints to the richloc.
4837 (pop_init_level): Add "insert_before" param and pass it
4838 when calling pop_init_level. Add fixits about missing
4839 close braces to any richloc. Use the richloc for the
4840 -Wmissing-braces warning.
4841 (set_designator): Pass last_init_list_comma to pop_init_level.
4842 (process_init_element): Likewise.
4843
cbe34bb5
JJ
48442017-01-01 Jakub Jelinek <jakub@redhat.com>
4845
4846 Update copyright years.
4847
d17680f3
JJ
48482016-12-21 Jakub Jelinek <jakub@redhat.com>
4849
0dba7960
JJ
4850 PR bootstrap/78817
4851 * c-typeck.c (build_function_call_vec): If check_function_arguments
4852 returns true, set TREE_NO_WARNING on CALL_EXPR.
4853
d17680f3
JJ
4854 PR c/77767
4855 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4856 to *expr instead of overwriting it.
4857
aa90531e
RB
48582016-12-20 Richard Biener <rguenther@suse.de>
4859
4860 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4861 error recovery.
4862 (c_parser_gimple_statement): Only build assigns for non-error
4863 stmts.
4864 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4865
629b3d75
MJ
48662016-12-14 Martin Jambor <mjambor@suse.cz>
4867
4868 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4869 omp-low.h.
4870 (c_finish_oacc_routine): Adjusted call to
4871 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4872 to use their new names.
4873 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4874 use its new name.
4875 (c_parser_oacc_update): Likewise.
4876 (c_parser_omp_simd): Likewise.
4877 (c_parser_omp_target_update): Likewise.
4878 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4879 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4880 name.
4881 (c_finish_omp_cancellation_point): Likewise.
4882 * gimple-parser.c: Do not include omp-low.h
4883
c5af52eb
CP
48842016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4885 James Norris <jnorris@codesourcery.com>
4886
4887 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4888 EXIT_DATA,WAIT} are not used in compound statements.
4889 (c_parser_oacc_enter_exit_data): Update diagnostics.
4890
48330c93
BE
48912016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4892
4893 PR c++/71973
4894 * c-decl.c (diagnose_mismatched_decls): Use
4895 OPT_Wbuiltin_declaration_mismatch here too.
4896
899ca90e 48972016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4898 Alan Hayward <alan.hayward@arm.com>
4899 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4900
4901 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4902 (make_label, finish_struct): Likewise.
4903
1ee62b92 49042016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4905 Richard Biener <rguenther@suse.de>
22b15758 4906
8e745a17
JJ
4907 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4908 * config-lang.in (gtfiles): Add c/c-parser.h.
4909 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4910 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4911 * c-parser.c (enum c_id_kind, struct c_token,
4912 c_parser_next_token_is, c_parser_next_token_is_not,
4913 c_parser_next_token_is_keyword,
4914 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4915 Split out to ...
4916 * c-parser.h: ... new header.
4917 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4918 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4919 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4920 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4921 c_parser_error, c_parser_require, c_parser_skip_until_found,
4922 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4923 c_parser_type_name): Export.
4924 (c_parser_tokens_buf): New function.
4925 (c_parser_error): Likewise.
4926 (c_parser_set_error): Likewise.
4927 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4928 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4929 via c_parser_parse_gimple_body.
8e745a17
JJ
4930 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4931 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4932 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4933 c_parser_error, c_parser_require, c_parser_skip_until_found,
4934 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4935 c_parser_type_name): Declare.
1ee62b92
PG
4936 (struct c_parser): Declare forward.
4937 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4938 (c_parser_error): Likewise.
4939 (c_parser_set_error): Likewise.
4940 * gimple-parser.c: New file.
4941 * gimple-parser.h: Likewise.
1ee62b92 4942
22b15758
UB
49432016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4944
4945 PR c/35503
4946 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4947 warn_for_restrict.
4948
84ff4775
LCW
49492016-09-11 Le-Chun Wu <lcwu@google.com>
4950 Mark Wielaard <mjw@redhat.com>
4951
4952 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4953 to the given -Wshadow= variant.
4954
4d0cdd0c
TP
49552016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4956
4957 * c-typeck.c: Include memmodel.h.
4958
1202f33e
JJ
49592016-10-13 Jakub Jelinek <jakub@redhat.com>
4960
4961 PR target/77957
4962 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4963 instead of lhd_return_null_tree_v.
4964
8a14afd0
BS
49652016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4966
4967 PR c++/69733
4968 * c-decl.c (smallest_type_quals_location): New static function.
4969 (grokdeclarator): Try to find the correct location for an ignored
4970 qualifier.
4971
81fea426
MP
49722016-09-26 Marek Polacek <polacek@redhat.com>
4973
4974 PR c/7652
4975 * c-decl.c (pop_scope): Add gcc_fallthrough.
4976
49772016-09-26 Marek Polacek <polacek@redhat.com>
4978
4979 PR c/7652
4980 * c-parser.c (struct c_token): Add flags field.
4981 (c_lex_one_token): Pass it to c_lex_with_flags.
4982 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4983 into IFN_FALLTHROUGH.
4984 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4985 attribute fallthrough after a case label or default label.
4986 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4987
9a2300e9
MP
49882016-09-24 Marek Polacek <polacek@redhat.com>
4989
4990 PR c/77490
4991 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4992 have boolean value. Warn about ++/-- on booleans.
4993
7de76362
JJ
49942016-09-23 Jakub Jelinek <jakub@redhat.com>
4995
4996 * c-parser.c (incomplete_record_decls): Remove unnecessary
4997 = vNULL initialization of file scope vec.
4998
5b73d2ab
MP
49992016-09-16 Marek Polacek <polacek@redhat.com>
5000
5001 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5002
e51fbec3
MP
50032016-09-14 Marek Polacek <polacek@redhat.com>
5004
5005 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5006 (fix_array_notation_expr): Likewise.
5007 * c-decl.c (finish_decl): Likewise.
5008 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5009 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5010 (function_to_pointer_conversion): Use false instead of 0.
5011 (convert_lvalue_to_rvalue): Likewise.
5012 (parser_build_unary_op): Likewise.
5013 (build_atomic_assign): Likewise.
5014 (build_unary_op): Change nonconvert parameter type to bool, use
5015 true/false instead of 1/0.
5016 (build_binary_op): Use true instead of 1.
5017
254830ba
DM
50182016-09-13 David Malcolm <dmalcolm@redhat.com>
5019
5020 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5021 of add_fixit_insert to add_fixit_insert_before.
5022
4c13ba17
MP
50232016-09-13 Marek Polacek <polacek@redhat.com>
5024
5025 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5026 it.
5027
54dcdb88
BE
50282016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5029
5030 PR c++/77496
5031 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5032 COMPOUND_EXPR to warn_for_omitted_condop.
5033
e5106e27
DM
50342016-09-07 David Malcolm <dmalcolm@redhat.com>
5035
5036 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5037 c_get_substring_location for this new langhook.
5038
9dc5773f
JJ
50392016-09-02 Jakub Jelinek <jakub@redhat.com>
5040
5041 PR c/65467
5042 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5043 flag_openmp.
5044 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5045 instead of mark_exp_read on low_bound/length expression.
5046 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5047 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5048 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5049 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5050 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5051 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5052 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5053 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5054 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5055 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5056 instead of mark_expr_read.
5057 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5058 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5059 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5060 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5061 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5062 array section bases outside of depend clause, for depend clause
5063 use convert_lvalue_to_rvalue on the base.
5064 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5065 linear, aligned, map, to and from clauses.
5066 (c_omp_clause_copy_ctor): New function.
5067
295844f6
MP
50682016-09-01 Marek Polacek <polacek@redhat.com>
5069
5070 PR c/7652
5071 * c-typeck.c (composite_type): Add FALLTHRU comment.
5072
089af25c
DM
50732016-08-31 David Malcolm <dmalcolm@redhat.com>
5074
5075 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5076 to the insertion fixits for "struct", "union", and "enum".
5077
f9087798
DM
50782016-08-30 David Malcolm <dmalcolm@redhat.com>
5079
5080 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5081 rather than add_fixit_misspelled_id.
5082 (undeclared_variable): Likewise.
5083 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5084 now-redundant "here" params from add_fixit_insert method calls.
5085 (c_parser_parameter_declaration): Likewise.
5086 * c-typeck.c (build_component_ref): Remove now-redundant range
5087 param from add_fixit_replace method calls.
5088
ebef225f
MP
50892016-08-25 Marek Polacek <polacek@redhat.com>
5090
5091 * c-typeck.c (parser_build_binary_op): Pass LHS to
5092 warn_logical_not_parentheses.
5093
fe377a48
MP
50942016-08-25 Marek Polacek <polacek@redhat.com>
5095
5096 PR c/77323
5097 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5098 or _FloatN or _FloatNx is not supported.
5099 (finish_declspecs): Set type to integer_type_node when _FloatN or
5100 _FloatNx is not supported.
5101
c65699ef
JM
51022016-08-19 Joseph Myers <joseph@codesourcery.com>
5103
5104 PR c/32187
5105 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5106 (struct c_declspecs): Add field floatn_nx_idx.
5107 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5108 and _FloatNx type specifiers.
5109 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5110 (c_parser_declspecs, c_parser_attribute_any_word)
5111 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5112 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5113 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5114 narrower than double.
5115
2f1364c2
JJ
51162016-08-12 Jakub Jelinek <jakub@redhat.com>
5117 Martin Liska <mliska@suse.cz>
5118
5119 PR c/67410
5120 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5121 % to determine val element to change. Assert that
5122 wchar_bytes * charwidth fits into val array.
5123
191816a3
MP
51242016-08-12 Marek Polacek <polacek@redhat.com>
5125
5126 PR c/7652
5127 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5128 (c_parser_postfix_expression): Likewise.
5129 * c-typeck.c (build_unary_op): Adjust fall through comment.
5130 (c_mark_addressable): Likewise.
5131
b95a64bb
JJ
51322016-08-11 Jakub Jelinek <jakub@redhat.com>
5133
5134 PR c/72816
5135 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5136 array member through typedef, for orig_qual_indirect == 0 clear
5137 orig_qual_type.
5138
895aa8e1
DM
51392016-08-08 David Malcolm <dmalcolm@redhat.com>
5140
5141 PR c/64955
5142 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5143 this up to selftest::run_c_tests.
5144 (selftest::run_c_tests): New function.
5145
0b212d8c
TS
51462016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5147
ae9281fc
TS
5148 * c-parser.c (struct oacc_routine_data): Add error_seen and
5149 fndecl_seen members.
5150 (c_finish_oacc_routine): Use these.
5151 (c_parser_declaration_or_fndef): Adjust.
5152 (c_parser_oacc_routine): Likewise. Support more C language
5153 constructs, and improve diagnostics. Move pragma context
5154 checking...
5155 (c_parser_pragma): ... here.
5156
0b212d8c
TS
5157 * c-parser.c (struct oacc_routine_data): New.
5158 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5159 Simplify code.
5160 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5161 declare target" attribute.
5162
76e2c821
JB
51632016-08-01 Jan Beulich <jbeulich@suse.com>
5164
5165 * c-fold.c (c_fully_fold_internal): Also emit shift count
5166 warnings for vector types.
5167 * c-typeck.c (build_binary_op): Likewise.
5168
f618a472
MP
51692016-07-29 Marek Polacek <polacek@redhat.com>
5170
5171 PR c/71742
5172 * c-decl.c (finish_struct): Rephrase an error message.
5173
efd0786f
MP
5174 PR c/71853
5175 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5176 to error node for invalid code.
5177
e00dceaf
MP
5178 PR c/71573
5179 * c-decl.c (implicitly_declare): Return decl early not only for
5180 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5181
673a107a
JJ
51822016-07-29 Jakub Jelinek <jakub@redhat.com>
5183
5184 PR c/71969
5185 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5186 on GNU extern inline functions.
5187
a5b5c8b6
MP
51882016-07-29 Marek Polacek <polacek@redhat.com>
5189
5190 PR c/71583
5191 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5192 check expr.value.
5193
e3fe09c1
UB
51942016-07-22 Uros Bizjak <ubizjak@gmail.com>
5195
5196 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5197
7c8f7eaa
DM
51982016-07-20 David Malcolm <dmalcolm@redhat.com>
5199
5200 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5201 spellcheck-tree.h
5202 (best_macro_match): Likewise, converting from a typedef to a
5203 subclass.
5204 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5205 (lookup_name_fuzzy): Update for change of best_macro_match to a
5206 subclass with a ctor that calls cpp_forall_identifiers.
5207
de6a69ee
DM
52082016-07-20 David Malcolm <dmalcolm@redhat.com>
5209
5210 * c-decl.c (implicit_decl_warning): Update for conversion of
5211 return type of lookup_name_fuzzy to const char *.
5212 (undeclared_variable): Likewise.
5213 (lookup_name_fuzzy): Convert return type from tree to
5214 const char *.
5215 * c-parser.c (c_parser_declaration_or_fndef): Update for
5216 conversion of return type of lookup_name_fuzzy to const char *.
5217 (c_parser_parameter_declaration): Likewise.
5218
b1c9c068
CP
52192016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5220
5221 * c-parser.c (c_parser_oacc_declare): Don't scan for
5222 GOMP_MAP_POINTER.
5223 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5224 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5225 zero-length subarrays.
5226
ddbbcb19
JJ
52272016-07-15 Jakub Jelinek <jakub@redhat.com>
5228
5229 PR c/71858
5230 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5231 instead of FUZZY_LOOKUP_NAME.
5232 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5233 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5234
dd36b877
JJ
52352016-07-14 Jakub Jelinek <jakub@redhat.com>
5236
5237 PR c/71858
5238 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5239
8c681247
TS
52402016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5241
5242 * c-parser.c (c_parser_generic_selection): Make type of variable
5243 auto_vec.
5244 (c_parser_omp_declare_simd): Likewise.
5245
bf4fa671
TS
52462016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5247
5248 * c-decl.c (struct c_struct_parse_info): Change member types
5249 from vec to auto_vec.
5250 (start_struct): Adjust.
5251 (finish_struct): Likewise.
5252
557e8c49
JJ
52532016-07-02 Jakub Jelinek <jakub@redhat.com>
5254
5255 PR c/71719
5256 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5257
54d19c3b
TS
52582016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5259
5260 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5261 Move pragma context checking into...
5262 (c_parser_omp_cancellation_point): ... here, and improve
5263 diagnostic messages.
5264 * c-typeck.c (c_finish_omp_cancel)
5265 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5266
152ef731
JJ
52672016-06-29 Jakub Jelinek <jakub@redhat.com>
5268
5269 PR c/71685
5270 * c-typeck.c (c_build_qualified_type): Don't clear
5271 C_TYPE_INCOMPLETE_VARS for the main variant.
5272
52732016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
5274
5275 PR c/71552
5276 * c-typeck.c (output_init_element): Diagnose incompatible types
5277 before non-constant initializers.
5278
e9ac1f86
JJ
52792016-06-28 Jakub Jelinek <jakub@redhat.com>
5280
5281 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5282
277d7ee0
AK
52832016-06-23 Andi Kleen <ak@linux.intel.com>
5284
5285 * Make-lang.in: Add support for autofdo.
5286
1a4f11c8
DM
52872016-06-22 David Malcolm <dmalcolm@redhat.com>
5288
5289 PR c/70339
5290 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5291 (implicit_decl_warning): When issuing warnings for implicit
5292 declarations, attempt to provide a suggestion via
5293 lookup_name_fuzzy.
5294 (undeclared_variable): Likewise when issuing errors.
5295 (lookup_name_in_scope): Likewise.
5296 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5297 (best_macro_match): New typedef.
5298 (find_closest_macro_cpp_cb): New function.
5299 (lookup_name_fuzzy): New function.
5300 * c-parser.c: Include gcc-rich-location.h.
5301 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5302 (c_keyword_starts_typename): ...this new function.
5303 (c_parser_declaration_or_fndef): When issuing errors about
5304 missing "struct" etc, add a fixit. For other kinds of errors,
5305 attempt to provide a suggestion via lookup_name_fuzzy.
5306 (c_parser_parms_declarator): When looking ahead to detect typos in
5307 type names, also reject CPP_KEYWORD.
5308 (c_parser_parameter_declaration): When issuing errors about
5309 unknown type names, attempt to provide a suggestion via
5310 lookup_name_fuzzy.
5311 * c-tree.h (c_keyword_starts_typename): New prototype.
5312
5a578671
JM
53132016-06-20 Joseph Myers <joseph@codesourcery.com>
5314
5315 PR c/71601
5316 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5317 c_common_type returns error_mark_node.
5318
3f8257db 53192016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
5320
5321 PR c/69507
5322 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5323 __alignof__ (expression).
5324
6a3f203c
DM
53252016-06-14 David Malcolm <dmalcolm@redhat.com>
5326
5327 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5328
264757fb
DM
53292016-06-14 David Malcolm <dmalcolm@redhat.com>
5330
5331 * c-typeck.c (build_component_ref): Simplify fixit code by
5332 using gcc_rich_location::add_fixit_misspelled_id.
5333 (set_init_label): Likewise.
5334
f7e4f2e3
DM
53352016-06-13 David Malcolm <dmalcolm@redhat.com>
5336
5337 * c-parser.c (c_parser_initelt): Provide location of name for new
5338 location_t param of set_init_label.
5339 * c-tree.h (set_init_label): Add location_t param.
5340 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5341 param and use it when issuing error messages about unrecognized
5342 field names. Attempt to provide a fixit hint if appropriate,
5343 otherwise update the error message to provide the type name.
5344
4b1ffdb1
TS
53452016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5346
5347 PR c/71381
5348 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5349 Loosen checking.
5350
44a845ca
MS
53512016-06-08 Martin Sebor <msebor@redhat.com>
5352 Jakub Jelinek <jakub@redhat.com>
5353
5354 PR c++/70507
5355 PR c/68120
5356 * c-typeck.c (convert_arguments): Don't promote last argument
5357 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5358
92a5f2ba
MP
53592016-06-08 Marek Polacek <polacek@redhat.com>
5360
5361 PR c/71418
5362 * c-decl.c (grokdeclarator): Check TYPE_P.
5363
08203f73
MP
5364 PR c/71426
5365 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5366 code.
5367
6ffd47b7
DM
53682016-06-07 David Malcolm <dmalcolm@redhat.com>
5369
5370 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5371 and structure element reference, capture the location of the
5372 element name token and pass it to build_component_ref.
5373 (c_parser_postfix_expression_after_primary): Likewise for
5374 structure element dereference.
5375 (c_parser_omp_variable_list): Likewise for
5376 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5377 * c-tree.h (build_component_ref): Add location_t param.
5378 * c-typeck.c (build_component_ref): Add location_t param
5379 COMPONENT_LOC. Use it, if available, when issuing hints about
5380 mispelled member names to provide a fixit replacement hint.
5381
1f40cff3
MP
53822016-06-06 Marek Polacek <polacek@redhat.com>
5383
5384 PR c/71362
5385 * c-parser.c (c_parser_direct_declarator): Set location.
5386
5545a907
MP
53872016-06-06 Marek Polacek <polacek@redhat.com>
5388
5389 * c-typeck.c (comptypes_internal): Handle comparisons of
5390 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5391 TYPE_REF_CAN_ALIAS_ALL.
5392
b605f663
CLT
53932016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5394
5395 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5396 arguments as addressable when async clause exists.
5397
00631022
JJ
53982016-05-30 Jakub Jelinek <jakub@redhat.com>
5399
5400 PR c++/71349
5401 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5402 when combined with target construct.
5403
7211a097
JJ
54042016-05-26 Jakub Jelinek <jakub@redhat.com>
5405
5406 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5407 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5408
95efe6b6
MP
54092016-05-25 Marek Polacek <polacek@redhat.com>
5410
5411 PR c/71265
5412 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5413
a23faf7a
MP
5414 PR c/71266
5415 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5416
e46c7770
CP
54172016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5418
5419 * c-parser.c (c_parser_oacc_declare): Add support for
5420 GOMP_MAP_FIRSTPRIVATE_POINTER.
5421 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5422 argument with enum c_omp_region_type ort.
5423 (handle_omp_array_sections): Likewise. Update call to
5424 handle_omp_array_sections_1.
5425 (c_finish_omp_clauses): Add specific errors and warning messages for
5426 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5427 call to handle_omp_array_sections.
5428
a04e69c0
TS
54292016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5430
5431 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5432
f17a223d
RB
54332016-05-24 Richard Biener <rguenther@suse.de>
5434
5435 PR middle-end/70434
5436 PR c/69504
5437 * c-typeck.c (build_array_ref): Do not complain about indexing
5438 non-lvalue vectors. Adjust for function name change.
5439
79063edd
MS
54402016-05-20 Martin Sebor <msebor@redhat.com>
5441
5442 PR c/71115
5443 * c-typeck.c (error_init): Use
5444 expansion_point_location_if_in_system_header.
5445 (warning_init): Same.
5446
8a40fef3
DM
54472016-05-19 David Malcolm <dmalcolm@redhat.com>
5448
5449 PR c/71171
5450 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5451 in error-handling.
5452 (c_parser_postfix_expression): Likewise.
5453 * c-tree.h (c_expr::set_error): New method.
5454 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5455 that result's range is initialized.
5456
e9892350
JG
54572016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5458
5459 * c-typeck.c (parser_build_unary_op): Fix formatting.
5460
8fad45f5
MW
54612016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5462
5463 * c-decl.c (grokdeclarator): Remove errmsg and use of
5464 targetm.invalid_return_type.
5465 (grokparms): Remove errmsg and use of
5466 targetm.invalid_parameter_type.
5467
aa4b467b
JM
54682016-05-13 Joseph Myers <joseph@codesourcery.com>
5469
5470 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5471 function return type.
5472
4f2e1536
MP
54732016-05-12 Marek Polacek <polacek@redhat.com>
5474
5475 PR c/70756
5476 * c-decl.c (build_compound_literal): Pass LOC down to
5477 c_incomplete_type_error.
5478 * c-tree.h (require_complete_type): Adjust declaration.
5479 (c_incomplete_type_error): Likewise.
5480 * c-typeck.c (require_complete_type): Add location parameter, pass it
5481 down to c_incomplete_type_error.
5482 (c_incomplete_type_error): Add location parameter, pass it down to
5483 error_at.
5484 (build_component_ref): Pass location down to c_incomplete_type_error.
5485 (default_conversion): Pass location down to require_complete_type.
5486 (build_array_ref): Likewise.
5487 (build_function_call_vec): Likewise.
5488 (convert_arguments): Likewise.
5489 (build_unary_op): Likewise.
5490 (build_c_cast): Likewise.
5491 (build_modify_expr): Likewise.
5492 (convert_for_assignment): Likewise.
5493 (c_finish_omp_clauses): Likewise.
5494
d6e83a8d
MM
54952016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5496
5497 PR c/43651
5498 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5499 is enabled.
5500 * c-errors.c (pedwarn_c90): Return true if warned.
5501 * c-tree.h (pedwarn_c90): Change return type to bool.
5502 (enum c_declspec_word): Add new enumerator cdw_atomic.
5503
5c3a10fb
MP
55042016-05-11 Marek Polacek <polacek@redhat.com>
5505
5506 PR c++/71024
5507 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5508 diagnose_mismatched_attributes and call it.
5509
cf68d92c
MP
55102016-05-10 Marek Polacek <polacek@redhat.com>
5511
5512 PR c/70255
5513 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5514 on a declaration following the definition.
5515
351f85c5
JJ
55162016-05-05 Jakub Jelinek <jakub@redhat.com>
5517
5518 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5519 parse it through to c_parser_c99_block_statement.
5520 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5521 caller.
5522
deef7113
MP
55232016-05-04 Marek Polacek <polacek@redhat.com>
5524
5525 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5526 OPT_Wdangling_else.
5527
de55efd5
MP
55282016-05-04 Marek Polacek <polacek@redhat.com>
5529
5530 PR c/48778
5531 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5532 for macro expansions.
5533
79ce98bc
MP
55342016-05-03 Marek Polacek <polacek@redhat.com>
5535
5536 PR c/70859
5537 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5538 check_builtin_function_arguments.
5539
fb2647aa
RB
55402016-05-03 Richard Biener <rguenther@suse.de>
5541
5542 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5543 the checksum from the previous stage.
5544
77886428
CP
55452016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5546
5547 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5548 c_finish_omp_clauses.
5549 (c_parser_omp_all_clauses): Likewise.
5550 (c_parser_oacc_cache): Likewise.
5551 (c_parser_oacc_loop): Likewise.
5552 (omp_split_clauses): Likewise.
5553 (c_parser_omp_declare_target): Likewise.
5554 (c_parser_cilk_all_clauses): Likewise.
5555 (c_parser_cilk_for): Likewise.
5556 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5557 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5558
7176a4a0
MP
55592016-05-02 Marek Polacek <polacek@redhat.com>
5560
5561 PR c/70851
5562 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5563 incomplete type.
5564
e7ff0319
CP
55652016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5566
5567 PR middle-end/70626
5568 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5569 OACC_LOOP_CLAUSE_MASK.
5570 (c_parser_oacc_kernels_parallel): Update call to
5571 c_oacc_split_loop_clauses.
5572
9f405ce1
AM
55732016-04-28 Andrew MacLeod <amacleod@redhat.com>
5574
5575 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5576 argument to build_modify_expr in two cases.
5577
c1e1f433
BS
55782016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5579
5580 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5581 warn_for_memset instead of warning directly here.
5582
2448a956
MP
55832016-04-26 Marek Polacek <polacek@redhat.com>
5584
5585 PR c/67784
5586 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5587 out of ...
5588 (c_parser_for_statement): ... here.
5589 (c_parser_if_statement): Use it.
5590 (c_parser_switch_statement): Use it.
5591 (c_parser_while_statement): Use it.
5592
b02a5e26
MP
5593 PR c/70791
5594 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5595
477d4906
IV
55962016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5597
5598 PR c++/69363
5599 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5600 instead of c_finish_cilk_clauses.
5601 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5602 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5603 floating-point variables in the linear clause for Cilk Plus.
5604
fe37c7af
MM
56052016-04-18 Michael Matz <matz@suse.de>
5606
5607 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5608 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5609
949505a9
MP
56102016-04-15 Marek Polacek <polacek@redhat.com>
5611
5612 PR c/70671
5613 * c-typeck.c (build_unary_op): Pass location down to error and
5614 warning call.
5615
dda1bf61
JJ
56162016-04-15 Jakub Jelinek <jakub@redhat.com>
5617
5618 PR c/70436
5619 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5620 where needed.
5621 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5622 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5623 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5624 Adjust c_parser_pragma callers.
5625 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5626 caller.
5627 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5628 c_parser_statement.
5629 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5630 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5631 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5632 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5633 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5634 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5635 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5636 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5637 down where needed.
5638 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5639 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5640 calls.
5641
99cd9857
MP
56422016-04-13 Marek Polacek <polacek@redhat.com>
5643
5644 PR c/70436
5645 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5646 adjust callers.
5647 (c_parser_statement): Likewise.
5648 (c_parser_c99_block_statement): Likewise.
5649 (c_parser_while_statement): Likewise.
5650 (c_parser_for_statement): Likewise.
5651 (c_parser_if_body): Don't set IF_P here.
5652 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5653 about dangling else here.
5654 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5655 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5656 warn about dangling else here.
5657
f13355da
MP
56582016-04-04 Marek Polacek <polacek@redhat.com>
5659
5660 PR c/70307
5661 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5662
5fde6a45
MP
56632016-03-31 Marek Polacek <polacek@redhat.com>
5664
5665 PR c/70297
5666 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5667
4bbf545b
DM
56682016-03-18 David Malcolm <dmalcolm@redhat.com>
5669
5670 PR c/70281
5671 * c-parser.c (c_parser_postfix_expression): Set the source range
5672 for uses of "__builtin_types_compatible_p".
5673
fcc2b74f
JJ
56742016-03-17 Jakub Jelinek <jakub@redhat.com>
5675
5676 PR c/70280
5677 * c-typeck.c (composite_type): Don't count void_list_node
5678 into len, if the list is terminated by void_list_node, start
5679 with void_list_node instead of NULL for newargs. Stop
5680 at void_list_node.
5681
ab4c578f
MP
56822016-03-16 Marek Polacek <polacek@redhat.com>
5683
5684 PR c/70093
5685 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5686 nested functions returning VM types.
5687
96b3c82d
CP
56882016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5689
5690 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5691 when calling c_finish_omp_clauses.
5692
29b9828f
BS
56932016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5694
5695 PR c/69824
5696 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5697 for later.
5698
7ff6ca38
MP
56992016-03-04 Marek Polacek <polacek@redhat.com>
5700
5701 PR c/69798
5702 * c-parser.c (c_parser_postfix_expression): Call
5703 c_parser_cast_expression rather than c_parser_postfix_expression.
5704
686e2237
JJ
57052016-03-01 Jakub Jelinek <jakub@redhat.com>
5706
5707 PR c/69796
5708 PR c/69974
5709 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5710 of incomplete decls to error_mark_node.
5711
0b05329b
MP
57122016-02-24 Marek Polacek <polacek@redhat.com>
5713
5714 PR c/69819
5715 * c-decl.c (finish_decl): Don't update the copy of the type of a
5716 different decl type.
5717
067fbd8b
JJ
57182016-02-23 Jakub Jelinek <jakub@redhat.com>
5719
5720 PR objc/69844
5721 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5722 in id_kind reclassification.
5723
bf14eba2
JJ
57242016-02-16 Jakub Jelinek <jakub@redhat.com>
5725
5726 PR c/69835
5727 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5728
ba539195
JN
57292016-02-16 James Norris <jnorris@codesourcery.com>
5730
5731 PR c/64748
5732 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5733
16595a1f
BS
57342016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5735
f48dfe98
BS
5736 * c-decl.c (build_null_declspecs): Zero the entire struct.
5737
16595a1f
BS
5738 PR c/69522
5739 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5740 callers changed. If nested_p is true, use it to call
5741 finish_implicit_inits.
5742 * c-tree.h (finish_implicit_inits): Declare.
5743 * c-typeck.c (finish_implicit_inits): New function. Move code
5744 from ...
5745 (push_init_level): ... here.
5746 (set_designator, process_init_element): Call finish_implicit_inits.
5747
66756373
JJ
57482016-02-11 Jakub Jelinek <jakub@redhat.com>
5749
5750 PR c/69768
5751 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5752 arguments for -Waddress warning.
5753
1066e9b5
JJ
57542016-02-04 Jakub Jelinek <jakub@redhat.com>
5755
5756 PR c/69669
5757 * c-decl.c (finish_enum): When honoring mode attribute,
5758 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5759
3a5d2ba4
JJ
57602016-01-29 Jakub Jelinek <jakub@redhat.com>
5761
5762 PR debug/69518
5763 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5764 all type variants, not just TYPE_MAIN_VARIANT.
5765
cbdd8ae0
JJ
57662016-01-27 Jakub Jelinek <jakub@redhat.com>
5767
5768 PR debug/66869
5769 * c-decl.c (c_write_global_declarations_1): Warn with
5770 warn_unused_function if static prototype without definition
5771 is not C_DECL_USED.
5772
fa74a4bc
MP
57732016-01-27 Marek Polacek <polacek@redhat.com>
5774
5775 PR c/68062
5776 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5777 to unsigned, if needed. Add -Wsign-compare warning.
5778
13f92e8d
JJ
57792016-01-26 Jakub Jelinek <jakub@redhat.com>
5780
5781 PR tree-optimization/69483
5782 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5783
cd8e73dc 57842016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5785
5786 PR c/24293
5787 * c-tree.h (incomplete_record_decls): Declare.
5788 * c-parser.c (incomplete_record_decls): Define.
5789 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5790 report error if any decl has zero size.
5791 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5792 or enum type to incomplete_record_decls.
5793
e6d6ec9e
TV
57942016-01-14 Tom de Vries <tom@codesourcery.com>
5795
5796 PR tree-optimization/68773
5797 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5798 set force_output.
5799
00083992
MP
58002016-01-14 Marek Polacek <polacek@redhat.com>
5801
5802 PR c/69262
5803 * c-decl.c (grokdeclarator): Provide more information for invalid
5804 array declarations.
5805
7443cf13
DM
58062016-01-06 David Malcolm <dmalcolm@redhat.com>
5807
5808 * c-parser.c (c_parser_unary_expression): For dereferences, build
5809 a combined location before calling build_indirect_ref, so that
5810 error reports cover the full range, manually updating the c_expr
5811 src_range.
5812
6b131d5b
MP
58132016-01-06 Marek Polacek <polacek@redhat.com>
5814
5815 PR sanitizer/69099
5816 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5817 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5818 NULL.
5819
818ab71a
JJ
58202016-01-04 Jakub Jelinek <jakub@redhat.com>
5821
5822 Update copyright years.
5823
2fe0a208
MP
58242016-01-04 Marek Polacek <polacek@redhat.com>
5825
5826 PR c/68908
5827 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5828 optimization to use __atomic_fetch_* built-in if possible.
5829
c7b48c8a
TS
58302015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5831
5832 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5833 into...
5834 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5835 all users.
5836
fda5652f
MP
58372015-12-22 Marek Polacek <polacek@redhat.com>
5838
5839 PR c/69002
5840 * c-typeck.c (build_component_ref): Warn when acessing elements of
5841 atomic structures or unions.
5842
745e411d
DM
58432015-12-21 David Malcolm <dmalcolm@redhat.com>
5844
5845 * c-typeck.c: Include "gcc-rich-location.h".
5846 (build_binary_op): In the two places that call binary_op_error,
5847 create a gcc_rich_location and populate it with the location of
5848 the binary op and its two operands.
5849
94c40e19
DM
58502015-12-16 David Malcolm <dmalcolm@redhat.com>
5851
5852 * c-parser.c (c_parser_statement_after_labels): When calling
5853 c_finish_return, Use the return expression's location if it has
5854 one, falling back to the location of the first token within it.
5855 * c-typeck.c (c_finish_return): When issuing warnings about
5856 the incorrect presence/absence of a return value, issue a note
5857 showing the declaration of the function.
5858
de67c4c3
DM
58592015-12-16 David Malcolm <dmalcolm@redhat.com>
5860
5861 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5862 to 4.
5863 (c_parser_peek_nth_token): New function.
5864 (c_parser_peek_conflict_marker): New function.
5865 (c_parser_error): Detect conflict markers and report them as such.
5866
a10704e1
DM
58672015-12-16 David Malcolm <dmalcolm@redhat.com>
5868
5869 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5870 to preserve range information for the primary expression
5871 in the call to c_parser_postfix_expression_after_primary.
5872
8062bca6
DM
58732015-12-16 David Malcolm <dmalcolm@redhat.com>
5874
5875 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5876 expression location, falling back on the first token location,
5877 rather than always using the latter.
5878
d06f8b75
MP
58792015-12-16 Marek Polacek <polacek@redhat.com>
5880
5881 PR c/64637
5882 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5883 available.
5884
2994fb91
MP
58852015-12-15 Marek Polacek <polacek@redhat.com>
5886
5887 PR c/68907
5888 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5889 artificial decl.
5890
a1b93f8d
DM
58912015-12-08 David Malcolm <dmalcolm@redhat.com>
5892
5893 * c-parser.c (c_parser_alignof_expression): Capture location of
5894 closing parenthesis (if any), or of end of unary expression, and
5895 use it to build a src_range for the expression.
5896
46c6e1e2
DM
58972015-12-08 David Malcolm <dmalcolm@redhat.com>
5898
5899 PR c/68757
5900 * c-parser.c (c_parser_get_builtin_args): Add
5901 "out_close_paren_loc" param, and write back to it.
5902 (c_parser_postfix_expression): Capture the closing
5903 parenthesis location for RID_CHOOSE_EXPR,
5904 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5905 RID_BUILTIN_SHUFFLE and use it to set the source range
5906 for such expressions; within RID_BUILTIN_COMPLEX set
5907 the underlying location.
5908
66189108
MP
59092015-12-07 Marek Polacek <polacek@redhat.com>
5910
5911 PR c/68668
5912 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5913 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5914
f187980b
EB
59152015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5916
5917 * c-tree.h (c_build_va_arg): Adjust prototype.
5918 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5919 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5920 parameter, adjust throughout and issue an error if EXPR is a component
5921 with reverse storage order.
5922
4250754e
JM
59232015-12-02 Jason Merrill <jason@redhat.com>
5924
5925 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5926 (c_fully_fold_internal, decl_constant_value_for_optimization):
5927 Move from c-common.c.
5928 * c-tree.h: Declare decl_constant_value_for_optimization.
5929 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5930
e9e32ee6
JM
59312015-12-02 Joseph Myers <joseph@codesourcery.com>
5932
5933 PR c/68162
5934 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5935 following link from declarator to next declarator. Track original
5936 qualified type and pass it to c_build_qualified_type.
5937 * c-typeck.c (c_build_qualified_type): Add arguments
5938 orig_qual_type and orig_qual_indirect.
5939
ff7a55bf
TS
59402015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5941
5942 * c-parser.c (c_parser_omp_clause_name)
5943 (c_parser_oacc_all_clauses): Alphabetical sorting.
5944
657e4e47
JJ
59452015-12-02 Jakub Jelinek <jakub@redhat.com>
5946
5947 PR c/68533
5948 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5949 for diagnostics.
5950
37d5ad46
JB
59512015-12-01 Julian Brown <julian@codesourcery.com>
5952 Cesar Philippidis <cesar@codesourcery.com>
5953 James Norris <James_Norris@mentor.com>
5954
5955 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5956 (c_parser_oacc_clause_use_device): New function.
5957 (c_parser_oacc_all_clauses): Add use_device support.
5958 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5959 (c_parser_oacc_host_data): New function.
5960 (c_parser_omp_construct): Add host_data support.
5961 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5962 * c-typeck.c (c_finish_oacc_host_data): New function.
5963 (c_finish_omp_clauses): Add use_device support.
5964
a4850ce9
JH
59652015-11-29 Jan Hubicka <hubicka@ucw.cz>
5966
5967 PR c/67106
5968 * c-decl.c: Set TYPE_PACKED in variants.
5969
b58d3df2
ML
59702015-11-27 Martin Liska <mliska@suse.cz>
5971
5972 PR c++/68312
5973 * c-array-notation.c (fix_builtin_array_notation_fn):
5974 Use release_vec_vec instead of vec::release.
5975 (build_array_notation_expr): Likewise.
5976 (fix_conditional_array_notations_1): Likewise.
5977 (fix_array_notation_expr): Likewise.
5978 (fix_array_notation_call_expr): Likewise.
5979
aec17bfe
JJ
59802015-11-27 Jakub Jelinek <jakub@redhat.com>
5981
5982 PR c/63326
5983 * c-parser.c (c_parser_compound_statement_nostart): If
5984 last_label is true, use pragma_stmt instead of pragma_compound
5985 as second c_parser_pragma argument.
5986 (c_parser_omp_ordered, c_parser_omp_target_update,
5987 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5988 false as second argument to c_parser_skip_to_pragma_eol after
5989 diagnosing standalone directives used in pragma_stmt context.
5990
688c4de0
IV
59912015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5992
5993 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5994 with "if (ENABLE_OFFLOADING)".
5995
cbd03aee
DM
59962015-11-23 David Malcolm <dmalcolm@redhat.com>
5997
5998 PR objc/68438
5999 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6000 for various Objective-C constructs: Class.name syntax,
6001 @selector(), @protocol(), @encode(), and [] message syntax.
6002
a87a86e1
DM
60032015-11-20 David Malcolm <dmalcolm@redhat.com>
6004
6005 PR 62314
6006 * c-typeck.c (should_suggest_deref_p): New function.
6007 (build_component_ref): Special-case POINTER_TYPE when
6008 generating a "not a structure of union" error message, and
6009 suggest a "->" rather than a ".", providing a fix-it hint.
6010
8ece8dfb
DM
60112015-11-19 David Malcolm <dmalcolm@redhat.com>
6012
6013 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6014 candidate into a new function, find_closest_identifier.
6015
433068cc
MP
60162015-11-19 Marek Polacek <polacek@redhat.com>
6017
6018 PR c/68412
6019 * c-typeck.c (parser_build_binary_op): Properly handle
6020 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6021
bef08b71
DM
60222015-11-17 David Malcolm <dmalcolm@redhat.com>
6023
6024 * c-parser.c (set_c_expr_source_range): Bulletproof both
6025 overloaded implementations against NULL expr->value.
6026 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6027 values.
6028 (c_parser_unary_expression): Likewise when handling addresses of
6029 labels.
6030 (c_parser_postfix_expression): Likewise for statement expressions,
6031 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6032 __builtin_va_arg, and for __builtin_offset_of.
6033 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6034 src_range using the range of the braced initializer.
6035 (c_parser_transaction_expression): Set src_range for "ret" to a
6036 sane pair of values.
6037
fff77217
KY
60382015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6039
6040 * c-parser.c (c_finish_omp_declare_simd): Look for
6041 "simd" attribute as well. Update error message.
6042
1d899da2
TS
60432015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6044
6045 * c-parser.c (c_parser_omp_declare_target): Adjust.
6046
e4606348
JJ
60472015-11-14 Jakub Jelinek <jakub@redhat.com>
6048
6049 * c-typeck.c (c_finish_omp_clauses): Don't mark
6050 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6051
3e636daf
MP
60522015-11-14 Marek Polacek <polacek@redhat.com>
6053
6054 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6055 * c-typeck.c: Likewise.
6056
ebedc9a3
DM
60572015-11-13 David Malcolm <dmalcolm@redhat.com>
6058
6059 * c-decl.c (warn_defaults_to): Pass line_table to
6060 rich_location ctor.
6061 * c-errors.c (pedwarn_c99): Likewise.
6062 (pedwarn_c90): Likewise.
6063 * c-parser.c (set_c_expr_source_range): New functions.
6064 (c_token::get_range): New method.
6065 (c_token::get_finish): New method.
6066 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6067 based on the range from the start of the LHS to the end of the
6068 RHS.
6069 (c_parser_conditional_expression): Likewise, based on the range
6070 from the start of the cond.value to the end of exp2.value.
6071 (c_parser_binary_expression): Call set_c_expr_source_range on
6072 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6073 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6074 based on the cast_loc through to the end of the expr.
6075 (c_parser_unary_expression): Likewise, based on the
6076 op_loc through to the end of op.
6077 (c_parser_sizeof_expression) Likewise, based on the start of the
6078 sizeof token through to either the closing paren or the end of
6079 expr.
6080 (c_parser_postfix_expression): Likewise, using the token range,
6081 or from the open paren through to the close paren for
6082 parenthesized expressions.
6083 (c_parser_postfix_expression_after_primary): Likewise, for
6084 various kinds of expression.
6085 * c-tree.h (struct c_expr): Add field "src_range".
6086 (c_expr::get_start): New method.
6087 (c_expr::get_finish): New method.
6088 (set_c_expr_source_range): New decls.
6089 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6090 on ret for prefix unary ops.
6091 (parser_build_binary_op): Likewise, running from the start of
6092 arg1.value through to the end of arg2.value.
6093
ec8b536f
MP
60942015-11-13 Marek Polacek <polacek@redhat.com>
6095
6096 PR c/68320
6097 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6098
277fe616
DM
60992015-11-13 David Malcolm <dmalcolm@redhat.com>
6100
6101 * c-typeck.c: Include spellcheck.h.
6102 (lookup_field_fuzzy_find_candidates): New function.
6103 (lookup_field_fuzzy): New function.
6104 (build_component_ref): If the field was not found, try using
6105 lookup_field_fuzzy and potentially offer a suggestion.
6106
6e232ba4
JN
61072015-11-12 James Norris <jnorris@codesourcery.com>
6108 Joseph Myers <joseph@codesourcery.com>
6109
6110 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6111 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6112 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6113 and PRAGMA_OMP_CLAUSE_LINK.
6114 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6115 and PRAGMA_OACC_CLAUSE_LINK.
6116 (OACC_DECLARE_CLAUSE_MASK): New definition.
6117 (c_parser_oacc_declare): New function.
6118
9be4f715
MP
61192015-11-12 Marek Polacek <polacek@redhat.com>
6120
6121 PR c/67784
6122 * c-parser.c (c_parser_for_statement): Reclassify the token in
6123 a correct scope.
6124
e78bede6
MP
61252015-11-11 Marek Polacek <polacek@redhat.com>
6126
6127 PR c/68107
6128 PR c++/68266
6129 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6130 checking the size of an array.
6131
69f293c9
AM
61322015-11-11 Andrew MacLeod <amacleod@redhat.com>
6133
6134 * c-array-notation.c: Remove unused header files.
6135 * c-aux-info.c: Likewise.
6136 * c-convert.c: Likewise.
6137 * c-decl.c: Likewise.
6138 * c-errors.c: Likewise.
6139 * c-lang.c: Likewise.
6140 * c-objc-common.c: Likewise.
6141 * c-parser.c: Likewise.
6142 * c-typeck.c: Likewise.
6143 * gccspec.c: Likewise.
6144
3a40d81d
NS
61452015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6146 Cesar Philippidis <cesar@codesourcery.com>
6147 James Norris <jnorris@codesourcery.com>
6148 Julian Brown <julian@codesourcery.com>
6149 Nathan Sidwell <nathan@codesourcery.com>
6150
3a40d81d
NS
6151 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6152 routine arg.
6153 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6154 (c_parser_pragma): Parse 'acc routine'.
6155 (OACC_ROUTINE_CLAUSE_MARK): Define.
6156 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6157
fc402eec
AA
61582015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6159
6160 PR debug/67192
6161 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6162 location of the backward-goto to the start of the loop body.
6163
f6b0b3db
AA
61642015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6165
6166 PR debug/67192
6167 * c-parser.c (c_parser_while_statement): Finish the loop before
6168 parsing ahead for misleading indentation.
6169 (c_parser_for_statement): Likewise.
6170
ee45a32d
EB
61712015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6172
6173 * c-decl.c (finish_struct): If the structure has reverse storage
6174 order, rewrite the type of array fields with scalar component. Call
6175 maybe_apply_pragma_scalar_storage_order on entry.
6176 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6177 errors on bit-fields and reverse SSO here and not...
6178 (c_mark_addressable): ...here.
6179 (output_init_element): Adjust call to initializer_constant_valid_p.
6180 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6181
8a645150
DM
61822015-11-06 David Malcolm <dmalcolm@redhat.com>
6183
6184 * c-decl.c (warn_defaults_to): Update for change in signature
6185 of diagnostic_set_info.
6186 * c-errors.c (pedwarn_c99): Likewise.
6187 (pedwarn_c90): Likewise.
6188 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6189 for textinfo::set_location.
6190
7a5e4956
CP
61912015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6192 Thomas Schwinge <thomas@codesourcery.com>
6193 James Norris <jnorris@codesourcery.com>
6194
6195 * c-parser.c (c_parser_omp_clause_name): Add support for
6196 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6197 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6198 default(none) in OpenACC.
6199 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6200 arguments.
6201 (c_parser_oacc_clause_tile): New function.
6202 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6203 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6204 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6205 TILE}.
6206 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6207 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6208 FIRSTPRIVATE}.
6209 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6210 (c_parser_oacc_update): Update the error message for missing clauses.
6211 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6212 and OMP_CLAUSE_INDEPENDENT.
6213
bfcfbfa0
MP
62142015-11-05 Marek Polacek <polacek@redhat.com>
6215
6216 PR c/68090
6217 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6218 deal with pre-evaluation on invalid types.
6219
e01d41e5
JJ
62202015-11-05 Jakub Jelinek <jakub@redhat.com>
6221 Ilya Verbin <ilya.verbin@intel.com>
6222
6223 * c-parser.c: Include context.h and gimple-expr.h.
6224 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6225 monotonic together with nonmonotonic.
6226 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6227 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6228 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6229 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6230 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6231 expressions on combined target teams before the target.
6232 (c_parser_omp_declare_target): If decl has "omp declare target" or
6233 "omp declare target link" attribute, and cgraph or varpool node already
6234 exists, then set corresponding flags. Call c_finish_omp_clauses
6235 in the parenthesized extended-list syntax case.
6236 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6237 declare target.
6238 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6239 on OMP_CLAUSE_REDUCTION array sections.
6240 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6241 into the constant offset, or for variable low-bound using
6242 POINTER_PLUS_EXPR. For structure element based array sections use
6243 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6244 (c_finish_omp_clauses): Drop generic_field_head, structure
6245 elements are now always mapped even as array section bases,
6246 diagnose same var in data sharing and mapping clauses. Diagnose if
6247 linear step on declare simd is neither a constant nor a uniform
6248 parameter. Look through POINTER_PLUS_EXPR for array section
6249 reductions. Diagnose the same var or function appearing multiple
6250 times on the same directive. Fix up wording for the to clause if t
6251 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6252 modifier on kinds other than dynamic or guided or nonmonotonic
6253 modifier together with ordered clause.
6254
4bf9e5a8
TS
62552015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6256 Chung-Lin Tang <cltang@codesourcery.com>
6257
6258 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6259
2adfab87
AM
62602015-10-29 Andrew MacLeod <amacleod@redhat.com>
6261
6262 * c-array-notation.c: Reorder #include's and remove duplicates.
6263 * c-aux-info.c: Likewise.
6264 * c-convert.c: Likewise.
6265 * c-decl.c: Likewise.
6266 * c-errors.c: Likewise.
6267 * c-lang.c: Likewise.
6268 * c-objc-common.c: Likewise.
6269 * c-parser.c: Likewise.
6270 * c-typeck.c: Likewise.
6271
e922069e
JW
62722015-10-26 Jim Wilson <jim.wilson@linaro.org>
6273
6274 PR debug/66068
6275 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6276 after calling build_qualified_type.
6277
765dd391
CP
62782015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6279 Thomas Schwinge <thomas@codesourcery.com>
6280 James Norris <jnorris@codesourcery.com>
6281 Joseph Myers <joseph@codesourcery.com>
6282 Julian Brown <julian@codesourcery.com>
6283 Bernd Schmidt <bschmidt@redhat.com>
6284
6285 * c-parser.c (c_parser_oacc_shape_clause): New.
6286 (c_parser_oacc_simple_clause): New.
6287 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6288 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6289
88bae6f4
TS
62902015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6291 James Norris <jnorris@codesourcery.com>
6292 Cesar Philippidis <cesar@codesourcery.com>
6293
6294 PR c/64765
6295 PR c/64880
6296 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6297 parameters, and handle these. Adjust all users.
6298 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6299 into...
6300 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6301 all users.
6302 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6303 declare functions.
6304 (c_finish_omp_construct): Declare function.
6305 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6306 Merge functions into...
6307 (c_finish_omp_construct): ... this new function.
6308
a8fc2579
RB
63092015-10-22 Richard Biener <rguenther@suse.de>
6310
6311 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6312 before folding a MINUS_EXPR.
6313
e9122ef6
MP
63142015-10-21 Marek Polacek <polacek@redhat.com>
6315
6316 PR c/68024
6317 * c-decl.c (start_function): Warn about vararg functions without
6318 a prototype.
6319
9f47c7e5
IE
63202015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6321
6322 * c-typeck.c (build_conditional_expr): Use boolean vector
6323 type for vector comparison.
6324 (build_vec_cmp): New.
6325 (build_binary_op): Use build_vec_cmp for comparison.
6326
fa60eeb9
MP
63272015-10-20 Marek Polacek <polacek@redhat.com>
6328
6329 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6330
2c7020eb
MP
63312015-10-20 Marek Polacek <polacek@redhat.com>
6332
6333 PR c/67964
6334 * c-parser.c (c_parser_attributes): Break out of the loop if the
6335 token after an attribute isn't a comma.
6336
d9a6bd32
JJ
63372015-10-13 Jakub Jelinek <jakub@redhat.com>
6338 Aldy Hernandez <aldyh@redhat.com>
6339
6340 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6341 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6342 (c_parser_omp_variable_list): Handle structure elements for
6343 map, to and from clauses. Handle array sections in reduction
6344 clause. Formatting fixes.
6345 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6346 if clause modifiers.
6347 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6348 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6349 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6350 c_parser_omp_clause_is_device_ptr): New functions.
6351 (c_parser_omp_clause_ordered): Parse optional parameter.
6352 (c_parser_omp_clause_reduction): Handle array reductions.
6353 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6354 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6355 functions.
6356 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6357 (c_parser_omp_clause_depend_sink): New function.
6358 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6359 (c_parser_omp_clause_map): Parse release/delete map kinds and
6360 optional always modifier.
6361 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6362 and c_finish_omp_clauses callers.
6363 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6364 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6365 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6366 (OMP_CRITICAL_CLAUSE_MASK): Define.
6367 (c_parser_omp_critical): Parse critical clauses.
6368 (c_parser_omp_for_loop): Handle doacross loops, adjust
6369 c_finish_omp_for and c_finish_omp_clauses callers.
6370 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6371 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6372 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6373 (c_parser_omp_for): Disallow ordered clause when combined with
6374 distribute. Disallow linear clause when combined with distribute
6375 and not combined with simd.
6376 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6377 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6378 parse clauses and if depend clause is found, don't parse a body.
6379 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6380 Allow target parallel without for after it.
6381 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6382 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6383 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6384 invalid kinds.
6385 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6386 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6387 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6388 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6389 functions.
6390 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6391 defaultmap and is_device_ptr clauses.
6392 (c_parser_omp_target): Parse target parallel and target simd. Set
6393 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6394 and target exit data. Diagnose invalid map kinds.
6395 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6396 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6397 construct.
6398 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6399 &omp_priv.
6400 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6401 (c_parser_omp_taskloop): New function.
6402 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6403 handle PRAGMA_OMP_TASKLOOP.
6404 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6405 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6406 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6407 Add IS_OMP argument, handle structure element bases, diagnose
6408 bitfields, pass IS_OMP recursively, diagnose known zero length
6409 array sections in depend clauses, handle array sections in reduction
6410 clause, diagnose negative length even for pointers.
6411 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6412 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6413 array sections in reduction clause, set
6414 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6415 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6416 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6417 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6418
21ba0cea
MP
64192015-10-06 Marek Polacek <polacek@redhat.com>
6420
6421 * c-parser.c (c_parser_statement_after_labels): Use
6422 protected_set_expr_location.
6423 (c_parser_omp_clause_num_gangs): Likewise.
6424 (c_parser_omp_clause_num_threads): Likewise.
6425 (c_parser_omp_clause_num_workers): Likewise.
6426 (c_parser_omp_clause_vector_length): Likewise.
6427 (c_parser_omp_clause_num_teams): Likewise.
6428 (c_parser_omp_clause_thread_limit): Likewise.
6429 * c-typeck.c (build_c_cast): Likewise.
6430 (c_cast_expr): Likewise.
6431
624d31fe
RS
64322015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6433
6434 * c-typeck.c (c_tree_equal): Use real_equal instead of
6435 REAL_VALUES_EQUAL.
6436
b8fd7909
JM
64372015-10-04 Jason Merrill <jason@redhat.com>
6438
6439 * c-parser.c (c_lex_one_token): Handle @synchronized.
6440 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6441 can change whether the function is transaction_safe.
6442
1c7485af
MP
64432015-10-02 Marek Polacek <polacek@redhat.com>
6444
6445 PR c/67730
6446 * c-typeck.c (convert_for_assignment): Use the expansion point
6447 location throughout.
6448
3e3b8d63
MP
64492015-10-02 Marek Polacek <polacek@redhat.com>
6450
6451 PR c/64249
6452 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6453 and pass it down to c_parser_if_statement.
6454 (c_parser_else_body): Add CHAIN parameter and pass it down to
6455 c_parser_statement_after_labels.
6456 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6457 duplicated if-else-if conditions.
6458
aabef2de
MP
64592015-10-01 Marek Polacek <polacek@redhat.com>
6460
6461 * c-typeck.c (convert_for_assignment): Improve commentary.
6462
de8ddd5f
MP
64632015-09-30 Marek Polacek <polacek@redhat.com>
6464
6465 PR c/67730
6466 * c-typeck.c (c_finish_return): Use the expansion point location for
6467 certain "return with value" warnings.
6468
c4914de6
MLI
64692015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6470
6471 * c-parser.c (pragma_lex): Add loc argument.
6472
0e36f5c7
MP
64732015-09-15 Marek Polacek <polacek@redhat.com>
6474
6475 PR c/67580
6476 * c-decl.c (tag_exists_p): New function.
6477 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6478 struct/union/enum keywords are missing.
6479 * c-tree.h (tag_exists_p): Declare.
6480
2f3bb934
MP
64812015-09-15 Marek Polacek <polacek@redhat.com>
6482
6483 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6484 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6485 Return NULL_TREE instead of 0.
6486 (lookup_name): Return NULL_TREE instead of 0.
6487 (lookup_name_in_scope): Likewise.
6488 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6489 (parser_xref_tag): Use false instead of 0.
6490 (start_struct): Use true instead of 1.
6491 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6492
aa256c4a
MP
64932015-09-14 Marek Polacek <polacek@redhat.com>
6494
6495 * c-typeck.c (set_nonincremental_init_from_string): Use
6496 HOST_WIDE_INT_M1U when shifting a negative value.
6497
dbb68221
MW
64982015-09-09 Mark Wielaard <mjw@redhat.com>
6499
6500 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6501 parm against NULL.
6502
a8a098ac
JJ
65032015-09-10 Jakub Jelinek <jakub@redhat.com>
6504
6505 PR c/67502
6506 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6507 into OMP_FOR_PRE_BODY rather than before the loop.
6508
f4b189d5
JJ
65092015-09-09 Jakub Jelinek <jakub@redhat.com>
6510
0bb99c11
JJ
6511 PR c/67501
6512 * c-parser.c (c_parser_oacc_all_clauses,
6513 c_parser_omp_all_clauses): Remove invalid clause from
6514 list of clauses even if parser->error is set.
6515
fce5e5e3
JJ
6516 PR c/67500
6517 * c-parser.c (c_parser_omp_clause_aligned,
6518 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6519 test for errors.
6520 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6521 error_mark_node.
6522
f4b189d5
JJ
6523 PR c/67495
6524 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6525 instead of c_parser_unary_expression. If the result is !lvalue_p,
6526 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6527
b2aaf235
MP
65282015-09-04 Marek Polacek <polacek@redhat.com>
6529
6530 PR sanitizer/67279
6531 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6532
1807ffc1
MS
65332015-09-03 Martin Sebor <msebor@redhat.com>
6534
6535 PR c/66516
8b652e65
JJ
6536 * c-typeck.c (convert_arguments, parser_build_unary_op,
6537 build_conditional_expr, c_cast_expr, convert_for_assignment,
6538 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6539 reject_gcc_builtin.
6540 (c_decl_implicit): Define.
6541
d04ff417
MP
65422015-09-02 Marek Polacek <polacek@redhat.com>
6543
6544 PR c/67432
6545 * c-parser.c (c_parser_enum_specifier): Give a better error for
6546 an empty enum.
6547
a79683d5
TS
65482015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6549
6550 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6551
191a6b94
MP
65522015-08-12 Marek Polacek <polacek@redhat.com>
6553
6554 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6555 LOC to it.
6556
420a9d9b
MP
65572015-08-03 Marek Polacek <polacek@redhat.com>
6558
6559 PR c/67088
6560 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6561 Use it.
6562 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6563
992118a1
PP
65642015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6565
6566 * c-parser.c (c_parser_if_body): Take token_indent_info
6567 argument. Call warn_for_misleading_indentation even when the
6568 body is a semicolon. Extract token_indent_infos corresponding
6569 to the guard, body and next tokens. Adjust call to
6570 warn_for_misleading_indentation accordingly.
6571 (c_parser_else_body): Likewise.
6572 (c_parser_if_statement): Likewise.
6573 (c_parser_while_statement): Likewise.
6574 (c_parser_for_statement): Likewise.
6575
46308474
LFSM
65762015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6577 Manuel López-Ibáñez <manu@gcc.gnu.org>
6578
6579 * c-decl.c (get_parm_info): Remove static var. Update warning
6580 message.
6581
05b28fd6
MP
65822015-07-27 Marek Polacek <polacek@redhat.com>
6583
6584 PR c++/66555
6585 PR c/54979
6586 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6587
451b5e48
MP
65882015-07-20 Marek Polacek <polacek@redhat.com>
6589
6590 PR c++/55095
6591 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6592 (build_binary_op): Warn about left shift overflows.
6593
1916bcb5
AM
65942015-07-09 Andrew MacLeod <amacleod@redhat.com>
6595
6596 * c-array-notation.c: Adjust includes for flags.h changes.
6597 * c-objc-common.c: Likewise.
6598
c7131fb2
AM
65992015-07-07 Andrew MacLeod <amacleod@redhat.com>
6600
6601 * c-array-notation.c: Adjust includes.
6602 * c-aux-info.c: Likewise.
6603 * c-convert.c: Likewise.
6604 * c-decl.c: Likewise.
6605 * c-errors.c: Likewise.
6606 * c-lang.c: Likewise.
6607 * c-objc-common.c: Likewise.
6608 * c-parser.c: Likewise.
6609 * c-typeck.c: Likewise.
6610
da2e71c9
MLI
66112015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6612
6613 PR fortran/66605
6614 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6615
b155cfd9
MP
66162015-06-29 Marek Polacek <polacek@redhat.com>
6617
6618 PR c/66322
6619 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6620 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6621 about -Wswitch-bool here.
6622 (do_case): Update c_add_case_label call.
6623 (c_finish_case): Update c_do_switch_warnings call.
6624
31521951
MP
66252015-06-27 Marek Polacek <polacek@redhat.com>
6626
6627 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6628
22d03525
MP
66292015-06-26 Marek Polacek <polacek@redhat.com>
6630
6631 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6632 INDIRECT_REF_P.
6633 * c-typeck.c (array_to_pointer_conversion): Likewise.
6634 (build_unary_op): Likewise.
6635 (c_finish_return): Likewise.
6636
f0889939
AM
66372015-06-25 Andrew MacLeod <amacleod@redhat.com>
6638
6639 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6640 * c-parser.c: Likewise.
6641
8d67ee55
RS
66422015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6643
6644 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6645 instead of pointer_hash.
6646 (detect_field_duplicates): Likewise.
6647
0ae9bd27
MP
66482015-06-25 Marek Polacek <polacek@redhat.com>
6649
6650 * c-array-notation.c: Use VAR_P throughout.
6651 * c-decl.c: Likewise.
6652 * c-objc-common.c: Likewise.
6653 * c-parser.c: Likewise.
6654 * c-typeck.c: Likewise.
6655
62f9079a
MP
66562015-06-25 Marek Polacek <polacek@redhat.com>
6657
6658 * c-decl.c: Use is_global_var throughout.
6659 * c-parser.c: Likewise.
6660 * c-typeck.c: Likewise.
6661
abb226c9
AM
66622015-06-17 Andrew MacLeod <amacleod@redhat.com>
6663
6664 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6665 * c-aux-info.c: Likewise.
6666 * c-convert.c: Likewise.
6667 * c-decl.c: Likewise.
6668 * c-errors.c: Likewise.
6669 * c-lang.c: Likewise.
6670 * c-objc-common.c: Likewise.
6671 * c-parser.c: Likewise.
6672 * c-typeck.c: Likewise.
6673
8cbababc
JH
66742015-06-11 Jan Hubicka <hubicka@ucw.cz>
6675
6676 PR middle-end/66325
6677 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6678 variants.
6679
a0349665
PMR
66802015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6681
6682 * c-decl.c (pop_scope): Register the main translation unit
6683 through the new debug hook.
6684
13fdf2e2
AM
66852015-06-08 Andrew MacLeod <amacleod@redhat.com>
6686
6687 * c-array-notation.c : Adjust include files.
6688 * c-aux-info.c : Likewise.
6689 * c-convert.c : Likewise.
6690 * c-decl.c : Likewise.
6691 * c-errors.c : Likewise.
6692 * c-lang.c : Likewise.
6693 * c-lang.h : Likewise.
6694 * c-objc-common.c : Likewise.
6695 * c-parser.c : Likewise.
6696 * c-typeck.c : Likewise.
6697
d7438551
AH
66982015-06-05 Aldy Hernandez <aldyh@redhat.com>
6699
6700 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6701 immediately clobber it.
6702 (c_write_global_declarations_1): Remove call to
6703 check_global_declaration_1.
6704 (c_write_global_declarations_2): Remove.
6705 (c_write_final_cleanups): Rename from c_write_global_declarations.
6706 Remove call to finalize_compilation_unit.
6707 Remove calls to debugging hooks.
6708 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6709 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6710 * c-tree.h: Remove c_write_global_declarations.
6711
ecb9f223
AM
67122015-06-04 Andrew MacLeod <amacleod@redhat.com>
6713
6714 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6715 * c-aux-info.c: Likewise.
6716 * c-convert.c: Likewise.
6717 * c-decl.c: Likewise.
6718 * c-errors.c: Likewise.
6719 * c-lang.c: Likewise.
6720 * c-objc-common.c: Likewise.
6721 * c-parser.c: Likewise.
6722 * c-typeck.c: Likewise.
6723
9482b620
MP
67242015-06-04 Marek Polacek <polacek@redhat.com>
6725
6726 PR c/66341
6727 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6728 it is a lvalue.
6729
bc51ace3
PK
67302015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6731
6732 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6733 Warn for empty struct.
6734 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6735
ea5b45b6
AT
67362015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6737
6738 * c-decl.c (start_function): Call plugin before parsing.
6739 (finish_function): Call plugin after parsing.
6740
c2d47482
PK
67412015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6742
6743 PR c/49551
6744 * c-decl.c (merge_decls): Merge DECL_COMMON.
6745
a95492ab
JW
67462015-05-22 Jim Wilson <jim.wilson@linaro.org>
6747
6748 * Make-lang.in (check_gcc_pallelize): Define.
6749
fd5c817a
MP
67502015-05-22 Marek Polacek <polacek@redhat.com>
6751
6752 PR c/47043
6753 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6754 attributes.
6755
c7b70a3c
MP
67562015-05-21 Marek Polacek <polacek@redhat.com>
6757
6758 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6759 DECL_BUILT_IN.
6760
21b634ae
MP
67612015-05-20 Marek Polacek <polacek@redhat.com>
6762
6763 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6764 * c-typeck.c: Likewise.
6765
296a8c2f
MP
67662015-05-19 Marek Polacek <polacek@redhat.com>
6767
6768 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6769
41b37d5e
JJ
67702015-05-19 Jakub Jelinek <jakub@redhat.com>
6771
6772 PR middle-end/66199
6773 * c-parser.c (c_parser_omp_for_loop): Don't add
6774 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6775 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6776 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6777 constructs.
6778
fab27f52
MM
67792015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6780
6781 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6782 swaps.
fab27f52 6783
40de31cf
MLI
67842015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6785
6786 PR fortran/44054
6787 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6788 accessor function.
6789
3aa3c9fc
MP
67902015-05-14 Marek Polacek <polacek@redhat.com>
6791
6792 PR c/66066
6793 PR c/66127
6794 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6795 rather than with 0.
6796
c3388e62
DM
67972015-05-12 David Malcolm <dmalcolm@redhat.com>
6798
6799 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6800 to add a call to warn_for_misleading_indentation.
6801 (c_parser_else_body): Likewise, adding param "else_loc".
6802 (c_parser_if_statement): Check for misleading indentation.
6803 (c_parser_while_statement): Likewise.
6804 (c_parser_for_statement): Likewise.
6805
755e528f
MP
68062015-05-08 Marek Polacek <polacek@redhat.com>
6807
6808 PR c/64918
6809 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6810 (output_init_element): Likewise.
6811
0173bd2a
MP
68122015-05-07 Marek Polacek <polacek@redhat.com>
6813
6814 PR c/65179
6815 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6816 value.
6817
9babc352
MP
68182015-04-30 Marek Polacek <polacek@redhat.com>
6819
6820 * c-typeck.c (set_init_label): Call error_at instead of error and
6821 pass LOC to it.
6822
ac9f18db
MP
6823 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6824 the type of a decl.
6825
ec3fba51
MP
6826 * c-typeck.c (c_build_va_arg): Clarify the error message.
6827
b811915d
TS
68282015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6829
6830 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6831 OMP_STANDALONE_CLAUSES.
6832
f3075008
MP
68332015-04-28 Marek Polacek <polacek@redhat.com>
6834
6835 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6836
4e81b788
MP
68372015-04-28 Marek Polacek <polacek@redhat.com>
6838
6839 PR c/65901
6840 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6841
6c1db78e
MP
68422015-04-25 Marek Polacek <polacek@redhat.com>
6843
6844 PR c/52085
6845 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6846 attribute.
6847
5c4abbb8
MP
68482015-04-23 Marek Polacek <polacek@redhat.com>
6849
6850 PR c/65345
6851 * c-decl.c (set_labels_context_r): New function.
6852 (store_parm_decls): Call it via walk_tree_without_duplicates.
6853 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6854 instead of create_tmp_var. Build TARGET_EXPR instead of
6855 COMPOUND_EXPR.
6856 (build_atomic_assign): Use create_tmp_var_raw instead of
6857 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6858
06aca1d5
IV
68592015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6860
6861 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6862 (c_parser_omp_target_update): Add missed %> to error_at ().
6863
8fba1830
BRF
68642015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6865
6866 PR target/55143
6867 * c-decl.c (c_default_pointer_mode): Remove definition.
6868 * c-tree.h (c_default_pointer_mode): Remove declaration.
6869
62021f64
TB
68702015-03-27 Tobias Burnus <burnus@net-b.de>
6871
6872 PR c/65586
6873 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6874 error out.
6875 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6876 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6877 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6878
9b65e171
JJ
68792015-03-19 Jakub Jelinek <jakub@redhat.com>
6880
6881 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6882 attribute for DECL_EXTERNAL VAR_DECLs.
6883
17958621
JJ
68842015-03-11 Jakub Jelinek <jakub@redhat.com>
6885
6886 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6887 argument.
6888
7ccb1a11
JJ
68892015-03-10 Jakub Jelinek <jakub@redhat.com>
6890
6891 PR c/65120
6892 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6893 before preparing arguments to warn_logical_not_parentheses.
6894
01177669
JJ
68952015-03-09 Jakub Jelinek <jakub@redhat.com>
6896
6897 PR c/65120
6898 * c-typeck.c (parser_build_binary_op): Don't warn for
6899 !!x == y or !b == y where b is _Bool.
6900
802ac282
MP
69012015-03-09 Marek Polacek <polacek@redhat.com>
6902
6903 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6904 * c-decl.c (grokdeclarator): Likewise.
6905 * c-typeck.c (build_binary_op): Likewise.
6906
e5165b60
MP
69072015-02-27 Marek Polacek <polacek@redhat.com>
6908
6909 PR c/65228
6910 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6911
065d214c
MP
69122015-02-14 Marek Polacek <polacek@redhat.com>
6913
6914 PR c/64768
6915 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6916 declared through a typedef name.
6917
e5d9235b
MP
69182015-02-13 Marek Polacek <polacek@redhat.com>
6919
6920 PR c/65050
6921 * c-decl.c (grokdeclarator): Print also the type when giving
6922 the error message about array's incomplete element type.
6923
fa01ffcc
JJ
69242015-02-11 Jakub Jelinek <jakub@redhat.com>
6925
6926 PR c/64824
6927 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6928 check in the POP macro.
6929
c3e38a03
MP
69302015-02-09 Marek Polacek <polacek@redhat.com>
6931
6932 PR c/64856
6933 * c-typeck.c (process_init_element): Don't always wrap
6934 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6935 initializing a range of elements.
6936
4886ec8e
JJ
69372015-02-04 Jakub Jelinek <jakub@redhat.com>
6938
6939 PR c/64824
6940 PR c/64868
6941 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6942
c3e38a03 69432015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6944
6945 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6946 processing enum declaration.
6947
7b33f0c8
MP
69482015-01-29 Marek Polacek <polacek@redhat.com>
6949
6950 PR c/64709
6951 * c-typeck.c (pop_init_level): If constructor_elements has
6952 exactly one element with integer_zerop value, set constructor_zeroinit
6953 to 1. Remove braces around warning_init call.
6954
dea63e49
JJ
69552015-01-27 Jakub Jelinek <jakub@redhat.com>
6956
6957 PR c/64766
6958 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6959 of FUNCTION_DECLs with error_mark_node.
6960
d38f7dce
JJ
69612015-01-26 Jakub Jelinek <jakub@redhat.com>
6962
6963 PR c/64778
6964 * c-typeck.c (convert_arguments): Return -1 if there are
6965 error_args, even if we've diagnosed too many arguments.
6966
cbf5d0e7
RB
69672015-01-21 Richard Biener <rguenther@suse.de>
6968
6969 PR middle-end/64313
6970 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6971 for builtins the user declared correctly.
6972
41dbbb37
TS
69732015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6974 Bernd Schmidt <bernds@codesourcery.com>
6975 Cesar Philippidis <cesar@codesourcery.com>
6976 James Norris <jnorris@codesourcery.com>
6977 Jakub Jelinek <jakub@redhat.com>
6978 Ilmir Usmanov <i.usmanov@samsung.com>
6979
6980 * c-parser.c: Include "gomp-constants.h".
6981 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6982 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6983 Use OMP_CLAUSE_SET_MAP_KIND.
6984 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6985 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6986 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6987 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6988 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6989 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6990 "copyout", "create", "delete", "deviceptr", "gang", "host",
6991 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6992 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6993 "present_or_create", "pcreate", "seq", "self", "vector",
6994 "vector_length", "wait", "worker".
6995 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6996 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6997 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6998 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6999 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7000 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7001 (c_parser_oacc_data_clause_deviceptr)
7002 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7003 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7004 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7005 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7006 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7007 (c_parser_oacc_parallel, c_parser_oacc_update)
7008 (c_parser_oacc_wait): New functions.
7009 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7010 (c_finish_oacc_data): New prototypes.
7011 * c-typeck.c: Include "gomp-constants.h".
7012 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7013 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7014 OMP_CLAUSE_SET_MAP_KIND.
7015 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7016 (c_finish_oacc_data): New functions.
7017 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7018 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7019 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7020 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7021 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7022 GOMP_MAP_FORCE_DEVICEPTR.
7023
adfac8df
JJ
70242015-01-09 Michael Collison <michael.collison@linaro.org>
7025
7026 * c-array-notation.c: Include hash-set.h, machmode.h,
7027 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7028 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7029 * c-aux-info.c: Ditto.
7030 * c-convert.c: Ditto.
7031 * c-decl.c: Ditto.
7032 * c-errors.c: Ditto.
7033 * c-lang.c: Dittoxs.
7034 * c-objc-common.c: Ditto.
7035 * c-parser.c: Ditto.
7036 * c-typeck.c: Include hash-set.h, machmode.h,
7037 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7038 fold-const.h, wide-int.h, inchash.h, real.h and
7039 fixed-value.h due to flattening of tree.h.
7040
2cc901dc
MP
70412015-01-07 Marek Polacek <polacek@redhat.com>
7042
7043 PR c/64417
7044 * c-typeck.c (process_init_element): Disallow initialization of
7045 a flexible array member with a string constant if the structure
7046 is in an array.
7047
5624e564
JJ
70482015-01-05 Jakub Jelinek <jakub@redhat.com>
7049
e5341100
JJ
7050 PR sanitizer/64344
7051 * c-typeck.c (convert_for_assignment, c_finish_return): For
7052 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7053 types also set in_late_binary_op around convert call.
7054 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7055 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7056 result on expr as last argument to ubsan_instrument_float_cast,
7057 if in_late_binary_op, don't use c_save_expr but save_expr.
7058
5624e564
JJ
7059 Update copyright years.
7060
5bd012f8
MP
70612015-01-05 Marek Polacek <polacek@redhat.com>
7062
7063 PR c/64423
7064 * c-typeck.c (build_array_ref): Pass loc down to
7065 warn_array_subscript_with_type_char.
7066
3f8257db 70672014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7068
7069 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 7070 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 7071 element type.
8e745a17 7072 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 7073 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 7074 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 7075 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 7076 to PEDWARN_FOR_QUALIFIERS.
768952be 7077
8f94a8c4
JJ
70782014-12-17 Jakub Jelinek <jakub@redhat.com>
7079
7080 PR sanitizer/64289
7081 * c-convert.c: Include ubsan.h.
7082 (convert): For real -> integral casts and
7083 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7084 instead instrument the float cast directly.
7085
b731b390
JJ
70862014-11-29 Jakub Jelinek <jakub@redhat.com>
7087
7088 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7089 c_finish_stmt_expr): Remove NULL last argument from
7090 create_tmp_var_raw and create_tmp_var calls.
7091 * c-array-notation.c (fix_builtin_array_notation_fn,
7092 build_array_notation_expr, fix_conditional_array_notations_1,
7093 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7094
541e35a6
MP
70952014-11-28 Marek Polacek <polacek@redhat.com>
7096
7097 PR c/63862
7098 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7099 convert the right operand to integer type.
7100
b286be94
MP
71012014-11-25 Marek Polacek <polacek@redhat.com>
7102
7103 PR c/63877
7104 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7105 for inline functions.
7106
aa7da51a
JJ
71072014-11-21 Jakub Jelinek <jakub@redhat.com>
7108
7109 PR target/63764
7110 * c-typeck.c (build_array_ref): Adjust
7111 convert_vector_to_pointer_for_subscript caller. If it returns true,
7112 call non_lvalue_loc on the result.
7113
d876207f
RB
71142014-11-11 Richard Biener <rguenther@suse.de>
7115
7116 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7117 to true.
7118
e5e44252
AK
71192014-11-10 Andi Kleen <ak@linux.intel.com>
7120
7121 PR c/60804
7122 * c-parser.c (c_parser_statement_after_labels): Call
7123 check_no_cilk.
7124 (c_parser_if_statement): Dito.
7125 (c_parser_switch_statement): Dito.
7126 (c_parser_while_statement): Dito.
7127 (c_parser_do_statement): Dito.
7128 (c_parser_for_statement): Dito.
7129 * c-typeck.c (c_finish_loop): Dito.
7130
13c21655
PC
71312014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7132
7133 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7134 OPT_Wshift_count_overflow in the warnings.
7135
2d51fcef
MP
71362014-10-30 Marek Polacek <polacek@redhat.com>
7137
7138 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7139 print the stripped version as well, if they're not the same.
7140
ef4bddc2
RS
71412014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7142
7143 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7144 machine_mode.
7145
c582198b
AM
71462014-10-28 Andrew MacLeod <amacleod@redhat.com>
7147
7148 * c-decl.c: Adjust include files.
7149 * c-parser.c: Ditto.
7150
ddc8de03
PM
71512014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7152 Tom Tromey <tromey@redhat.com>
7153
7154 * c-tree.h (enum c_oracle_request): New.
7155 (c_binding_oracle_function): New typedef.
7156 (c_binding_oracle, c_pushtag, c_bind): Declare.
7157 * c-decl.c (c_binding_oracle): New global.
7158 (I_SYMBOL_CHECKED): New macro.
7159 (i_symbol_binding): New function.
7160 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7161 (I_TAG_CHECKED): New macro.
7162 (i_tag_binding): New function.
7163 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7164 (I_LABEL_CHECKED): New macro.
7165 (i_label_binding): New function.
7166 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7167 (c_print_identifier): Save and restore c_binding_oracle.
7168 (c_pushtag, c_bind): New functions.
7169
60393bbc
AM
71702014-10-27 Andrew MacLeod <amacleod@redhat.com>
7171
7172 * c-typeck.c: Adjust include files.
7173
d723bb7c
MLI
71742014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7175
7176 PR c++/53061
7177 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7178 initialization here...
7179 (c_initialize_diagnostics): ... but here. Set defaults after
7180 building pretty-printer.
7181
1bc5a451
MP
71822014-10-23 Marek Polacek <polacek@redhat.com>
7183
7184 PR c/63626
7185 * c-decl.c (pop_scope): Don't print warning in external_scope.
7186
4435bb92
MP
71872014-10-19 Marek Polacek <polacek@redhat.com>
7188
7189 PR c/63567
7190 * c-typeck.c (output_init_element): Allow initializing objects with
7191 static storage duration with compound literals even in C99 and add
7192 pedwarn for it.
7193
7278465e
MP
71942014-10-17 Marek Polacek <polacek@redhat.com>
7195
7196 PR c/63567
7197 * c-typeck.c (digest_init): Allow initializing objects with static
7198 storage duration with compound literals even in C99 and add pedwarn
7199 for it.
7200
d9b7be2e
MP
72012014-10-17 Marek Polacek <polacek@redhat.com>
7202
7203 PR c/63543
7204 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7205 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7206 error multiple times. Print the type.
7207
f406ae1f
MP
72082014-10-17 Marek Polacek <polacek@redhat.com>
7209
7210 PR c/63549
7211 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7212 type.
7213
92574c7c
MP
72142014-10-17 Marek Polacek <polacek@redhat.com>
7215
7216 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7217 (start_function): Use OPT_Wimplicit_int instead of 0.
7218 (store_parm_decls_oldstyle): Likewise.
7219
1bc4a978
MT
72202014-10-17 Alan Modra <amodra@gmail.com>
7221
7222 PR middle-end/61848
7223 * c-decl.c (merge_decls): Don't merge section name or tls model
7224 to newdecl symtab node, instead merge to olddecl. Override
7225 existing olddecl section name. Set tls_model for all thread-local
7226 vars, not just OMP thread-private ones. Remove incorrect comment.
7227
83685514
AM
72282014-10-16 Andrew MacLeod <amacleod@redhat.com>
7229
7230 * c-decl.c: Adjust include files.
7231
78a7c317
DD
72322014-10-14 DJ Delorie <dj@redhat.com>
7233
7234 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7235 (c_token_starts_typename): Check all __intN, not just __int128.
7236 (c_token_starts_declspecs): Likewise.
7237 (c_parser_declspecs): Likewise.
7238 (c_parser_attribute_any_word): Likewise.
7239 (c_parser_objc_selector): Likewise.
7240 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7241 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7242 is specified.
7243 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7244 __int128.
7245 (finish_declspecs): Likewise.
7246
74d98c1e
AB
72472014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7248
8e745a17 7249 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 7250 the duplicate code.
8e745a17 7251 (c_parser_statement): Call the new function.
74d98c1e 7252
84937de2
MP
72532014-10-09 Marek Polacek <polacek@redhat.com>
7254
7255 PR c/63480
7256 * c-typeck.c (pop_init_level): Don't warn about initializing
7257 with { }.
7258
0382aaa0
MP
72592014-10-07 Marek Polacek <polacek@redhat.com>
7260
7261 PR c/59717
7262 * c-decl.c (header_for_builtin_fn): New function.
7263 (implicitly_declare): Suggest which header to include.
7264
7a0ca710
MP
72652014-10-07 Marek Polacek <polacek@redhat.com>
7266
7267 * c-convert.c (convert): Use error_operand_p.
7268 * c-typeck.c (require_complete_type): Likewise.
7269 (really_atomic_lvalue): Likewise.
7270 (digest_init): Likewise.
7271 (handle_omp_array_sections_1): Likewise.
7272
6bc8a126
MP
72732014-10-03 Marek Polacek <polacek@redhat.com>
7274
7275 PR c/63453
7276 * c-decl.c (pop_scope): Don't warn about "inline function declared
7277 but never defined" for functions marked with gnu_inline attribute.
7278
d90c0a59
JJ
72792014-09-25 Jakub Jelinek <jakub@redhat.com>
7280
7281 PR c++/63249
7282 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7283 on low_bound and length.
7284
083e891e
MP
72852014-09-24 Marek Polacek <polacek@redhat.com>
7286
7287 PR c/61405
7288 PR c/53874
7289 * c-parser.c: Don't define CPP_KEYWORD.
7290 (c_parser_switch_statement): Pass original type to c_finish_case.
7291 * c-tree.h (c_finish_case): Update declaration.
7292 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7293 conditionally to c_do_switch_warnings.
7294
8d95fe25
MP
72952014-09-03 Marek Polacek <polacek@redhat.com>
7296
7297 PR c/62024
7298 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7299 conversions.
7300
9a771876
JJ
73012014-09-02 Jakub Jelinek <jakub@redhat.com>
7302 Balaji V. Iyer <balaji.v.iyer@intel.com>
7303 Igor Zamyatin <igor.zamyatin@intel.com>
7304
7305 * c-parser.c (c_parser_cilk_for): New function.
7306 (c_parser_cilk_grainsize): Likewise.
7307 (c_get_temp_regvar): Likewise.
7308 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7309 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7310 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7311 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7312 case.
7313
b7679d96
CG
73142014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7315
7316 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7317 with using HOST_WIDE_INT without truncation to 'int'
7318
59ea0364
MP
73192014-08-22 Marek Polacek <polacek@redhat.com>
7320
7321 PR c++/62199
7322 * c-typeck.c (parser_build_binary_op): Adjust call to
7323 warn_logical_not_parentheses.
7324
671a475e
IZ
73252014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7326
7327 PR other/62008
7328 * c-parser.c (c_parser_array_notation): Check for correct
7329 type of an array added.
7330
04159acf
MP
73312014-08-19 Marek Polacek <polacek@redhat.com>
7332
7333 PR c++/62153
7334 * c-typeck.c (build_binary_op): If either operand of a comparison
7335 is a boolean expression, call maybe_warn_bool_compare.
7336
c77935ee
PP
73372014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7338
7339 PR c/45584
7340 * c-typeck.c (build_c_cast): Do a conversion even when the
7341 TYPE_MAIN_VARIANTs are the same.
7342
35aff4fb
MP
73432014-08-19 Marek Polacek <polacek@redhat.com>
7344
7345 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7346 pedwarn_c99 instead of pedwarn.
7347 (grokfield): Likewise.
7348 (warn_defaults_to): New function.
7349 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7350 Unconditionally call pedwarn_c99 instead of pedwarn.
7351 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7352 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7353 check flag_isoc11 before.
7354 * c-errors.c (pedwarn_c99): Change the return type to bool.
7355 Handle -Wc99-c11-compat.
7356 * c-parser.c (disable_extension_diagnostics): Handle
7357 warn_c99_c11_compat.
7358 (restore_extension_diagnostics): Likewise.
7359 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7360 instead of pedwarn, don't check flag_isoc11 before.
7361 (c_parser_declspecs): Likewise.
7362 (c_parser_alignas_specifier): Likewise.
7363 (c_parser_alignof_expression): Likewise.
7364 (c_parser_generic_selection): Likewise.
7365 * c-tree.h (pedwarn_c99): Update declaration.
7366 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7367 of pedwarn_c99.
7368
177cce46
MP
73692014-08-19 Marek Polacek <polacek@redhat.com>
7370
7371 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7372 to pedwarn_c90.
7373 * c-errors.c: Include "opts.h".
7374 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7375 * c-parser.c (disable_extension_diagnostics): Handle negative value
7376 of warn_c90_c99_compat, too.
7377 (restore_extension_diagnostics): Likewise.
7378 (c_parser_compound_statement_nostart): Pass
7379 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7380
6dc99c33
MP
73812014-08-12 Marek Polacek <polacek@redhat.com>
7382
7383 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7384 Add pedwarn.
7385 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7386 Likewise.
7387 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7388
3f8257db 73892014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
7390
7391 PR c/51849
7392 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7393 Call pedwarn_c90 instead of pedwarn.
7394 (check_bitfield_type_and_width): Likewise.
7395 (declspecs_add_qual): Likewise.
7396 (declspecs_add_type): Likewise.
7397 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7398 Adjust to only call pedwarn_c90.
7399 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7400 pedwarn_c90 instead of pedwarn.
7401 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7402 * c-parser.c (disable_extension_diagnostics): Handle
7403 warn_c90_c99_compat.
7404 (restore_extension_diagnostics): Likewise.
7405 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7406 pedwarn_c90 instead of pedwarn.
7407 (c_parser_initelt): Likewise.
7408 (c_parser_postfix_expression): Likewise.
7409 (c_parser_postfix_expression_after_paren_type): Likewise.
7410 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7411 * c-tree.h: Fix formatting.
7412 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7413 pedwarn_c90 instead of pedwarn.
7414
9f25a338
TS
74152014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7416
7417 * c-typeck.c: Remove include of pointer-set.h.
7418
044331a8
MP
74192014-08-07 Marek Polacek <polacek@redhat.com>
7420
7421 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7422
b787e7a2
TS
74232014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7424
7425 * c-typeck.c: Use hash_map instead of pointer_map.
7426
6e2830c3
TS
74272014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7428
7429 * c-decl.c: Use hash_set instead of pointer_set.
7430
a7ee52fb
IZ
74312014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7432
7433 PR middle-end/61455
7434 * c-array-notation.c (expand_array_notations): Handling
7435 of DECL_EXPR added.
7436
b4dfdc11
MG
74372014-07-31 Marc Glisse <marc.glisse@inria.fr>
7438
7439 PR c++/60517
7440 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7441 a local variable.
7442
976d5a22
TT
74432014-07-30 Tom Tromey <tromey@redhat.com>
7444
7445 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7446 field.
7447 (really_start_incremental_init, push_init_level): Initialize
7448 designator_depth.
7449 (pop_init_level): Set global designator_depth.
7450 (process_init_element): Check for designated_init attribute.
7451
30281de2
MP
74522014-07-20 Marek Polacek <polacek@redhat.com>
7453
7454 PR c/61852
7455 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7456 (implicitly_declare): Pass location to implicit_decl_warning.
7457
b108f48f
JJ
74582014-07-14 Jakub Jelinek <jakub@redhat.com>
7459
7460 PR middle-end/61294
7461 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7462 If non-NULL, call c_parser_check_literal_zero.
7463 (c_parser_check_literal_zero): New function.
7464 (c_parser_postfix_expression_after_primary): Adjust
7465 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7466
773ec47f
MP
74672014-07-06 Marek Polacek <polacek@redhat.com>
7468
7469 PR c/6940
7470 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7471 * c-tree.h (C_ARRAY_PARAMETER): Define.
7472 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7473 function parameter.
7474
22e1cf1c 74752014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7476 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7477
7478 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7479 releasing symbol.
7480
52ec0ea3
MP
74812014-07-01 Marek Polacek <polacek@redhat.com>
7482
7483 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7484 instead of 0 to WARN_FOR_ASSIGNMENT.
7485
d5c3d343
MP
74862014-07-01 Marek Polacek <polacek@redhat.com>
7487
7488 PR c/58286
7489 * c-typeck.c (convert_for_assignment): Pass
7490 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7491
6a7253a4
MP
74922014-06-30 Marek Polacek <polacek@redhat.com>
7493
7494 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7495 has no_sanitize_undefined attribute.
7496
5e88a8f4
IZ
74972014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7498
7499 PR middle-end/57541
7500 * c-array-notation.c (fix_builtin_array_notation_fn):
7501 Check for 0 arguments in builtin call. Check that bultin argument is
7502 correct.
7503 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7504 index.
7505
9698b078
SH
75062014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7507
7508 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7509 qualifiers in __auto_type for atomic types.
7510 (c_parser_typeof_specifier): Discard all type qualifiers in
7511 __typeof__ for atomic types.
7512
6e07c515
MP
75132014-06-25 Marek Polacek <polacek@redhat.com>
7514
7515 PR c/61162
7516 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7517 the return expression to c_finish_return.
7518
da6f124d
JJ
75192014-06-25 Jakub Jelinek <jakub@redhat.com>
7520
7521 * c-typeck.c (c_finish_omp_clauses): Make sure
7522 OMP_CLAUSE_LINEAR_STEP has correct type.
7523
c203e8a7
TS
75242014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7525
7526 * c-decl.c: Adjust.
7527
56ad0e38
JJ
75282014-06-24 Jakub Jelinek <jakub@redhat.com>
7529
7530 * c-parser.c (c_parser_omp_for_loop): For
7531 #pragma omp parallel for simd move lastprivate clause from parallel
7532 to for rather than simd.
7533
47c2554f
MP
75342014-06-23 Marek Polacek <polacek@redhat.com>
7535
7536 * c-typeck.c (parser_build_binary_op): Don't call
7537 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7538
56363ffd
JH
75392014-06-15 Jan Hubicka <hubicka@ucw.cz>
7540
7541 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7542 * c-decl.c (merge_decls): Likewise.
7543
d7ff7ae5
MP
75442014-06-09 Marek Polacek <polacek@redhat.com>
7545
7546 PR c/36446
7547 * c-typeck.c (error_init): Call inform instead of error_at.
7548 (pedwarn_init): Call inform instead of pedwarn.
7549 (warning_init): Call inform instead of warning_at.
7550
24d047a3
JH
75512014-06-07 Jan Hubicka <hubicka@ucw.cz>
7552
7553 * c-decl.c (merge_decls): Use set_decl_section_name.
7554 (duplicate_decls): Remove node if it exists.
7555
9bac5cbb
G
75562014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7557
7558 PR c/53119
7559 * c-typeck.c (push_init_level, process_init_element,
7560 pop_init_level): Correct check for zero initialization, move
7561 missing brace warning to respect zero initialization.
7562
8ffcdea8
MP
75632014-06-05 Marek Polacek <polacek@redhat.com>
7564
7565 PR c/56724
7566 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7567
742938c9
MP
75682014-06-05 Marek Polacek <polacek@redhat.com>
7569
7570 PR c/49706
7571 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7572 on the left hand side operand of a comparison.
742938c9 7573
6447c55d
MP
75742014-06-05 Marek Polacek <polacek@redhat.com>
7575
7576 PR c/48062
7577 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7578 Print note only if the warning was printed.
7579
9dc7743c
IZ
75802014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7581
7582 PR c/58942
7583 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7584 with a pointer.
7585
fedfecef
MP
75862014-06-03 Marek Polacek <polacek@redhat.com>
7587
7588 PR c/60439
7589 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7590 c_start_case.
7591 * c-tree.h (c_start_case): Update.
7592 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7593 switch condition has boolean value.
7594
9b2b7279
AM
75952014-06-02 Andrew MacLeod <amacleod@redhat.com>
7596
7597 * c-decl.c: Include builtins.h.
7598 * c-parser.c: Likewise.
7599
5c1bc275
MP
76002014-05-27 Marek Polacek <polacek@redhat.com>
7601
7602 PR c/56724
7603 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7604 error and warning calls to error_at and warning_at. Pass location of
7605 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7606 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7607 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7608
97563bc8
IZ
76092014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7610
7611 PR c/61191
7612 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7613 function parameters.
7614
aede2c10
JH
76152014-05-23 Jan Hubicka <hubicka@ucw.cz>
7616
7617 * c-decl.c (merge_decls): Preserve symtab node pointers.
7618 (duplicate_decls): Free new decl.
7619
edbba2ce
TS
76202014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7621
f3316c6d
TS
7622 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7623 initialization.
7624
edbba2ce
TS
7625 * c-parser.c (c_parser_omp_target): Return bool values.
7626
68c81f24
TS
76272014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7628
7629 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7630 num_teams_loc variable to num_thread_limit_loc.
7631
632f2871
RS
76322014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7633
7634 * c-array-notation.c (expand_array_notations): Use void_node
7635 instead of void_zero_node.
7636
766090c2
TS
76372014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7638
7639 * c-decl.c (finish_struct): Adjust.
7640 (finish_enum): Likewise.
7641 (bind): Adjust.
7642 (record_inline_static): Likewise.
7643 (push_scope): Likewise.
7644 (make_label): Likewise.
7645 (lookup_label_for_goto): Likewise.
7646 (finish_struct): Likewise.
7647 (finish_enum): Likewise.
7648 (store_parm_decls): Likewise.
7649 (c_push_function_context): Likewise.
7650 * c-lang.h: Remove usage of variable_size gty attribute.
7651 * c-parser.c (c_parse_init): Adjust.
7652 (c_parse_file): Likewise.
7653
2b107f6b
MP
76542014-05-13 Marek Polacek <polacek@redhat.com>
7655
7656 PR c/61162
7657 * c-typeck.c (convert_for_assignment): Pass location to
7658 WARN_FOR_ASSIGNMENT instead of input_location.
7659
d033409e
MP
76602014-05-10 Marek Polacek <polacek@redhat.com>
7661
7662 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7663 maybe_warn_string_init.
7664 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7665 maybe_warn_string_init.
7666 * c-tree.h (maybe_warn_string_init): Update declaration.
7667 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7668 Call pedwarn_init with loc instead of with input_location.
7669 (digest_init): Pass init_loc to maybe_warn_string_init.
7670 (pop_init_level): Call pedwarn_init with loc instead of with
7671 input_location.
7672 (set_init_index): Likewise.
7673 (process_init_element): Likewise.
7674
ea58ef42
MP
76752014-05-09 Marek Polacek <polacek@redhat.com>
7676
7677 PR c/61096
7678 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7679 (c_parser_initelt): Pass location to set_init_label. Pass array index
7680 location to set_init_index.
7681 * c-tree.h (push_init_level): Update declaration.
7682 (pop_init_level): Likewise.
7683 (set_init_index): Likewise.
7684 (set_init_label): Likewise.
7685 * c-typeck.c (error_init): Add location parameter. Call error_at
7686 instead of error.
7687 (digest_init): Pass init_loc to error_init.
7688 (really_start_incremental_init):
7689 (push_init_level): Add location parameter. Pass loc to pop_init_level
7690 and error_init.
7691 (pop_init_level): Likewise.
7692 (set_designator): Add location parameter. Pass loc to pop_init_level,
7693 push_init_level, and error_init.
7694 (set_init_index): Add location parameter. Pass loc to error_init and
7695 set_designator.
7696 (set_init_label): Likewise.
7697 (output_init_element): Pass loc to error_init.
7698 (process_init_element): Pass loc to error_init, pop_init_level,
7699 pedwarn_init, and push_init_level.
7700
661a0813
MP
77012014-05-09 Marek Polacek <polacek@redhat.com>
7702
7703 PR c/50459
7704 * c-parser.c (c_parser_attributes): Parse the arguments as an
7705 expression-list if the attribute takes identifier.
7706
2793eeab
MP
77072014-05-08 Marek Polacek <polacek@redhat.com>
7708
7709 PR c/61053
7710 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7711 TYPE_ALIGN_UNIT.
7712
f827930a
MP
77132014-05-08 Marek Polacek <polacek@redhat.com>
7714
7715 PR c/61077
7716 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7717 of main.
7718
1d60af08
KZ
77192014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7720 Mike Stump <mikestump@comcast.net>
7721 Richard Sandiford <rdsandiford@googlemail.com>
7722
7723 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7724 (finish_enum): Use wide-int interfaces.
7725 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7726 * c-typeck.c (build_c_cast): Likewise.
7727 (set_nonincremental_init_from_string): Likewise.
7728 (c_tree_equal): Likewise.
7729
a0e24419
MP
77302014-05-02 Marek Polacek <polacek@redhat.com>
7731
7732 PR c/25801
7733 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7734 Return size_one_node when the type is not complete.
7735 (pointer_diff): Remove comment.
7736 (build_unary_op): Improve error messages.
7737
19fc9faa
MP
77382014-05-02 Marek Polacek <polacek@redhat.com>
7739
7740 * c-typeck.c (c_finish_return): Separate warning_at calls.
7741
63bc4e87
MP
77422014-05-02 Marek Polacek <polacek@redhat.com>
7743
7744 * c-tree.h (error_init): Remove declaration.
7745 (pedwarn_init): Likewise.
7746 * c-typeck.c (error_init): Make static and move above.
7747 (pedwarn_init): Likewise.
7748 (warning_init): Move above.
7749 (maybe_warn_string_init): Likewise.
7750
4bd2511b
JL
77512014-05-01 Jeff Law <law@redhat.com>
7752
7753 Revert:
7754
7755 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7756 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7757 avoid goto.
7758
6a358dcb
MP
77592014-05-02 Marek Polacek <polacek@redhat.com>
7760
7761 PR c/60784
7762 * c-typeck.c (push_init_level): Set constructor_designated to
7763 p->designated for structures.
7764
ae5ebda4
MP
77652014-05-01 Marek Polacek <polacek@redhat.com>
7766
7767 PR c/60915
7768 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7769 function-definition has an attribute after the declarator.
7770
96b40f8d
MP
77712014-05-01 Marek Polacek <polacek@redhat.com>
7772
7773 PR c/60257
7774 * c-typeck.c (warning_init): Add location_t parameter. Call
7775 warning_at instead of warning.
7776 (push_init_level): Pass input_location to warning_init.
7777 (add_pending_init): Add location_t parameter. Pass loc to
7778 warning_init.
7779 (set_nonincremental_init): Pass input_location to add_pending_init.
7780 (set_nonincremental_init_from_string): Likewise.
7781 (output_init_element): Pass loc to warning_init and to
7782 add_pending_init.
7783
32e00768
MP
77842014-05-01 Marek Polacek <polacek@redhat.com>
7785
7786 PR c/43395
7787 * c-typeck.c (c_finish_return): Distinguish between label and variable
7788 when warning about returning local address.
7789
c9379ce2
MP
77902014-05-01 Marek Polacek <polacek@redhat.com>
7791
7792 PR c/29467
7793 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7794 in C89 mode.
7795
d00887e8
MP
77962014-05-01 Marek Polacek <polacek@redhat.com>
7797
7798 PR c/43245
7799 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7800 instead of 0 to WARN_FOR_QUALIFIERS.
7801
5436fa2e
MP
78022014-05-01 Marek Polacek <polacek@redhat.com>
7803
7804 PR c/56989
7805 * c-typeck.c (default_conversion): Use better location for
7806 error call.
7807
f8ed5150
MP
78082014-04-30 Marek Polacek <polacek@redhat.com>
7809
7810 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7811 also when SANITIZE_FLOAT_DIVIDE is on.
7812
8337d1db
MP
78132014-04-30 Marek Polacek <polacek@redhat.com>
7814
7815 PR c/60139
7816 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7817 and pedwarn_init. Use loc insted of input_location.
7818
c4bdc42f
MP
78192014-04-30 Marek Polacek <polacek@redhat.com>
7820
7821 PR c/60351
7822 * c-typeck.c (build_binary_op): Use location when warning about
7823 shift count.
7824
45484dcf
MP
78252014-04-25 Marek Polacek <polacek@redhat.com>
7826
7827 PR c/18079
7828 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7829 always_inline/noinline and hot/cold attributes.
7830
34cf811f
MP
78312014-04-25 Marek Polacek <polacek@redhat.com>
7832
7833 PR c/60114
7834 * c-parser.c (c_parser_initelt): Pass input_location to
7835 process_init_element.
7836 (c_parser_initval): Pass loc to process_init_element.
7837 * c-tree.h (process_init_element): Adjust declaration.
7838 * c-typeck.c (push_init_level): Pass input_location to
7839 process_init_element.
7840 (pop_init_level): Likewise.
7841 (set_designator): Likewise.
7842 (output_init_element): Add location_t parameter. Pass loc to
7843 digest_init.
7844 (output_pending_init_elements): Pass input_location to
7845 output_init_element.
7846 (process_init_element): Add location_t parameter. Pass loc to
7847 output_init_element.
7848
42056eac
JJ
78492014-04-24 Jakub Jelinek <jakub@redhat.com>
7850
7851 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7852 atomic-clause, allow comma in between atomic-clause and
7853 seq_cst.
7854
e162a134
JJ
78552014-04-22 Jakub Jelinek <jakub@redhat.com>
7856
7857 PR c/59073
7858 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7859 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7860
2f6babac
IZ
78612014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7862
7863 PR middle-end/60469
7864 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7865 create_tmp_var instead build_decl for creating temps.
7866 (build_array_notation_expr): Likewise.
7867 (fix_conditional_array_notations_1): Likewise.
7868 (fix_array_notation_expr): Likewise.
7869 (fix_array_notation_call_expr): Likewise.
7870
8edbfaa6
JJ
78712014-03-28 Jakub Jelinek <jakub@redhat.com>
7872
7873 PR c++/60689
7874 * c-tree.h (c_build_function_call_vec): New prototype.
7875 * c-typeck.c (build_function_call_vec): Don't call
7876 resolve_overloaded_builtin here.
7877 (c_build_function_call_vec): New wrapper function around
7878 build_function_call_vec. Call resolve_overloaded_builtin here.
7879 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7880 Call c_build_function_call_vec instead of build_function_call_vec.
7881 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7882 * c-decl.c (finish_decl): Likewise.
7883
7485aeea
MLI
78842014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7885
7886 PR c/55383
7887 * c-typeck.c: Use correct format string in cast-qual warning
7888
b17a8b07
TS
78892014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7890
7891 * c-decl.c (c_decl_attributes): Use
7892 lang_hooks.types.omp_mappable_type.
7893 * c-typeck.c (c_finish_omp_clauses): Likewise.
7894
3af9c5e9
MP
78952014-03-06 Marek Polacek <polacek@redhat.com>
7896
7897 PR c/60197
7898 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7899 of checking tree code.
7900
1c9f5f33
PK
79012014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7902
7903 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7904 (c_parser_parameter_declaration): Likewise.
7905
cc28fc7f
MP
79062014-02-19 Marek Polacek <polacek@redhat.com>
7907
7908 PR c/60195
7909 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7910 Call mark_exp_read on exp.value.
7911 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7912 TREE_ADDRESSABLE on old instead of val.
7913 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7914
b581c05c
PK
79152014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7916
7917 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7918 C_EXPR_APPEND by vec_safe_push.
7919 * c-tree.h (C_EXPR_APPEND): Remove.
7920
81e5eca8
MP
79212014-01-31 Marek Polacek <polacek@redhat.com>
7922
7923 PR c/59963
7924 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7925 build_function_call_vec.
7926 (build_function_call): Likewise.
7927 (build_atomic_assign): Likewise.
7928 (build_function_call_vec): Add arg_loc parameter. Use it.
7929 (convert_arguments): Likewise.
7930 (convert_for_assignment): Rename rhs_loc to expr_loc.
7931 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7932 (c_parser_objc_keywordexpr): Likewise.
7933 (c_parser_postfix_expression_after_primary): Call
7934 build_function_call_vec with expr_loc rather than op_loc.
7935 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7936 build_function_call_vec.
7937 (c_parser_expr_list): Add locations parameter. Fill it with locations
7938 of function arguments.
7939 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7940
68fca595
MP
79412014-01-30 Marek Polacek <polacek@redhat.com>
7942
7943 PR c/59940
7944 * c-typeck.c (build_function_call_vec): Use loc parameter.
7945 (convert_arguments): Add location parameter. Use it.
7946 (ep_convert_and_check): Likewise.
7947 (build_atomic_assign): Adjust convert_for_assignment call.
7948 (build_modify_expr): Likewise.
7949 (digest_init): Likewise.
7950 (c_finish_return): Likewise.
7951 (build_conditional_expr): Adjust ep_convert_and_check calls.
7952 (convert_for_assignment): Add rhs_loc parameter. Use it.
7953 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7954 calls.
7955
fa337f3a
RB
79562014-01-30 Richard Biener <rguenther@suse.de>
7957
7958 PR c/59905
7959 * c-typeck.c (build_function_call_vec): Do not replace calls
7960 to a function via an incompatible type with a runtime abort.
7961
b72271b9
BI
79622014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7963
7964 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7965 flag_enable_cilkplus with flag_cilkplus.
7966 (c_parser_direct_declarator_inner): Likewise.
7967 (c_parser_attribute_any_word): Likewise.
7968 (c_parser_attributes): Likewise.
7969 (c_parser_compound_statement): Likewise.
7970 (c_parser_statement_after_labels): Likewise.
7971 (c_parser_if_statement): Likewise.
7972 (c_parser_switch_statement): Likewise.
7973 (c_parser_do_statement): Likewise.
7974 (c_parser_for_statement): Likewise.
7975 (c_parser_unary_expression): Likewise.
7976 (c_parser_postfix_expression): Likewise.
7977 (c_parser_postfix_expression_after_primary): Likewise.
7978 (c_parser_postfix_expression_after_primary): Likewise.
7979 (c_parser_omp_clause_name): Likewise.
7980 (c_finish_omp_declare_simd): Likewise.
7981 (c_parser_cilk_verify_simd): Likewise.
7982 * c-typeck.c (build_array_ref): Likewise.
7983 (build_function_call_vec): Likewise.
7984 (convert_arguments): Likewise.
7985 (build_compound_expr): Likewise.
7986 (c_finish_return): Likewise.
7987 (c_finish_if_stmt): Likewise.
7988 (c_finish_loop): Likewise.
7989 (build_binary_op): Likewise.
7990
393e8e8b
MP
79912014-01-23 Marek Polacek <polacek@redhat.com>
7992
7993 PR c/59846
7994 * c-typeck.c (parser_build_binary_op): Use location instead of
7995 input_location.
7996 (build_binary_op): Pass location to shorten_compare.
7997
f04dda30
MP
79982014-01-23 Marek Polacek <polacek@redhat.com>
7999
8000 PR c/58346
8001 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8002 an empty aggregate.
8003
789eadcd
MP
80042014-01-23 Marek Polacek <polacek@redhat.com>
8005
8006 PR c/59871
8007 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8008 of a comma expression.
8009 (emit_side_effect_warnings): Likewise.
8010
40f14e9f
BI
80112014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8012
8013 PR c/59825
8014 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8015 function to use walk_tree and moved a lot of its functionality to
8016 expand_array_notations.
8017 (expand_array_notations): New function.
8018
74558dd9
BI
80192014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8020
8021 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8022 attribute an attribute without value.
8023
652fea39
JJ
80242014-01-23 Jakub Jelinek <jakub@redhat.com>
8025
8026 PR middle-end/58809
8027 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8028 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8029
f34f1c87
MP
80302014-01-22 Marek Polacek <polacek@redhat.com>
8031
8032 PR c/59891
8033 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8034 of remove_c_maybe_const_expr on op1 and op2.
8035
241f845a
JJ
80362014-01-15 Jakub Jelinek <jakub@redhat.com>
8037
8038 PR c/58943
8039 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8040 effects, preevaluate rhs using SAVE_EXPR first.
8041
9a74f20c
BI
80422014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8043
8044 PR c++/59631
8045 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8046 statements with if-elseif statements.
8047
96066ce1
MP
80482014-01-06 Marek Polacek <polacek@redhat.com>
8049
8050 PR c/57773
8051 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8052 defined bit-field types only in ISO C.
8053
23a5b65a
RS
80542014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8055
8056 Update copyright years
8057
f9030485
RS
80582014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8059
8060 * c-array-notation.c: Use the standard form for the copyright notice.
8061
41958c28
BI
80622013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8063
8064 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8065 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8066 field in parser is not empty. If not-empty, call the function
8067 c_parser_finish_omp_declare_simd.
8068 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8069 between SIMD-enabled functions and #pragma simd. Added new parameter.
8070 (c_parser_cilk_all_clauses): Modified the usage of the function
8071 c_parser_cilk_clause_vectorlength as mentioned above.
8072 (c_parser_cilk_simd_fn_vector_attrs): New function.
8073 (c_finish_cilk_simd_fn_tokens): Likewise.
8074 (is_cilkplus_vector_p): Likewise.
8075 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8076 "nomask," and "mask" strings in clause name.
8077 (c_parser_omp_all_clauses): Added 3 new case statements:
8078 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8079 PRAGMA_CILK_CLAUSE_NOMASK.
8080 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8081 check for vector attribute and if so call the function
8082 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8083 called the function c_finish_cilk_simd_fn_tokens.
8084 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8085 parser field is non-empty. If so, parse them as you would parse
8086 the omp declare simd pragma.
8087 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8088 Added a check when step is a parameter and flag it as error.
8089 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8090 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8091 pragma_omp_clause.
8092
cef0fd0e
TS
80932013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8094
8095 * c-parser.c (c_parser_omp_parallel): Fix description.
8096
12893402
BI
80972013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8098
8099 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8100 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8101 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8102 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8103
296674db
JM
81042013-12-04 Joseph Myers <joseph@codesourcery.com>
8105
8106 PR c/52023
8107 * c-parser.c (c_parser_alignas_specifier): Use
8108 c_sizeof_or_alignof_type instead of c_alignof.
8109 (c_parser_alignof_expression): Likewise, with min_alignof
8110 parameter depending on alignof spelling used.
8111
edd28054
MP
81122013-12-04 Marek Polacek <polacek@redhat.com>
8113
8114 PR c/54113
8115 * c-decl.c (start_function): Don't warn for missing prototype for
8116 inline functions.
8117
da0fc454
MP
81182013-12-03 Marek Polacek <polacek@redhat.com>
8119
8120 PR c/59351
8121 * c-decl.c (build_compound_literal): Allow compound literals with
8122 empty initial value.
8123
4c2ecab0
JM
81242013-12-02 Joseph Myers <joseph@codesourcery.com>
8125
8126 PR c/58235
8127 * c-typeck.c (build_modify_expr): Diagnose assignment to
8128 expression with array type.
8129
340baef7
JM
81302013-11-29 Joseph Myers <joseph@codesourcery.com>
8131
8132 PR c/42262
8133 * c-typeck.c (process_init_element): Do not treat a string as
8134 initializing a whole array when used with a designator for an
8135 individual element.
8136
6763b9f7
JM
81372013-11-29 Joseph Myers <joseph@codesourcery.com>
8138
8139 PR c/57574
8140 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8141 an inline function following a static declaration.
8142
e7bd1de1
JJ
81432013-11-28 Jakub Jelinek <jakub@redhat.com>
8144
8145 PR c/59310
8146 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8147 to p_name before calling c_parser_omp_teams instead of after.
8148 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8149 argument. Remove unused p_name variable.
8150
0136f8f0
AH
81512013-11-27 Aldy Hernandez <aldyh@redhat.com>
8152 Jakub Jelinek <jakub@redhat.com>
8153
8154 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8155 external_scope is NULL.
8156
241b71bb
TV
81572013-11-27 Tom de Vries <tom@codesourcery.com>
8158 Marc Glisse <marc.glisse@inria.fr>
8159
8160 PR c++/59032
8161 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8162
2fb9a547
AM
81632013-11-22 Andrew MacLeod <amacleod@redhat.com>
8164
8165 * c-typeck.c: Add required include files from gimple.h.
8166
8400e75e
DM
81672013-11-22 David Malcolm <dmalcolm@redhat.com>
8168
8169 * c-decl.c (define_label, shadow_tag_warned)
8170 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8171 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8172 (declspecs_add_type): Remove use of in_system_header macro.
8173 * c-parser.c (c_parser_unary_expression): Likewise.
8174 * c-typeck.c (store_init_value, process_init_element)
8175 (c_start_case): Likewise.
8176
8177 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8178 macro.
8179
8180 * c-parser.c (c_parser_set_source_position_from_token): Remove
8181 reference to in_system_header from comment.
8182
386b1f1f
RS
81832013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8184
8185 * c-decl.c (grokdeclarator): Update comment to refer to
8186 tree_to_[su]hwi rather than tree_low_cst.
8187
ae7e9ddd
RS
81882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8189
8190 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8191 tree_to_uhwi throughout.
8192
9439e9a1
RS
81932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8194
8195 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8196 throughout.
8197
9541ffee
RS
81982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8199
8200 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8201 throughout.
8202
c02065fc
AH
82032013-11-15 Aldy Hernandez <aldyh@redhat.com>
8204
8205 * c-parser.c (c_parser_cilk_simd): New.
8206 (c_parser_cilk_verify_simd): New.
8207 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8208 (c_parser_omp_for_loop): Add case for NE_EXPR.
8209 Set c_break_label for CILK_SIMD.
8210 (c_parser_cilk_clause_vectorlength): New.
8211 (c_parser_cilk_clause_linear): New.
8212 (c_parser_cilk_clause_name): New.
8213 (c_parser_cilk_all_clauses): New.
8214 * c-typeck.c (build_unary_op): Pass location argument to
8215 readonly_error.
8216 (build_modify_expr): Same.
8217 (build_asm_expr): Same.
8218 (c_finish_bc_stmt): Error on break/continue in loops.
8219
18f429e2
AM
82202013-11-14 Andrew MacLeod <amacleod@redhat.com>
8221
8222 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8223
d8a2d370
DN
82242013-11-14 Diego Novillo <dnovillo@google.com>
8225
8226 * c-decl.c: Include print-tree.h.
8227 Include stor-layout.h.
8228 Include varasm.h.
8229 Include attribs.h.
8230 Include stringpool.h.
8231 * c-lang.c: Include fold-const.h.
8232 * c-parser.c: Include stringpool.h.
8233 Include attribs.h.
8234 Include stor-layout.h.
8235 Include varasm.h.
8236 Include trans-mem.h.
8237 * c-typeck.c: Include stor-layout.h.
8238 Include trans-mem.h.
8239 Include varasm.h.
8240 Include stmt.h.
8241
38b7bc7f
JM
82422013-11-13 Joseph Myers <joseph@codesourcery.com>
8243
8244 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8245 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8246 __auto_type.
8247 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8248 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8249 RID_AUTO_TYPE.
8250 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8251 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8252 (c_parser_declarator, c_parser_direct_declarator_inner)
8253 (c_parser_parameter_declaration, c_parser_type_name): All callers
8254 changed.
8255 (c_parser_declaration_or_fndef): Handle declarations with type
8256 determined from the initializer.
8257
45b0be94
AM
82582013-11-12 Andrew MacLeod <amacleod@redhat.com>
8259
18f429e2 8260 * c-typeck.c: Include gimplify.h.
45b0be94 8261
582d9b50
JM
82622013-11-12 Joseph Myers <joseph@codesourcery.com>
8263
8264 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8265 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8266 comment.
8267 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8268 or _Thread_local as appropriate in diagnostics.
8269 (build_null_declspecs): Initialize ret->thread_gnu_p.
8270 (declspecs_add_scspec): Handle either __thread or _Thread_local
8271 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8272 pedantic. Do not disallow _Thread_local extern and _Thread_local
8273 static.
8274
267bac10
JM
82752013-11-07 Joseph Myers <joseph@codesourcery.com>
8276 Andrew MacLeod <amacleod@redhat.com>
8277
8278 * c-aux-info.c (gen_type): Handle atomic qualifier.
8279 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8280 qualifiers when compating types.
8281 (shadow_tag_warned): Handle atomic_p in declspecs.
8282 (quals_from_declspecs): Likewise.
8283 (start_decl): Use c_type_promotes_to when promoting argument
8284 types.
8285 (grokdeclarator): Handle _Atomic.
8286 (get_parm_info): Diagnose any qualifier on "void" as only
8287 parameter.
8288 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8289 comparing types. Use c_type_promotes_to when promoting argument
8290 types.
8291 (finish_function): Use c_type_promotes_to when promoting argument
8292 types.
8293 (build_null_declspecs): Handle atomic_p in declspecs.
8294 (declspecs_add_qual): Handle RID_ATOMIC.
8295 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8296 (c_token_starts_declspecs): Handle RID_ATOMIC.
8297 (c_parser_declspecs): Handle atomic type specifiers and
8298 qualifiers.
8299 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8300 from types of expressions with atomic type.
8301 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8302 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8303 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8304 (c_parser_statement_after_labels, c_parser_switch_statement)
8305 (c_parser_for_statement, c_parser_expr_no_commas)
8306 (c_parser_conditional_expression, c_parser_binary_expression)
8307 (c_parser_cast_expression, c_parser_unary_expression)
8308 (c_parser_postfix_expression)
8309 (c_parser_postfix_expression_after_primary, c_parser_expression):
8310 Use convert_lvalue_to_rvalue.
8311 (c_parser_expression_conv, c_parser_expr_list): Document
8312 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8313 (c_parser_objc_synchronized_statement): Use
8314 convert_lvalue_to_rvalue.
8315 (c_parser_objc_selector): Handle RID_ATOMIC.
8316 (c_parser_objc_receiver, c_parser_array_notation): Use
8317 convert_lvalue_to_rvalue.
8318 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8319 _Atomic (type-name).
8320 (struct c_declspecs): Add atomic_p field.
8321 (convert_lvalue_to_rvalue): Declare.
8322 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8323 corresponding atomic types.
8324 (qualify_type): Don't add _Atomic qualifiers from second argument.
8325 (comp_target_types): Do not allow _Atomic mismatches.
8326 (type_lists_compatible_p): Do not remove atomic qualifiers when
8327 comparing types.
8328 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8329 (build_atomic_assign): New functions.
8330 (build_unary_op): Use build_atomic_assign for atomic increment and
8331 decrement.
8332 (build_conditional_expr): Do not treat _Atomic void as a qualified
8333 version of void.
8334 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8335 (find_anonymous_field_with_type, convert_to_anonymous_field)
8336 (convert_for_assignment): Do not remove atomic qualifiers when
8337 comparing types.
8338 (digest_init): Do not accept initialization of arrays of atomic
8339 elements by string constants.
8340 (build_asm_expr): Use convert_lvalue_to_rvalue.
8341 (build_binary_op): Do not treat _Atomic void as a qualified
8342 version of void.
8343
0c249d4b
DD
83442013-11-06 DJ Delorie <dj@redhat.com>
8345
8346 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8347 both explicit and builtin, print the location of the explicit one.
8348
6d7f7e0a
TB
83492013-11-05 Tobias Burnus <burnus@net-b.de>
8350
8351 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8352 c_parser_omp_distribute, c_parser_omp_teams,
8353 c_parser_omp_target, c_parser_omp_declare): Handle
8354 -fopenmp-simd.
8355
b906f4ca
MP
83562013-11-03 Marek Polacek <polacek@redhat.com>
8357
8358 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8359
ee1d5a02
JJ
83602013-11-01 Jakub Jelinek <jakub@redhat.com>
8361
8362 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8363 check_dup_generic at the end, unless remove is true.
8364 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8365 remove = true;.
8366 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8367
5a9785fb
JJ
83682013-10-31 Jakub Jelinek <jakub@redhat.com>
8369
8370 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8371 with decl that is not pointer nor array.
8372
939b37da
BI
83732013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8374
8375 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8376 a spawning function is found.
8377 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8378 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8379 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8380 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8381 case.
8382 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8383 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8384 expr.
8385 (c_finish_return): Added a check to reject _Cilk_spawn in return
8386 expression.
8387 (build_cilk_spawn): New function.
8388 (build_cilk_sync): Likewise.
8389 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 8390
d4af74d4
TB
83912013-10-27 Tobias Burnus <burnus@net-b.de>
8392
8393 PR other/33426
8394 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8395 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8396 (c_parser_statement_after_labels): Update calls.
8397
d73749df 83982013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8399
8400 PR other/33426
8401 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8402 Handle PRAGMA_IVDEP.
8403 (c_parser_statement_after_labels): Update call.
8404
f28aa681
MP
84052013-10-24 Marek Polacek <polacek@redhat.com>
8406
8407 * c-parser.c (c_parser_struct_declaration): Add a comment.
8408 (c_parser_declarator): Don't allow _Alignas here.
8409
0645c1a2
AM
84102013-10-17 Andrew MacLeod <amacleod@redhat.com>
8411
8412 * c-parser.c: Include omp-low.h.
8413 * c-typeck.c: Likewise.
8414
568a31f2
MP
84152013-10-17 Marek Polacek <polacek@redhat.com>
8416
8417 PR c/58267
8418 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8419 Document syntax of the array-declarator.
8420 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8421 are not permitted.
8422 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8423 (c_parser_struct_declaration): Likewise.
8424 (c_parser_declarator): Likewise.
8425 (c_parser_direct_declarator_inner): Likewise.
8426 (c_parser_parameter_declaration): Likewise.
8427 (c_parser_type_name): Likewise.
8428
acf0174b
JJ
84292013-10-11 Jakub Jelinek <jakub@redhat.com>
8430
8431 * c-lang.h (current_omp_declare_target_attribute): New extern
8432 decl.
8433 * c-parser.c: Include c-lang.h.
8434 (struct c_parser): Change tokens to c_token *.
8435 Add tokens_buf field. Change tokens_avail type to unsigned int.
8436 (c_parser_consume_token): If parser->tokens isn't
8437 &parser->tokens_buf[0], increment parser->tokens.
8438 (c_parser_consume_pragma): Likewise.
8439 (enum pragma_context): Add pragma_struct and pragma_param.
8440 (c_parser_external_declaration): Adjust
8441 c_parser_declaration_or_fndef caller.
8442 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8443 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8444 Adjust recursive call.
8445 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8446 of pragma_external.
8447 (c_parser_parameter_declaration): Use pragma_param instead of
8448 pragma_external.
8449 (c_parser_compound_statement_nostart, c_parser_label,
8450 c_parser_for_statement): Adjust
8451 c_parser_declaration_or_fndef callers.
8452 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8453 it through to c_parser_conditional_expression.
8454 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8455 pass it through to c_parser_binary_expression. Adjust recursive
8456 call.
8457 (c_parser_binary_expression): Remove prec argument, add
8458 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8459 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8460 binop matches it, use build2 instead of parser_build_binary_op.
8461 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8462 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8463 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8464 Handle pragma_struct and pragma_param the same as pragma_external.
8465 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8466 (c_parser_omp_variable_list): Parse array sections for
8467 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8468 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8469 (c_parser_omp_clause_reduction): Handle user defined reductions.
8470 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8471 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8472 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8473 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8474 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8475 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8476 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8477 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8478 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8479 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8480 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8481 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8482 (c_parser_omp_for_loop): Add CODE argument, pass it through
8483 to c_finish_omp_for. Change last argument to cclauses,
8484 and adjust uses to grab parallel clauses from the array of all
8485 the split clauses. Adjust c_parser_binary_expression,
8486 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8487 (omp_split_clauses): New function.
8488 (c_parser_omp_simd): New function.
8489 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8490 Allow the function to be called also when parsing combined constructs,
8491 and call c_parser_omp_simd when parsing for simd.
8492 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8493 #pragma omp section, require exactly one structured-block instead of
8494 sequence of statements.
8495 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8496 Allow the function to be called also when parsing combined constructs.
8497 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8498 Allow the function to be called also when parsing combined
8499 constructs.
8500 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8501 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8502 c_parser_omp_teams, c_parser_omp_target_data,
8503 c_parser_omp_target_update, c_parser_omp_target,
8504 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8505 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8506 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8507 (c_parser_omp_construct): Add p_name and mask vars. Handle
8508 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8509 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8510 and c_parser_omp_sections callers.
8511 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8512 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8513 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8514 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8515 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8516 OMP_CLAUSE_DEPEND.
8517 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8518 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8519 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8520 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8521 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8522 * c-typeck.c: Include tree-inline.h.
8523 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8524 handle_omp_array_sections_1, handle_omp_array_sections,
8525 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8526 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8527 user defined reductions.
8528 (c_tree_equal): New function.
8529 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8530 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8531 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8532 c_check_omp_declare_reduction_r): New prototypes.
8533 * c-decl.c (current_omp_declare_target_attribute): New variable.
8534 (c_decl_attributes): New function.
8535 (start_decl, start_function): Use it instead of decl_attributes.
8536 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8537 c_omp_reduction_decl, c_omp_reduction_lookup,
8538 c_check_omp_declare_reduction_r): New functions.
8539
0a6c2227
TT
85402013-09-25 Tom Tromey <tromey@redhat.com>
8541
8542 * Make-lang.in (c/gccspec.o): Remove.
8543 (CFLAGS-c/gccspec.o): New variable.
8544 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8545 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8546 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8547
f3bc55f0
TT
85482013-09-25 Tom Tromey <tromey@redhat.com>
8549
8550 * Make-lang.in (c/gccspec.o): Don't use subshell.
8551
a24d975c
MP
85522013-09-18 Marek Polacek <polacek@redhat.com>
8553
8554 PR sanitize/58443
8555 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8556 Remove unnecessary check.
8557
ce6923c5
MP
85582013-09-18 Marek Polacek <polacek@redhat.com>
8559
8560 PR sanitizer/58411
8561 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8562 no_sanitize_undefined attribute.
8563
a1e51df9
KT
85642013-09-13 Kai Tietz <ktietz@redhat.com>
8565
8566 PR target/57848
8567 * c-decl.c (c_builtin_function_ext_scope): Remove
8568 wrong assumption that it is never called on prexisting
8569 symbol.
8570
0af94e6f
JR
85712013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8572
8573 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8574
20059c8b
GDR
85752013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8576
8577 * c-objc-common.c (c_tree_printer): Tidy.
8578
de5a5fa1
MP
85792013-08-30 Marek Polacek <polacek@redhat.com>
8580
8581 * c-typeck.c (build_binary_op): Add division by zero and shift
8582 instrumentation.
8583
2531a1d9 85842013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8585 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8586
6e2bcc98 8587 PR c/35649
2531a1d9
JR
8588 * c-typeck.c (c_common_type): Prefer double_type_node over
8589 other REAL_TYPE types with the same precision.
8590 (convert_arguments): Likewise.
8591
025311c4
GDR
85922013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8593
8594 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8595 (c_initialize_diagnostics): Call a destructor for the early printer.
8596
da6ca2b5
GDR
85972013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8598
8599 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8600 printer initialization.
8601
318cda85 86022013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8603
318cda85
BI
8604 PR c/57490
8605 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8606 check for truth values.
8607 (expand_array_notation_exprs): Added truth values case. Removed an
8608 unwanted else. Added for-loop to walk through subtrees in default
8609 case.
8610
b066401f
GDR
86112013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8612
8613 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8614
fb48aadc
JM
86152013-07-23 Joseph Myers <joseph@codesourcery.com>
8616
8617 * c-parser.c (struct c_generic_association): Fix typo.
8618
433cc7b0
TT
86192013-07-23 Tom Tromey <tromey@redhat.com>
8620 Joseph Myers <joseph@codesourcery.com>
8621
8622 * c-parser.c (struct c_generic_association): New.
8623 (c_generic_association_d): New typedef.
8624 (c_parser_generic_selection): New function.
8625 (c_parser_postfix_expression): Handle RID_GENERIC.
8626
26d40c3d
JM
86272013-07-13 Jason Merrill <jason@redhat.com>
8628
8629 PR c++/57793
8630 * c-decl.c (finish_struct): Check for too-large class.
8631
ecdbd01a 86322013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8633
8634 PR c/57821
8635 * c-typeck.c (set_init_index): When folding, check for index overflow.
8636
1141ed3f
BI
86372013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8638
8639 * c-parser.c (c_parser_array_notation): Removed rejection of array
8640 notations in an array of function pointers.
8641
713b46fa
BI
86422013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8643
8644 * c-array-notation.c (make_triplet_val_inv): New function.
8645 (create_cmp_incr): Likewise.
8646 (create_array_refs): Likewise.
8647 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8648 Also modularized common parts between functions and called the function.
8649 (build_array_notation_expr): Likewise.
8650 (fix_conditional_array_notations_1): Likewise.
8651 (fix_array_notation_expr): Likewise.
8652 (fix_array_notation_call_expr): Likewise.
8653
92f20202
MP
86542013-06-18 Marek Polacek <polacek@redhat.com>
8655
8656 PR c/57630
8657 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8658
73a23b06
BI
86592013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8660
8661 * c-array-notation.c (build_array_notation_expr): Reject array notation
8662 mismatch between LHS and RHS even inside a call_expr. Also, removed
8663 a couple while statements that were dead code.
8664
00b8517d
BI
86652013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8666
8667 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8668 excessive precision expressions in function parameters. Also removed
8669 couple unwanted while statements.
8670
1509bdda
BI
86712013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8672
8673 * c-array-notation.c (expand_array_notation_exprs): Added
8674 ARRAY_NOTATION_REF case.
ab20d992 8675
d60f1706
BI
86762013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8677
8678 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8679 function to c-family/array-notation-common.c.
8680 (is_cilkplus_reduce_builtin): Likewise.
8681 (find_rank): Likewise.
8682 (extract_array_notation_exprs): Likewise.
8683 (replace_array_notations): Likewise.
8684 (find_inv_trees): Likewise.
8685 (replace_inv_trees): Likewise.
8686 (contains_array_notation_expr): Likewise.
8687 (find_correct_array_notation_type): Likewise.
8688 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8689 (struct inv_list): Moved this to c-family/array-notation-common.c.
8690 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8691
6d6efbb3
BI
86922013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8693
8694 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8695 reduction functions outside the for-loop. Added a check if the fundecl
8696 is non-NULL. Finally, removed an unwanted if-statement, and made the
8697 body unconditional.
8698
25c22937
BI
86992013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8700
8701 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8702 condition of the if-statement matches the rank of else-block and then-
8703 block when array notations are used.
8704 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8705 expression after the entire function body is parsed.
8706 (c_parser_expr_no_commas): Delayed creating array notation expressions
8707 to the end of function parsing.
8708 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8709 whole if-statement instead of just the condition.
ab20d992 8710 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8711
edd25645
BI
87122013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8713
8714 PR c/57474
8715 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8716 array to NULL_TREE if they are unused. Also added a check for the
8717 field to be NULL before its fields are used in future.
ab20d992 8718
065ce7f1
RO
87192013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8720
8721 PR bootstrap/57450
8722 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8723 (build_array_notation_expr): Likewise.
8724
36536d79
BI
87252013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8726
8727 * c-typeck.c (build_array_ref): Added a check to see if array's
8728 index is greater than one. If true, then emit an error.
8729 (build_function_call_vec): Exclude error reporting and checking
8730 for builtin array-notation functions.
8731 (convert_arguments): Likewise.
8732 (c_finish_return): Added a check for array notations as a return
8733 expression. If true, then emit an error.
8734 (c_finish_loop): Added a check for array notations in a loop
8735 condition. If true then emit an error.
8736 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8737 (build_binary_op): Added a check for array notation expr inside
8738 op1 and op0. If present, we call another function to find correct
8739 type.
8740 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8741 * c-parser.c (c_parser_compound_statement): Check if array
8742 notation code is used in tree, if so, then transform them into
8743 appropriate C code.
8744 (c_parser_expr_no_commas): Check if array notation is used in LHS
8745 or RHS, if so, then build array notation expression instead of
8746 regular modify.
8747 (c_parser_postfix_expression_after_primary): Added a check for
8748 colon(s) after square braces, if so then handle it like an array
8749 notation. Also, break up array notations in unary op if found.
8750 (c_parser_direct_declarator_inner): Added a check for array
8751 notation.
8752 (c_parser_compound_statement): Added a check for array notation in
8753 a stmt. If one is present, then expand array notation expr.
8754 (c_parser_if_statement): Likewise.
8755 (c_parser_switch_statement): Added a check for array notations in
8756 a switch statement's condition. If true, then output an error.
8757 (c_parser_while_statement): Similarly, but for a while.
8758 (c_parser_do_statement): Similarly, but for a do-while.
8759 (c_parser_for_statement): Similarly, but for a for-loop.
8760 (c_parser_unary_expression): Check if array notation is used in a
8761 pre-increment or pre-decrement expression. If true, then expand
8762 them.
8763 (c_parser_array_notation): New function.
8764 * c-array-notation.c: New file.
8765 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8766
cd192ccc
MS
87672013-05-23 Mike Stump <mikestump@comcast.net>
8768
8769 * c-typeck.c (convert_for_assignment): Handle references to memory
8770 spaces better.
8771
427b248d
JM
87722013-05-16 Jason Merrill <jason@redhat.com>
8773
8774 * Make-lang.in (cc1$(exeext)): Use link mutex.
8775
44d90fe1
PC
87762013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8777
8778 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8779 to simply use OPT_Wpointer_arith.
8780 (build_unary_op): Likewise.
8781
4e7d7b3d
JJ
87822013-04-03 Jakub Jelinek <jakub@redhat.com>
8783
8784 PR c/19449
8785 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8786 argument. If set, or it temporarily for parsing of the first
8787 argument into force_folding_builtin_constant_p.
8788 (c_parser_postfix_expression): Adjust callers.
8789
839b422f
RB
87902013-03-21 Richard Biener <rguenther@suse.de>
8791
8792 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8793 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8794
2ee028f1
MP
87952013-02-12 Marek Polacek <polacek@redhat.com>
8796
8797 PR c/44938
8798 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8799 origtypes to NULL.
8800
8824edff
JJ
88012013-01-24 Jakub Jelinek <jakub@redhat.com>
8802
8803 PR c/56078
8804 * c-typeck.c (set_nonincremental_init_from_string): If
8805 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8806 returned false.
8807 (process_init_element): Likewise.
8808
eadd3d0d
JJ
88092012-12-20 Jakub Jelinek <jakub@redhat.com>
8810
8811 PR c++/55619
8812 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8813 argument, don't call default_function_array_conversion
8814 nor c_fully_fold here.
8815 (c_parser_asm_statement): Adjust callers.
8816 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8817 and outputs here, and call default_function_array_conversion
8818 on inputs that don't need to be addressable.
8819
f8a93a2e
JJ
88202012-12-18 Jakub Jelinek <jakub@redhat.com>
8821
8822 PR c/39464
8823 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8824 warning require that both c_common_unsigned_type as well as
8825 c_common_signed_type is the same for both mvl and mvr types.
8826
9771b263
DN
88272012-11-16 Diego Novillo <dnovillo@google.com>
8828
8829 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8830
8831 * c-common.c: Use new vec API in vec.h.
8832 * c-common.h: Likewise.
8833 * c-gimplify.c: Likewise.
8834 * c-pragma.c: Likewise.
8835 * c-pretty-print.c: Likewise.
8836 * c-pretty-print.h: Likewise.
8837 * c-semantics.c: Likewise.
8838 * c-decl.c: Likewise.
8839 * c-parser.c: Likewise.
8840 * c-tree.h: Likewise.
8841 * c-typeck.c: Likewise.
8842
880661a4
JW
88432012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8844
8845 PR c++/54930
8846 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8847
077d1abe
MLI
88482012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8849
8850 PR c/53066
8851 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8852 shadows a function, unless the variable is a function or a
8853 pointer-to-function.
8854
3a785c97
JJ
88552012-10-12 Jakub Jelinek <jakub@redhat.com>
8856
8857 PR c/54381
8858 * c-parser.c (struct c_tree_loc_pair): Removed.
8859 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8860 add location_t * and tree * arguments, fill in array of 3
8861 sizeof_arg trees and corresponding locs.
8862 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8863 c_parser_expr_list callers.
8864 (c_parser_postfix_expression_after_primary): Likewise. Pass
8865 array of 3 sizeof_arg trees and locs (corresponding to first
8866 3 arguments) to sizeof_pointer_memaccess_warning.
8867
703c8606
LC
88682012-10-09 Lawrence Crowl <crowl@google.com>
8869
8870 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8871 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8872 hash table.
8873
5d9de0d0
PC
88742012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8875
8876 PR c++/54194
8877 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8878 call.
8879
a212e43f
MG
88802012-10-09 Marc Glisse <marc.glisse@inria.fr>
8881
8882 PR c++/54427
8883 * c-typeck.c: Include c-common.h.
8884 (enum stv_conv): Moved to c-common.h.
8885 (scalar_to_vector): Moved to c-common.c.
8886 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8887 * Make-lang.in: c-typeck.c depends on c-common.h.
8888
3b78de56
AC
88892012-10-04 Arnaud Charlet <charlet@adacore.com>
8890
8891 * c-decl.c (c_write_global_declarations): Fix handling of
8892 -fdump-ada-spec*.
8893
78c60e3d
SS
88942012-09-30 Sharad Singhai <singhai@google.com>
8895
8896 * c-decl.c (c_write_global_declarations): Use a different method
8897 to determine if the dump has ben initialized.
8898
9f33203d
JM
88992012-09-14 Joseph Myers <joseph@codesourcery.com>
8900
8901 PR c/54552
8902 * c-typeck.c (c_cast_expr): When casting to a type requiring
8903 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8904 c_fully_fold first.
8905
a27d595d
JM
89062012-09-14 Joseph Myers <joseph@codesourcery.com>
8907
8908 PR c/54103
8909 * c-typeck.c (build_unary_op): Pass original argument of
8910 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8911 any C_MAYBE_CONST_EXPR, if it has integer operands.
8912 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8913 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8914 to c_objc_common_truthvalue_conversion, then remove any
8915 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8916 c_objc_common_truthvalue_conversion not
8917 c_common_truthvalue_conversion.
8918 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8919 call note_integer_operands for arguments with integer operands
8920 that are not integer constants.
8921
9feb29df
JJ
89222012-09-13 Jakub Jelinek <jakub@redhat.com>
8923
8924 PR c/54559
8925 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8926 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8927
d409320c
JJ
89282012-08-31 Jakub Jelinek <jakub@redhat.com>
8929
8930 PR c/54428
8931 * c-convert.c (convert): Don't call fold_convert_loc if
8932 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8933 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8934 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8935
6265d07c
JJ
89362012-08-24 Jakub Jelinek <jakub@redhat.com>
8937
8938 PR c/54355
8939 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8940 for nested and empty_ok arguments in the call to
8941 c_parser_declaration_or_fndef.
8942
1a4049e7
JJ
89432012-08-17 Jakub Jelinek <jakub@redhat.com>
8944
8945 * c-tree.h (c_last_sizeof_arg): Declare.
8946 * c-parser.c (struct c_tree_loc_pair): New type.
8947 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8948 non-NULL.
8949 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8950 (c_parser_postfix_expression_after_primary): Likewise. Call
8951 sizeof_pointer_memaccess_warning if needed.
8952 (sizeof_ptr_memacc_comptypes): New function.
8953 * c-typeck.c (c_last_sizeof_arg): New global variable.
8954 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8955
0229aee9
UB
89562012-07-24 Uros Bizjak <ubizjak@gmail.com>
8957
8958 * c-lang.h (lang_decl): Add variable_size GTY option.
8959
7ee2468b
SB
89602012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8961
8962 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8963 * Make-lang.in: Fix dependencies.
8964
d4a10d0a
SB
89652012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8966
8967 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8968 and add language Makefile hooks.
8969 * config-lang.in: New file.
8970 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8971 add the required "normal" config-lang.in rules.
8972 * c-lang.h: Moved from gcc/ to here.
8973 * c-tree.h: Likewise.
8974 * c-objc-common.c: Likewise.
8975 * c-objc-common.h: Likewise.
8976 * c-typeck.c: Likewise.
8977 * c-convert.c: Likewise.
8978 * c-lang.c: Likewise.
8979 * c-aux-info.c: Likewise.
8980 * c-errors.c: Likewise.
8981 * gccspec.c: Likewise.
8982 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8983 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8984\f
877e3c2a 8985Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8986
8987Copying and distribution of this file, with or without modification,
8988are permitted in any medium without royalty provided the copyright
8989notice and this notice are preserved.