]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Modula-2: fix documentation layout
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
d808db1f
GA
12023-01-06 Joseph Myers <joseph@codesourcery.com>
2
3 * c-parser.cc (c_parser_postfix_expression): Handle integer
4 generic arguments to functions passed to __builtin_tgmath as
5 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
6 Do not handle integer arguments to some narrowing functions as
7 _Float64.
8
d2ef2327
GA
92022-12-19 Jakub Jelinek <jakub@redhat.com>
10
11 PR c/108043
12 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
13 compound literals with function type.
14
4bc2d9f6
GA
152022-12-07 Joseph Myers <joseph@codesourcery.com>
16
17 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
18 auto, constexpr and a type used together.
19
3fe66f7f
GA
202022-12-06 Qing Zhao <qing.zhao@oracle.com>
21
22 * c-decl.cc (is_flexible_array_member_p): Call new function
23 strict_flex_array_level_of.
24
9a1b4f1d
GA
252022-11-24 Florian Weimer <fweimer@redhat.com>
26
27 PR c/107805
28 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
29 from type to specs.
30
add89840
GA
312022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
32
33 * c-decl.cc (start_function): Set the result decl source
34 location to the location of the typespec.
35
362022-11-17 David Malcolm <dmalcolm@redhat.com>
37
38 PR analyzer/107711
39 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
40 to cpp_create_reader, rather than ident_hash, so that the new
41 reader gets its own hash table.
42
cdc34229
GA
432022-11-15 David Malcolm <dmalcolm@redhat.com>
44
45 PR analyzer/106302
46 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
47 (class ana::c_translation_unit): New.
48 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
49
30d77d49
GA
502022-11-12 Joseph Myers <joseph@codesourcery.com>
51
52 * c-decl.cc (start_underspecified_init)
53 (finish_underspecified_init): Handle name == NULL_TREE for
54 compound literals.
55 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
56 (shadow_tag_warned): Check for constexpr.
57 (start_decl): Add parameter do_push.
58 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
59 (grokdeclarator): Handle constexpr.
60 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
61 (declspecs_add_scspec): Handle constexpr.
62 * c-parser.cc (c_token_starts_compound_literal)
63 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
64 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
65 (c_parser_compound_literal_scspecs)
66 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
67 Update calls to start_init.
68 (c_parser_declaration_or_fndef, c_parser_initializer)
69 (c_parser_initval): Pass true for new argument of
70 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
71 constexpr compound literals.
72 (c_parser_static_assert_declaration_no_semi)
73 (c_parser_enum_specifier, c_parser_struct_declaration)
74 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
75 Call convert_lvalue_to_rvalue on expressions required to be
76 integer constant expressions.
77 (c_parser_omp_declare_reduction): Update call to start_init.
78 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
79 (C_DECL_DECLARED_CONSTEXPR): New macros.
80 (struct c_declspecs): Add constexpr_p.
81 (start_decl, convert_lvalue_to_rvalue, start_init): Update
82 prototypes.
83 * c-typeck.cc (require_constant_value, require_constant_elements):
84 Change to bool.
85 (require_constexpr_value, maybe_get_constexpr_init)
86 (constexpr_init_fits_real_type, check_constexpr_init): New.
87 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
88 maybe_get_constexpr_init.
89 (store_init_value): Update call to digest_init.
90 (digest_init): Add parameters int_const_expr, arith_const_expr and
91 require_constexpr. Check constexpr initializers.
92 (constructor_top_level): Remove.
93 (struct initializer_stack): Remove top_level. Add
94 require_constexpr_value.
95 (start_init): Remove parameter top_level. Add parameters
96 init_require_constant and init_require_constexpr. Save
97 require_constexpr_value on stack.
98 (pop_init_level): Use a null pointer constant for zero initializer
99 of pointer initialized with {}.
100 (output_init_element): Update call to digest_init. Avoid passing
101 null pointer constants of pointer type through digest_init a
102 second time when initializing a constexpr object.
103
d29260ce
GA
1042022-11-03 Joseph Myers <joseph@codesourcery.com>
105
106 * c-decl.cc (in_underspecified_init, start_underspecified_init)
107 (finish_underspecified_init): New.
108 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
109 Give errors inside initializers of underspecified declarations.
110 (grokdeclarator): Handle (erroneous) case of C2X auto on a
111 parameter.
112 (declspecs_add_type): Handle c2x_auto_p case.
113 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
114 C2X mode.
115 (finish_declspecs): Handle c2x_auto_p.
116 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
117 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
118 (struct c_declspecs): Add c2x_auto_p.
119 (start_underspecified_init, finish_underspecified_init): New
120 prototypes.
121 * c-typeck.cc (build_external_ref): Give error for underspecified
122 declaration referenced in its initializer.
123
3055829a
GA
1242022-10-28 Joseph Myers <joseph@codesourcery.com>
125
126 * c-decl.cc (grokdeclarator): Pass
127 arg_info->no_named_args_stdarg_p to build_function_type.
128 (grokparms): Check arg_info->no_named_args_stdarg_p before
129 converting () to (void).
130 (build_arg_info): Initialize no_named_args_stdarg_p.
131 (get_parm_info): Set no_named_args_stdarg_p.
132 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
133 build_function_type.
134 (store_parm_decls): Count (...) functions as prototyped.
135 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
136 parenthesis to start parameter list.
137 (c_parser_parms_list_declarator): Always allow '...' with no
138 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
139 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
140 * c-typeck.cc (composite_type): Handle
141 TYPE_NO_NAMED_ARGS_STDARG_P.
142 (function_types_compatible_p): Compare
143 TYPE_NO_NAMED_ARGS_STDARG_P.
144
1452022-10-28 Jakub Jelinek <jakub@redhat.com>
146
147 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
148 comma before the first clause.
149 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
150 c_parser_omp_flush, c_parser_omp_scan_loop_body,
151 c_parser_omp_ordered, c_finish_omp_declare_variant,
152 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
153 c_parser_omp_requires, c_parser_omp_error,
154 c_parser_omp_assumption_clauses): Likewise.
155
1562022-10-28 Joseph Myers <joseph@codesourcery.com>
157
158 PR c/61469
159 * c-convert.cc (c_convert): Handle enums with underlying boolean
160 type like bool.
161 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
162 enums with enum type specifier, but give errors for storage class
163 specifiers, qualifiers or alignment specifiers in non-definition
164 declarations of such enums.
165 (grokdeclarator): Give error for non-definition use of type
166 specifier with an enum type specifier.
167 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
168 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
169 (xref_tag): Update call to parser_xref_tag.
170 (start_enum): Add argument fixed_underlying_type. Complete enum
171 type with a fixed underlying type given in the definition. Give
172 error for defining without a fixed underlying type in the
173 definition if one was given in a prior declaration. Do not mark
174 enums with fixed underlying type as packed for -fshort-enums.
175 Store the enum type in the_enum.
176 (finish_enum): Do not adjust types of values or check their range
177 for an enum with a fixed underlying type. Set underlying type of
178 enum and variants.
179 (build_enumerator): Check enumeration constants for enum with
180 fixed underlying type against that type and convert to that type.
181 Increment in the underlying integer type, with handling for bool.
182 (c_simulate_enum_decl): Update call to start_enum.
183 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
184 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
185 rather than recomputing an underlying type based on size.
186 * c-parser.cc (c_parser_declspecs)
187 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
188 Set has_enum_type_specifier for type specifiers.
189 (c_parser_enum_specifier): Handle enum type specifiers.
190 (c_parser_struct_or_union_specifier): Update call to
191 parser_xref_tag.
192 (c_parser_omp_atomic): Check for boolean increment or decrement
193 using C_BOOLEAN_TYPE_P.
194 * c-tree.h (C_BOOLEAN_TYPE_P): New.
195 (struct c_typespec): Add has_enum_type_specifier.
196 (struct c_declspecs): Add enum_type_specifier_ref_p.
197 (struct c_enum_contents): Add enum_type.
198 (start_enum, parser_xref_tag): Update prototypes.
199 * c-typeck.cc (composite_type): Allow for enumerated types
200 compatible with bool.
201 (common_type, comptypes_internal, perform_integral_promotions):
202 Use ENUM_UNDERLYING_TYPE.
203 (parser_build_binary_op, build_unary_op, convert_for_assignment)
204 (c_finish_return, c_start_switch, build_binary_op): Check for
205 boolean types using C_BOOLEAN_TYPE_P.
206
4e939ae1
GA
2072022-10-24 Jakub Jelinek <jakub@redhat.com>
208
209 PR c++/107358
210 * c-typeck.cc (build_binary_op): Pass operands before excess precision
211 promotions to scalar_to_vector call.
212
2132022-10-24 Arsen Arsenović <arsen@aarsen.me>
214
215 * c-decl.cc (finish_function): Ignore hosted when deciding
216 whether to implicitly return zero, but check noreturn.
217 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
218 requirements to just MAIN_NAME_P when hosted, or `int main'
219 otherwise.
220
47a6ae56
GA
2212022-10-20 Richard Biener <rguenther@suse.de>
222
223 PR c/107305
224 PR c/107306
225 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
226 the parsed IL and zap the body on error.
227
21de009f
GA
2282022-10-18 Joseph Myers <joseph@codesourcery.com>
229
230 PR c/107164
231 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
232 with previous declaration visible.
233
2342022-10-18 Joseph Myers <joseph@codesourcery.com>
235
236 PR c/36113
237 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
238 convert all to the type of the enumeration. pedwarn if no integer
239 type fits all enumerators and default to
240 widest_integer_literal_type_node in that case. Otherwise pedwarn
241 for type wider than intmax_t.
242 (build_enumerator): pedwarn for enumerators outside the range of
243 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
244 enumerators outside the range of int. On overflow, attempt to
245 find a wider type that can hold the value of the next enumerator.
246 Do not convert value to type determined with
247 c_common_type_for_size.
248
baeec7cc
GA
2492022-10-14 Jakub Jelinek <jakub@redhat.com>
250
251 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
252 double.
253
2542022-10-14 Joseph Myers <joseph@codesourcery.com>
255
256 * c-decl.cc (build_compound_literal): Add parameter scspecs.
257 Handle storage class specifiers.
258 * c-parser.cc (c_token_starts_compound_literal)
259 (c_parser_compound_literal_scspecs): New.
260 (c_parser_postfix_expression_after_paren_type): Add parameter
261 scspecs. Call pedwarn_c11 for use of storage class specifiers.
262 Update call to build_compound_literal.
263 (c_parser_cast_expression, c_parser_sizeof_expression)
264 (c_parser_alignof_expression): Handle storage class specifiers for
265 compound literals. Update calls to
266 c_parser_postfix_expression_after_paren_type.
267 (c_parser_postfix_expression): Update syntax comment.
268 * c-tree.h (build_compound_literal): Update prototype.
269 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
270 register compound literal.
271
9ff6c33e
GA
2722022-10-07 Qing Zhao <qing.zhao@oracle.com>
273
274 * c-decl.cc (flexible_array_member_type_p): New function.
275 (one_element_array_type_p): Likewise.
276 (zero_length_array_type_p): Likewise.
277 (add_flexible_array_elts_to_size): Call new utility
278 routine flexible_array_member_type_p.
279 (is_flexible_array_member_p): New function.
280 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
281
629d04d3
GA
2822022-10-06 Joseph Myers <joseph@codesourcery.com>
283
284 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
285 and not C2x.
286 (c_keyword_starts_typename, c_token_starts_declspecs)
287 (c_parser_declspecs, c_parser_objc_selector): Handle
288 RID_TYPEOF_UNQUAL.
289 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
290 Distinguish typeof for C2x from __typeof__ for all standard
291 versions and typeof before C2x.
292 * c-typeck.cc (build_function_call_vec): Use unqualified version
293 of non-void return type.
294 (build_unary_op): Use unqualified type for increment and
295 decrement.
296
2972022-10-06 Jakub Jelinek <jakub@redhat.com>
298
299 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
300 call for holds clause on assume construct.
301
3022022-10-06 Jakub Jelinek <jakub@redhat.com>
303
304 PR c++/106654
305 * c-parser.cc (handle_assume_attribute): New function.
306 (c_parser_declaration_or_fndef): Handle assume attribute.
307 (c_parser_attribute_arguments): Add assume_attr argument,
308 if true, parse first argument as conditional expression.
309 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
310 c_parser_attribute_arguments callers.
311 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
312 assume attribute.
313
85872a69
GA
3142022-10-04 Jakub Jelinek <jakub@redhat.com>
315
316 * c-lang.h (struct c_omp_declare_target_attr): New type.
317 (current_omp_declare_target_attribute): Change type from
318 int to vec<c_omp_declare_target_attr, va_gc> *.
319 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
320 If last pushed directive was begin declare target, use different
321 wording and simplify format strings for easier translations.
322 (c_parser_omp_clause_device_type): Uncomment
323 check_no_duplicate_clause call.
324 (c_parser_omp_declare_target): Adjust for the
325 current_omp_declare_target_attribute type change, push { -1 }.
326 Use error_at rather than warning_at for declare target with
327 only device_type clauses.
328 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
329 (c_parser_omp_begin): Add begin declare target support.
330 (c_parser_omp_end): Adjust for the
331 current_omp_declare_target_attribute type change, adjust
332 diagnostics wording and simplify format strings for easier
333 translations.
334 * c-decl.cc (current_omp_declare_target_attribute): Change type from
335 int to vec<c_omp_declare_target_attr, va_gc> *.
336 (c_decl_attributes): Adjust for the
337 current_omp_declare_target_attribute type change. If device_type
338 was present on begin declare target, add "omp declare target host"
339 and/or "omp declare target nohost" attributes.
340
bbdcdf5c
GA
3412022-09-29 Joseph Myers <joseph@codesourcery.com>
342
343 * c-decl.cc (handle_std_noreturn_attribute): New function.
344 (std_attribute_table): Add _Noreturn and noreturn.
345
1f16a020
GA
3462022-09-27 Jakub Jelinek <jakub@redhat.com>
347
348 * c-lang.h (current_omp_begin_assumes): Declare.
349 * c-parser.cc: Include bitmap.h.
350 (c_parser_omp_end_declare_target): Rename to ...
351 (c_parser_omp_end): ... this. Handle also end assumes.
352 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
353 c_parser_omp_assumes, c_parser_omp_assume): New functions.
354 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
355 without corresponding #pragma omp end assumes.
356 (c_parser_pragma): Use %s in may only be used at file scope
357 diagnostics to decrease number of translatable messages. Handle
358 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
359 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
360 for it rather than c_parser_omp_end_declare_target.
361 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
362 * c-decl.cc (current_omp_begin_assumes): Define.
363
28a61ecd
GA
3642022-09-24 Jakub Jelinek <jakub@redhat.com>
365
366 PR c/106981
367 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
368 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
369 t2 have different types.
370
279c6715
GA
3712022-09-22 David Malcolm <dmalcolm@redhat.com>
372
373 PR c/106830
374 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
375 (c_parser_cast_expression): Likewise.
376 (c_parser_alignof_expression): Likewise.
377 (c_parser_postfix_expression_after_paren_type): Likewise.
378 (c_parser_postfix_expression_after_primary): Likewise.
379 (c_parser_expression): Likewise.
380 (c_parser_omp_variable_list): Likewise.
381 (c_parser_transaction_expression): Likewise.
382 * c-tree.h (c_expr::set_error): Likewise.
383 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
384 (parser_build_unary_op): Likewise.
385 (parser_build_binary_op): Likewise.
386 (digest_init): Likewise.
387 (pop_init_level): Likewise.
388 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
389
43be56c4
GA
3902022-09-19 Marek Polacek <polacek@redhat.com>
391
392 PR c/106947
393 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
394 notes.
395
d0fc05e8
GA
3962022-09-15 Richard Biener <rguenther@suse.de>
397
398 * c-decl.cc (build_void_list_node): Remove.
399
ff822367
GA
4002022-09-14 Julian Brown <julian@codesourcery.com>
401
402 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
403 on error.
404
fe2a8ce9
GA
4052022-09-07 Joseph Myers <joseph@codesourcery.com>
406
407 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
408 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
409 for C2x spellings of keywords.
410 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
411
25aeb922
GA
4122022-09-06 Jakub Jelinek <jakub@redhat.com>
413
414 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
415 in omp_cur_iteration - 1 has integer_type_node type.
416
83f2f228
GA
4172022-09-03 Jakub Jelinek <jakub@redhat.com>
418
419 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
420 (c_parser_omp_clause_depend_sink): Renamed to ...
421 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
422 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
423 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
424 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
425 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
426 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
427 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
428 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
429 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
430 (c_parser_omp_clause_doacross): New function.
431 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
432 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
433 OMP_CLAUSE_DEPEND_SOURCE.
434 (c_parser_omp_for_loop): Don't diagnose here linear clause together
435 with ordered with argument.
436 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
437 for simd.
438 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
439 (c_parser_omp_ordered): Handle also doacross and adjust for it
440 diagnostic wording.
441 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
442 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
443
c64b0947
GA
4442022-09-02 David Malcolm <dmalcolm@redhat.com>
445
446 PR c/90885
447 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
448 (c_parser_expr_no_commas): Likewise.
449 (c_parser_conditional_expression): Likewise.
450 (c_parser_binary_expression): Clear m_decimal when popping the
451 stack.
452 (c_parser_unary_expression): Clear ret.m_decimal.
453 (c_parser_has_attribute_expression): Likewise for result.
454 (c_parser_predefined_identifier): Likewise for expr.
455 (c_parser_postfix_expression): Likewise for expr.
456 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
457 token.
458 * c-tree.h (c_expr::m_decimal): New bitfield.
459 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
460 (parser_build_binary_op): Call check_for_xor_used_as_pow.
461
bb0a1556
GA
4622022-09-01 Joseph Myers <joseph@codesourcery.com>
463
464 * c-decl.cc (grokparms): Handle () in a function declaration the
465 same as (void) for C2X.
466
542c60c4
GA
4672022-08-31 Joseph Myers <joseph@codesourcery.com>
468
469 * c-parser.cc (c_parser_label): Pass attributes to do_case.
470 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
471 c_add_case_label.
472
16f542d6
GA
4732022-08-26 Jakub Jelinek <jakub@redhat.com>
474
475 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
476
5d4389dc
GA
4772022-08-25 Marek Polacek <polacek@redhat.com>
478
479 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
480 Give a better diagnostic when converting to nullptr_t.
481 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
482 initialization.
483 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
484 (c_parser_postfix_expression): Handle RID_NULLPTR.
485 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
486 nullptr_node.
487 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
488 (build_conditional_expr): Handle the case when the second/third operand
489 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
490 (convert_for_assignment): Handle converting an expression of type
491 nullptr_t to pointer/bool.
492 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
493 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
494
4952022-08-25 Joseph Myers <joseph@codesourcery.com>
496
497 * c-decl.cc (start_decl): Do not diagnose initialization of
498 variable-sized objects here.
499 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
500 callers changed.
501 (c_parser_initializer): Diagnose initialization of variable-sized
502 objects other than with braced initializer.
503 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
504 braces and update diagnostic text. Diagnose initialization of
505 variable-sized objects with nonempty braces.
506 * c-typeck.cc (digest_init): Update diagnostic for initialization
507 of variable-sized objects.
508 (really_start_incremental_init, set_designator)
509 (process_init_element): Update comments.
510 (pop_init_level): Allow scalar empty initializers.
511
0342f034
GA
5122022-08-17 Tobias Burnus <tobias@codesourcery.com>
513 Chung-Lin Tang <cltang@codesourcery.com>
514
515 PR c++/104493
516 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
517 instead of removed langhook.
518 * c-typeck.cc (c_finish_omp_clauses): Likewise.
519
5cd525f0
GA
5202022-08-11 Marek Polacek <polacek@redhat.com>
521
522 PR middle-end/102633
523 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
524 Call suppress_warning.
525 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
526 (c_parser_omp_declare_reduction): Pass omp_priv down to
527 c_parser_initializer.
528
5f17badb
GA
5292022-08-08 Tom Honermann <tom@honermann.net>
530
531 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
532 of CPP_UTF8STRING when char8_t support is enabled.
533 * c-typeck.cc (digest_init): Allow initialization of an array
534 of character type by a string literal with type array of
535 char8_t.
536
32510382
GA
5372022-08-01 David Malcolm <dmalcolm@redhat.com>
538
539 * c-typeck.cc (build_c_cast): Quote names of address spaces in
540 diagnostics.
541 (convert_for_assignment): Add a note to address space mismatch
542 diagnostics, specifying the expected and actual types.
543
b53ebbc5
GA
5442022-07-10 Lewis Hyatt <lhyatt@gmail.com>
545
546 PR preprocessor/97498
547 * c-parser.cc (c_parser_pragma): Set input_location to the
548 location of the pragma, rather than the start of the line.
549
8467574d
GA
5502022-07-04 Tobias Burnus <tobias@codesourcery.com>
551 Chung-Lin Tang <cltang@codesourcery.com>
552 Thomas Schwinge <thomas@codesourcery.com>
553
554 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
555 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
556 OMP_REQUIRES_TARGET_USED.
557 (c_parser_omp_requires): Remove sorry.
558
ed974488
GA
5592022-07-01 Tobias Burnus <tobias@codesourcery.com>
560
561 * c-parser.cc (c_parser_omp_target_enter_data,
562 c_parser_omp_target_exit_data): Accept tofrom
563 map-type modifier but use 'to' / 'from' internally.
564
bc7e9f76
GA
5652022-06-16 David Malcolm <dmalcolm@redhat.com>
566
567 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
568 group the warning with any note.
569 (warn_about_goto): Likewise to group error or warning with note.
570 Bail out if the warning wasn't emitted, to avoid emitting orphan
571 notes.
572 (lookup_label_for_goto): Add auto_diagnostic_group to
573 group the error with the note.
574 (check_earlier_gotos): Likewise.
575 (c_check_switch_jump_warnings): Likewise for any error/warning.
576 Conditionalize emission of the notes.
577 (diagnose_uninitialized_cst_member): Likewise for warning,
578 conditionalizing emission of the note.
579 (grokdeclarator): Add auto_diagnostic_group to group the "array
580 type has incomplete element type" error with any note.
581 (parser_xref_tag): Add auto_diagnostic_group to group warnings
582 with their notes. Conditionalize emission of notes.
583 (start_struct): Add auto_diagnostic_group to group the
584 "redefinition of" errors with any note.
585 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
586 (check_for_loop_decls): Likewise for pre-C99 error.
587
445ba599
GA
5882022-06-07 Jakub Jelinek <jakub@redhat.com>
589
590 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
591 style linear clause modifiers. Set
592 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
593 old style modifiers are used.
594 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
595 with val modifier on simd or for if the old style modifiers are
596 used.
597
b168441c
GA
5982022-06-02 David Malcolm <dmalcolm@redhat.com>
599
600 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
601 (c_get_sarif_source_language): New.
602 * c-tree.h (c_get_sarif_source_language): New decl.
603
820ead45
GA
6042022-05-31 Jason Merrill <jason@redhat.com>
605
606 * Make-lang.in (c.tags): Look at *.cc.
607
6082022-05-31 Jakub Jelinek <jakub@redhat.com>
609
610 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
611 clauses.
612
37b3b5da
GA
6132022-05-28 Jakub Jelinek <jakub@redhat.com>
614
615 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
616 seen first, use "%<to%>" or "%<enter%>" depending on
617 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
618 "%<to%> or %<enter%>" wording.
619
d9176e64
GA
6202022-05-27 Jakub Jelinek <jakub@redhat.com>
621
622 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
623 (c_parser_omp_all_clauses): For to clause on declare target, use
624 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
625 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
626 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
627 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
628 OMP_CLAUSE_TO_DECLARE.
629 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
630 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
631 name in diagnostics instead of
632 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
633
3dff965c
GA
6342022-05-25 Jakub Jelinek <jakub@redhat.com>
635
636 PR c/91134
637 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
638 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
639 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
640 diagnostic and fixit hint if DATUM has pointer type.
641 * c-parser.cc (c_parser_postfix_expression,
642 c_parser_omp_variable_list): Adjust build_component_ref callers.
643 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
644 Likewise.
645
768f49a2
GA
6462022-05-24 Jakub Jelinek <jakub@redhat.com>
647
648 PR c/105378
649 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
650
1cda629f
GA
6512022-05-18 Marek Polacek <polacek@redhat.com>
652
653 PR c/105131
654 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
655 mismatches.
656 * c-tree.h (comptypes_check_enum_int): Declare.
657 * c-typeck.cc (comptypes): No longer static.
658
3d9439b1
GA
6592022-05-17 Marek Polacek <polacek@redhat.com>
660
661 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
662 its value.
663
6642022-05-17 Jakub Jelinek <jakub@redhat.com>
665
666 * c-parser.cc (c_parser_omp_clause_depend): Parse
667 inoutset depend-kind.
668 (c_parser_omp_depobj): Likewise.
669
702bd11f
GA
6702022-05-16 Martin Liska <mliska@suse.cz>
671
672 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
673
49ace834
GA
6742022-05-12 Jakub Jelinek <jakub@redhat.com>
675
676 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
677 if flag_openmp.
678 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
679 in postfix expressions.
680 (c_parser_omp_variable_list): Handle omp_all_memory in depend
681 clause.
682 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
683 keyword in depend clause as null_pointer_node, diagnose invalid
684 uses.
685
bd022ff9
GA
6862022-05-09 Martin Liska <mliska@suse.cz>
687
688 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
689 macros.
690 (c_parser_binary_expression): Likewise.
691
a1947c92
GA
6922022-05-07 Marek Polacek <polacek@redhat.com>
693
694 PR c++/101833
695 PR c++/47634
696 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
697
405eda0d
GA
6982022-04-08 Jakub Jelinek <jakub@redhat.com>
699
700 PR c/105149
701 * c-typeck.cc (c_build_va_arg): Reject function types.
702
a2287813
GA
7032022-03-22 Marek Polacek <polacek@redhat.com>
704
705 PR c/82283
706 PR c/84685
707 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
708 (start_init): Set it.
709 (finish_init): Restore constructor_designated.
710 (push_init_level): Set constructor_designated to the value of
711 constructor_designated in the upper constructor_stack.
712
57eeedda
GA
7132022-03-12 Thomas Schwinge <thomas@codesourcery.com>
714
715 PR other/65095
716 * c-typeck.cc (handle_omp_array_sections_1)
717 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
718 instead of 'c_omp_map_clause_name'.
719
8cc4f9cd
GA
7202022-03-09 Joseph Myers <joseph@codesourcery.com>
721
722 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
723 differently from earlier standards for unprototyped function type
724 compatibility.
725
7262022-03-09 Jakub Jelinek <jakub@redhat.com>
727
728 PR c/104711
729 * c-fold.cc (c_fully_fold_internal): Don't emit
730 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
731 * c-typeck.cc (build_binary_op): Likewise.
732
e6533e2e
GA
7332022-03-07 Jakub Jelinek <jakub@redhat.com>
734
735 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
736 literal.
737
4bf3bac1
GA
7382022-02-23 Richard Biener <rguenther@suse.de>
739
740 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
741 SSA names without definition.
742 (c_parser_gimple_declaration): Handle pointer typed SSA names.
743
0bdb0498
GA
7442022-02-17 Jakub Jelinek <jakub@redhat.com>
745
746 PR c/104532
747 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
748 convert_lvalue_to_rvalue and build_indirect_ref instead of
749 build_simple_mem_ref.
750
e8d68f0a
GA
7512022-02-11 Richard Biener <rguenther@suse.de>
752
753 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
754 VEC_COND_EXPRs.
755
a645583d
GA
7562022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
757
758 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
759 clause.
760 (c_parser_omp_variable_list): Handle array sections.
761 (c_parser_omp_clause_has_device_addr): Added.
762 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
763 case.
764 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
765 OMP_CLAUSE_MASK.
766 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
767 (c_finish_omp_clauses): Handle array sections.
768
3adf509f
GA
7692022-02-09 Jakub Jelinek <jakub@redhat.com>
770
771 PR c/104427
772 * c-parser.cc (c_parser_postfix_expression)
773 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
774 instead of build1_loc to build PAREN_EXPR.
775 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
776 * c-fold.cc (c_fully_fold_internal): Likewise.
777
fc829782
GA
7782022-01-17 Martin Liska <mliska@suse.cz>
779
780 * Make-lang.in: Rename .c names to .cc.
781 * c-convert.cc: Likewise.
782 * c-decl.cc (struct lang_identifier): Likewise.
783 (pop_scope): Likewise.
784 (finish_decl): Likewise.
785 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
786 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
787 * c-parser.h (GCC_C_PARSER_H): Likewise.
788 * c-tree.h (c_keyword_starts_typename): Likewise.
789 (finish_declspecs): Likewise.
790 (c_get_alias_set): Likewise.
791 (enum c_oracle_request): Likewise.
792 (tag_exists_p): Likewise.
793 (set_c_expr_source_range): Likewise.
794 * c-typeck.cc (c_common_type): Likewise.
795 (c_finish_omp_clauses): Likewise.
796 * config-lang.in: Likewise.
797
7982022-01-17 Martin Liska <mliska@suse.cz>
799
800 * c-aux-info.c: Moved to...
801 * c-aux-info.cc: ...here.
802 * c-convert.c: Moved to...
803 * c-convert.cc: ...here.
804 * c-decl.c: Moved to...
805 * c-decl.cc: ...here.
806 * c-errors.c: Moved to...
807 * c-errors.cc: ...here.
808 * c-fold.c: Moved to...
809 * c-fold.cc: ...here.
810 * c-lang.c: Moved to...
811 * c-lang.cc: ...here.
812 * c-objc-common.c: Moved to...
813 * c-objc-common.cc: ...here.
814 * c-parser.c: Moved to...
815 * c-parser.cc: ...here.
816 * c-typeck.c: Moved to...
817 * c-typeck.cc: ...here.
818 * gccspec.c: Moved to...
819 * gccspec.cc: ...here.
820 * gimple-parser.c: Moved to...
821 * gimple-parser.cc: ...here.
822
8232022-01-17 Andrew Stubbs <ams@codesourcery.com>
824
825 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
826
617db51d
GA
8272022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
828
829 PR c++/103705
830 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
831 outer node for ARRAY_REFs.
832
62eb5308
GA
8332022-01-01 Jakub Jelinek <jakub@redhat.com>
834
835 PR objc/103639
836 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
837 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
838
2554e2da
GA
8392021-12-17 Marek Polacek <polacek@redhat.com>
840
841 PR c/103649
842 * c-decl.c (c_warn_unused_attributes): Don't warn for
843 attribute_ignored_p.
844 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
845 arguments when the attribute is ignored.
846
9c6586bc
GA
8472021-12-14 Jakub Jelinek <jakub@redhat.com>
848
849 PR c/103587
850 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
851 consume the pragma and silently skip to the pragma eol.
852
c8dcf64b
GA
8532021-12-12 Jonathan Wakely <jwakely@redhat.com>
854
855 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
856 * c-parser.c: Likewise.
857
4b4839e3
GA
8582021-12-09 Jakub Jelinek <jakub@redhat.com>
859
860 PR pch/71934
861 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
862 to resort_data.new_value.
863
641ff219
GA
8642021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
865
866 * c-parser.c (struct omp_dim): New struct type for use inside
867 c_parser_omp_variable_list.
868 (c_parser_omp_variable_list): Allow multiple levels of array and
869 component accesses in array section base-pointer expression.
870 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
871 c_parser_omp_var_list_parens.
872 (c_parser_omp_clause_from): Likewise.
873 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
874 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
875 POINTER_PLUS_EXPR.
876 (c_finish_omp_clauses): Extend allowed ranged of expressions
877 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
878
8792021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
880
881 PR middle-end/92120
882 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
883 call to c_parser_omp_variable_list to 'true'.
884 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
885 array base handling.
886 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
887
c177e806
GA
8882021-11-30 Thomas Schwinge <thomas@codesourcery.com>
889
890 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
891 orphan loop" checking.
892
8932021-11-30 Cesar Philippidis <cesar@codesourcery.com>
894 Thomas Schwinge <thomas@codesourcery.com>
895
896 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
897 OpenACC gang reductions.
898
8992021-11-30 Richard Biener <rguenther@suse.de>
900
901 * gimple-parser.c (c_parser_gimple_postfix_expression):
902 avoid unreachable code after break.
903
87cd82c8
GA
9042021-11-29 Eric Gallager <egallager@gcc.gnu.org>
905
906 PR other/103021
907 * Make-lang.in: Use ETAGS variable in TAGS target.
908
9092021-11-29 Richard Biener <rguenther@suse.de>
910
911 * c-typeck.c (c_tree_equal): Remove unreachable return.
912 * c-parser.c (get_matching_symbol): Likewise.
913
e1d43592
GA
9142021-11-23 Jakub Jelinek <jakub@redhat.com>
915
916 * c-typeck.c (c_clone_omp_udr): Don't initialize
917 id.transform_lang_insert_block.
918
9c077398
GA
9192021-11-19 Martin Sebor <msebor@redhat.com>
920
921 PR c++/33925
922 PR c/102867
923 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
924 code resulting from macro expansion.
925
9262021-11-19 Martin Liska <mliska@suse.cz>
927
928 Revert:
929 2021-11-19 Martin Liska <mliska@suse.cz>
930
931 * c-parser.c (add_debug_begin_stmt): Use option directly.
932
483092d3
GA
9332021-11-18 Matthias Kretz <m.kretz@gsi.de>
934
935 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
936 * c-parser.c (c_parser_postfix_expression): Likewise.
937
9382021-11-18 Martin Liska <mliska@suse.cz>
939
940 * c-parser.c (add_debug_begin_stmt): Use option directly.
941
280d2838
GA
9422021-11-17 Martin Sebor <msebor@redhat.com>
943
944 PR c/101702
945 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
946 bounds before deciding if they're constant.
947
e2b57363
GA
9482021-11-15 Jakub Jelinek <jakub@redhat.com>
949
950 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
951 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
952
b39265d4
GA
9532021-11-11 Jakub Jelinek <jakub@redhat.com>
954
955 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
956 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
957 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
958 OMP_CLAUSE_NUM_TEAMS_EXPR.
959 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
960 combined target teams even lower-bound expression.
961
9622021-11-11 Richard Biener <rguenther@suse.de>
963
964 * gimple-parser.c: Shuffle bitmap.h include.
965
18ae471f
GA
9662021-11-03 Joseph Myers <joseph@codesourcery.com>
967
968 PR c/103031
969 * c-convert.c (c_convert): New function, based on convert.
970 (convert): Make into wrapper of c_convert.
971 (convert_init): New function.
972 * c-typeck.c (enum impl_conv): Add ic_init_const.
973 (convert_for_assignment): Handle ic_init_const like ic_init. Add
974 new argument to convert_and_check call.
975 (digest_init): Pass ic_init_const to convert_for_assignment for
976 initializers required to be constant.
977
b4df2dd3
GA
9782021-11-02 Richard Sandiford <richard.sandiford@arm.com>
979
980 * c-tree.h (c_simulate_record_decl): Declare.
981 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
982 * c-decl.c (c_simulate_record_decl): New function.
983
c2bd5d8a
GA
9842021-10-22 Eric Gallager <egallager@gcc.gnu.org>
985
986 PR other/102663
987 * Make-lang.in: Add dummy c.install-dvi target.
988
93d183a5
GA
9892021-10-15 Richard Biener <rguenther@suse.de>
990
991 PR c/102763
992 * gimple-parser.c
993 (c_parser_gimple_postfix_expression_after_primary): Check
994 for a pointer do be dereferenced by ->.
995
5d5885c9
GA
9962021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
997
998 * c-parser.c (c_finish_omp_declare_variant): Change call from
999 c_omp_check_context_selector to omp_check_context_selector. Change
1000 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1001
c9db17b8
GA
10022021-10-09 Jakub Jelinek <jakub@redhat.com>
1003
1004 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1005 (c_parser_omp_scan_loop_body): Use it.
1006 (c_parser_omp_sections_scope): Likewise.
1007
50e20ee6
GA
10082021-10-07 Richard Biener <rguenther@suse.de>
1009
1010 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1011
bb6194e0
GA
10122021-10-05 Richard Biener <rguenther@suse.de>
1013
1014 PR c/102605
1015 * gimple-parser.c (c_parser_gimple_postfix_expression):
1016 Accept more address _Literals.
1017
da9c5f78
GA
10182021-10-04 Marek Polacek <polacek@redhat.com>
1019
1020 PR c++/97573
1021 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1022
9d116bcc
GA
10232021-10-01 Martin Sebor <msebor@redhat.com>
1024
1025 PR c/102103
1026 * c-typeck.c (maybe_warn_for_null_address): New function.
1027 (build_binary_op): Call it.
1028
10292021-10-01 Jakub Jelinek <jakub@redhat.com>
1030 Richard Biener <rguenther@suse.de>
1031
1032 PR sanitizer/102515
1033 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1034 for division even for SANITIZE_SI_OVERFLOW.
1035
10362021-10-01 Jakub Jelinek <jakub@redhat.com>
1037
1038 * c-parser.c (c_parser_omp_clause_order): Set
1039 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1040
fd133479
GA
10412021-09-28 Andrew Pinski <apinski@marvell.com>
1042
1043 PR c/32122
1044 * c-parser.c (c_parser_statement_after_labels): Pass
1045 the c_expr instead of the tree to c_finish_goto_ptr.
1046 * c-typeck.c (c_finish_goto_ptr): Change the second
1047 argument type to c_expr.
1048 * c-tree.h (c_finish_goto_ptr): Likewise.
1049 Error out if the expression was not of a pointer type.
1050
e4777439
GA
10512021-09-22 Jakub Jelinek <jakub@redhat.com>
1052
1053 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1054 modifiers.
1055
cf74e7b5
GA
10562021-09-18 Jakub Jelinek <jakub@redhat.com>
1057
1058 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1059 and reproducible modifiers.
1060 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1061
10622021-09-18 Jakub Jelinek <jakub@redhat.com>
1063
1064 * c-parser.c (c_parser_omp_clause_default): Handle private and
1065 firstprivate arguments, adjust diagnostics on unknown argument.
1066
0a4cb439
GA
10672021-09-17 Jakub Jelinek <jakub@redhat.com>
1068
1069 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1070 is true.
1071
a26206ec
GA
10722021-09-10 Jakub Jelinek <jakub@redhat.com>
1073
1074 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1075 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1076 don't call build_conditional_expr, instead build a COND_EXPR directly.
1077 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1078 if omp_atomic_lhs even in more cases for >, < or ==.
1079 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1080 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1081 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1082 * c-typeck.c (build_binary_op): For flag_openmp only handle
1083 MIN_EXPR/MAX_EXPR.
1084
b2748138
GA
10852021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1086
1087 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1088 directive.
1089
e11c6046
GA
10902021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1091
1092 * c-decl.c (enum deprecated_states): Add unavailable state.
1093 (merge_decls): Copy unavailability.
1094 (quals_from_declspecs): Handle unavailable case.
1095 (start_decl): Amend the logic handling suppression of nested
1096 deprecation states to include unavailability.
1097 (smallest_type_quals_location): Amend comment.
1098 (grokdeclarator): Handle the unavailable deprecation state.
1099 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1100 * c-tree.h (struct c_declspecs): Add unavailable_p.
1101 * c-typeck.c (build_component_ref): Handle unavailability.
1102 (build_external_ref): Likewise.
1103
11042021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1105 Joseph Myers <joseph@codesourcery.com>
1106
1107 PR c/79412
1108 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1109 types of both (non-function) decls as error_mark_node, so that the
1110 middle-end can see the code is malformed.
1111 (free_attr_access_data): Don't process if the type has been set to
1112 error_mark_node.
1113
6d51ee43
GA
11142021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1115
1116 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1117 and 'ancestor' in 'target device' clauses.
1118
38b19c5b
GA
11192021-08-23 Jakub Jelinek <jakub@redhat.com>
1120
1121 * c-parser.c (c_parser_omp_clause_num_tasks,
1122 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1123
5b2876f9
GA
11242021-08-22 Martin Uecker <muecker@gwdg.de>
1125
1126 PR c/98397
1127 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1128 for pointers to arrays with qualifiers.
1129 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1130 to arrays when the other pointer is a void pointer. Update warnings.
1131 (convert_for_assignment): Update warnings for C2X when converting from
1132 void* with qualifiers to a pointer to array with the same qualifiers.
1133
7c9e1645
GA
11342021-08-20 Jakub Jelinek <jakub@redhat.com>
1135
1136 * c-parser.c (c_parser_omp_error): New function.
1137 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1138
11392021-08-20 Jakub Jelinek <jakub@redhat.com>
1140
1141 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1142 comma at the end of list.
1143 (c_parser_omp_requires): Likewise.
1144
b57fba5e
GA
11452021-08-19 Jakub Jelinek <jakub@redhat.com>
1146
1147 * c-parser.c (c_parser_omp_requires): Don't call
1148 c_parser_peek_2nd_token and optionally consume token if current
1149 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1150
6e529985
GA
11512021-08-18 Jakub Jelinek <jakub@redhat.com>
1152
1153 * c-parser.c (c_parser_omp_nothing): New function.
1154 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1155
11562021-08-18 Jakub Jelinek <jakub@redhat.com>
1157
1158 * c-parser.c (c_parser_statement_after_labels): Add restart label
1159 near the start of the function. If c_parser_pragma returns false,
1160 goto restart.
1161 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1162 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1163 return what c_parser_omp_declare returned. Return true instead of
1164 false after emitting errors that the directive is not allowed in
1165 pragma_stmt context.
1166 (c_parser_omp_ordered): Return true instead of
1167 false after emitting errors that the directive is not allowed in
1168 pragma_stmt context.
1169 (c_parser_omp_target_update): Likewise.
1170 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1171 Change return type from tree to bool, return false if the
1172 directive should be ignored in pragma_stmt contexts.
1173 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1174 return their result directly.
1175 (c_parser_omp_cancellation_point): Change return type from void to
1176 bool, return false if the directive should be ignored in pragma_stmt
1177 contexts.
1178 (c_parser_omp_declare): Likewise.
1179
2d14d64b
GA
11802021-08-17 Jakub Jelinek <jakub@redhat.com>
1181
1182 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1183 (c_parser_omp_scope): New function.
1184 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1185
72be20e2
GA
11862021-08-12 Jakub Jelinek <jakub@redhat.com>
1187
1188 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1189 (c_parser_omp_clause_filter): New function.
1190 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1191 (OMP_MASKED_CLAUSE_MASK): Define.
1192 (c_parser_omp_masked): New function.
1193 (c_parser_omp_parallel): Handle parallel masked.
1194 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1195 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1196
11972021-08-12 Martin Uecker <muecker@gwdg.de>
1198
1199 PR c/101838
1200 PR c/29970
1201 * c-typeck.c (c_expr_sizeof_type): Evaluate
1202 size expressions for structs of variable size.
1203
12042021-08-12 Tobias Burnus <tobias@codesourcery.com>
1205
1206 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1207 'primary' as alias for 'master'.
1208
3ae564ea
GA
12092021-08-10 Martin Uecker <muecker@gwdg.de>
1210
1211 PR c/29970
1212 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1213 size expressions for structs of variable size.
1214
f92f4778
GA
12152021-08-06 Tamar Christina <tamar.christina@arm.com>
1216
1217 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1218 * c-tree.h (c_simulate_enum_decl): Likewise.
1219
12202021-08-06 Martin Sebor <msebor@redhat.com>
1221
1222 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1223 vec arguments to by-reference.
1224 (c_finish_omp_declare_simd): Same.
1225 (c_parser_compound_statement_nostart): Same.
1226 (c_parser_for_statement): Same.
1227 (c_parser_objc_methodprotolist): Same.
1228 (c_parser_oacc_routine): Same.
1229 (c_parser_omp_for_loop): Same.
1230 (c_parser_omp_declare_simd): Same.
1231
419c6c68
GA
12322021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1233 Joseph Myers <joseph@codesourcery.com>
1234 Cesar Philippidis <cesar@codesourcery.com>
1235
1236 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1237 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1238 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1239 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1240
92d45509
GA
12412021-07-20 Martin Sebor <msebor@redhat.com>
1242
1243 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1244 by-const-reference.
1245 * c-typeck.c (c_build_function_call_vec): Same.
1246
d97d71a1
GA
12472021-07-15 Martin Sebor <msebor@redhat.com>
1248
1249 PR c/101289
1250 PR c/97548
1251 * c-decl.c (get_parm_array_spec): Strip nops.
1252
6fba0eea
GA
12532021-07-06 Martin Sebor <msebor@redhat.com>
1254
1255 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1256
7a60a6e8
GA
12572021-07-02 Jakub Jelinek <jakub@redhat.com>
1258
1259 PR c/101297
1260 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1261 appears before a CPP_NAME.
1262
90708f87
GA
12632021-06-25 Martin Sebor <msebor@redhat.com>
1264
1265 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1266 warning_suppressed_p, suppress_warning, and copy_no_warning.
1267 (diagnose_mismatched_decls): Same.
1268 (duplicate_decls): Same.
1269 (grokdeclarator): Same.
1270 (finish_function): Same.
1271 (c_write_global_declarations_1): Same.
1272 * c-fold.c (c_fully_fold_internal): Same.
1273 * c-parser.c (c_parser_expr_no_commas): Same.
1274 (c_parser_postfix_expression): Same.
1275 * c-typeck.c (array_to_pointer_conversion): Same.
1276 (function_to_pointer_conversion): Same.
1277 (default_function_array_conversion): Same.
1278 (convert_lvalue_to_rvalue): Same.
1279 (default_conversion): Same.
1280 (build_indirect_ref): Same.
1281 (build_function_call_vec): Same.
1282 (build_atomic_assign): Same.
1283 (build_unary_op): Same.
1284 (c_finish_return): Same.
1285 (emit_side_effect_warnings): Same.
1286 (c_finish_stmt_expr): Same.
1287 (c_omp_clause_copy_ctor): Same.
1288
9aa8327e
GA
12892021-06-24 Jakub Jelinek <jakub@redhat.com>
1290
1291 PR c/101176
1292 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1293 the result.
1294
12952021-06-24 Jakub Jelinek <jakub@redhat.com>
1296
1297 PR c/101171
1298 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1299 error_mark_node.
1300
13012021-06-24 Jakub Jelinek <jakub@redhat.com>
1302
1303 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1304 C_ORT_OMP for clauses on target construct.
1305 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1306 (c_parser_omp_target): For non-combined target add
1307 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1308 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1309 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1310 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1311 never present on C_ORT_*DECLARE_SIMD.
1312 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1313 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1314 corresponding map clauses.
1315
2f080224
GA
13162021-06-21 Jakub Jelinek <jakub@redhat.com>
1317
1318 PR inline-asm/100785
1319 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1320 bit-fields addressable.
1321
ede6c356
GA
13222021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1323
1324 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1325 similar.
1326
8dc48181
GA
13272021-06-14 Tobias Burnus <tobias@codesourcery.com>
1328
1329 PR c/100913
1330 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1331 var in the error case.
1332
438aac59
GA
13332021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1334
1335 PR c/100920
1336 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1337 spot built-in functions.
1338
7d6987e9
GA
13392021-06-06 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR c/100902
1342 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1343 even when target is combined with other constructs.
1344
13452021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1346
1347 PR c/100920
1348 * c-decl.c (finish_struct): Fix thinko in previous change.
1349 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1350 assignment and initialization for storage order purposes if the
1351 RHS is a call to a DECL_IS_MALLOC function.
1352
600f90cb
GA
13532021-06-04 Martin Sebor <msebor@redhat.com>
1354
1355 PR c/100783
1356 * c-objc-common.c (print_type): Handle erroneous types.
1357
440c8a0a
GA
13582021-06-03 Jakub Jelinek <jakub@redhat.com>
1359
1360 PR c++/100859
1361 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1362 after depend only cases.
1363
ee682192
GA
13642021-05-31 Richard Biener <rguenther@suse.de>
1365
1366 PR c++/88601
1367 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1368 * c-parser.c (c_parser_postfix_expression): Likewise.
1369
48166757
GA
13702021-05-28 Richard Biener <rguenther@suse.de>
1371
1372 PR c/100803
1373 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1374 invalid if conditions.
1375
13762021-05-28 Jakub Jelinek <jakub@redhat.com>
1377
1378 PR middle-end/99928
1379 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1380 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1381 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1382 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1383 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1384 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1385 if present in map_head, map_field_head or map_firstprivate_head
1386 bitmaps.
1387
13882021-05-28 Tobias Burnus <tobias@codesourcery.com>
1389
1390 * c-parser.c (c_parser_omp_clause_affinity): New.
1391 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1392 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1393 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1394 c_finish_omp_clauses): Likewise.
1395
01c59ef2
GA
13962021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1397
1398 PR c/100653
1399 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1400 field with a differing scalar storage order.
1401
2832d51b
GA
14022021-05-21 Jakub Jelinek <jakub@redhat.com>
1403
1404 PR middle-end/99928
1405 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1406 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1407 if a decl is mentioned both in map clause and in such firstprivate
1408 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1409
65f32e5d
GA
14102021-05-19 Jakub Jelinek <jakub@redhat.com>
1411
1412 PR middle-end/99928
1413 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1414 master when combined with taskloop.
1415 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1416 parallel master when not combined with taskloop.
1417
a8daf9a1
GA
14182021-05-18 Richard Biener <rguenther@suse.de>
1419
1420 PR c/100522
1421 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1422 Diagnose calls to non-functions.
1423 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1424
a7ffc1ef
GA
14252021-05-17 Richard Biener <rguenther@suse.de>
1426
1427 PR c/100625
1428 * gimple-parser.c (c_parser_gimple_label): Avoid building
1429 a GIMPLE label with NULL label decl.
1430
f9af11c7
GA
14312021-05-13 Martin Sebor <msebor@redhat.com>
1432
1433 PR c/100550
1434 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1435
0ff3a0f2
GA
14362021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1437
1438 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1439 'close'.
1440
aa891c56
GA
14412021-05-10 Martin Liska <mliska@suse.cz>
1442
1443 * c-aux-info.c (affix_data_type): Use startswith
1444 function instead of strncmp.
1445 * c-typeck.c (build_function_call_vec): Likewise.
1446 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1447
62d87a32
GA
14482021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1449
1450 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1451 on the address of a pointer field in a record with reverse SSO.
1452
99e8df7a
GA
14532021-05-04 Tobias Burnus <tobias@codesourcery.com>
1454
1455 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1456 for || and && reductions.
1457
3c8e539d
GA
14582021-04-29 Joseph Myers <joseph@codesourcery.com>
1459
1460 * c-typeck.c (function_types_compatible_p): For C2X, treat
1461 unprototyped function as compatible with non-variadic prototyped
1462 function even if some argument types are changed by the default
1463 argument promotions.
1464
ee351f7f
GA
14652021-04-15 Martin Sebor <msebor@redhat.com>
1466
1467 PR c/99420
1468 PR c/99972
1469 * c-decl.c (pushdecl): Always propagate type attribute.
1470
14712021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1472
1473 PR c/98852
1474 * c-typeck.c (c_common_type): Do not drop attributes that
1475 affect type identity.
1476
1d54b138
GA
14772021-04-10 Jakub Jelinek <jakub@redhat.com>
1478
1479 PR c/99990
1480 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1481 error_mark_node.
1482
4493b1c1
GA
14832021-03-25 Jakub Jelinek <jakub@redhat.com>
1484
1485 PR c++/99565
1486 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1487 to operand_equal_p.
1488
5f256a70
GA
14892021-03-19 Jakub Jelinek <jakub@redhat.com>
1490
1491 PR c/99588
1492 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1493 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1494 if found.
1495 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1496 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1497 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1498
3c5b6d24
GA
14992021-03-15 Tobias Burnus <tobias@codesourcery.com>
1500
1501 PR c++/99509
1502 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1503 ensure that the varpool node is marked as offloadable.
1504
ceae9533
GA
15052021-03-05 Tobias Burnus <tobias@codesourcery.com>
1506
1507 PR c/99137
1508 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1509
4028d01a
GA
15102021-02-24 Martin Sebor <msebor@redhat.com>
1511
1512 PR middle-end/97172
1513 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1514
bf81237e
GA
15152021-02-18 Jakub Jelinek <jakub@redhat.com>
1516
1517 PR c/99136
1518 * c-typeck.c (c_finish_return): Don't wrap retval into
1519 EXCESS_PRECISION_EXPR in functions that return void.
1520
0c5cdb31
GA
15212021-02-11 Marek Polacek <polacek@redhat.com>
1522
1523 * c-parser.c (c_parser_if_statement): Use vec_free.
1524
a19dd5e6
GA
15252021-02-04 Martin Sebor <msebor@redhat.com>
1526
1527 PR c/97882
1528 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1529 (diagnose_mismatched_decls): Same.
1530 (start_function): Introduce temporaries for better readability.
1531 * c-typeck.c (comptypes_internal): Only consider complete enum
1532 types in comparisons with integers.
1533
f7884fb1
GA
15342021-02-01 Martin Sebor <msebor@redhat.com>
1535
1536 PR middle-end/97172
1537 * c-decl.c (free_attr_access_data): New function.
1538 (c_parse_final_cleanups): Call free_attr_access_data.
1539
59cf67d1
GA
15402021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1541
1542 * c-parser.c (c_parser_omp_clause_detach): New.
1543 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1544 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1545 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1546 clause. Prevent use of detach with mergeable and overriding the
1547 data sharing mode of the event handle.
1548
2f7f0d32
GA
15492021-01-15 Jakub Jelinek <jakub@redhat.com>
1550
1551 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1552 unqualified element type and then call c_build_qualified_type on the
1553 ARRAY_TYPE.
1554
7d187e4f
GA
15552021-01-07 Richard Biener <rguenther@suse.de>
1556
1557 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1558 reallocate loop array if it is too small.
1559
eefe499f
GA
15602020-12-16 Martin Uecker <muecker@gwdg.de>
1561
1562 PR c/98047
1563 * c-typeck.c (build_modify_expr): Drop qualifiers.
1564
15652020-12-16 Martin Uecker <muecker@gwdg.de>
1566
1567 PR c/98260
1568 * c-parser.c (c_parser_expression): Look into
1569 nop expression when marking expressions as read.
1570
d52945ce
GA
15712020-12-14 Martin Liska <mliska@suse.cz>
1572
1573 PR sanitizer/98204
1574 * c-typeck.c (pointer_diff): Do not emit a top-level
1575 sanitization.
1576 (build_binary_op): Likewise.
1577
ca2bd949
GA
15782020-12-09 Tobias Burnus <tobias@codesourcery.com>
1579
1580 * c-parser.c (c_parser_omp_allocate): New.
1581 (c_parser_omp_construct): Call it.
1582
15832020-12-09 Richard Biener <rguenther@suse.de>
1584
1585 PR c/98200
1586 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1587 early on error.
1588
bc8a7013
GA
15892020-12-07 Martin Uecker <muecker@gwdg.de>
1590
1591 PR c/97981
1592 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1593 that drops qualifiers to the end of the function.
1594
d48df6f2
GA
15952020-11-26 Martin Uecker <muecker@gwdg.de>
1596
1597 PR c/65455
1598 PR c/92935
1599 * c-parser.c (c_parser_declaration_or_fndef): Remove
1600 redundant code to drop qualifiers of _Atomic types for __auto_type.
1601 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1602 types for __typeof__.
1603
1e2c9a27
GA
16042020-11-24 Jakub Jelinek <jakub@redhat.com>
1605
1606 PR c/97958
1607 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1608 expressions, use make_node instead of build2 to avoid checking build2
1609 performs.
1610
8e6198d0
GA
16112020-11-23 Joseph Myers <joseph@codesourcery.com>
1612
1613 PR c/95630
1614 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1615 for comparisons of complete and incomplete pointers.
1616
7a97e2fc
GA
16172020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1618
1619 * c-aux-info.c (gen_type): Support opaque types.
1620
82e5048e
GA
16212020-11-20 Martin Sebor <msebor@redhat.com>
1622
1623 PR middle-end/97879
1624 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1625
16262020-11-20 Jakub Jelinek <jakub@redhat.com>
1627
1628 PR other/97911
1629 * Make-lang.in (c.serial): Change from goal to a variable.
1630 (.PHONY): Drop c.serial.
1631
16322020-11-20 Martin Uecker <muecker@gwdg.de>
1633
1634 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1635
d62586ee
GA
16362020-11-19 Jakub Jelinek <jakub@redhat.com>
1637
1638 PR c/97860
1639 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1640 error_operand_p.
1641
25bb75f8
GA
16422020-11-18 Jakub Jelinek <jakub@redhat.com>
1643
1644 * Make-lang.in (c.serial): New goal.
1645 (.PHONY): Add c.serial c.prev.
1646 (cc1$(exeext)): Call LINK_PROGRESS.
1647
77f67db2
GA
16482020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1649
1650 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1651 goto too.
1652 * c-typeck.c (build_asm_expr): Remove an assert checking output
1653 absence for asm goto.
1654
16552020-11-13 Jakub Jelinek <jakub@redhat.com>
1656
1657 * c-typeck.c (c_finish_omp_clauses): Don't clear
1658 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1659
16602020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1661
1662 PR objc/77404
1663 * c-parser.c (c_parser_objc_class_definition): Pass the
1664 location of the class name to the interface declaration.
1665
bb622641
GA
16662020-11-10 Strager Neds <strager.nds@gmail.com>
1667
1668 * c-decl.c (merge_decls): Use new overload of
1669 set_decl_section_name.
1670
16712020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1672
1673 * c-parser.c (c_parser_omp_target_data): Add use of
1674 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1675 handled map clause kind.
1676 (c_parser_omp_target_enter_data): Likewise.
1677 (c_parser_omp_target_exit_data): Likewise.
1678 (c_parser_omp_target): Likewise.
1679 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1680 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1681 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1682 same struct field access to co-exist on OpenMP construct.
1683
2da7ee05
GA
16842020-11-07 Martin Uecker <muecker@gwdg.de>
1685
1686 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1687 (c_parser_all_labels): Likewise.
1688
44cab2d8
GA
16892020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1690
1691 * c-parser.c (c_parser_objc_at_property_declaration):
1692 Improve parsing fidelity. Associate better location info
1693 with @property attributes. Clean up the interface to
1694 objc_add_property_declaration ().
1695
16962020-11-06 Nathan Sidwell <nathan@acm.org>
1697
1698 * c-decl.c (diagnose_mismatched_decls): Rename
1699 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1700 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1701 (collect_source_refs): Likewise.
1702 * c-typeck.c (inform_declaration, inform_for_arg)
1703 (convert_for_assignment): Likewise.
1704
17052020-11-06 Tobias Burnus <tobias@codesourcery.com>
1706
1707 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1708 OpenACC matching.
1709 (c_parser_omp_construct): Update call.
1710
35c125cb
GA
17112020-11-04 Jakub Jelinek <jakub@redhat.com>
1712
1713 PR c++/97670
1714 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1715 find underlying decl to clear in the aligned_head bitmap.
1716
17172020-11-04 Joseph Myers <joseph@codesourcery.com>
1718
1719 * c-decl.c (handle_nodiscard_attribute): New.
1720 (std_attribute_table): Add nodiscard.
1721 * c-parser.c (c_parser_std_attribute): Expect argument to
1722 nodiscard attribute to be a string. Do not special-case ignoring
1723 nodiscard.
1724 * c-typeck.c (maybe_warn_nodiscard): New.
1725 (build_compound_expr, emit_side_effect_warnings): Call
1726 maybe_warn_nodiscard.
1727 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1728 emit_side_effect_warnings if warn_unused_result.
1729
4f0606fe
GA
17302020-10-29 Asher Gordon <AsDaGo@posteo.net>
1731
1732 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1733 with XDELETE.
1734 (finish_init): Likewise.
1735 (pop_init_level): Likewise.
1736
e93aae4a
GA
17372020-10-28 Joseph Myers <joseph@codesourcery.com>
1738
1739 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1740 error_at for omitted parameter name.
1741
17422020-10-28 Jakub Jelinek <jakub@redhat.com>
1743
1744 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1745 (c_parser_omp_clause_allocate): New function.
1746 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1747 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1748 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1749 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1750 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1751 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1752 PRAGMA_OMP_CLAUSE_ALLOCATE.
1753 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1754
89bb01e7
GA
17552020-10-27 Joseph Myers <joseph@codesourcery.com>
1756
1757 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1758 standard attributes.
1759
efe71fcc
GA
17602020-10-23 Marek Polacek <polacek@redhat.com>
1761
1762 PR c++/91741
1763 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1764 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1765 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1766 * c-tree.h (char_type_p): Declare.
1767 * c-typeck.c (char_type_p): No longer static.
1768
17692020-10-23 Martin Sebor <msebor@redhat.com>
1770
1771 PR middle-end/97552
1772 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1773
2fe5b7d1
GA
17742020-09-19 Martin Sebor <msebor@redhat.com>
1775
1776 PR c/50584
1777 * c-decl.c (lookup_last_decl): Define new function.
1778 (c_decl_attributes): Call it.
1779 (start_decl): Add argument and use it.
1780 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1781 (get_parm_array_spec): Define new function.
1782 (push_parm_decl): Call get_parm_array_spec.
1783 (start_function): Call warn_parm_array_mismatch. Build attribute
1784 access and add it to current function.
1785 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1786 in forms of array parameters.
1787 * c-tree.h (start_decl): Add argument.
1788
17892020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1790
1791 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1792 with...
1793 (in_statement): New.
1794 (start_function): Adjust for above change.
1795 (c_push_function_context, c_pop_function_context): Likewise.
1796 * c-lang.h (struct language_function): Likewise.
1797 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1798 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1799 New.
1800 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1801 (c_parser_switch_statement): Adjust break/switch context handling
1802 and calls to renamed functions.
1803 (c_parser_while_statement): Adjust break/switch context handling and
1804 build a WHILE_STMT.
1805 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1806 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1807 (c_parser_omp_for_loop): Adjust break/switch context handling.
1808 * c-tree.h (c_break_label, c_cont_label): Delete.
1809 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1810 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1811 (in_statement, switch_statement_break_seen_p): Declare.
1812 (c_start_case, c_finish_case): Renamed to...
1813 (c_start_switch, c_finish_switch).
1814 (c_finish_bc_stmt): Adjust arguments.
1815 * c-typeck.c (build_function_call_vec): Don't try to print
1816 statements with %qE format.
1817 (struct c_switch): Rename switch_expr field to switch_stmt.
1818 Add break_stmt_seen_p field.
1819 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1820 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1821 (do_case): Update for changes to struct c_switch.
1822 (c_finish_case): Rename to c_finish_switch. Update for changes to
1823 struct c_switch and change of representation from SWITCH_EXPR to
1824 SWITCH_STMT.
1825 (c_finish_loop): Delete.
1826 (c_finish_bc_stmt): Update to reflect changes to break/continue
1827 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1828 of a GOTO_EXPR except for objc foreach loops.
1829
e1a4a8a0
GA
18302020-09-01 Jakub Jelinek <jakub@redhat.com>
1831
1832 PR c++/96867
1833 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1834 only on PARM_DECLs.
1835
8f7ea26a
GA
18362020-08-28 Martin Sebor <msebor@redhat.com>
1837
1838 PR c/96596
1839 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1840 argument type.
1841
8b394f01
GA
18422020-08-27 Martin Liska <mliska@suse.cz>
1843
1844 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1845 growth function to true.
1846
db0f6efe
GA
18472020-08-25 Tobias Burnus <tobias@codesourcery.com>
1848
1849 PR c/96678
1850 * c-typeck.c (handle_omp_array_sections_1): Talk about
1851 array function parameter in the error message.
1852
5c265693
GA
18532020-08-18 Jakub Jelinek <jakub@redhat.com>
1854
1855 PR c/96571
1856 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1857 to int, holding index of the match. Call mark_exp_read on the selector
1858 expression and on expressions other than the selected one.
1859
4967ca2f
GA
18602020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1861
1862 PR c/96377
1863 * c-typeck.c (process_init_element): Split test for whether to
1864 recurse into a record, union or array into...
1865 (initialize_elementwise_p): ...this new function. Don't recurse
1866 into a vector type if the initialization value is also a vector.
1867
48cc2e46
GA
18682020-07-31 Richard Biener <rguenther@suse.de>
1869
1870 PR debug/96383
1871 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1872 Define to c_common_finalize_early_debug.
1873
3ea9abca
GA
18742020-07-22 Tobias Burnus <tobias@codesourcery.com>
1875
1876 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1877 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1878 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1879
30430061
GA
18802020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1881
1882 PR target/95237
1883 * c-decl.c (finish_decl): Call target hook
1884 lower_local_decl_alignment to lower local decl alignment.
1885
3f8ca9cb
GA
18862020-07-09 Julian Brown <julian@codesourcery.com>
1887 Thomas Schwinge <thomas@codesourcery.com>
1888
1889 PR middle-end/95270
1890 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1891 for standalone attach/detach clauses.
1892
a82c4c4c 18932020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1894
1895 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1896 set, warn for conversion between pointers that point to incompatible
1897 scalar storage orders.
1898
f60ee68d
GA
18992020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1900
1901 * c-parser.c (c_parser_statement_after_labels): Pass correct
1902 parameters to c_parser_do_statement.
1903
56638b9b
GA
19042020-06-16 Jakub Jelinek <jakub@redhat.com>
1905
1906 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1907 c_in_omp_for.
1908 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1909 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1910 c_finish_omp_for.
1911 * c-tree.h (c_in_omp_for): Declare.
1912 * c-typeck.c (c_in_omp_for): Define.
1913 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1914 (digest_init): Likewise.
1915 (build_binary_op): Likewise.
1916
19172020-06-16 Jakub Jelinek <jakub@redhat.com>
1918
1919 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1920 from kind by comma rather than colon.
1921
1a59f3db
GA
19222020-06-05 Mark Wielaard <mark@klomp.org>
1923
1924 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1925 an undeclared builtin, then add a fixit header hint, if found.
1926 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1927 warning_at about implicit builtin declaration type mismatch.
1928
9a5b7438
GA
19292020-06-03 Mark Wielaard <mark@klomp.org>
1930
1931 * c-parser.c (struct c_parser): Add seen_string_literal
1932 bitfield.
1933 (c_parser_consume_token): Reset seen_string_literal.
1934 (c_parser_error_richloc): Add name_hint if seen_string_literal
1935 and next token is a CPP_NAME and we have a missing header
1936 suggestion for the name.
1937 (c_parser_string_literal): Set seen_string_literal.
1938
19392020-06-03 Mark Wielaard <mark@klomp.org>
1940
1941 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1942 scope with matching_parens after CPP_OPEN_PAREN.
1943
19442020-06-03 Tobias Burnus <tobias@codesourcery.com>
1945
1946 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1947
53ffb43a
GA
19482020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1949
1950 * Make-lang.in: Remove extra slash.
1951
8f66f175
ML
19522020-05-19 Martin Liska <mliska@suse.cz>
1953
1954 * c-parser.c: Fix typo.
1955
49ddde69
JJ
19562020-05-14 Jakub Jelinek <jakub@redhat.com>
1957
1958 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1959
eb72dc66
RB
19602020-05-07 Richard Biener <rguenther@suse.de>
1961
1962 PR middle-end/94703
1963 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1964 DECL_GIMPLE_REG_P.
1965
bf915591
JJ
19662020-04-30 Jakub Jelinek <jakub@redhat.com>
1967
1968 PR c/94842
1969 * c-decl.c (set_labels_context_r): In addition to context-less
1970 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1971 parent function if any.
1972 (store_parm_decls): Adjust comment.
1973
e1113ffb
JJ
19742020-04-19 Jakub Jelinek <jakub@redhat.com>
1975
1976 PR objc/94637
1977 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1978 two CPP_COLON tokens.
1979
2e389749
JJ
19802020-04-17 Jakub Jelinek <jakub@redhat.com>
1981
1982 PR other/94629
1983 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1984 to data.clauses.
1985
2dc9294c
JJ
19862020-04-15 Jakub Jelinek <jakub@redhat.com>
1987
1988 PR c/94593
1989 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1990 requires directive when not at file scope.
1991
13e41d8b
TB
19922020-04-08 Tobias Burnus <tobias@codesourcery.com>
1993
1994 PR middle-end/94120
1995 * c-decl.c (c_check_in_current_scope): New function.
1996 * c-tree.h (c_check_in_current_scope): Declare it.
1997 * c-parser.c (c_parser_oacc_declare): Add check that variables
1998 are declared in the same scope as the directive. Fix handling
1999 of namespace vars.
2000
4df50a05
JJ
20012020-04-07 Jakub Jelinek <jakub@redhat.com>
2002
2003 PR c++/94512
2004 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2005 if c_parser_omp_master succeeded.
2006
5db9e893
JJ
20072020-03-23 Jakub Jelinek <jakub@redhat.com>
2008
2009 PR gcov-profile/94029
2010 PR c/94239
2011 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2012 the function_start_locus location. Don't do that afterwards for the
2013 __GIMPLE body parsing.
2014
9def91e9
JJ
20152020-03-19 Jakub Jelinek <jakub@redhat.com>
2016
2017 PR gcov-profile/94029
2018 * c-tree.h (finish_function): Add location_t argument defaulted to
2019 input_location.
2020 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2021 set it to the locus of closing } if non-NULL.
2022 (c_parser_compound_statement_nostart): Return locus of closing }.
2023 (c_parser_parse_rtl_body): Likewise.
2024 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2025 finish_function.
2026 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2027 input_location to set function_end_locus.
2028
046c5890
JJ
20292020-03-17 Jakub Jelinek <jakub@redhat.com>
2030
2031 PR c/94172
2032 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2033 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2034 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2035 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2036 ENUMERAL_TYPEs.
2037 (finish_incomplete_vars): New function, moved from finish_struct. Use
2038 relayout_decl instead of layout_decl.
2039 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2040 being TYPE_VFIELD. Use finish_incomplete_vars.
2041 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2042 finish_incomplete_vars.
2043 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2044 also on ENUMERAL_TYPEs.
2045
c015ff8c
JJ
20462020-03-16 Jakub Jelinek <jakub@redhat.com>
2047
2048 PR c/94179
2049 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2050
f2e9fe5f
MS
20512020-03-13 Martin Sebor <msebor@redhat.com>
2052
2053 PR c/94040
2054 * c-decl.c (builtin_structptr_type_count): New constant.
2055 (match_builtin_function_types): Reject decls that are incompatible
2056 in types pointed to by pointers.
2057 (diagnose_mismatched_decls): Adjust comments.
2058
c9d70946
JM
20592020-03-05 Joseph Myers <joseph@codesourcery.com>
2060
2061 PR c/93577
2062 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2063 empty when initialized type is error_mark_node.
2064 (set_designator, process_init_element): Ignore initializers for
2065 elements of a variable-size type or of error_mark_node.
2066
726e292d
MS
20672020-03-01 Martin Sebor <msebor@redhat.com>
2068
2069 PR middle-end/93926
2070 * c-decl.c (types_close_enough_to_match): New function.
2071 (match_builtin_function_types):
2072 (diagnose_mismatched_decls): Add missing inform call to a warning.
2073
a499c2f8
MS
20742020-03-01 Martin Sebor <msebor@redhat.com>
2075
2076 PR c/93812
2077 * c-typeck.c (build_functype_attribute_variant): New function.
2078 (composite_type): Call it.
2079
9c3da8cc
JJ
20802020-02-25 Jakub Jelinek <jakub@redhat.com>
2081
2082 PR other/93912
2083 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2084 Rename last argument from probablity to probability.
2085
bacdd5e9
JJ
20862020-02-13 Jakub Jelinek <jakub@redhat.com>
2087
2088 PR c/93576
2089 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2090 *expr if it has side effects.
2091
f9eb0973
JL
20922020-01-30 Jeff Law <law@redhat.com>
2093
2094 PR c/88660
2095 * c-parser.c (c_parser_switch_statement): Make sure to request
2096 marking the switch expr as used.
2097
ac68e287
JM
20982020-01-22 Joseph Myers <joseph@codesourcery.com>
2099
2100 PR c/93348
2101 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2102 argument with integer operands.
2103
852f0ae8
KK
21042020-01-16 Kerem Kat <keremkat@gmail.com>
2105
2106 PR c/92833
2107 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2108 to support 4 available tokens.
2109
e2346a33
JM
21102020-01-15 Joseph Myers <joseph@codesourcery.com>
2111
2112 PR c/93072
2113 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2114 determine whether to set DECL_CONTEXT.
2115
3d77686d
JM
21162020-01-13 Joseph Myers <joseph@codesourcery.com>
2117
2118 PR c/93241
2119 * c-typeck.c (build_c_cast): Check for expressions with integer
2120 operands that can occur in an unevaluated part of an integer
2121 constant expression and call note_integer_operands as needed.
2122
f74c4b2c
RB
21232019-01-08 Richard Biener <rguenther@suse.de>
2124
2125 PR middle-end/93199
2126 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2127 permanently.
2128
8d9254fc
JJ
21292020-01-01 Jakub Jelinek <jakub@redhat.com>
2130
2131 Update copyright years.
2132
39292e25
EB
21332019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2134
2135 * c-decl.c (collect_source_ref_cb): Delete.
2136 (for_each_global_decl): Rename into...
2137 (collect_source_refs): ...this. Call collect_source_ref directly.
2138 (c_parse_final_cleanups): Always call collect_source_ref on the main
2139 input filename.
2140
519d7496
JB
21412019-12-19 Julian Brown <julian@codesourcery.com>
2142 Cesar Philippidis <cesar@codesourcery.com>
2143
2144 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2145 detach clauses.
2146 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2147 Allow deref (->) in variable lists if true.
2148 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2149 Pass to c_parser_omp_variable_list.
2150 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2151 call to c_parser_omp_variable_list.
2152 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2153 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2154 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2155 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2156 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2157 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2158 and detach. Support deref.
2159 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2160 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2161 (c_oacc_check_attachments): New function.
2162 (c_finish_omp_clauses): Check attach/detach arguments for being
2163 pointers using above. Support deref.
2164
a6163563
JB
21652019-12-19 Julian Brown <julian@codesourcery.com>
2166 Maciej W. Rozycki <macro@codesourcery.com>
2167 Tobias Burnus <tobias@codesourcery.com>
2168 Thomas Schwinge <thomas@codesourcery.com>
2169
2170 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2171 (c_parser_oacc_data_clause): Likewise.
2172 (c_parser_oacc_all_clauses): Likewise.
2173 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2174 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2175 PRAGMA_OACC_CLAUSE_NO_CREATE.
2176 * c-typeck.c (handle_omp_array_sections): Support
2177 GOMP_MAP_NO_ALLOC.
2178
d68f5d45
DM
21792019-12-09 David Malcolm <dmalcolm@redhat.com>
2180
2181 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2182 Replace label_text ctor calls.
2183
4691bf46
JM
21842019-12-04 Joseph Myers <joseph@codesourcery.com>
2185
2186 PR c/36941
2187 PR c/88827
2188 * c-typeck.c (convert_lvalue_to_rvalue): Call
2189 require_complete_type for arguments not of void types.
2190 (build_indirect_ref): Do not diagnose dereferencing pointers to
2191 incomplete types.
2192 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2193
85d11957
JM
21942019-12-03 Joseph Myers <joseph@codesourcery.com>
2195
2196 PR c/88704
2197 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2198 old-style parameter definitions.
2199
4569f8b3
SL
22002019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2201
2202 PR target/92499
2203
2204 * c-decl.c (flexible_array_type_p): Move to common code.
2205
65ef05d0
RS
22062019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2207
2208 * c-decl.c (start_decl): Allow initialization of variables whose
2209 size is a POLY_INT_CST.
2210 (finish_decl): Use verify_type_context to check whether the target
2211 allows variables with a particular type to have static or thread-local
2212 storage duration. Don't raise a second error if such variables do
2213 not have a constant size.
2214 (grokdeclarator): Use verify_type_context to check whether the
2215 target allows fields or array elements to have a particular type.
2216 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2217 the target allows pointer difference for the types involved.
2218 (build_unary_op): Likewise for pointer increment and decrement.
2219
34b43828
JM
22202019-11-29 Joseph Myers <joseph@codesourcery.com>
2221
2222 * c-parser.c (struct c_parser): Add members raw_tokens and
2223 raw_tokens_used.
2224 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2225 using previously-lexed raw tokens.
2226 (c_parser_peek_nth_token_raw)
2227 (c_parser_check_balanced_raw_token_sequence): New functions.
2228 (c_parser_nth_token_starts_std_attributes): Use
2229 c_parser_check_balanced_raw_token_sequence for Objective-C.
2230
5b8d9367
JM
22312019-11-25 Joseph Myers <joseph@codesourcery.com>
2232
2233 PR c/91985
2234 * c-decl.c (finish_declspecs): Use int instead of decimal
2235 floating-point types if decimal floating-point not supported.
2236
1723e1be
JM
22372019-11-25 Joseph Myers <joseph@codesourcery.com>
2238
2239 * c-tree.h (struct c_declarator): Use a structure for id member.
2240 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2241 declarators at the start, not when handling individual declarators
2242 later. Use u.id.id instead of u.id.
2243 (grokfield): Use u.id.id instead of u.id.
2244 (build_id_declarator): Set u.id.id and u.id.attrs.
2245 (finish_declspecs): Handle postfix attributes in case of typedef
2246 name or typeof used.
2247 * c-parser.c (c_parser_direct_declarator)
2248 (c_parser_direct_declarator_inner): Place declarator for
2249 attributes inside that for function or array, not outside. Set
2250 u.id.attrs for identifiers.
2251 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2252 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2253 instead of u.id.
2254
bdaf8be1
JJ
22552019-11-22 Jakub Jelinek <jakub@redhat.com>
2256
2257 PR c/90677
2258 * c-decl.c (identifier_global_tag): Define.
2259
3e00ba47
RB
22602019-11-20 Richard Biener <rguenther@suse.de>
2261
2262 PR c/92088
2263 * c-decl.c (grokdeclarator): Prevent inlining of nested
2264 function with VLA arguments.
2265
8c5b727a
JM
22662019-11-20 Joseph Myers <joseph@codesourcery.com>
2267
2268 * c-decl.c (c_warn_type_attributes): New function.
2269 (groktypename, grokdeclarator, finish_declspecs): Call
2270 c_warn_type_attributes before applying attributes to types.
2271 * c-tree.h (c_warn_type_attributes): Declare.
2272
192961ff
JM
22732019-11-19 Joseph Myers <joseph@codesourcery.com>
2274
2275 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2276 standard attributes.
2277 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2278 pedwarn for unknown standard attributes and return error_mark_node
2279 for them.
2280
20a38017
MM
22812019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2282
2283 * c-parser.c (c_parser_parse_rtl_body): Always call
2284 run_rtl_passes, even if startwith pass is not provided.
2285
d5fbe5e0
JM
22862019-11-15 Joseph Myers <joseph@codesourcery.com>
2287
2288 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2289 duplicate standard attributes.
2290
97cc1187
JM
22912019-11-15 Joseph Myers <joseph@codesourcery.com>
2292
2293 * c-decl.c (std_attribute_table): Add maybe_unused.
2294
f8aea5e3
JM
22952019-11-15 Joseph Myers <joseph@codesourcery.com>
2296
2297 * c-decl.c (std_attribute_table): Add fallthrough.
2298 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2299 attribute at top level.
2300
2cc94aa8
JM
23012019-11-15 Joseph Myers <joseph@codesourcery.com>
2302
2303 * c-decl.c (std_attribute_table): New.
2304 (c_init_decl_processing): Register attributes from
2305 std_attribute_table.
2306 * c-parser.c (c_parser_attribute_arguments): Add arguments
2307 require_string and allow_empty_args. All callers changed.
2308 (c_parser_std_attribute): Set require_string argument for
2309 "deprecated" attribute.
2310
7c5890cc
JM
23112019-11-14 Joseph Myers <joseph@codesourcery.com>
2312
2313 * c-parser.c (c_parser_postfix_expression)
2314 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2315 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2316
e8738f4e
RS
23172019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2318
2319 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2320 of build_same_sized_truth_vector_type.
2321 (build_vec_cmp): Likewise.
2322
b2417b59
JJ
23232019-11-14 Jakub Jelinek <jakub@redhat.com>
2324
bedb7f04
JJ
2325 * c-parser.c (c_parser_omp_context_selector): Don't require score
2326 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2327 negative score.
2328
b2417b59
JJ
2329 * c-parser.c (c_parser_omp_context_selector): Rename
2330 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2331 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2332 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2333 and string literals.
2334
4e03c3a7
JM
23352019-11-14 Joseph Myers <joseph@codesourcery.com>
2336
2337 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2338 ctsk_tagfirstref_attrs.
2339 (struct c_declspecs): Update description of attrs. Add
2340 postfix_attrs and non_std_attrs_seen_p. Increase size of
2341 typespec_kind bit-field.
2342 (c_warn_unused_attributes): New declaration.
2343 (parser_xref_tag): Update prototype.
2344 * c-decl.c (c_warn_unused_attributes): New function.
2345 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2346 ctsk_tagref_attrs. Handle attribute declarations.
2347 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2348 (grokdeclarator): Handle standard attributes.
2349 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2350 attributes to incomplete type reference.
2351 (xref_tag): Update call to parser_xref_tag.
2352 (declspecs_add_addrspace, declspecs_add_type)
2353 (declspecs_add_scspec, declspecs_add_attrs): Set
2354 non_std_attrs_seen_p.
2355 (finish_declspecs): Apply postfix standard attributes to type.
2356 * c-parser.c (c_token_starts_declspecs)
2357 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2358 (c_parser_next_tokens_start_declaration): Update comments.
2359 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2360 parser->tokens[2] to parser->tokens[1].
2361 (c_parser_nth_token_starts_std_attributes)
2362 (c_parser_std_attribute_specifier_sequence): New functions.
2363 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2364 attrs. All callers changed. Handle standard attributes.
2365 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2366 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2367 All callers changed.
2368 (c_parser_declspecs): Add arguments start_std_attr_ok and
2369 end_std_attr_ok. All callers changed. Handle standard
2370 attributes.
2371 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2372 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2373 (c_parser_compound_statement_nostart, c_parser_all_labels)
2374 (c_parser_label, c_parser_statement, c_parser_for_statement):
2375 Handle standard attributes.
2376 * c-parser.h (c_parser_declspecs): Update prototype.
2377 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2378 c_parser_declspecs.
2379
0c29cac4
ML
23802019-11-12 Martin Liska <mliska@suse.cz>
2381
2382 * gimple-parser.c: Do not include params.h.
2383
028d4092
ML
23842019-11-12 Martin Liska <mliska@suse.cz>
2385
2386 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2387 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2388 macro.
2389
62aee289
MR
23902019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2391 Frederik Harwath <frederik@codesourcery.com>
2392
2393 gcc/c/
2394 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2395 (c_parser_oacc_kernels_parallel): Rename function to...
2396 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2397 (c_parser_omp_construct): Update accordingly.
2398
2399
7cec9588
JJ
24002019-11-11 Jakub Jelinek <jakub@redhat.com>
2401
2402 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2403 without corresponding end declare target.
2404
f486280c
RS
24052019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2406
2407 * c-convert.c (convert): Only handle vector conversions if one of
2408 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2409 allows it.
2410 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2411 vectors satisfy gnu_vector_type_p.
2412 (build_unary_op): Only allow unary operators to be applied to
2413 vectors if they satisfy gnu_vector_type_p.
2414 (digest_init): Only allow by-element initialization of vectors
2415 if they satisfy gnu_vector_type_p.
2416 (really_start_incremental_init): Likewise.
2417 (push_init_level): Likewise.
2418 (pop_init_level): Likewise.
2419 (process_init_element): Likewise.
2420 (build_binary_op): Only allow binary operators to be applied to
2421 vectors if they satisfy gnu_vector_type_p.
2422
017c6491
JM
24232019-11-08 Joseph Myers <joseph@codesourcery.com>
2424
2425 * c-decl.c (grokparms): Convert () in a function definition to
2426 (void) for C2x.
2427 (store_parm_decls_oldstyle): Pedwarn for C2x.
2428 (store_parm_decls): Update comment about () not generating a
2429 prototype.
2430
c01bd174
JM
24312019-11-07 Joseph Myers <joseph@codesourcery.com>
2432
2433 * c-parser.c (c_parser_attribute_arguments): New function.
2434 Factored out of c_parser_gnu_attribute.
2435 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2436 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2437 (c_parser_std_attribute_specifier): New functions.
2438 (c_parser_transaction_attributes): Use
2439 c_parser_std_attribute_specifier.
2440
471c5330
JM
24412019-11-07 Joseph Myers <joseph@codesourcery.com>
2442
2443 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2444 lex_joined_string and translate_strings_p.
2445 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2446 c_lex_with_flags.
2447 (c_parser_string_literal): New function.
2448 (c_parser_static_assert_declaration_no_semi): Use
2449 c_parser_string_literal. Do not set lex_untranslated_string.
2450 (c_parser_asm_string_literal): Use c_parser_string_literal.
2451 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2452 (c_parser_gnu_attributes): Set and restore translate_strings_p
2453 instead of lex_untranslated_string.
2454 (c_parser_asm_statement): Do not set lex_untranslated_string.
2455 (c_parser_asm_operands): Likewise.
2456 (c_parser_has_attribute_expression): Set and restore
2457 translate_strings_p instead of lex_untranslated_string.
2458 (c_parser_postfix_expression): Use c_parser_string_literal.
2459 (pragma_lex): Likewise.
2460 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2461 (c_parse_file): Set translate_strings_p.
2462 * gimple-parser.c (c_parser_gimple_postfix_expression)
2463 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2464 * c-parser.c (c_parser_string_literal): Declare function.
2465
d0c464d2
JJ
24662019-11-02 Jakub Jelinek <jakub@redhat.com>
2467
2468 * c-parser.c (c_finish_omp_declare_variant): Use
2469 omp_get_context_selector instead of c_omp_get_context_selector.
2470
ac2cfa6c
RS
24712019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2472
2473 * c-tree.h (c_simulate_enum_decl): Declare.
2474 * c-decl.c (c_simulate_enum_decl): New function.
2475 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2476
74078538
RS
24772019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2478
2479 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2480 * c-decl.c (c_simulate_builtin_function_decl): New function.
2481 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2482 to the above.
2483
ad1539d5
MS
24842019-10-28 Martin Sebor <msebor@redhat.com>
2485
2486 PR c/66970
2487 * c-decl.c (names_builtin_p): Define a new function.
2488
cb73e4e7
RB
24892019-10-28 Richard Biener <rguenther@suse.de>
2490
2491 PR c/92249
2492 * gimple-parser.c (c_parser_parse_gimple_body): Make
2493 current_bb the entry block initially to easier recover
2494 from errors.
2495 (c_parser_gimple_compound_statement): Adjust.
2496
135df52c
JJ
24972019-10-24 Jakub Jelinek <jakub@redhat.com>
2498
2499 * c-parser.c (c_finish_omp_declare_variant): Use
2500 omp_context_selector_matches instead of
2501 c_omp_context_selector_matches.
2502 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2503 attribute in between declare target and end declare target
2504 pragmas.
2505
783bfe5e
JM
25062019-10-15 Joseph Myers <joseph@codesourcery.com>
2507
2508 * c-parser.c (c_parser_attribute_any_word): Rename to
2509 c_parser_gnu_attribute_any_word. All callers changed.
2510 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2511 callers changed.
2512 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2513 callers changed.
2514 (c_parser_declaration_or_fndef, c_parser_declspecs)
2515 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2516 (c_parser_struct_declaration, c_parser_declarator)
2517 (c_parser_gnu_attribute, c_parser_compound_statement)
2518 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2519 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2520 attribute-related syntax productions.
2521
56898e43
RS
25222019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2523
2524 * c-objc-common.c (useful_aka_type_p): Replace with...
2525 (get_aka_type): ...this new function. Given the original type,
2526 decide which aka type to print (if any). Only look through typedefs
2527 if user_facing_original_type_p.
2528 (print_type): Update accordingly.
2529
b9424661
JJ
25302019-10-14 Jakub Jelinek <jakub@redhat.com>
2531
2532 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2533 into int NESTED, if it is 2, diagnose missing commas in between
2534 clauses.
2535 (c_parser_omp_context_selector): Pass 2 as last argument to
2536 c_parser_omp_all_clauses.
2537
20de9568
JJ
25382019-10-12 Jakub Jelinek <jakub@redhat.com>
2539
2540 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2541 For simd properties, put them directly into TREE_VALUE.
2542 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2543 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2544 add "omp declare variant base" attribute rather than
2545 "omp declare variant".
2546
fe2bc27c
JM
25472019-10-11 Joseph Myers <joseph@codesourcery.com>
2548
2549 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2550
94e7f906
JJ
25512019-10-10 Jakub Jelinek <jakub@redhat.com>
2552
2553 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2554 true, terminate processing on closing paren and don't skip to end of
2555 pragma line.
2556 (c_parser_omp_declare_simd): Handle also declare variant.
2557 (omp_construct_selectors, omp_device_selectors,
2558 omp_implementation_selectors, omp_user_selectors): New variables.
2559 (c_parser_omp_context_selector,
2560 c_parser_omp_context_selector_specification,
2561 c_finish_omp_declare_variant): New functions.
2562 (c_finish_omp_declare_simd): Handle both declare simd and
2563 declare variant.
2564 (c_parser_omp_declare): Handle declare variant.
2565
93313b94
JM
25662019-10-02 Joseph Myers <joseph@codesourcery.com>
2567
2568 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2569 CPP_COLON tokens.
2570
55879815
RS
25712019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2572
2573 * c-objc-common.c (useful_aka_type_p): New function.
2574 (print_type): Use it to decide whether an aka type is worth printing.
2575
59bc434a
JJ
25762019-09-27 Jakub Jelinek <jakub@redhat.com>
2577
2578 PR c++/88203
2579 * c-parser.c (c_parser_predefined_identifier): New function.
2580 (c_parser_postfix_expression): Use it.
2581 (c_parser_omp_variable_list): Parse predefined identifiers.
2582 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2583 in shared and firstprivate clauses, even when they are predetermined
2584 shared.
2585
c6447c20
RS
25862019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2587
2588 * c-typeck.c (build_function_call_vec): Take the original function
2589 decl as an optional final parameter. Pass all built-in calls to
2590 check_builtin_function_arguments.
2591
522da4c2
EB
25922019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2593
2594 PR c/91815
2595 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2596 of identifiers in the external scope only for variables and functions.
2597
68e2c199
PK
25982019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2599
2600 PR c/78736
2601 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2602
22f8849d
IS
26032019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2604
2605 PR pch/61250
2606 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2607 after determining that the first token is not
2608 PRAGMA_GCC_PCH_PREPROCESS.
2609
db376f45
EB
26102019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2611
2612 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2613 FUNCTION_DECL to the right value in the presence of nested declarators.
2614
4d732405
RS
26152019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2616
2617 PR middle-end/91421
2618 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2619
cb1180d5
RS
26202019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2621
2622 PR middle-end/91421
2623 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2624 of a built_in_function.
2625 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2626
77eb117f
JJ
26272019-08-10 Jakub Jelinek <jakub@redhat.com>
2628
2629 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2630 (c_parser_omp_clause_device_type): New function.
2631 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2632 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2633 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2634 diagnostics for declare target with clauses nested in clause-less
2635 declare target declaration-definition-seq.
2636 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2637
2c3b8bad
JJ
26382019-08-09 Jakub Jelinek <jakub@redhat.com>
2639
bb522e2e
JJ
2640 * c-parser.c (check_no_duplicate_clause): Simplify using
2641 omp_find_clause.
2642 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2643 directive name modifiers.
2644 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2645
2c3b8bad
JJ
2646 PR c/91401
2647 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2648 check_no_duplicate_clause call. Comment it out, instead emit a
2649 warning for duplicate dist_schedule clauses.
2650
99769e7f
RS
26512019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2652
2653 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2654
8860d270
JJ
26552019-08-08 Jakub Jelinek <jakub@redhat.com>
2656
2657 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2658 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2659 instead of generic_head to track duplicates.
2660
398e3feb
JJ
26612019-08-07 Jakub Jelinek <jakub@redhat.com>
2662
2663 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2664 (c_parser_omp_clause_use_device_addr): New function.
2665 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2666 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2667 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2668 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2669 map or use_device_* clauses.
2670 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2671 in OpenMP, require pointer type rather than pointer or array type.
2672 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2673
a28351e7
JJ
26742019-07-31 Jakub Jelinek <jakub@redhat.com>
2675
2676 PR c/91192
2677 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2678 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2679 case.
2680
6343b6bf
ML
26812019-07-25 Martin Liska <mliska@suse.cz>
2682 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2683
2684 PR c++/23383
2685 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2686
cb50701e
ML
26872019-07-25 Martin Liska <mliska@suse.cz>
2688
2689 * c-decl.c (merge_decls): Use new macros
2690 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2691
62e3e66f
RB
26922019-07-23 Richard Biener <rguenther@suse.de>
2693
2694 PR tree-optimization/83518
2695 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2696 a CFG also rebuild cgraph edges.
2697
554a530f
JJ
26982019-07-20 Jakub Jelinek <jakub@redhat.com>
2699
2700 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2701 (c_parser_omp_clause_bind): New function.
2702 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2703 (OMP_LOOP_CLAUSE_MASK): Define.
2704 (c_parser_omp_loop): New function.
2705 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2706 loop combined with parallel or teams.
2707 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2708 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2709
d119bf79
RS
27102019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2711
2712 PR c/53633
2713 * c-decl.c (finish_function): Check targetm.warn_func_return
2714 before issuing a -Wreturn-type warning.
2715
ab20d992 27162019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2717
2718 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2719 (c_parser_compound_statement): Call it.
2720
1fdd6f04
JJ
27212019-07-12 Jakub Jelinek <jakub@redhat.com>
2722
2723 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2724 (c_parser_omp_clause_order): New function.
2725 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2726 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2727 PRAGMA_OMP_CLAUSE_ORDER.
2728 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2729
8389386c
RB
27302019-07-10 Richard Biener <rguenther@suse.de>
2731
2732 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2733 _Literal (int *) &x for address literals.
2734
99b1c316
MS
27352019-07-09 Martin Sebor <msebor@redhat.com>
2736
2737 PR c++/61339
2738 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2739 to class.
2740 (field_decl_cmp): Same.
2741 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2742 * c-tree.h: Same.
2743 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2744
6c1dae73
MS
27452019-07-09 Martin Sebor <msebor@redhat.com>
2746
2747 PR c++/61339
2748 * c-decl.c: Change class-key from class to struct and vice versa
2749 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2750 * gimple-parser.c: Same.
2751
69b5279e
RB
27522019-07-01 Richard Biener <rguenther@suse.de>
2753
2754 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2755 _Literal (char *) &"foo" for address literals pointing to
2756 STRING_CSTs.
2757
ab20d992
JJ
27582019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2759
2760 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2761 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2762 C incompatibility if alternate "__intN__" form is used.
2763
1e3d475e
MS
27642019-06-24 Martin Sebor <msebor@redhat.com>
2765
2766 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2767
bf38f7e9
JJ
27682019-06-10 Jakub Jelinek <jakub@redhat.com>
2769
2770 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2771 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2772 (c_parser_omp_scan_loop_body): New function.
2773 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2774 inscan reduction clauses.
2775 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2776 non-inscan reductions on the same construct, or inscan reductions with
2777 ordered or schedule clauses, or inscan array reductions.
2778
65985d78
MS
27792019-06-05 Martin Sebor <msebor@redhat.com>
2780
2781 PR c/90737
2782 * c-typeck.c (c_finish_return): Only consider functions returning
2783 pointers as candidates for -Wreturn-local-addr.
2784
0ecf545c
MS
27852019-06-05 Martin Sebor <msebor@redhat.com>
2786
2787 * c-decl.c (start_decl): Adjust quoting and hyphenation
2788 in diagnostics.
2789 (finish_decl): Same.
2790 (finish_enum): Same.
2791 (start_function): Same.
2792 (declspecs_add_type): Same.
2793 * c-parser.c (warn_for_abs): Same.
2794 * c-typeck.c (build_binary_op): Same.
2795
e03436e7
TS
27962019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2797
b48f44bf
TS
2798 PR c/89433
2799 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2800 marked with an OpenACC 'routine' directive.
2801
5bf04509
TS
2802 PR c/89433
2803 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2804 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2805
e03436e7
TS
2806 PR c/89433
2807 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2808 clauses from "omp declare target" attribute.
2809
a9c697b8
MS
28102019-05-16 Martin Sebor <msebor@redhat.com>
2811
ab20d992
JJ
2812 * c-decl.c (start_decl): Quote keywords, operators, and
2813 types in diagnostics.
2814 (finish_decl): Same.
2815 * c-parser.c (c_parser_asm_statement): Same.
2816 (c_parser_conditional_expression): Same.
2817 (c_parser_transaction_cancel): Same.
2818 * c-typeck.c (c_common_type): Same.
2819 (build_conditional_expr): Same.
2820 (digest_init): Same.
2821 (process_init_element): Same.
2822 (build_binary_op): Same.
a9c697b8 2823
c4499192
RB
28242019-05-17 Richard Biener <rguenther@suse.de>
2825
2826 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2827 (c_parser_gimple_unary_expression): Likewise.
2828 (c_parser_gimple_parentized_ternary_expression): New function.
2829
adfe6e4b
RB
28302019-05-16 Richard Biener <rguenther@suse.de>
2831
2832 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2833 (c_parser_gimple_unary_expression): Likewise.
2834
186dabf2
RB
28352019-05-15 Richard Biener <rguenther@suse.de>
2836
2837 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2838 __BIT_FIELD_REF.
2839
1158c5b4
RB
28402019-05-14 Richard Biener <rguenther@suse.de>
2841
2842 * gimple-parser.c (c_parser_gimple_statement): Remove
2843 questionable auto-promotion to VIEW_CONVERT_EXPR.
2844 (c_parser_gimple_typespec): Split out from __MEM parsing.
2845 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2846 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2847 as __VIEW_CONVERT with -gimple.
2848
fd4485aa
ML
28492019-05-09 Martin Liska <mliska@suse.cz>
2850
2851 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2852 __MAX.
2853 (c_parser_gimple_unary_expression): Parse also binary expression
2854 __MIN and __MAX.
2855 (c_parser_gimple_parentized_binary_expression): New function.
2856
d276406a
ML
28572019-05-09 Martin Liska <mliska@suse.cz>
2858
2859 * gimple-parser.c (struct gimple_parser): Add probability.
2860 for gimple_parser_edge.
2861 (gimple_parser::push_edge): Add new argument probability.
2862 (c_parser_gimple_parse_bb_spec): Parse also probability
2863 if present.
2864 (c_parser_parse_gimple_body): Set edge probability.
2865 (c_parser_gimple_compound_statement): Consume token
2866 before calling c_parser_gimple_goto_stmt.
2867 Parse BB counts.
2868 (c_parser_gimple_statement): Pass new argument.
2869 (c_parser_gimple_goto_stmt): Likewise.
2870 (c_parser_gimple_if_stmt): Likewise.
2871 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2872 * c-parser.c (c_parser_declaration_or_fndef): Pass
2873 hot_bb_threshold argument.
2874 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2875 field.
2876 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2877
f179b64e
JJ
28782019-04-26 Jakub Jelinek <jakub@redhat.com>
2879
2880 PR debug/90197
2881 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2882 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2883 (c_parser_do_statement): Likewise.
2884 (c_parser_for_statement): Likewise. Formatting fixes.
2885 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2886 emit DEBUG_BEGIN_STMTs if needed.
2887
e7178413
JJ
28882019-04-19 Jakub Jelinek <jakub@redhat.com>
2889
c280b7ee
JJ
2890 PR c/89888
2891 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2892 (c_start_case): Don't clear it.
2893 (do_case): Adjust c_add_case_label caller.
2894 (c_finish_case): Adjust c_do_switch_warnings caller.
2895
e7178413
JJ
2896 PR c++/90108
2897 * c-decl.c (merge_decls): If remove is main variant and
2898 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2899 variant that has newdecl as TYPE_NAME if any.
2900
60a2c645
JJ
29012019-04-12 Jakub Jelinek <jakub@redhat.com>
2902
2903 PR c/89933
2904 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2905 don't try to remove it from the variant list, but instead assert
2906 it has no variants.
2907
2a82beaa
RB
29082019-04-01 Richard Biener <rguenther@suse.de>
2909
2910 PR c/71598
2911 * c-tree.h (c_get_alias_set): Declare.
2912 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2913 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2914 as the underlying integer type.
2915
bec1da64
MS
29162019-03-19 Martin Sebor <msebor@redhat.com>
2917
2918 PR tree-optimization/89688
2919 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2920 kinds of initializers.
2921
855cd9b1
JJ
29222019-03-19 Jakub Jelinek <jakub@redhat.com>
2923
2924 PR c/89734
2925 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2926 return type even if quals_used is 0. Formatting fixes.
2927
baa09dc5
RB
29282019-03-14 Richard Biener <rguenther@suse.de>
2929
2930 * c-tree.h (enum c_declspec_il): New.
2931 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2932 enum bitfield.
2933 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2934 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2935 (c_parser_declspecs): Adjust.
2936 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2937 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2938 and bitmap.h.
2939 (struct gimple_parser): New.
2940 (gimple_parser::push_edge): New method.
2941 (c_parser_gimple_parse_bb_spec): New helper.
2942 (c_parser_parse_gimple_body): Get start pass and IL specification.
2943 Initialize SSA and CFG.
2944 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2945 Build a gimple_parser parsing state and pass it along.
2946 (c_parser_gimple_statement): Change intermittend __PHI internal
2947 function argument for the edge.
2948 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2949 (c_parser_gimple_goto_stmt): Record edges to build.
2950 (c_parser_gimple_if_stmt): Likewise.
2951 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2952 (c_parser_gimple_or_rtl_pass_list): Likewise.
2953
a3f9f006
ML
29542019-03-11 Martin Liska <mliska@suse.cz>
2955
2956 * c-decl.c (check_for_loop_decls): Wrap an option name
2957 in a string format message and fix GNU coding style.
2958 * c-parser.c (c_parser_declspecs): Likewise.
2959
1db01ff9
JJ
29602019-03-08 Jakub Jelinek <jakub@redhat.com>
2961
2962 PR tree-optimization/89550
2963 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2964 returned true.
2965 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2966 or warning returned true.
2967
66dcb747
JJ
29682019-02-28 Jakub Jelinek <jakub@redhat.com>
2969
2970 PR c/89525
2971 * c-typeck.c (convert_arguments): Call inform_declaration only if
2972 the previous warning_at call returned true.
2973
2263c9f2
TS
29742019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2975
2976 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2977 parameter. Adjust all users.
2978 (c_parser_oacc_simple_clause): Replace parser with loc formal
2979 parameter. Adjust all users.
2980
ab20d992 29812019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2982
2983 PR c/87924
2984 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2985 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2986
5f88ba10
JJ
29872019-02-15 Jakub Jelinek <jakub@redhat.com>
2988
2989 PR c/89340
2990 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2991 before c_decl_attributes rather than after it.
2992
cfc30fd1
JJ
29932019-02-06 Jakub Jelinek <jakub@redhat.com>
2994
2995 PR c/89211
2996 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2997 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2998 instead of 3 nested ifs.
2999
fbe83e6b
JM
30002019-02-06 Joseph Myers <joseph@codesourcery.com>
3001
3002 PR c/88584
3003 * c-decl.c (finish_decl): Do not complete array types for arrays
3004 with external linkage not at file scope.
3005
f461f938
RB
30062019-02-05 Richard Biener <rguenther@suse.de>
3007
3008 PR c/88606
3009 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3010 all type variants when not supported.
3011
fe509359
JJ
30122019-01-30 Jakub Jelinek <jakub@redhat.com>
3013
3014 PR c/89061
3015 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3016 * c-decl.c (decl_jump_unsafe): Return false for
3017 C_DECL_COMPOUND_LITERAL_P decls.
3018 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3019
6a335b96
JJ
30202019-01-29 Jakub Jelinek <jakub@redhat.com>
3021
f4b7e754
JJ
3022 PR c/89045
3023 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3024 scope.
3025
6a335b96
JJ
3026 PR c/86125
3027 * c-decl.c (last_fileptr_type): Remove.
3028 (last_structptr_types): New variable.
3029 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3030 {old,new}rettype instead of the types themselves. Assert
3031 last_structptr_types array has the same number of elements
3032 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3033 argument oldtype and newtype. Instead of handling
3034 just fileptr_type_node specially, handle all builtin_structptr_types
3035 pointer nodes. Formatting fix.
3036
d8b5a1a0
MS
30372019-01-24 Martin Sebor <msebor@redhat.com>
3038
3039 PR c/86125
3040 PR c/88886
3041 PR middle-end/86308
3042 * c-decl.c (match_builtin_function_types): Add arguments.
3043 (diagnose_mismatched_decls): Diagnose mismatched declarations
3044 of built-ins more strictly.
3045
e21c4491
JJ
30462019-01-24 Jakub Jelinek <jakub@redhat.com>
3047
3048 PR c++/88976
3049 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3050 on #pragma omp cancel with different modifiers.
3051
420183d9
L
30522019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3053
3054 PR c/51628
3055 PR c/88664
3056 * c-typeck.c (convert_for_assignment): Upate the
3057 warn_for_address_or_pointer_of_packed_member call.
3058
17ad43dd
TH
30592019-01-16 Tom Honermann <tom@honermann.net>
3060 Jason Merrill <jason@redhat.com>
3061
3062 * c-typeck.c (digest_init): Revised the error message produced for
3063 ill-formed cases of array initialization with a string literal.
3064 (error_init): Make variadic.
3065
5f07d78a
JJ
30662019-01-12 Jakub Jelinek <jakub@redhat.com>
3067
3068 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3069
c4581bbf
JJ
30702019-01-07 Jakub Jelinek <jakub@redhat.com>
3071
3072 PR c/88701
3073 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3074 if current_function_decl is non-NULL.
3075
65c5b1eb
JM
30762019-01-07 Joseph Myers <joseph@codesourcery.com>
3077
3078 PR c/88720
3079 PR c/88726
3080 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3081 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3082 functions declared but never defined only for external scope, not
3083 for other scopes.
3084
d8fcab68
JJ
30852019-01-07 Jakub Jelinek <jakub@redhat.com>
3086
3087 PR c++/85052
3088 * c-parser.c (c_parser_postfix_expression): Parse
3089 __builtin_convertvector.
3090
a5544970
JJ
30912019-01-01 Jakub Jelinek <jakub@redhat.com>
3092
3093 Update copyright years.
3094
da77eace
L
30952018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3096
3097 PR c/51628
3098 * c-typeck.c (convert_for_assignment): Call
3099 warn_for_address_or_pointer_of_packed_member.
3100
1edf8866
SB
31012018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3102
3103 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3104 a more specific error message (instead of just falling through).
3105
db4fd626
SB
31062018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3107
3108 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3109 asm qualifier is first seen; use that to give nicer "duplicate asm
3110 qualifier" messages. Delete 'quals" variable, instead pass the
3111 "is_volatile_ flag to build_asm_stmt directly.
3112 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3113 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3114
9c9cfcbb
SB
31152018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3116
3117 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3118 "done" boolean variable.
3119
a14feb3c
DM
31202018-12-19 David Malcolm <dmalcolm@redhat.com>
3121
3122 PR c++/87504
3123 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3124 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3125 (build_binary_op): Use struct op_location_t and
3126 class binary_op_rich_location.
3127
6d939173
JJ
31282018-12-11 Jakub Jelinek <jakub@redhat.com>
3129
3130 PR sanitizer/88426
3131 * c-convert.c (convert): Call c_fully_fold before calling
3132 ubsan_instrument_float_cast.
3133
b7055028
SB
31342018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3135
3136 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3137 setting "quals".
3138
5b76e75f
SB
31392018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3140
3141 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3142 after asm. Pass a flag for it to build_asm_expr.
3143 * c-tree.h (build_asm_expr): Update declaration.
3144 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3145 set ASM_INLINE_P.
3146
30bd42b9
SB
31472018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3148
3149 PR inline-asm/55681
3150 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3151 combination of volatile and goto, in any order, without repetitions.
3152
9df6c0e4
JB
31532018-12-04 James Norris <jnorris@codesourcery.com>
3154 Cesar Philippidis <cesar@codesourcery.com>
3155 Julian Brown <julian@codesourcery.com>
3156
3157 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3158 code.
3159
f44697b7
RB
31602018-11-30 Richard Biener <rguenther@suse.de>
3161
3162 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3163 _Literal (type) { ... } as empty aggregate or vector constructor.
3164
550dfbdc
MS
31652018-11-29 Martin Sebor <msebor@redhat.com>
3166
3167 PR c/88091
3168 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3169 (convert_arguments): Add comments. Pass additional argument to
3170 the function above.
3171
673670da
MS
31722018-11-29 Martin Sebor <msebor@redhat.com>
3173
3174 PR c/88172
3175 PR testsuite/88208
3176 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3177
db1d09b0
MS
31782018-11-23 Martin Sebor <msebor@redhat.com>
3179
3180 PR testsuite/88098
3181 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3182 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3183
98f08eb8
MS
31842018-11-20 Martin Sebor <msebor@redhat.com>
3185
3186 * c-parser.c (c_parser_has_attribute_expression): New function.
3187 (c_parser_attribute): New function.
3188 (c_parser_attributes): Move code into c_parser_attribute.
3189 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3190
cd5da983
MS
31912018-11-15 Martin Sebor <msebor@redhat.com>
3192
3193 PR c/83656
3194 * c-decl.c (header_for_builtin_fn): Declare.
3195 (diagnose_mismatched_decls): Diagnose declarations of built-in
3196 functions without a prototype.
3197 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3198 (convert_argument): Same.
3199 (convert_arguments): Factor code out into convert_argument.
3200 Detect mismatches between built-in formal arguments in calls
3201 to built-in without prototype.
3202 (build_conditional_expr): Same.
3203 (type_or_builtin_type): New function.
3204 (convert_for_assignment): Add argument. Conditionally issue
3205 warnings instead of errors for mismatches.
3206
620e594b
DM
32072018-11-13 David Malcolm <dmalcolm@redhat.com>
3208
3209 * c-decl.c: Replace "source_location" with "location_t".
3210 * c-tree.h: Likewise.
3211 * c-typeck.c: Likewise.
3212 * gimple-parser.c: Likewise.
3213
3179ebae
JJ
32142018-11-09 Jakub Jelinek <jakub@redhat.com>
3215
81a227c6
JJ
3216 * c-parser.c (c_parser_omp_clause_final): Use
3217 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3218 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3219 parsing instead of c_parser_paren_condition.
3220 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3221 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3222 c_fully_fold instead of c_parser_condition.
3223 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3224 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3225 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3226 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3227 c_parser_expr_no_commas instead of c_parser_expression.
3228
98c91c56
JJ
3229 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3230 reduction clause with inscan modifier.
3231
3179ebae
JJ
3232 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3233 clauses other than atomic_default_mem_order.
3234
28567c40
JJ
32352018-11-08 Jakub Jelinek <jakub@redhat.com>
3236
3237 * c-parser.c: Include memmode.h.
3238 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3239 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3240 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3241 task_reduction clauses.
3242 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3243 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3244 section, or lvalue assignment expression.
3245 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3246 (c_parser_omp_clause_lastprivate): Parse optional
3247 conditional: modifier.
3248 (c_parser_omp_clause_hint): Require constant integer expression rather
3249 than just integer expression.
3250 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3251 clause.
3252 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3253 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3254 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3255 functions.
3256 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3257 iterators. Parse mutexinoutset and depobj kinds.
3258 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3259 callers.
3260 (c_parser_omp_all_clauses): Likewise. Handle
3261 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3262 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3263 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3264 default memory order from requires directive if any. Adjust
3265 c_finish_omp_atomic caller.
3266 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3267 (c_parser_omp_flush): Parse flush with memory-order-clause.
3268 (c_parser_omp_for_loop): Allow NE_EXPR even in
3269 OpenMP loops, adjust c_finish_omp_for caller.
3270 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3271 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3272 Allow to be called while parsing combined parallel master.
3273 Parse combined master taskloop{, simd}.
3274 (c_parser_omp_parallel): Parse combined
3275 parallel master{, taskloop{, simd}} constructs.
3276 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3277 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3278 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3279 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3280 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3281 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3282 around teams body. Use SET_EXPR_LOCATION.
3283 (c_parser_omp_target_data): Allow target data
3284 with only use_device_ptr clauses.
3285 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3286 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3287 (c_parser_omp_requires): New function.
3288 (c_finish_taskloop_clauses): New function.
3289 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3290 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3291 declaration. Disallow in_reduction clause when combined with parallel
3292 master.
3293 (c_parser_omp_construct): Adjust c_parser_omp_master and
3294 c_parser_omp_taskgroup callers.
3295 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3296 other than cancel.
3297 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3298 like OMP_CLAUSE_REDUCTION.
3299 (handle_omp_array_sections): Likewise. Call save_expr on array
3300 reductions before calling build_index_type. Handle depend clauses
3301 with iterators.
3302 (struct c_find_omp_var_s): New type.
3303 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3304 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3305 with static, runtime or auto schedule kinds. Call save_expr for whole
3306 array reduction sizes. Diagnose reductions with zero sized elements
3307 or variable length structures. Diagnose nogroup clause used with
3308 reduction clause(s). Handle depend clause with
3309 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3310 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3311 some different type for other kinds. Use build_unary_op with
3312 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3313 Handle depend clauses with iterators. Remove no longer needed special
3314 case that predetermined const qualified vars may be specified in
3315 firstprivate clause. Complain if const qualified vars are mentioned
3316 in data-sharing clauses other than firstprivate or shared. Use
3317 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3318 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3319 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3320 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3321
7e2de6df
DM
33222018-10-29 David Malcolm <dmalcolm@redhat.com>
3323
3324 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3325 logic for change to name_hint::operator bool.
3326 (undeclared_variable): Likewise.
3327 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3328 (c_parser_parameter_declaration): Likewise.
3329
9f936c86
JM
33302018-10-17 Joseph Myers <joseph@codesourcery.com>
3331
3332 * c-errors.c (pedwarn_c11): New function.
3333 * c-parser.c (disable_extension_diagnostics): Save
3334 warn_c11_c2x_compat and set it to 0.
3335 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3336 (c_parser_static_assert_declaration_no_semi): Handle
3337 _Static_assert without string constant.
3338 * c-tree.h (pedwarn_c11): New prototype.
3339
033eb567
DM
33402018-10-17 David Malcolm <dmalcolm@redhat.com>
3341
3342 * Make-lang.in (selftest-c): New.
3343 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3344 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3345 from gcc/Makefile.in.
3346
0edf3afe
RB
33472018-10-02 Richard Biener <rguenther@suse.de>
3348
3349 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3350
8313a764
JM
33512018-09-26 Joseph Myers <joseph@codesourcery.com>
3352
3353 PR c/87390
3354 * c-typeck.c (build_binary_op): Use excess precision for
3355 comparisons of integers and floating-point for C11 and later.
3356
ce6f0888
MJ
33572018-09-26 Martin Jambor <mjambor@suse.cz>
3358
3359 PR c/87347
3360 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 3361 comment.
ce6f0888 3362
9c4a4b3c
DM
33632018-09-17 David Malcolm <dmalcolm@redhat.com>
3364
3365 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3366 Update for new param.
3367 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3368 Likewise.
3369
80c6d1f4
MJ
33702018-09-17 Martin Jambor <mjambor@suse.cz>
3371
3372 PR c/63886
3373 * c-parser.c: (warn_for_abs): New function.
3374 (c_parser_postfix_expression_after_primary): Call it.
3375
4a426e36
BE
33762018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3377
3378 * c-typeck.c (digest_init): Shorten overlength strings.
3379
6d900107
BE
33802018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3381
3382 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3383
b5764229
BE
33842018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3385
3386 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3387 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3388
22eea6b2
AM
33892018-08-30 Alexander Monakov <amonakov@ispras.ru>
3390
3391 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3392 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3393
85204e23
DM
33942018-08-27 David Malcolm <dmalcolm@redhat.com>
3395
3396 PR 87091
3397 * c-decl.c (implicitly_declare): Update call to
3398 maybe_add_include_fixit to suggest overriding the location, as it
3399 is for a note.
3400 * c-objc-common.c (c_tree_printer): Update for conversion of
3401 show_caret_p to a tri-state.
3402
3d78e008
ML
34032018-08-27 Martin Liska <mliska@suse.cz>
3404
3405 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
3406 fndecl_built_in_p and remove check for FUNCTION_DECL if
3407 possible.
3d78e008
ML
3408 (diagnose_mismatched_decls): Likewise.
3409 (merge_decls): Likewise.
3410 (warn_if_shadowing): Likewise.
3411 (pushdecl): Likewise.
3412 (implicitly_declare): Likewise.
3413 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3414 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3415 * c-typeck.c (build_function_call_vec): Likewise.
3416 (convert_arguments): Likewise.
3417
097f82ec
DM
34182018-08-20 David Malcolm <dmalcolm@redhat.com>
3419
3420 PR other/84889
3421 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3422 (diagnose_mismatched_decls): Likewise, in various places.
3423 (warn_if_shadowing): Likewise.
3424 (implicit_decl_warning): Likewise.
3425 (implicitly_declare): Likewise.
3426 (undeclared_variable): Likewise.
3427 (declare_label): Likewise.
3428 (grokdeclarator): Likewise.
3429 (start_function): Likewise.
3430 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3431 (c_parser_parameter_declaration): Likewise.
3432 (c_parser_binary_expression): Likewise.
3433 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3434 (parser_build_binary_op): Likewise.
3435 (build_unary_op): Likewise.
3436 (error_init): Likewise.
3437 (pedwarn_init): Likewise.
3438 (warning_init): Likewise.
3439 (convert_for_assignment): Likewise.
3440
96e6ae57
DM
34412018-08-15 David Malcolm <dmalcolm@redhat.com>
3442
3443 * c-objc-common.c: Include "gcc-rich-location.h".
3444 (c_tree_printer): Move implemenation of '%T' to...
3445 (print_type): ...this new function.
3446 (range_label_for_type_mismatch::get_text): New function.
3447 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3448 range for the various ic_argpass cases.
3449 (class maybe_range_label_for_tree_type_mismatch): New class.
3450 (build_binary_op): Use it when calling binary_op_error.
3451
0cd020ae 34522018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3453
0cd020ae
PK
3454 * c-decl.c (start_decl): Do not warn if variables is named as main
3455 and is a local variable.
3456
72733314
IS
34572018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3458
3459 PR c/19315
3460 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3461 objects of unknown size.
3462
23aa9f7c
MS
34632018-08-13 Martin Sebor <msebor@redhat.com>
3464
3465 PR tree-optimization/71625
3466 * c-parser.c (c_parser_declaration_or_fndef): Call
3467 braced_list_to_string.
3468
e5e7e50d
BH
34692018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3470
3471 PR c/86690
3472 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3473 errors.
3474
8a45b051
MS
34752018-08-01 Martin Sebor <msebor@redhat.com>
3476
3477 PR tree-optimization/86650
3478 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3479 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3480
5922dcb5
JJ
34812018-08-01 Jakub Jelinek <jakub@redhat.com>
3482
3483 PR c/85704
3484 * c-typeck.c (init_field_decl_cmp): New function.
3485 (output_pending_init_elements): Use it for field comparisons
3486 instead of pure bit_position comparisons.
3487
9b452033
JJ
34882018-07-12 Jakub Jelinek <jakub@redhat.com>
3489
3490 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3491 type here, instead add "omp declare target implicit" attribute.
3492 (finish_decl): Diagnose vars without mappable type here.
3493
ab20d992
JJ
34942018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3495 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3496 Cesar Philippidis <cesar@codesourcery.com>
3497
3498 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3499 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3500 to their non-present_or_* counterparts. Make 'self' an alias to
3501 PRAGMA_OACC_CLAUSE_HOST.
3502 (c_parser_oacc_data_clause): Update GOMP mappings for
3503 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3504 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3505 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3506 Remove support for present_or_* clauses.
3507 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3508 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3509 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3510 (OACC_DATA_CLAUSE_MASK): Likewise.
3511 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3512 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3513 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3514 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3515 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3516
e197e64e
KV
35172018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3518
3519 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3520 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3521 (c_parser_gimple_unary_expression): Likewise.
3522
487f2f61
JJ
35232018-06-15 Jakub Jelinek <jakub@redhat.com>
3524
3525 PR c/86093
3526 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3527 before doing POINTER_DIFF_EXPR.
3528
e4d44a37
MP
35292018-06-07 Marek Polacek <polacek@redhat.com>
3530
3531 PR c/85318
3532 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3533 for loop initial declarations.
3534
b67b9225
DP
35352018-05-30 David Pagan <dave.pagan@oracle.com>
3536
3537 PR c/55976
3538 * c-decl.c (grokdeclarator): Update check for return type warnings.
3539 (start_function): Likewise.
3540 (finish_function): Likewise.
3541 * c-typeck.c (c_finish_return): Update check for return type warnings.
3542 Pass OPT_Wreturn_type to pedwarn when appropriate.
3543
c566cc9f
RS
35442018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3545
3546 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3547 __FMA_EXPR handlng.
3548
e4f81565
RS
35492018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3550
3551 * gimple-parser.c: Include internal-fn.h.
3552 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3553 (c_parser_gimple_call_internal): New function.
3554 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3555 Fix typos in comment.
3556
79e7b1fe
JJ
35572018-05-10 Jakub Jelinek <jakub@redhat.com>
3558
3559 PR c++/85662
3560 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3561 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3562 fold_convert_loc.
3563 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3564 fold_offsetof_1, pass argtype as TYPE to it and drop the
3565 fold_convert_loc.
3566
f7584c81
DP
35672018-05-02 David Pagan <dave.pagan@oracle.com>
3568
3569 PR c/30552
3570 * c-decl.c (old_style_parameter_scope): New function.
3571 * c-parser.c (c_parser_postfix_expression): Check for statement
3572 expressions in old-style function parameter list declarations.
3573 * c-parser.h (old_style_parameter_scope): New extern declaration.
3574
b33a0cb3
JJ
35752018-04-25 Jakub Jelinek <jakub@redhat.com>
3576
3577 PR sanitizer/84307
3578 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3579 it is not TREE_STATIC.
3580 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3581 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3582 its COMPOUND_LITERAL_EXPR_DECL.
3583
c5c5822a
JM
35842018-03-21 Joseph Myers <joseph@codesourcery.com>
3585
3586 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3587 where all functions return the same _FloatN or _FloatNx type,
3588 treat integer types as _Float64 instead of double.
3589
aa1c9429
JJ
35902018-03-21 Jakub Jelinek <jakub@redhat.com>
3591
3592 PR c/84999
3593 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3594 building vector comparison, diagnose it and return error_mark_node.
3595
9bb45a95
JJ
35962018-03-15 Jakub Jelinek <jakub@redhat.com>
3597
3598 PR c/84853
3599 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3600 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3601 INTEGER_TYPE element type.
3602
ada6bad9
DP
36032018-03-13 David Pagan <dave.pagan@oracle.com>
3604
3605 PR c/46921
3606 * c-typeck.c (output_init_element): Ensure field initializer
3607 expression is always evaluated if there are side effects.
3608
849bbdb9
JJ
36092018-03-06 Jakub Jelinek <jakub@redhat.com>
3610
3611 PR c/84721
3612 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3613 !building_stmt_list_p ().
3614
d74641bd
RS
36152018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3616
3617 PR c/84305
3618 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3619 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3620 and include the BIND_EXPR in the list of things that need to be
3621 pre-evaluated.
3622
0444aa9c
NS
36232018-02-09 Nathan Sidwell <nathan@acm.org>
3624
3625 PR c/84293
3626 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3627 to strict_aliasing_warning.
3628
7c30b12a
PC
36292018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3630
3631 * c-typeck.c (really_start_incremental_init, push_init_level,
3632 set_nonincremental_init, output_init_element, process_init_element):
3633 Use DECL_UNNAMED_BIT_FIELD.
3634
2be4dfcb
MP
36352018-01-31 Marek Polacek <polacek@redhat.com>
3636
3637 PR c/81779
3638 * c-parser.c (c_parser_compound_statement_nostart): Call
3639 expansion_point_location_if_in_system_header.
3640
bb9869d5
DM
36412018-01-17 David Malcolm <dmalcolm@redhat.com>
3642
3643 PR c++/83814
3644 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3645 the C part.
3646
b4923738
JJ
36472018-01-13 Jakub Jelinek <jakub@redhat.com>
3648
3649 PR c/83801
3650 * c-tree.h (decl_constant_value_1): Add a bool argument.
3651 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3652 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3653 (decl_constant_value): Adjust caller.
3654 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3655 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3656 decl_constant_value returns initializer that has BLKmode or
3657 array type.
3658 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3659
928686b1
RS
36602018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3661 Alan Hayward <alan.hayward@arm.com>
3662 David Sherwood <david.sherwood@arm.com>
3663
3664 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3665 TYPE_VECTOR_SUBPARTS.
3666
85ec4feb
JJ
36672018-01-03 Jakub Jelinek <jakub@redhat.com>
3668
3669 Update copyright years.
3670
913884f7
JJ
36712018-01-01 Jakub Jelinek <jakub@redhat.com>
3672
3673 PR c/83595
3674 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3675 c_parser_conditional_expression, c_parser_cast_expression,
3676 c_parser_sizeof_expression, c_parser_alignof_expression,
3677 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3678 c_parser_transaction_expression): Use set_error () method instead
3679 of setting value member to error_mark_node.
3680
c6cfa2bf
MM
36812017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3682
3683 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3684 and _Float<N>X built-in functions.
3685
11d29d63
JJ
36862017-12-22 Jakub Jelinek <jakub@redhat.com>
3687
14ec014e
JJ
3688 PR debug/83550
3689 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3690 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3691 incomplete vars rather than after it.
3692
11d29d63
JJ
3693 PR debug/83547
3694 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3695 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3696 and consider empty ones if there are no other stmts. For
3697 -Wunused-value walk all statements before the one only followed by
3698 DEBUG_BEGIN_STMTs.
3699
170a8bd6 37002017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3701 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3702
3703 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3704 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3705 (c_parser_do_statement): Likewise.
3706 (c_parser_for_statement): Likewise.
3707 (c_parser_statement_after_labels): Adjust calls to above.
3708 (c_parse_pragma_ivdep): New static function.
3709 (c_parser_pragma_unroll): Likewise.
3710 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3711 <PRAGMA_UNROLL>: New case.
3712
01512446
JJ
37132017-12-19 Jakub Jelinek <jakub@redhat.com>
3714
3715 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3716 perform_integral_promotions, digest_init): Replace Yoda conditions
3717 with typical order conditions.
3718 * c-decl.c (check_bitfield_type_and_width): Likewise.
3719
c65e18d3
BE
37202017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3721
3722 * c-typeck.c (c_safe_arg_type_equiv_p,
3723 c_safe_function_type_cast_p): New function.
3724 (build_c_cast): Implement -Wcast-function-type.
3725
b7280579
RB
37262017-12-14 Richard Biener <rguenther@suse.de>
3727
3728 PR c/83415
3729 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3730 like REALPART_EXPR for the behavior of whether its operand
3731 is an lvalue.
3732
49e6a6c0
MP
37332017-12-12 Marek Polacek <polacek@redhat.com>
3734
3735 PR c/82679
3736 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3737
ab20d992 37382017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3739
3740 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3741 * c-parser.c (add_debug_begin_stmt): New.
3742 (c_parser_declaration_or_fndef): Call it.
3743 (c_parser_compound_statement_nostart): Likewise.
3744 (c_parser_statement_after_labels): Likewise.
3745 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3746
4b2b493f
JM
37472017-12-07 Joseph Myers <joseph@codesourcery.com>
3748
3749 * c-decl.c (build_compound_literal): Add parameter alignas_align
3750 and set alignment of decl if nonzero.
3751 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3752 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3753 qualifier.
3754 (c_parser_struct_declaration): Update syntax comment.
3755 (c_parser_type_name): Add alignas_ok argument and pass it to
3756 c_parser_declspecs.
3757 (c_parser_cast_expression): Pass true to c_parser_type_name and
3758 give error if a cast used an _Alignas specifier.
3759 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3760 give error if sizeof (type-name) used an _Alignas specifier.
3761 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3762 give error if _Alignof (type-name) used an _Alignas specifier.
3763 (c_parser_postfix_expression_after_paren_type): Check specified
3764 alignment for a compound literal and pass it to
3765 build_compound_literal.
3766 * c-parser.h (c_parser_type_name): Update prototype.
3767 * c-tree.h (build_compound_literal): Update prototype.
3768
5d9ae53d
MS
37692017-12-07 Martin Sebor <msebor@redhat.com>
3770
3771 PR c/81544
3772 * c-decl.c (c_decl_attributes): Look up existing declaration and
3773 pass it to decl_attributes.
3774
c79144f8
DM
37752017-12-06 David Malcolm <dmalcolm@redhat.com>
3776
3777 PR c/83236
3778 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3779 reserved for use by the implementation.
3780
613bc14f
DM
37812017-12-06 David Malcolm <dmalcolm@redhat.com>
3782
3783 * c-decl.c: Include "c-family/c-spellcheck.h".
3784
05abad4c
ML
37852017-12-05 Martin Liska <mliska@suse.cz>
3786 Jakub Jelinek <jakub@redhat.com>
3787
3788 * c-typeck.c (pointer_diff): Add new argument and instrument
3789 pointer subtraction.
3790 (build_binary_op): Similar for pointer comparison.
3791
cc6534d4
JJ
37922017-12-01 Jakub Jelinek <jakub@redhat.com>
3793
65791f42
JJ
3794 PR c/79153
3795 * c-parser.c: Include tree-iterator.h.
3796 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3797 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3798 on it.
3799
cc6534d4
JJ
3800 PR c/83222
3801 * c-tree.h (decl_constant_value_1): Declare.
3802 * c-typeck.c (decl_constant_value_1): New function.
3803 (decl_constant_value): Use it.
3804 * c-fold.c (c_fully_fold_internal): If in_init, use
3805 decl_constant_value_1 instead of decl_constant_value.
3806
5de73c05
JJ
38072017-11-30 Jakub Jelinek <jakub@redhat.com>
3808
3809 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3810
058f0b9e
JJ
38112017-11-28 Jakub Jelinek <jakub@redhat.com>
3812
3813 PR sanitizer/81275
3814 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3815 c_switch_covers_all_cases_p returns true.
3816
5e9d6aa4 38172017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3818 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3819
3820 * Make-lang.in (c/c-array-notation.o): Remove.
3821 * c-array-notation.c: Delete.
3822 * c-decl.c: Remove cilkplus condition.
3823 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3824 c_parser_cilk_verify_simd, c_parser_array_notation,
3825 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3826 c_parser_cilk_simd_fn_vector_attrs,
3827 c_finish_cilk_simd_fn_tokens): Delete.
3828 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3829 (c_parser_direct_declarator_inner): Ditto.
3830 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3831 (c_parser_attributes, c_parser_compound_statement,
3832 c_parser_statement_after_labels, c_parser_if_statement,
3833 c_parser_switch_statement, c_parser_while_statement,
3834 c_parser_do_statement, c_parser_for_statement,
3835 c_parser_unary_expression, c_parser_postfix_expression,
3836 c_parser_postfix_expression_after_primary,
3837 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3838 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3839 support.
3840 * c-typeck.c (build_array_ref, build_function_call_vec,
3841 convert_arguments,
3842 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3843 c_finish_loop, build_binary_op): Remove cilkplus support.
3844
9e851845
JJ
38452017-11-28 Jakub Jelinek <jakub@redhat.com>
3846
3847 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3848 of build3.
3849
ab20d992 38502017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3851
3852 * Make-lang.in (c.install-plugin): Install backend import library.
3853
41521dee
JJ
38542017-11-23 Jakub Jelinek <jakub@redhat.com>
3855
3856 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3857 pragma_stmt context.
3858
ac9effed
EB
38592017-11-23 Mike Stump <mikestump@comcast.net>
3860 Eric Botcazou <ebotcazou@adacore.com>
3861
3862 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3863 ANNOTATE_EXPR.
3864 (c_parser_do_statement): Likewise.
3865 (c_parser_for_statement): Likewise.
3866
ce95abc4
DM
38672017-11-22 David Malcolm <dmalcolm@redhat.com>
3868
3869 PR c++/62170
3870 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3871 bool to bool *. Within '%T' handling, if showing an "aka", use
3872 "quoted" param to add appropriate quoting.
3873
974aedcc
MP
38742017-11-22 Marek Polacek <polacek@redhat.com>
3875
3876 PR c++/60336
3877 PR middle-end/67239
3878 PR target/68355
3879 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3880
d4300cc6
DM
38812017-11-21 David Malcolm <dmalcolm@redhat.com>
3882
3883 PR c/83056
3884 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3885 earlier failed lookups.
3886
1af4ebf5
MG
38872017-11-21 Marc Glisse <marc.glisse@inria.fr>
3888
3889 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3890 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3891
26edace6
DM
38922017-11-20 David Malcolm <dmalcolm@redhat.com>
3893
3894 PR c/81404
3895 * c-decl.c: Include "c-family/known-headers.h".
3896 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3897 to known-headers.cc.
3898 (class suggest_missing_header): Move to known-header.h.
3899 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3900 than get_c_name_hint.
3901
b1212255
DM
39022017-11-20 David Malcolm <dmalcolm@redhat.com>
3903
3904 * c-decl.c (get_c_name_hint): New function.
3905 (class suggest_missing_header): New class.
3906 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3907 suggest missing headers to the user.
3908
6c7a259b
DM
39092017-11-20 David Malcolm <dmalcolm@redhat.com>
3910
3911 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3912 Include "c-family/name-hint.h"
3913 (implicit_decl_warning): Convert "hint" from
3914 const char * to name_hint. Pass location to
3915 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3916 warning was not printed.
3917 (undeclared_variable): Likewise for "guessed_id".
3918 (lookup_name_fuzzy): Convert return type from const char *
3919 to name_hint. Add location_t param.
3920 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3921 Include "c-family/name-hint.h"
3922 (c_parser_declaration_or_fndef): Convert "hint" from
3923 const char * to name_hint. Pass location to lookup_name_fuzzy.
3924 (c_parser_parameter_declaration): Likewise.
3925
f9c59f7e
JJ
39262017-11-19 Jakub Jelinek <jakub@redhat.com>
3927
3928 PR c/66618
3929 PR c/69960
3930 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3931 where needed.
3932 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3933 handle_omp_array_sections): Likewise.
3934 (digest_init): Don't call decl_constant_value_for_optimization.
3935 * c-tree.h (decl_constant_value_for_optimization): Removed.
3936 * c-fold.c (c_fold_array_ref): New function.
3937 (c_fully_fold_internal): Add LVAL argument, propagate it through
3938 recursive calls. For VAR_P call decl_constant_value and
3939 unshare if not LVAL and either optimizing or IN_INIT. Remove
3940 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3941 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3942 (c_fully_fold): Add LVAL argument, pass it through to
3943 c_fully_fold_internal.
3944 (decl_constant_value_for_optimization): Removed.
3945
3ca0dc60
JM
39462017-11-15 Joseph Myers <joseph@codesourcery.com>
3947
3948 PR c/81156
3949 * c-parser.c (check_tgmath_function): New function.
3950 (enum tgmath_parm_kind): New enum.
3951 (c_parser_postfix_expression): Handle __builtin_tgmath.
3952
64a5912c
DM
39532017-10-31 David Malcolm <dmalcolm@redhat.com>
3954
3955 * c-decl.c (implicit_decl_warning): Update for renaming of
3956 pedwarn_at_rich_loc and warning_at_rich_loc.
3957 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3958 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3959 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3960 (c_parser_struct_or_union_specifier): Likewise for renaming of
3961 pedwarn_at_rich_loc.
3962 (c_parser_parameter_declaration): Likewise for renaming of
3963 error_at_rich_loc.
3964 * c-typeck.c (build_component_ref): Likewise.
3965 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3966 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3967 (set_init_label): Likewise for renaming of error_at_rich_loc.
3968
c1136864
RB
39692017-10-30 Richard Biener <rguenther@suse.de>
3970
3971 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3972 stmts.
3973
ee5fd23a
MM
39742017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3975
3976 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3977 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3978
1a59ccf2
DM
39792017-10-25 David Malcolm <dmalcolm@redhat.com>
3980
3981 PR c/7356
3982 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3983 semicolons.
3984
bc1a75dd
JJ
39852017-10-25 Jakub Jelinek <jakub@redhat.com>
3986
3987 PR libstdc++/81706
3988 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3989 newdecl to corresponding __builtin_ if any.
3990
ff1ff960
PC
39912017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3992
3993 PR c++/82466
3994 * c-decl.c (diagnose_mismatched_decls): Use
3995 OPT_Wbuiltin_declaration_mismatch.
3996
62e1c678
DM
39972017-10-12 David Malcolm <dmalcolm@redhat.com>
3998
3999 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4000 use it to guard calls to maybe_suggest_missing_token_insertion.
4001 (c_parser_parms_list_declarator): Override default value of new
4002 "type_is_unique" param to c_parser_require.
4003 (c_parser_asm_statement): Likewise.
4004 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4005 defaulting to true.
4006
a92f6726
NS
40072017-10-11 Nathan Sidwell <nathan@acm.org>
4008
4009 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4010
8e6cdc90
RS
40112017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4012
4013 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4014 operating on trees as wide_ints.
4015 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4016 (c_tree_equal): Likewise.
4017
8139a48e
DM
40182017-10-04 David Malcolm <dmalcolm@redhat.com>
4019
4020 * c-decl.c (push_parm_decl): Store c_parm's location into the
4021 PARAM_DECL.
4022 (build_c_parm): Add "loc" param and store it within the c_parm.
4023 * c-parser.c (struct c_parser): Add "last_token_location" field.
4024 (c_parser_consume_token): Store location of the token into the
4025 new field.
4026 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4027 when handling a FUNCTION_DECL, if it doesn't already have them.
4028 (c_parser_parameter_declaration): Generate a location for the
4029 parameter, and pass it to the call to build_c_parm.
4030 * c-tree.h (struct c_parm): Add field "loc".
4031 (build_c_parm): Add location_t param.
4032 * c-typeck.c (get_fndecl_argument_location): New function.
4033 (inform_for_arg): New function.
4034 (convert_for_assignment): Use inform_for_arg when dealing with
4035 ic_argpass.
4036
2a389958
JJ
40372017-09-29 Jakub Jelinek <jakub@redhat.com>
4038
7d386d45
JJ
4039 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4040 width is non-NULL.
4041 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4042 don't SET_DECL_C_BIT_FIELD here.
4043
2a389958
JJ
4044 PR c/82340
4045 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4046 instead of trying to set just TREE_READONLY manually.
4047
ebc6a85e
TV
40482017-09-16 Tom de Vries <tom@codesourcery.com>
4049
4050 PR c/81875
4051 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4052 cond itself.
4053
bb75facd
JM
40542017-09-15 Joseph Myers <joseph@codesourcery.com>
4055
4056 PR c/82071
4057 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4058 for C11.
4059 (build_conditional_expr): For C11, generate result with excess
4060 precision when one argument is an integer and the other is of a
4061 type using excess precision.
4062
1d933576
BE
40632017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4064
4065 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4066
267bbb6f
MP
40672017-09-13 Marek Polacek <polacek@redhat.com>
4068
4069 PR c/82167
4070 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4071 than expr.original_type.
4072
6836632e
NS
40732017-09-12 Nathan Sidwell <nathan@acm.org>
4074
4075 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4076 resort_sorted_fields): Moved from c-family/c-common.c.
4077 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4078
e035be33
JM
40792017-09-01 Joseph Myers <joseph@codesourcery.com>
4080
4081 PR c/82071
4082 * c-typeck.c (build_atomic_assign): Handle argument with excess
4083 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4084 argument passed to build_binary_op and convert_for_assignment but
4085 not for call to c_fully_fold.
4086 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4087 Ensure build_binary_op is called with argument with original
4088 semantic type. Avoid calling c_fully_fold with an
4089 EXCESS_PRECISION_EXPR from build_binary_op.
4090
d2e05fcb
JJ
40912017-09-01 Jakub Jelinek <jakub@redhat.com>
4092
4093 PR c/81887
4094 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4095
b397965c
RS
40962017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4097 Alan Hayward <alan.hayward@arm.com>
4098 David Sherwood <david.sherwood@arm.com>
4099
4100 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4101 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4102 m1 and m2 to the signed equivalent of a fixed-point
4103 SCALAR_TYPE_MODE.
4104
14e18d71
DM
41052017-08-24 David Malcolm <dmalcolm@redhat.com>
4106
4107 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4108 than CAN_HAVE_LOCATION_P when determining whether to use the
4109 location_t value within "value".
4110
7f204c0f
DM
41112017-08-21 David Malcolm <dmalcolm@redhat.com>
4112
4113 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4114 rather than peeking the location of the first token.
4115 * c-tree.h (c_expr::get_location): New method.
4116
2f687306
DM
41172017-08-21 David Malcolm <dmalcolm@redhat.com>
4118
4119 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4120 to check_function_arguments.
4121
3e7b80d7
MP
41222017-08-18 Marek Polacek <polacek@redhat.com>
4123
4124 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4125 commentary.
4126
00aa1fa2
L
41272017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4128
4129 PR c/53037
4130 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4131 (check_bitfield_type_and_width): Don't allow bit-field with
4132 warn_if_not_aligned type.
4133
da67acb9
MS
41342017-08-14 Martin Sebor <msebor@redhat.com>
4135
4136 PR c/81117
4137 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4138
bb85aa74
MP
41392017-08-11 Marek Polacek <polacek@redhat.com>
4140
4141 PR c/81795
4142 * c-decl.c (pushtag): Only print inform if the warning was printed.
4143 (grokdeclarator): Likewise.
4144
32129a17
DM
41452017-08-10 David Malcolm <dmalcolm@redhat.com>
4146
4147 * c-parser.c (c_parser_error): Rename to...
4148 (c_parser_error_richloc): ...this, making static, and adding
4149 "richloc" parameter, passing it to the c_parse_error call,
4150 rather than calling c_parser_set_source_position_from_token.
4151 (c_parser_error): Reintroduce, reimplementing in terms of the
4152 above, converting return type from void to bool.
4153 (class token_pair): New class.
4154 (struct matching_paren_traits): New struct.
4155 (matching_parens): New typedef.
4156 (struct matching_brace_traits): New struct.
4157 (matching_braces): New typedef.
4158 (get_matching_symbol): New function.
4159 (c_parser_require): Add param MATCHING_LOCATION, using it to
4160 highlight matching "opening" tokens for missing "closing" tokens.
4161 (c_parser_skip_until_found): Likewise.
4162 (c_parser_static_assert_declaration_no_semi): Convert explicit
4163 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4164 class matching_parens, so that the pertinent open parenthesis is
4165 highlighted when there are problems locating the close
4166 parenthesis.
4167 (c_parser_struct_or_union_specifier): Likewise.
4168 (c_parser_typeof_specifier): Likewise.
4169 (c_parser_alignas_specifier): Likewise.
4170 (c_parser_simple_asm_expr): Likewise.
4171 (c_parser_braced_init): Likewise, for matching_braces.
4172 (c_parser_paren_condition): Likewise, for matching_parens.
4173 (c_parser_switch_statement): Likewise.
4174 (c_parser_for_statement): Likewise.
4175 (c_parser_asm_statement): Likewise.
4176 (c_parser_asm_operands): Likewise.
4177 (c_parser_cast_expression): Likewise.
4178 (c_parser_sizeof_expression): Likewise.
4179 (c_parser_alignof_expression): Likewise.
4180 (c_parser_generic_selection): Likewise.
4181 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4182 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4183 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4184 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4185 c_parser_skip_until_found call.
4186 (c_parser_objc_class_definition): Use class matching_parens as
4187 above.
4188 (c_parser_objc_method_decl): Likewise.
4189 (c_parser_objc_try_catch_finally_statement): Likewise.
4190 (c_parser_objc_synchronized_statement): Likewise.
4191 (c_parser_objc_at_property_declaration): Likewise.
4192 (c_parser_oacc_wait_list): Likewise.
4193 (c_parser_omp_var_list_parens): Likewise.
4194 (c_parser_omp_clause_collapse): Likewise.
4195 (c_parser_omp_clause_default): Likewise.
4196 (c_parser_omp_clause_if): Likewise.
4197 (c_parser_omp_clause_num_threads): Likewise.
4198 (c_parser_omp_clause_num_tasks): Likewise.
4199 (c_parser_omp_clause_grainsize): Likewise.
4200 (c_parser_omp_clause_priority): Likewise.
4201 (c_parser_omp_clause_hint): Likewise.
4202 (c_parser_omp_clause_defaultmap): Likewise.
4203 (c_parser_oacc_single_int_clause): Likewise.
4204 (c_parser_omp_clause_ordered): Likewise.
4205 (c_parser_omp_clause_reduction): Likewise.
4206 (c_parser_omp_clause_schedule): Likewise.
4207 (c_parser_omp_clause_num_teams): Likewise.
4208 (c_parser_omp_clause_thread_limit): Likewise.
4209 (c_parser_omp_clause_aligned): Likewise.
4210 (c_parser_omp_clause_linear): Likewise.
4211 (c_parser_omp_clause_safelen): Likewise.
4212 (c_parser_omp_clause_simdlen): Likewise.
4213 (c_parser_omp_clause_depend): Likewise.
4214 (c_parser_omp_clause_map): Likewise.
4215 (c_parser_omp_clause_device): Likewise.
4216 (c_parser_omp_clause_dist_schedule): Likewise.
4217 (c_parser_omp_clause_proc_bind): Likewise.
4218 (c_parser_omp_clause_uniform): Likewise.
4219 (c_parser_omp_for_loop): Likewise.
4220 (c_parser_cilk_clause_vectorlength): Likewise.
4221 (c_parser_cilk_clause_linear): Likewise.
4222 (c_parser_transaction_expression): Likewise.
4223 * c-parser.h (c_parser_require): Add param matching_location with
4224 default UNKNOWN_LOCATION.
4225 (c_parser_error): Convert return type from void to bool.
4226 (c_parser_skip_until_found): Add param matching_location with
4227 default UNKNOWN_LOCATION.
4228
30af3a2b
MP
42292017-08-09 Marek Polacek <polacek@redhat.com>
4230
4231 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4232 * c-tree.h (build_external_ref): Update declaration.
4233 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4234 (build_external_ref): Change the type of a parameter to bool.
4235 (parser_build_binary_op): Use true/false instead of 1/0.
4236 (pointer_diff): Likewise.
4237 (build_modify_expr): Likewise.
4238 (set_designator): Change the type of a parameter to bool.
4239 (set_init_index): Use true/false instead of 1/0.
4240 (set_init_label): Likewise.
4241 (output_init_element): Change the type of a parameter to bool.
4242 (output_pending_init_elements): Use true/false instead of 1/0.
4243 (process_init_element): Likewise.
4244 (build_binary_op): Change the type of a parameter to bool.
4245
296c53ac
MP
42462017-08-09 Marek Polacek <polacek@redhat.com>
4247
4248 PR c/81233
4249 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4250 Call emit_diagnostic_valist instead of pedwarn.
4251 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4252 Print the relevant types in diagnostics.
4253
a32c8316
MP
42542017-08-09 Marek Polacek <polacek@redhat.com>
4255
4256 PR c/81417
4257 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 4258 build_conditional_expr.
a32c8316
MP
4259 * c-parser.c (c_parser_conditional_expression): Create locations for
4260 EXP1 and EXP2 from their source ranges. Pass the locations down to
4261 build_conditional_expr.
4262 * c-tree.h (build_conditional_expr): Update declaration.
4263 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4264 For -Wsign-compare, also print the types.
4265
314e6352
ML
42662017-08-08 Martin Liska <mliska@suse.cz>
4267
4268 * c-convert.c: Include header files.
4269 * c-typeck.c: Likewise.
4270
577eec56
ML
42712017-08-07 Martin Liska <mliska@suse.cz>
4272
4273 * c-parser.c (c_parser_attributes): Canonicalize name of an
4274 attribute.
4275
f7b6353a
MP
42762017-08-02 Marek Polacek <polacek@redhat.com>
4277
4278 PR c/81289
4279 * c-parser.c (c_parser_unary_expression): Use set_error.
4280
8a6eab34
MP
4281 PR c/81448
4282 PR c/81306
4283 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4284 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4285
ab20d992 42862017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
4287 Martin Liska <mliska@suse.cz>
4288
4289 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 4290 statement.
7fef86d3 4291
f34ebeb2
ML
42922017-07-31 Martin Liska <mliska@suse.cz>
4293
4294 PR sanitize/81530
4295 * c-convert.c (convert): Guard condition with flag_sanitize_p
4296 also with current_function_decl non-null equality.
4297 * c-decl.c (grokdeclarator): Likewise.
4298 * c-typeck.c (build_binary_op): Likewise.
4299
8595f67b
MP
43002017-07-25 Marek Polacek <polacek@redhat.com>
4301
4302 * c-decl.c (grokfield): Remove local variable.
4303
d49718d6
MP
43042017-07-25 Marek Polacek <polacek@redhat.com>
4305
4306 PR c/81364
4307 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4308 macro expansion if the body is in { }.
4309 (c_parser_while_statement): Likewise.
4310 (c_parser_for_statement): Likewise.
4311
ff22eb12
NS
43122017-07-18 Nathan Sidwell <nathan@acm.org>
4313
4314 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4315
eea77d1f
DM
43162017-07-14 David Malcolm <dmalcolm@redhat.com>
4317
4318 * c-decl.c (implicitly_declare): When suggesting a missing
4319 #include, provide a fix-it hint.
4320
b6f43128
DM
43212017-07-06 David Malcolm <dmalcolm@redhat.com>
4322
4323 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4324 and call that instead.
4325 * c-tree.h (selftest::run_c_tests): New decl.
4326
3e2becc4
MP
43272017-06-26 Marek Polacek <polacek@redhat.com>
4328
4329 PR c/80116
4330 * c-parser.c (c_parser_if_body): Set the location of the
4331 body of the conditional after parsing all the labels. Call
4332 warn_for_multistatement_macros.
4333 (c_parser_else_body): Likewise.
4334 (c_parser_switch_statement): Likewise.
4335 (c_parser_while_statement): Likewise.
4336 (c_parser_for_statement): Likewise.
4337 (c_parser_statement): Add a default argument. Save the location
4338 after labels have been parsed.
4339 (c_parser_c99_block_statement): Likewise.
4340
343ae898
RB
43412017-06-19 Richard Biener <rguenther@suse.de>
4342
4343 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4344 negated _Literals to parse _Literal (int) -1.
4345
45b2222a
ML
43462017-06-13 Martin Liska <mliska@suse.cz>
4347
4348 PR sanitize/78204
4349 * c-convert.c (convert): Use sanitize_flags_p.
4350 * c-decl.c (grokdeclarator): Likewise.
4351 * c-typeck.c (convert_for_assignment): Likewise.
4352 (c_finish_return): Likewise.
4353 (build_binary_op): Likewise.
4354
8ab7005b
JJ
43552017-06-08 Jakub Jelinek <jakub@redhat.com>
4356
4357 PR c/81006
4358 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4359 to sizetype before size_binop.
4360
363dc72c
JJ
43612017-06-07 Jakub Jelinek <jakub@redhat.com>
4362
4363 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4364 of TDI_generic.
4365
dc949728
MP
43662017-06-06 Marek Polacek <polacek@redhat.com>
4367
4368 PR c/79983
4369 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4370 ref.
4371 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4372
40ffd95f
BE
43732017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4374
4375 * c-parser.c (c_parser_binary_expression): Implement the
4376 -Wsizeof_pointer_div warning.
4377 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4378 from a parenthesized expression.
4379 (c_parser_expr_list): Use c_last_sizeof_loc.
4380 * c-tree.h (c_last_sizeof_loc): New external.
4381 * c-typeck.c (c_last_sizeof_loc): New variable.
4382 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4383
9fc5e7a4
MM
43842017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4385
4386 PR testsuite/80580
4387 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4388
f012c8ef
DM
43892017-05-30 David Malcolm <dmalcolm@redhat.com>
4390
4391 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4392 parameters.
4393
3cd211af
MS
43942017-05-24 Martin Sebor <msebor@redhat.com>
4395
4396 PR c/80731
4397 * c-fold.c (c_fully_fold_internal): Adjust.
4398 * c-typeck.c (parser_build_unary_op): Adjust.
4399
fd71a9a2
TS
44002017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4401
4402 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4403 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4404 "VECTOR_LENGTH".
4405
92fa0f9e
MP
44062017-05-23 Marek Polacek <polacek@redhat.com>
4407
4408 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4409 quotes.
4410
d11c168a
JJ
44112017-05-22 Jakub Jelinek <jakub@redhat.com>
4412
4413 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4414 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4415 it returned invariant. Call tree_invariant_p unconditionally
4416 afterwards to decide whether to return expr or op0.
4417
58aca9d9
NS
44182017-05-22 Nathan Sidwell <nathan@acm.org>
4419
4420 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4421
7fd549d2
TS
44222017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4423
4424 * c-parser.c (c_parser_omp_clause_default): Handle
4425 "OMP_CLAUSE_DEFAULT_PRESENT".
4426
6ecd2339
BE
44272017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4428
4429 * config-lang.in (gtfiles): Add c-family/c-format.c.
4430
8a57ecff
NS
44312017-05-18 Nathan Sidwell <nathan@acm.org>
4432
4433 * c-decl.c (pushdecl_top_level): Delete unused function.
4434
6574d78e
MP
44352017-05-18 Marek Polacek <polacek@redhat.com>
4436
4437 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4438 (check_earlier_gotos): Likewise.
4439 (define_label): Likewise.
4440 (pending_xref_error): Likewise.
4441 (smallest_type_quals_location): Likewise.
4442 (grokdeclarator): Likewise.
4443 (grokparms): Likewise.
4444 (identifier_global_value): Likewise.
4445 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4446 (find_init_member): Likewise.
4447
e3455240
MP
44482017-05-18 Marek Polacek <polacek@redhat.com>
4449
4450 * c-decl.c (start_decl): Use false/true instead of 0/1.
4451 (grokdeclarator): Likewise.
4452 (finish_struct): Likewise.
4453 (start_function): Change the return type to bool. Use false/true
4454 instead of 0/1.
4455 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4456 * c-tree.h (start_function): Update.
4457 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4458 (set_designator): Change the return type to bool. Use false/true
4459 instead of 0/1.
4460
3fa8871b
MP
44612017-05-17 Marek Polacek <polacek@redhat.com>
4462
4463 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4464 * c-typeck.c: Likewise.
4465
142473df
MP
44662017-05-17 Marek Polacek <polacek@redhat.com>
4467
4468 PR sanitizer/80659
4469 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4470 DECL_IGNORED_P even for non-static compound literals.
4471
1a817418
ML
44722017-05-17 Martin Liska <mliska@suse.cz>
4473
4474 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4475 use it instead of int type.
4476
b2fa0a8b
MP
44772017-05-17 Marek Polacek <polacek@redhat.com>
4478
4479 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4480 call c_fully_fold.
4481 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4482 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4483 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4484 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4485 save_expr.
4486 (c_parser_conditional_expression): Likewise.
4487 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4488 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4489 (process_init_element): Likewise.
4490 (build_binary_op): Likewise.
4491 (handle_omp_array_sections_1): Likewise.
4492
1e47f02b
TS
44932017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4494
4495 * c-parser.c (c_parser_omp_clause_num_gangs)
4496 (c_parser_omp_clause_num_workers)
4497 (c_parser_omp_clause_vector_length): Merge functions into...
4498 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4499 all users.
4500
c24e924f
NS
45012017-05-11 Nathan Sidwell <nathan@acm.org>
4502
4503 * gimple-parser.c: Don't #include tree-dump.h.
4504
c587104e
MM
45052017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4506
4507 PR testsuite/80580
4508 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4509
67ac9a9d
MM
45102017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4511
4512 PR testsuite/80580
4513 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4514 incorrect __MEM syntax.
4515
ac4eb40f
MM
45162017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4517
4518 PR testsuite/80580
4519 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4520 type of unary '*'.
4521
641da50a
NS
45222017-05-09 Nathan Sidwell <nathan@acm.org>
4523
4524 * c-tree.h (pushdecl): Declare.
4525
56d35585
DM
45262017-05-05 David Malcolm <dmalcolm@redhat.com>
4527
4528 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4529 with diagnostic_report_diagnostic.
4530 * c-errors.c (pedwarn_c99): Likewise.
4531 (pedwarn_c90): Likewise.
4532
815d9cc6
XR
45332017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4534
92a285c1 4535 PR c++/80038
815d9cc6
XR
4536 * c-gimplify.c (c_gimplify_expr): Remove calls to
4537 cilk_gimplifY_call_params_in_spawned_fn.
4538
1c4ea66f
DM
45392017-04-25 David Malcolm <dmalcolm@redhat.com>
4540
4541 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4542 hint for removing extra semicolon.
4543
666f7903
JJ
45442017-04-21 Jakub Jelinek <jakub@redhat.com>
4545
4546 PR c/80468
4547 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4548 enabled, set specs->type to integer_type_node.
4549
5764ee3c
JW
45502017-04-03 Jonathan Wakely <jwakely@redhat.com>
4551
4552 * c-array-notation.c: Fix typo in comment.
4553
10fa8dfb
MP
45542017-03-29 Marek Polacek <polacek@redhat.com>
4555
4556 PR c/79730
4557 * c-decl.c (finish_decl): Check VAR_P.
4558
a9e4a1a5
JJ
45592017-03-27 Jakub Jelinek <jakub@redhat.com>
4560
4561 PR middle-end/80162
4562 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4563 * c-typeck.c (c_mark_addressable): Likewise. Look through
4564 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4565 to ARRAY_TYPE.
4566 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4567
ee3ff394
MP
45682017-03-23 Marek Polacek <polacek@redhat.com>
4569
4570 * c-tree.h: Remove a C_RID_YYCODE reference.
4571
4d1b8e70
JJ
45722017-03-21 Jakub Jelinek <jakub@redhat.com>
4573
4574 PR c/80097
4575 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4576 optional COMPOUND_EXPR with ubsan instrumentation.
4577
31dc71a8
MP
45782017-03-17 Marek Polacek <polacek@redhat.com>
4579
4580 * c-parser.c: Add C11 references.
4581
d579c385
MP
45822017-03-15 Marek Polacek <polacek@redhat.com>
4583
4584 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4585
85059a38
MP
45862017-03-11 Marek Polacek <polacek@redhat.com>
4587
4588 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4589
2f6f187a
DM
45902017-03-10 David Malcolm <dmalcolm@redhat.com>
4591
4592 PR translation/79848
4593 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4594 "%qs".
4595 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4596
36618428
MP
45972017-03-09 Marek Polacek <polacek@redhat.com>
4598
4599 PR sanitizer/79757
4600 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4601 parameter declarations with initializers.
4602
01e5af5a
JJ
46032017-03-09 Jakub Jelinek <jakub@redhat.com>
4604
4605 PR c/79969
4606 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4607 TYPE_STUB_DECL.
4608
a71dbc63
JJ
46092017-03-07 Jakub Jelinek <jakub@redhat.com>
4610
4611 PR c/79834
4612 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4613 for "may only be used in compound statements" diagnostics, change it
4614 such that the same translatable string is used for all pragmas. For
4615 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4616 diagnostics.
4617 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4618 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4619 "may only be used in compound statements" diagnostics, such that the
4620 same translatable string is used for all pragmas.
4621
1ff4bae6
MP
46222017-03-04 Marek Polacek <polacek@redhat.com>
4623
4624 PR c/79847
4625 * c-decl.c (implicit_decl_warning): Add missing space.
4626
7f5a7d78
MP
46272017-03-03 Marek Polacek <polacek@redhat.com>
4628
4629 PR c/79758
4630 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4631 current_function_prototype_arg_types is error_mark_node. Fix
4632 formatting. Use TREE_VALUE instead of TREE_TYPE.
4633
883c8f06
JJ
46342017-03-03 Jakub Jelinek <jakub@redhat.com>
4635
79c9b7a8
JJ
4636 PR c/79837
4637 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4638 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4639 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4640 diagnostics.
4641
883c8f06
JJ
4642 PR c/79836
4643 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4644 instead of %<_Generic>.
4645 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4646 (c_parser_omp_target_exit_data): Use %<release%> instead of
4647 %<release>.
4648
324ff1a0
JJ
46492017-02-28 Jakub Jelinek <jakub@redhat.com>
4650
4651 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4652 instead of just cond ? "..." : "...".
4653 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4654 for "enter"/"exit" keyword.
4655 (c_finish_oacc_routine): Don't use %s to supply portions of the
4656 message.
4657
4227c9ad
JJ
46582017-02-24 Jakub Jelinek <jakub@redhat.com>
4659
4660 PR c++/79588
4661 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4662 handle -Wrestrict here.
4663 * c-typeck.c (build_function_call_vec): Adjust
4664 check_function_arguments caller.
4665
5d972e66
RB
46662017-02-23 Richard Biener <rguenther@suse.de>
4667
4668 PR c/79684
4669 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4670 to initialize c_exprs to return.
4671 (c_parser_gimple_binary_expression): Likewise.
4672 (c_parser_gimple_unary_expression): Likewise.
4673 (c_parser_gimple_postfix_expression): Likewise.
4674
61ac5ebe
MP
46752017-02-22 Marek Polacek <polacek@redhat.com>
4676
4677 PR c/79662
4678 * c-typeck.c (convert_arguments): Handle error_mark_node.
4679
41d1b0b1
PK
46802017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4681
4682 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4683 value of c_parser_parse_ssa_name against error_mark_node and emit
4684 error if ssa name is anonymous and written as default definition.
4685
eab1f169
PK
46862017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4687
4688 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4689 FMA_EXPR.
4690
bcac0b4d
JJ
46912017-02-16 Jakub Jelinek <jakub@redhat.com>
4692
4693 PR c++/79512
4694 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4695 ignore #pragma omp target even when not followed by identifier.
4696
1be33173
PK
46972017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4698
4699 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4700 (c_parser_gimple_unary_expression): Likewise.
4701
aa326bfb
JJ
47022017-02-13 Jakub Jelinek <jakub@redhat.com>
4703
4704 * c-parser.c (c_parser_oacc_declare): Add missing space in
4705 diagnostics.
4706
8a398bc5
PK
47072017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4708
4709 PR c/79478
4710 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4711 set_c_expr_source_range when parsing ssa-name.
4712
3dcde5ef 47132017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4714 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4715
4716 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4717 building IL when arguments are error_mark_node.
4718 (c_parser_gimple_unary_expression): Likewise.
4719 (c_parser_gimple_if_stmt): Likewise.
4720 (c_parser_gimple_switch_stmt): Likewise.
4721 (c_parser_gimple_return_stmt): Likewise.
4722 (c_parser_parse_ssa_name): When name lookup fails do not build
4723 an SSA name. Use undeclared rather than not declared in error
4724 reporting.
4725
192b048b
MP
47262017-02-09 Marek Polacek <polacek@redhat.com>
4727
4728 PR c/79428
4729 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4730 instead of c_parser_skip_until_found.
4731
56f71478
JJ
47322017-02-09 Jakub Jelinek <jakub@redhat.com>
4733
4734 PR c/79431
4735 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4736 symtab_node::get on automatic variables.
4737
02889d23
CLT
47382016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4739 Chung-Lin Tang <cltang@codesourcery.com>
4740
4741 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4742 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4743 semantic checking.
4744 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4745
7af4b20d
RB
47462017-02-07 Richard Biener <rguenther@suse.de>
4747
4748 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4749 (c_parser_gimple_postfix_expression_after_primary):
4750 Do not use c_build_function_call_vec to avoid folding and promotion.
4751 Simplify.
4752
e5e391d6
MO
47532017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4754
4755 PR lto/79061
4756 * c-decl.c (pop_scope): Pass main_input_filename to
4757 build_translation_unit_decl.
4758
c2e84327
DM
47592017-01-24 David Malcolm <dmalcolm@redhat.com>
4760
4761 * c-parser.c: Include "read-rtl-function.h" and
4762 "run-rtl-passes.h".
4763 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4764 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4765 production. Update for renaming of field "gimple_pass" to
4766 "gimple_or_rtl_pass". If __RTL was seen, call
4767 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4768 to an auto_timevar, to cope with early exit.
4769 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4770 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4771 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4772 Handle RID_RTL.
4773 (c_parser_parse_rtl_body): New function.
4774 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4775 (struct c_declspecs): Rename field "gimple_pass" to
4776 "gimple_or_rtl_pass". Add field "rtl_p".
4777 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4778 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4779 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4780 (c_parser_gimple_or_rtl_pass_list): ...this.
4781
2ebd93e1
MP
47822017-01-20 Marek Polacek <polacek@redhat.com>
4783
4784 PR c/64279
4785 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4786
b1c95bb5
RB
47872017-01-13 Richard Biener <rguenther@suse.de>
4788
4789 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4790 nops.
4791
25329913
RB
47922017-01-13 Richard Biener <rguenther@suse.de>
4793
4794 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4795 _Literal ( type-name ) number.
4796
6bb4ea5c
RB
47972017-01-12 Richard Biener <rguenther@suse.de>
4798
4799 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4800 __MEM.
4801
6b5b4e9c
JJ
48022017-01-11 Jakub Jelinek <jakub@redhat.com>
4803
4804 PR c++/72813
4805 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4806 PCH file.
4807
e3252775
RB
48082017-01-11 Richard Biener <rguenther@suse.de>
4809
4810 PR bootstrap/79052
4811 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4812 returns on parse errors.
4813
a9342885
MP
48142017-01-04 Marek Polacek <polacek@redhat.com>
4815
4816 PR c++/64767
4817 * c-parser.c (c_parser_postfix_expression): Mark zero character
4818 constants by setting original_type in c_expr.
4819 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4820 with a zero character constant.
4821 (char_type_p): New function.
4822
5dd9a9d0
DM
48232017-01-04 David Malcolm <dmalcolm@redhat.com>
4824
4825 * c-parser.c (c_parser_declaration_or_fndef): Create a
4826 rich_location at init_loc and parse it to start_init.
4827 (last_init_list_comma): New global.
4828 (c_parser_braced_init): Update last_init_list_comma when parsing
4829 commas. Pass it to pop_init_level. Pass location of closing
4830 brace to pop_init_level.
4831 (c_parser_postfix_expression_after_paren_type): Create a
4832 rich_location at type_loc and parse it to start_init.
4833 (c_parser_omp_declare_reduction): Likewise for loc.
4834 * c-tree.h (start_init): Add rich_location * param.
4835 (pop_init_level): Add location_t param.
4836 * c-typeck.c (struct initializer_stack): Add field
4837 "missing_brace_richloc".
4838 (start_init): Add richloc param, use it to initialize
4839 the stack node's missing_brace_richloc.
4840 (last_init_list_comma): New decl.
4841 (finish_implicit_inits): Pass last_init_list_comma to
4842 pop_init_level.
4843 (push_init_level): When finding missing open braces, add fix-it
4844 hints to the richloc.
4845 (pop_init_level): Add "insert_before" param and pass it
4846 when calling pop_init_level. Add fixits about missing
4847 close braces to any richloc. Use the richloc for the
4848 -Wmissing-braces warning.
4849 (set_designator): Pass last_init_list_comma to pop_init_level.
4850 (process_init_element): Likewise.
4851
cbe34bb5
JJ
48522017-01-01 Jakub Jelinek <jakub@redhat.com>
4853
4854 Update copyright years.
4855
d17680f3
JJ
48562016-12-21 Jakub Jelinek <jakub@redhat.com>
4857
0dba7960
JJ
4858 PR bootstrap/78817
4859 * c-typeck.c (build_function_call_vec): If check_function_arguments
4860 returns true, set TREE_NO_WARNING on CALL_EXPR.
4861
d17680f3
JJ
4862 PR c/77767
4863 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4864 to *expr instead of overwriting it.
4865
aa90531e
RB
48662016-12-20 Richard Biener <rguenther@suse.de>
4867
4868 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4869 error recovery.
4870 (c_parser_gimple_statement): Only build assigns for non-error
4871 stmts.
4872 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4873
629b3d75
MJ
48742016-12-14 Martin Jambor <mjambor@suse.cz>
4875
4876 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4877 omp-low.h.
4878 (c_finish_oacc_routine): Adjusted call to
4879 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4880 to use their new names.
4881 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4882 use its new name.
4883 (c_parser_oacc_update): Likewise.
4884 (c_parser_omp_simd): Likewise.
4885 (c_parser_omp_target_update): Likewise.
4886 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4887 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4888 name.
4889 (c_finish_omp_cancellation_point): Likewise.
4890 * gimple-parser.c: Do not include omp-low.h
4891
c5af52eb
CP
48922016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4893 James Norris <jnorris@codesourcery.com>
4894
4895 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4896 EXIT_DATA,WAIT} are not used in compound statements.
4897 (c_parser_oacc_enter_exit_data): Update diagnostics.
4898
48330c93
BE
48992016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4900
4901 PR c++/71973
4902 * c-decl.c (diagnose_mismatched_decls): Use
4903 OPT_Wbuiltin_declaration_mismatch here too.
4904
899ca90e 49052016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4906 Alan Hayward <alan.hayward@arm.com>
4907 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4908
4909 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4910 (make_label, finish_struct): Likewise.
4911
1ee62b92 49122016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4913 Richard Biener <rguenther@suse.de>
22b15758 4914
8e745a17
JJ
4915 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4916 * config-lang.in (gtfiles): Add c/c-parser.h.
4917 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4918 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4919 * c-parser.c (enum c_id_kind, struct c_token,
4920 c_parser_next_token_is, c_parser_next_token_is_not,
4921 c_parser_next_token_is_keyword,
4922 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4923 Split out to ...
4924 * c-parser.h: ... new header.
4925 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4926 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4927 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4928 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4929 c_parser_error, c_parser_require, c_parser_skip_until_found,
4930 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4931 c_parser_type_name): Export.
4932 (c_parser_tokens_buf): New function.
4933 (c_parser_error): Likewise.
4934 (c_parser_set_error): Likewise.
4935 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4936 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4937 via c_parser_parse_gimple_body.
8e745a17
JJ
4938 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4939 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4940 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4941 c_parser_error, c_parser_require, c_parser_skip_until_found,
4942 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4943 c_parser_type_name): Declare.
1ee62b92
PG
4944 (struct c_parser): Declare forward.
4945 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4946 (c_parser_error): Likewise.
4947 (c_parser_set_error): Likewise.
4948 * gimple-parser.c: New file.
4949 * gimple-parser.h: Likewise.
1ee62b92 4950
22b15758
UB
49512016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4952
4953 PR c/35503
4954 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4955 warn_for_restrict.
4956
84ff4775
LCW
49572016-09-11 Le-Chun Wu <lcwu@google.com>
4958 Mark Wielaard <mjw@redhat.com>
4959
4960 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4961 to the given -Wshadow= variant.
4962
4d0cdd0c
TP
49632016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4964
4965 * c-typeck.c: Include memmodel.h.
4966
1202f33e
JJ
49672016-10-13 Jakub Jelinek <jakub@redhat.com>
4968
4969 PR target/77957
4970 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4971 instead of lhd_return_null_tree_v.
4972
8a14afd0
BS
49732016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4974
4975 PR c++/69733
4976 * c-decl.c (smallest_type_quals_location): New static function.
4977 (grokdeclarator): Try to find the correct location for an ignored
4978 qualifier.
4979
81fea426
MP
49802016-09-26 Marek Polacek <polacek@redhat.com>
4981
4982 PR c/7652
4983 * c-decl.c (pop_scope): Add gcc_fallthrough.
4984
49852016-09-26 Marek Polacek <polacek@redhat.com>
4986
4987 PR c/7652
4988 * c-parser.c (struct c_token): Add flags field.
4989 (c_lex_one_token): Pass it to c_lex_with_flags.
4990 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4991 into IFN_FALLTHROUGH.
4992 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4993 attribute fallthrough after a case label or default label.
4994 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4995
9a2300e9
MP
49962016-09-24 Marek Polacek <polacek@redhat.com>
4997
4998 PR c/77490
4999 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5000 have boolean value. Warn about ++/-- on booleans.
5001
7de76362
JJ
50022016-09-23 Jakub Jelinek <jakub@redhat.com>
5003
5004 * c-parser.c (incomplete_record_decls): Remove unnecessary
5005 = vNULL initialization of file scope vec.
5006
5b73d2ab
MP
50072016-09-16 Marek Polacek <polacek@redhat.com>
5008
5009 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5010
e51fbec3
MP
50112016-09-14 Marek Polacek <polacek@redhat.com>
5012
5013 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5014 (fix_array_notation_expr): Likewise.
5015 * c-decl.c (finish_decl): Likewise.
5016 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5017 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5018 (function_to_pointer_conversion): Use false instead of 0.
5019 (convert_lvalue_to_rvalue): Likewise.
5020 (parser_build_unary_op): Likewise.
5021 (build_atomic_assign): Likewise.
5022 (build_unary_op): Change nonconvert parameter type to bool, use
5023 true/false instead of 1/0.
5024 (build_binary_op): Use true instead of 1.
5025
254830ba
DM
50262016-09-13 David Malcolm <dmalcolm@redhat.com>
5027
5028 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5029 of add_fixit_insert to add_fixit_insert_before.
5030
4c13ba17
MP
50312016-09-13 Marek Polacek <polacek@redhat.com>
5032
5033 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5034 it.
5035
54dcdb88
BE
50362016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5037
5038 PR c++/77496
5039 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5040 COMPOUND_EXPR to warn_for_omitted_condop.
5041
e5106e27
DM
50422016-09-07 David Malcolm <dmalcolm@redhat.com>
5043
5044 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5045 c_get_substring_location for this new langhook.
5046
9dc5773f
JJ
50472016-09-02 Jakub Jelinek <jakub@redhat.com>
5048
5049 PR c/65467
5050 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5051 flag_openmp.
5052 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5053 instead of mark_exp_read on low_bound/length expression.
5054 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5055 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5056 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5057 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5058 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5059 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5060 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5061 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5062 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5063 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5064 instead of mark_expr_read.
5065 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5066 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5067 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5068 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5069 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5070 array section bases outside of depend clause, for depend clause
5071 use convert_lvalue_to_rvalue on the base.
5072 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5073 linear, aligned, map, to and from clauses.
5074 (c_omp_clause_copy_ctor): New function.
5075
295844f6
MP
50762016-09-01 Marek Polacek <polacek@redhat.com>
5077
5078 PR c/7652
5079 * c-typeck.c (composite_type): Add FALLTHRU comment.
5080
089af25c
DM
50812016-08-31 David Malcolm <dmalcolm@redhat.com>
5082
5083 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5084 to the insertion fixits for "struct", "union", and "enum".
5085
f9087798
DM
50862016-08-30 David Malcolm <dmalcolm@redhat.com>
5087
5088 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5089 rather than add_fixit_misspelled_id.
5090 (undeclared_variable): Likewise.
5091 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5092 now-redundant "here" params from add_fixit_insert method calls.
5093 (c_parser_parameter_declaration): Likewise.
5094 * c-typeck.c (build_component_ref): Remove now-redundant range
5095 param from add_fixit_replace method calls.
5096
ebef225f
MP
50972016-08-25 Marek Polacek <polacek@redhat.com>
5098
5099 * c-typeck.c (parser_build_binary_op): Pass LHS to
5100 warn_logical_not_parentheses.
5101
fe377a48
MP
51022016-08-25 Marek Polacek <polacek@redhat.com>
5103
5104 PR c/77323
5105 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5106 or _FloatN or _FloatNx is not supported.
5107 (finish_declspecs): Set type to integer_type_node when _FloatN or
5108 _FloatNx is not supported.
5109
c65699ef
JM
51102016-08-19 Joseph Myers <joseph@codesourcery.com>
5111
5112 PR c/32187
5113 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5114 (struct c_declspecs): Add field floatn_nx_idx.
5115 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5116 and _FloatNx type specifiers.
5117 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5118 (c_parser_declspecs, c_parser_attribute_any_word)
5119 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5120 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5121 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5122 narrower than double.
5123
2f1364c2
JJ
51242016-08-12 Jakub Jelinek <jakub@redhat.com>
5125 Martin Liska <mliska@suse.cz>
5126
5127 PR c/67410
5128 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5129 % to determine val element to change. Assert that
5130 wchar_bytes * charwidth fits into val array.
5131
191816a3
MP
51322016-08-12 Marek Polacek <polacek@redhat.com>
5133
5134 PR c/7652
5135 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5136 (c_parser_postfix_expression): Likewise.
5137 * c-typeck.c (build_unary_op): Adjust fall through comment.
5138 (c_mark_addressable): Likewise.
5139
b95a64bb
JJ
51402016-08-11 Jakub Jelinek <jakub@redhat.com>
5141
5142 PR c/72816
5143 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5144 array member through typedef, for orig_qual_indirect == 0 clear
5145 orig_qual_type.
5146
895aa8e1
DM
51472016-08-08 David Malcolm <dmalcolm@redhat.com>
5148
5149 PR c/64955
5150 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5151 this up to selftest::run_c_tests.
5152 (selftest::run_c_tests): New function.
5153
0b212d8c
TS
51542016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5155
ae9281fc
TS
5156 * c-parser.c (struct oacc_routine_data): Add error_seen and
5157 fndecl_seen members.
5158 (c_finish_oacc_routine): Use these.
5159 (c_parser_declaration_or_fndef): Adjust.
5160 (c_parser_oacc_routine): Likewise. Support more C language
5161 constructs, and improve diagnostics. Move pragma context
5162 checking...
5163 (c_parser_pragma): ... here.
5164
0b212d8c
TS
5165 * c-parser.c (struct oacc_routine_data): New.
5166 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5167 Simplify code.
5168 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5169 declare target" attribute.
5170
76e2c821
JB
51712016-08-01 Jan Beulich <jbeulich@suse.com>
5172
5173 * c-fold.c (c_fully_fold_internal): Also emit shift count
5174 warnings for vector types.
5175 * c-typeck.c (build_binary_op): Likewise.
5176
f618a472
MP
51772016-07-29 Marek Polacek <polacek@redhat.com>
5178
5179 PR c/71742
5180 * c-decl.c (finish_struct): Rephrase an error message.
5181
efd0786f
MP
5182 PR c/71853
5183 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5184 to error node for invalid code.
5185
e00dceaf
MP
5186 PR c/71573
5187 * c-decl.c (implicitly_declare): Return decl early not only for
5188 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5189
673a107a
JJ
51902016-07-29 Jakub Jelinek <jakub@redhat.com>
5191
5192 PR c/71969
5193 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5194 on GNU extern inline functions.
5195
a5b5c8b6
MP
51962016-07-29 Marek Polacek <polacek@redhat.com>
5197
5198 PR c/71583
5199 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5200 check expr.value.
5201
e3fe09c1
UB
52022016-07-22 Uros Bizjak <ubizjak@gmail.com>
5203
5204 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5205
7c8f7eaa
DM
52062016-07-20 David Malcolm <dmalcolm@redhat.com>
5207
5208 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5209 spellcheck-tree.h
5210 (best_macro_match): Likewise, converting from a typedef to a
5211 subclass.
5212 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5213 (lookup_name_fuzzy): Update for change of best_macro_match to a
5214 subclass with a ctor that calls cpp_forall_identifiers.
5215
de6a69ee
DM
52162016-07-20 David Malcolm <dmalcolm@redhat.com>
5217
5218 * c-decl.c (implicit_decl_warning): Update for conversion of
5219 return type of lookup_name_fuzzy to const char *.
5220 (undeclared_variable): Likewise.
5221 (lookup_name_fuzzy): Convert return type from tree to
5222 const char *.
5223 * c-parser.c (c_parser_declaration_or_fndef): Update for
5224 conversion of return type of lookup_name_fuzzy to const char *.
5225 (c_parser_parameter_declaration): Likewise.
5226
b1c9c068
CP
52272016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5228
5229 * c-parser.c (c_parser_oacc_declare): Don't scan for
5230 GOMP_MAP_POINTER.
5231 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5232 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5233 zero-length subarrays.
5234
ddbbcb19
JJ
52352016-07-15 Jakub Jelinek <jakub@redhat.com>
5236
5237 PR c/71858
5238 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5239 instead of FUZZY_LOOKUP_NAME.
5240 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5241 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5242
dd36b877
JJ
52432016-07-14 Jakub Jelinek <jakub@redhat.com>
5244
5245 PR c/71858
5246 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5247
8c681247
TS
52482016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5249
5250 * c-parser.c (c_parser_generic_selection): Make type of variable
5251 auto_vec.
5252 (c_parser_omp_declare_simd): Likewise.
5253
bf4fa671
TS
52542016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5255
5256 * c-decl.c (struct c_struct_parse_info): Change member types
5257 from vec to auto_vec.
5258 (start_struct): Adjust.
5259 (finish_struct): Likewise.
5260
557e8c49
JJ
52612016-07-02 Jakub Jelinek <jakub@redhat.com>
5262
5263 PR c/71719
5264 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5265
54d19c3b
TS
52662016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5267
5268 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5269 Move pragma context checking into...
5270 (c_parser_omp_cancellation_point): ... here, and improve
5271 diagnostic messages.
5272 * c-typeck.c (c_finish_omp_cancel)
5273 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5274
152ef731
JJ
52752016-06-29 Jakub Jelinek <jakub@redhat.com>
5276
5277 PR c/71685
5278 * c-typeck.c (c_build_qualified_type): Don't clear
5279 C_TYPE_INCOMPLETE_VARS for the main variant.
5280
52812016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
5282
5283 PR c/71552
5284 * c-typeck.c (output_init_element): Diagnose incompatible types
5285 before non-constant initializers.
5286
e9ac1f86
JJ
52872016-06-28 Jakub Jelinek <jakub@redhat.com>
5288
5289 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5290
277d7ee0
AK
52912016-06-23 Andi Kleen <ak@linux.intel.com>
5292
5293 * Make-lang.in: Add support for autofdo.
5294
1a4f11c8
DM
52952016-06-22 David Malcolm <dmalcolm@redhat.com>
5296
5297 PR c/70339
5298 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5299 (implicit_decl_warning): When issuing warnings for implicit
5300 declarations, attempt to provide a suggestion via
5301 lookup_name_fuzzy.
5302 (undeclared_variable): Likewise when issuing errors.
5303 (lookup_name_in_scope): Likewise.
5304 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5305 (best_macro_match): New typedef.
5306 (find_closest_macro_cpp_cb): New function.
5307 (lookup_name_fuzzy): New function.
5308 * c-parser.c: Include gcc-rich-location.h.
5309 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5310 (c_keyword_starts_typename): ...this new function.
5311 (c_parser_declaration_or_fndef): When issuing errors about
5312 missing "struct" etc, add a fixit. For other kinds of errors,
5313 attempt to provide a suggestion via lookup_name_fuzzy.
5314 (c_parser_parms_declarator): When looking ahead to detect typos in
5315 type names, also reject CPP_KEYWORD.
5316 (c_parser_parameter_declaration): When issuing errors about
5317 unknown type names, attempt to provide a suggestion via
5318 lookup_name_fuzzy.
5319 * c-tree.h (c_keyword_starts_typename): New prototype.
5320
5a578671
JM
53212016-06-20 Joseph Myers <joseph@codesourcery.com>
5322
5323 PR c/71601
5324 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5325 c_common_type returns error_mark_node.
5326
3f8257db 53272016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
5328
5329 PR c/69507
5330 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5331 __alignof__ (expression).
5332
6a3f203c
DM
53332016-06-14 David Malcolm <dmalcolm@redhat.com>
5334
5335 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5336
264757fb
DM
53372016-06-14 David Malcolm <dmalcolm@redhat.com>
5338
5339 * c-typeck.c (build_component_ref): Simplify fixit code by
5340 using gcc_rich_location::add_fixit_misspelled_id.
5341 (set_init_label): Likewise.
5342
f7e4f2e3
DM
53432016-06-13 David Malcolm <dmalcolm@redhat.com>
5344
5345 * c-parser.c (c_parser_initelt): Provide location of name for new
5346 location_t param of set_init_label.
5347 * c-tree.h (set_init_label): Add location_t param.
5348 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5349 param and use it when issuing error messages about unrecognized
5350 field names. Attempt to provide a fixit hint if appropriate,
5351 otherwise update the error message to provide the type name.
5352
4b1ffdb1
TS
53532016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5354
5355 PR c/71381
5356 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5357 Loosen checking.
5358
44a845ca
MS
53592016-06-08 Martin Sebor <msebor@redhat.com>
5360 Jakub Jelinek <jakub@redhat.com>
5361
5362 PR c++/70507
5363 PR c/68120
5364 * c-typeck.c (convert_arguments): Don't promote last argument
5365 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5366
92a5f2ba
MP
53672016-06-08 Marek Polacek <polacek@redhat.com>
5368
5369 PR c/71418
5370 * c-decl.c (grokdeclarator): Check TYPE_P.
5371
08203f73
MP
5372 PR c/71426
5373 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5374 code.
5375
6ffd47b7
DM
53762016-06-07 David Malcolm <dmalcolm@redhat.com>
5377
5378 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5379 and structure element reference, capture the location of the
5380 element name token and pass it to build_component_ref.
5381 (c_parser_postfix_expression_after_primary): Likewise for
5382 structure element dereference.
5383 (c_parser_omp_variable_list): Likewise for
5384 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5385 * c-tree.h (build_component_ref): Add location_t param.
5386 * c-typeck.c (build_component_ref): Add location_t param
5387 COMPONENT_LOC. Use it, if available, when issuing hints about
5388 mispelled member names to provide a fixit replacement hint.
5389
1f40cff3
MP
53902016-06-06 Marek Polacek <polacek@redhat.com>
5391
5392 PR c/71362
5393 * c-parser.c (c_parser_direct_declarator): Set location.
5394
5545a907
MP
53952016-06-06 Marek Polacek <polacek@redhat.com>
5396
5397 * c-typeck.c (comptypes_internal): Handle comparisons of
5398 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5399 TYPE_REF_CAN_ALIAS_ALL.
5400
b605f663
CLT
54012016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5402
5403 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5404 arguments as addressable when async clause exists.
5405
00631022
JJ
54062016-05-30 Jakub Jelinek <jakub@redhat.com>
5407
5408 PR c++/71349
5409 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5410 when combined with target construct.
5411
7211a097
JJ
54122016-05-26 Jakub Jelinek <jakub@redhat.com>
5413
5414 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5415 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5416
95efe6b6
MP
54172016-05-25 Marek Polacek <polacek@redhat.com>
5418
5419 PR c/71265
5420 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5421
a23faf7a
MP
5422 PR c/71266
5423 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5424
e46c7770
CP
54252016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5426
5427 * c-parser.c (c_parser_oacc_declare): Add support for
5428 GOMP_MAP_FIRSTPRIVATE_POINTER.
5429 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5430 argument with enum c_omp_region_type ort.
5431 (handle_omp_array_sections): Likewise. Update call to
5432 handle_omp_array_sections_1.
5433 (c_finish_omp_clauses): Add specific errors and warning messages for
5434 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5435 call to handle_omp_array_sections.
5436
a04e69c0
TS
54372016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5438
5439 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5440
f17a223d
RB
54412016-05-24 Richard Biener <rguenther@suse.de>
5442
5443 PR middle-end/70434
5444 PR c/69504
5445 * c-typeck.c (build_array_ref): Do not complain about indexing
5446 non-lvalue vectors. Adjust for function name change.
5447
79063edd
MS
54482016-05-20 Martin Sebor <msebor@redhat.com>
5449
5450 PR c/71115
5451 * c-typeck.c (error_init): Use
5452 expansion_point_location_if_in_system_header.
5453 (warning_init): Same.
5454
8a40fef3
DM
54552016-05-19 David Malcolm <dmalcolm@redhat.com>
5456
5457 PR c/71171
5458 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5459 in error-handling.
5460 (c_parser_postfix_expression): Likewise.
5461 * c-tree.h (c_expr::set_error): New method.
5462 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5463 that result's range is initialized.
5464
e9892350
JG
54652016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5466
5467 * c-typeck.c (parser_build_unary_op): Fix formatting.
5468
8fad45f5
MW
54692016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5470
5471 * c-decl.c (grokdeclarator): Remove errmsg and use of
5472 targetm.invalid_return_type.
5473 (grokparms): Remove errmsg and use of
5474 targetm.invalid_parameter_type.
5475
aa4b467b
JM
54762016-05-13 Joseph Myers <joseph@codesourcery.com>
5477
5478 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5479 function return type.
5480
4f2e1536
MP
54812016-05-12 Marek Polacek <polacek@redhat.com>
5482
5483 PR c/70756
5484 * c-decl.c (build_compound_literal): Pass LOC down to
5485 c_incomplete_type_error.
5486 * c-tree.h (require_complete_type): Adjust declaration.
5487 (c_incomplete_type_error): Likewise.
5488 * c-typeck.c (require_complete_type): Add location parameter, pass it
5489 down to c_incomplete_type_error.
5490 (c_incomplete_type_error): Add location parameter, pass it down to
5491 error_at.
5492 (build_component_ref): Pass location down to c_incomplete_type_error.
5493 (default_conversion): Pass location down to require_complete_type.
5494 (build_array_ref): Likewise.
5495 (build_function_call_vec): Likewise.
5496 (convert_arguments): Likewise.
5497 (build_unary_op): Likewise.
5498 (build_c_cast): Likewise.
5499 (build_modify_expr): Likewise.
5500 (convert_for_assignment): Likewise.
5501 (c_finish_omp_clauses): Likewise.
5502
d6e83a8d
MM
55032016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5504
5505 PR c/43651
5506 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5507 is enabled.
5508 * c-errors.c (pedwarn_c90): Return true if warned.
5509 * c-tree.h (pedwarn_c90): Change return type to bool.
5510 (enum c_declspec_word): Add new enumerator cdw_atomic.
5511
5c3a10fb
MP
55122016-05-11 Marek Polacek <polacek@redhat.com>
5513
5514 PR c++/71024
5515 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5516 diagnose_mismatched_attributes and call it.
5517
cf68d92c
MP
55182016-05-10 Marek Polacek <polacek@redhat.com>
5519
5520 PR c/70255
5521 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5522 on a declaration following the definition.
5523
351f85c5
JJ
55242016-05-05 Jakub Jelinek <jakub@redhat.com>
5525
5526 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5527 parse it through to c_parser_c99_block_statement.
5528 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5529 caller.
5530
deef7113
MP
55312016-05-04 Marek Polacek <polacek@redhat.com>
5532
5533 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5534 OPT_Wdangling_else.
5535
de55efd5
MP
55362016-05-04 Marek Polacek <polacek@redhat.com>
5537
5538 PR c/48778
5539 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5540 for macro expansions.
5541
79ce98bc
MP
55422016-05-03 Marek Polacek <polacek@redhat.com>
5543
5544 PR c/70859
5545 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5546 check_builtin_function_arguments.
5547
fb2647aa
RB
55482016-05-03 Richard Biener <rguenther@suse.de>
5549
5550 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5551 the checksum from the previous stage.
5552
77886428
CP
55532016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5554
5555 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5556 c_finish_omp_clauses.
5557 (c_parser_omp_all_clauses): Likewise.
5558 (c_parser_oacc_cache): Likewise.
5559 (c_parser_oacc_loop): Likewise.
5560 (omp_split_clauses): Likewise.
5561 (c_parser_omp_declare_target): Likewise.
5562 (c_parser_cilk_all_clauses): Likewise.
5563 (c_parser_cilk_for): Likewise.
5564 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5565 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5566
7176a4a0
MP
55672016-05-02 Marek Polacek <polacek@redhat.com>
5568
5569 PR c/70851
5570 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5571 incomplete type.
5572
e7ff0319
CP
55732016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5574
5575 PR middle-end/70626
5576 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5577 OACC_LOOP_CLAUSE_MASK.
5578 (c_parser_oacc_kernels_parallel): Update call to
5579 c_oacc_split_loop_clauses.
5580
9f405ce1
AM
55812016-04-28 Andrew MacLeod <amacleod@redhat.com>
5582
5583 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5584 argument to build_modify_expr in two cases.
5585
c1e1f433
BS
55862016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5587
5588 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5589 warn_for_memset instead of warning directly here.
5590
2448a956
MP
55912016-04-26 Marek Polacek <polacek@redhat.com>
5592
5593 PR c/67784
5594 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5595 out of ...
5596 (c_parser_for_statement): ... here.
5597 (c_parser_if_statement): Use it.
5598 (c_parser_switch_statement): Use it.
5599 (c_parser_while_statement): Use it.
5600
b02a5e26
MP
5601 PR c/70791
5602 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5603
477d4906
IV
56042016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5605
5606 PR c++/69363
5607 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5608 instead of c_finish_cilk_clauses.
5609 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5610 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5611 floating-point variables in the linear clause for Cilk Plus.
5612
fe37c7af
MM
56132016-04-18 Michael Matz <matz@suse.de>
5614
5615 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5616 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5617
949505a9
MP
56182016-04-15 Marek Polacek <polacek@redhat.com>
5619
5620 PR c/70671
5621 * c-typeck.c (build_unary_op): Pass location down to error and
5622 warning call.
5623
dda1bf61
JJ
56242016-04-15 Jakub Jelinek <jakub@redhat.com>
5625
5626 PR c/70436
5627 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5628 where needed.
5629 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5630 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5631 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5632 Adjust c_parser_pragma callers.
5633 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5634 caller.
5635 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5636 c_parser_statement.
5637 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5638 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5639 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5640 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5641 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5642 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5643 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5644 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5645 down where needed.
5646 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5647 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5648 calls.
5649
99cd9857
MP
56502016-04-13 Marek Polacek <polacek@redhat.com>
5651
5652 PR c/70436
5653 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5654 adjust callers.
5655 (c_parser_statement): Likewise.
5656 (c_parser_c99_block_statement): Likewise.
5657 (c_parser_while_statement): Likewise.
5658 (c_parser_for_statement): Likewise.
5659 (c_parser_if_body): Don't set IF_P here.
5660 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5661 about dangling else here.
5662 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5663 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5664 warn about dangling else here.
5665
f13355da
MP
56662016-04-04 Marek Polacek <polacek@redhat.com>
5667
5668 PR c/70307
5669 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5670
5fde6a45
MP
56712016-03-31 Marek Polacek <polacek@redhat.com>
5672
5673 PR c/70297
5674 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5675
4bbf545b
DM
56762016-03-18 David Malcolm <dmalcolm@redhat.com>
5677
5678 PR c/70281
5679 * c-parser.c (c_parser_postfix_expression): Set the source range
5680 for uses of "__builtin_types_compatible_p".
5681
fcc2b74f
JJ
56822016-03-17 Jakub Jelinek <jakub@redhat.com>
5683
5684 PR c/70280
5685 * c-typeck.c (composite_type): Don't count void_list_node
5686 into len, if the list is terminated by void_list_node, start
5687 with void_list_node instead of NULL for newargs. Stop
5688 at void_list_node.
5689
ab4c578f
MP
56902016-03-16 Marek Polacek <polacek@redhat.com>
5691
5692 PR c/70093
5693 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5694 nested functions returning VM types.
5695
96b3c82d
CP
56962016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5697
5698 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5699 when calling c_finish_omp_clauses.
5700
29b9828f
BS
57012016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5702
5703 PR c/69824
5704 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5705 for later.
5706
7ff6ca38
MP
57072016-03-04 Marek Polacek <polacek@redhat.com>
5708
5709 PR c/69798
5710 * c-parser.c (c_parser_postfix_expression): Call
5711 c_parser_cast_expression rather than c_parser_postfix_expression.
5712
686e2237
JJ
57132016-03-01 Jakub Jelinek <jakub@redhat.com>
5714
5715 PR c/69796
5716 PR c/69974
5717 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5718 of incomplete decls to error_mark_node.
5719
0b05329b
MP
57202016-02-24 Marek Polacek <polacek@redhat.com>
5721
5722 PR c/69819
5723 * c-decl.c (finish_decl): Don't update the copy of the type of a
5724 different decl type.
5725
067fbd8b
JJ
57262016-02-23 Jakub Jelinek <jakub@redhat.com>
5727
5728 PR objc/69844
5729 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5730 in id_kind reclassification.
5731
bf14eba2
JJ
57322016-02-16 Jakub Jelinek <jakub@redhat.com>
5733
5734 PR c/69835
5735 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5736
ba539195
JN
57372016-02-16 James Norris <jnorris@codesourcery.com>
5738
5739 PR c/64748
5740 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5741
16595a1f
BS
57422016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5743
f48dfe98
BS
5744 * c-decl.c (build_null_declspecs): Zero the entire struct.
5745
16595a1f
BS
5746 PR c/69522
5747 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5748 callers changed. If nested_p is true, use it to call
5749 finish_implicit_inits.
5750 * c-tree.h (finish_implicit_inits): Declare.
5751 * c-typeck.c (finish_implicit_inits): New function. Move code
5752 from ...
5753 (push_init_level): ... here.
5754 (set_designator, process_init_element): Call finish_implicit_inits.
5755
66756373
JJ
57562016-02-11 Jakub Jelinek <jakub@redhat.com>
5757
5758 PR c/69768
5759 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5760 arguments for -Waddress warning.
5761
1066e9b5
JJ
57622016-02-04 Jakub Jelinek <jakub@redhat.com>
5763
5764 PR c/69669
5765 * c-decl.c (finish_enum): When honoring mode attribute,
5766 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5767
3a5d2ba4
JJ
57682016-01-29 Jakub Jelinek <jakub@redhat.com>
5769
5770 PR debug/69518
5771 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5772 all type variants, not just TYPE_MAIN_VARIANT.
5773
cbdd8ae0
JJ
57742016-01-27 Jakub Jelinek <jakub@redhat.com>
5775
5776 PR debug/66869
5777 * c-decl.c (c_write_global_declarations_1): Warn with
5778 warn_unused_function if static prototype without definition
5779 is not C_DECL_USED.
5780
fa74a4bc
MP
57812016-01-27 Marek Polacek <polacek@redhat.com>
5782
5783 PR c/68062
5784 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5785 to unsigned, if needed. Add -Wsign-compare warning.
5786
13f92e8d
JJ
57872016-01-26 Jakub Jelinek <jakub@redhat.com>
5788
5789 PR tree-optimization/69483
5790 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5791
cd8e73dc 57922016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5793
5794 PR c/24293
5795 * c-tree.h (incomplete_record_decls): Declare.
5796 * c-parser.c (incomplete_record_decls): Define.
5797 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5798 report error if any decl has zero size.
5799 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5800 or enum type to incomplete_record_decls.
5801
e6d6ec9e
TV
58022016-01-14 Tom de Vries <tom@codesourcery.com>
5803
5804 PR tree-optimization/68773
5805 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5806 set force_output.
5807
00083992
MP
58082016-01-14 Marek Polacek <polacek@redhat.com>
5809
5810 PR c/69262
5811 * c-decl.c (grokdeclarator): Provide more information for invalid
5812 array declarations.
5813
7443cf13
DM
58142016-01-06 David Malcolm <dmalcolm@redhat.com>
5815
5816 * c-parser.c (c_parser_unary_expression): For dereferences, build
5817 a combined location before calling build_indirect_ref, so that
5818 error reports cover the full range, manually updating the c_expr
5819 src_range.
5820
6b131d5b
MP
58212016-01-06 Marek Polacek <polacek@redhat.com>
5822
5823 PR sanitizer/69099
5824 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5825 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5826 NULL.
5827
818ab71a
JJ
58282016-01-04 Jakub Jelinek <jakub@redhat.com>
5829
5830 Update copyright years.
5831
2fe0a208
MP
58322016-01-04 Marek Polacek <polacek@redhat.com>
5833
5834 PR c/68908
5835 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5836 optimization to use __atomic_fetch_* built-in if possible.
5837
c7b48c8a
TS
58382015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5839
5840 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5841 into...
5842 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5843 all users.
5844
fda5652f
MP
58452015-12-22 Marek Polacek <polacek@redhat.com>
5846
5847 PR c/69002
5848 * c-typeck.c (build_component_ref): Warn when acessing elements of
5849 atomic structures or unions.
5850
745e411d
DM
58512015-12-21 David Malcolm <dmalcolm@redhat.com>
5852
5853 * c-typeck.c: Include "gcc-rich-location.h".
5854 (build_binary_op): In the two places that call binary_op_error,
5855 create a gcc_rich_location and populate it with the location of
5856 the binary op and its two operands.
5857
94c40e19
DM
58582015-12-16 David Malcolm <dmalcolm@redhat.com>
5859
5860 * c-parser.c (c_parser_statement_after_labels): When calling
5861 c_finish_return, Use the return expression's location if it has
5862 one, falling back to the location of the first token within it.
5863 * c-typeck.c (c_finish_return): When issuing warnings about
5864 the incorrect presence/absence of a return value, issue a note
5865 showing the declaration of the function.
5866
de67c4c3
DM
58672015-12-16 David Malcolm <dmalcolm@redhat.com>
5868
5869 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5870 to 4.
5871 (c_parser_peek_nth_token): New function.
5872 (c_parser_peek_conflict_marker): New function.
5873 (c_parser_error): Detect conflict markers and report them as such.
5874
a10704e1
DM
58752015-12-16 David Malcolm <dmalcolm@redhat.com>
5876
5877 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5878 to preserve range information for the primary expression
5879 in the call to c_parser_postfix_expression_after_primary.
5880
8062bca6
DM
58812015-12-16 David Malcolm <dmalcolm@redhat.com>
5882
5883 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5884 expression location, falling back on the first token location,
5885 rather than always using the latter.
5886
d06f8b75
MP
58872015-12-16 Marek Polacek <polacek@redhat.com>
5888
5889 PR c/64637
5890 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5891 available.
5892
2994fb91
MP
58932015-12-15 Marek Polacek <polacek@redhat.com>
5894
5895 PR c/68907
5896 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5897 artificial decl.
5898
a1b93f8d
DM
58992015-12-08 David Malcolm <dmalcolm@redhat.com>
5900
5901 * c-parser.c (c_parser_alignof_expression): Capture location of
5902 closing parenthesis (if any), or of end of unary expression, and
5903 use it to build a src_range for the expression.
5904
46c6e1e2
DM
59052015-12-08 David Malcolm <dmalcolm@redhat.com>
5906
5907 PR c/68757
5908 * c-parser.c (c_parser_get_builtin_args): Add
5909 "out_close_paren_loc" param, and write back to it.
5910 (c_parser_postfix_expression): Capture the closing
5911 parenthesis location for RID_CHOOSE_EXPR,
5912 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5913 RID_BUILTIN_SHUFFLE and use it to set the source range
5914 for such expressions; within RID_BUILTIN_COMPLEX set
5915 the underlying location.
5916
66189108
MP
59172015-12-07 Marek Polacek <polacek@redhat.com>
5918
5919 PR c/68668
5920 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5921 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5922
f187980b
EB
59232015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5924
5925 * c-tree.h (c_build_va_arg): Adjust prototype.
5926 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5927 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5928 parameter, adjust throughout and issue an error if EXPR is a component
5929 with reverse storage order.
5930
4250754e
JM
59312015-12-02 Jason Merrill <jason@redhat.com>
5932
5933 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5934 (c_fully_fold_internal, decl_constant_value_for_optimization):
5935 Move from c-common.c.
5936 * c-tree.h: Declare decl_constant_value_for_optimization.
5937 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5938
e9e32ee6
JM
59392015-12-02 Joseph Myers <joseph@codesourcery.com>
5940
5941 PR c/68162
5942 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5943 following link from declarator to next declarator. Track original
5944 qualified type and pass it to c_build_qualified_type.
5945 * c-typeck.c (c_build_qualified_type): Add arguments
5946 orig_qual_type and orig_qual_indirect.
5947
ff7a55bf
TS
59482015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5949
5950 * c-parser.c (c_parser_omp_clause_name)
5951 (c_parser_oacc_all_clauses): Alphabetical sorting.
5952
657e4e47
JJ
59532015-12-02 Jakub Jelinek <jakub@redhat.com>
5954
5955 PR c/68533
5956 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5957 for diagnostics.
5958
37d5ad46
JB
59592015-12-01 Julian Brown <julian@codesourcery.com>
5960 Cesar Philippidis <cesar@codesourcery.com>
5961 James Norris <James_Norris@mentor.com>
5962
5963 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5964 (c_parser_oacc_clause_use_device): New function.
5965 (c_parser_oacc_all_clauses): Add use_device support.
5966 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5967 (c_parser_oacc_host_data): New function.
5968 (c_parser_omp_construct): Add host_data support.
5969 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5970 * c-typeck.c (c_finish_oacc_host_data): New function.
5971 (c_finish_omp_clauses): Add use_device support.
5972
a4850ce9
JH
59732015-11-29 Jan Hubicka <hubicka@ucw.cz>
5974
5975 PR c/67106
5976 * c-decl.c: Set TYPE_PACKED in variants.
5977
b58d3df2
ML
59782015-11-27 Martin Liska <mliska@suse.cz>
5979
5980 PR c++/68312
5981 * c-array-notation.c (fix_builtin_array_notation_fn):
5982 Use release_vec_vec instead of vec::release.
5983 (build_array_notation_expr): Likewise.
5984 (fix_conditional_array_notations_1): Likewise.
5985 (fix_array_notation_expr): Likewise.
5986 (fix_array_notation_call_expr): Likewise.
5987
aec17bfe
JJ
59882015-11-27 Jakub Jelinek <jakub@redhat.com>
5989
5990 PR c/63326
5991 * c-parser.c (c_parser_compound_statement_nostart): If
5992 last_label is true, use pragma_stmt instead of pragma_compound
5993 as second c_parser_pragma argument.
5994 (c_parser_omp_ordered, c_parser_omp_target_update,
5995 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5996 false as second argument to c_parser_skip_to_pragma_eol after
5997 diagnosing standalone directives used in pragma_stmt context.
5998
688c4de0
IV
59992015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6000
6001 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6002 with "if (ENABLE_OFFLOADING)".
6003
cbd03aee
DM
60042015-11-23 David Malcolm <dmalcolm@redhat.com>
6005
6006 PR objc/68438
6007 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6008 for various Objective-C constructs: Class.name syntax,
6009 @selector(), @protocol(), @encode(), and [] message syntax.
6010
a87a86e1
DM
60112015-11-20 David Malcolm <dmalcolm@redhat.com>
6012
6013 PR 62314
6014 * c-typeck.c (should_suggest_deref_p): New function.
6015 (build_component_ref): Special-case POINTER_TYPE when
6016 generating a "not a structure of union" error message, and
6017 suggest a "->" rather than a ".", providing a fix-it hint.
6018
8ece8dfb
DM
60192015-11-19 David Malcolm <dmalcolm@redhat.com>
6020
6021 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6022 candidate into a new function, find_closest_identifier.
6023
433068cc
MP
60242015-11-19 Marek Polacek <polacek@redhat.com>
6025
6026 PR c/68412
6027 * c-typeck.c (parser_build_binary_op): Properly handle
6028 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6029
bef08b71
DM
60302015-11-17 David Malcolm <dmalcolm@redhat.com>
6031
6032 * c-parser.c (set_c_expr_source_range): Bulletproof both
6033 overloaded implementations against NULL expr->value.
6034 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6035 values.
6036 (c_parser_unary_expression): Likewise when handling addresses of
6037 labels.
6038 (c_parser_postfix_expression): Likewise for statement expressions,
6039 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6040 __builtin_va_arg, and for __builtin_offset_of.
6041 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6042 src_range using the range of the braced initializer.
6043 (c_parser_transaction_expression): Set src_range for "ret" to a
6044 sane pair of values.
6045
fff77217
KY
60462015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6047
6048 * c-parser.c (c_finish_omp_declare_simd): Look for
6049 "simd" attribute as well. Update error message.
6050
1d899da2
TS
60512015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6052
6053 * c-parser.c (c_parser_omp_declare_target): Adjust.
6054
e4606348
JJ
60552015-11-14 Jakub Jelinek <jakub@redhat.com>
6056
6057 * c-typeck.c (c_finish_omp_clauses): Don't mark
6058 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6059
3e636daf
MP
60602015-11-14 Marek Polacek <polacek@redhat.com>
6061
6062 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6063 * c-typeck.c: Likewise.
6064
ebedc9a3
DM
60652015-11-13 David Malcolm <dmalcolm@redhat.com>
6066
6067 * c-decl.c (warn_defaults_to): Pass line_table to
6068 rich_location ctor.
6069 * c-errors.c (pedwarn_c99): Likewise.
6070 (pedwarn_c90): Likewise.
6071 * c-parser.c (set_c_expr_source_range): New functions.
6072 (c_token::get_range): New method.
6073 (c_token::get_finish): New method.
6074 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6075 based on the range from the start of the LHS to the end of the
6076 RHS.
6077 (c_parser_conditional_expression): Likewise, based on the range
6078 from the start of the cond.value to the end of exp2.value.
6079 (c_parser_binary_expression): Call set_c_expr_source_range on
6080 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6081 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6082 based on the cast_loc through to the end of the expr.
6083 (c_parser_unary_expression): Likewise, based on the
6084 op_loc through to the end of op.
6085 (c_parser_sizeof_expression) Likewise, based on the start of the
6086 sizeof token through to either the closing paren or the end of
6087 expr.
6088 (c_parser_postfix_expression): Likewise, using the token range,
6089 or from the open paren through to the close paren for
6090 parenthesized expressions.
6091 (c_parser_postfix_expression_after_primary): Likewise, for
6092 various kinds of expression.
6093 * c-tree.h (struct c_expr): Add field "src_range".
6094 (c_expr::get_start): New method.
6095 (c_expr::get_finish): New method.
6096 (set_c_expr_source_range): New decls.
6097 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6098 on ret for prefix unary ops.
6099 (parser_build_binary_op): Likewise, running from the start of
6100 arg1.value through to the end of arg2.value.
6101
ec8b536f
MP
61022015-11-13 Marek Polacek <polacek@redhat.com>
6103
6104 PR c/68320
6105 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6106
277fe616
DM
61072015-11-13 David Malcolm <dmalcolm@redhat.com>
6108
6109 * c-typeck.c: Include spellcheck.h.
6110 (lookup_field_fuzzy_find_candidates): New function.
6111 (lookup_field_fuzzy): New function.
6112 (build_component_ref): If the field was not found, try using
6113 lookup_field_fuzzy and potentially offer a suggestion.
6114
6e232ba4
JN
61152015-11-12 James Norris <jnorris@codesourcery.com>
6116 Joseph Myers <joseph@codesourcery.com>
6117
6118 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6119 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6120 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6121 and PRAGMA_OMP_CLAUSE_LINK.
6122 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6123 and PRAGMA_OACC_CLAUSE_LINK.
6124 (OACC_DECLARE_CLAUSE_MASK): New definition.
6125 (c_parser_oacc_declare): New function.
6126
9be4f715
MP
61272015-11-12 Marek Polacek <polacek@redhat.com>
6128
6129 PR c/67784
6130 * c-parser.c (c_parser_for_statement): Reclassify the token in
6131 a correct scope.
6132
e78bede6
MP
61332015-11-11 Marek Polacek <polacek@redhat.com>
6134
6135 PR c/68107
6136 PR c++/68266
6137 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6138 checking the size of an array.
6139
69f293c9
AM
61402015-11-11 Andrew MacLeod <amacleod@redhat.com>
6141
6142 * c-array-notation.c: Remove unused header files.
6143 * c-aux-info.c: Likewise.
6144 * c-convert.c: Likewise.
6145 * c-decl.c: Likewise.
6146 * c-errors.c: Likewise.
6147 * c-lang.c: Likewise.
6148 * c-objc-common.c: Likewise.
6149 * c-parser.c: Likewise.
6150 * c-typeck.c: Likewise.
6151 * gccspec.c: Likewise.
6152
3a40d81d
NS
61532015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6154 Cesar Philippidis <cesar@codesourcery.com>
6155 James Norris <jnorris@codesourcery.com>
6156 Julian Brown <julian@codesourcery.com>
6157 Nathan Sidwell <nathan@codesourcery.com>
6158
3a40d81d
NS
6159 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6160 routine arg.
6161 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6162 (c_parser_pragma): Parse 'acc routine'.
6163 (OACC_ROUTINE_CLAUSE_MARK): Define.
6164 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6165
fc402eec
AA
61662015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6167
6168 PR debug/67192
6169 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6170 location of the backward-goto to the start of the loop body.
6171
f6b0b3db
AA
61722015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6173
6174 PR debug/67192
6175 * c-parser.c (c_parser_while_statement): Finish the loop before
6176 parsing ahead for misleading indentation.
6177 (c_parser_for_statement): Likewise.
6178
ee45a32d
EB
61792015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6180
6181 * c-decl.c (finish_struct): If the structure has reverse storage
6182 order, rewrite the type of array fields with scalar component. Call
6183 maybe_apply_pragma_scalar_storage_order on entry.
6184 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6185 errors on bit-fields and reverse SSO here and not...
6186 (c_mark_addressable): ...here.
6187 (output_init_element): Adjust call to initializer_constant_valid_p.
6188 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6189
8a645150
DM
61902015-11-06 David Malcolm <dmalcolm@redhat.com>
6191
6192 * c-decl.c (warn_defaults_to): Update for change in signature
6193 of diagnostic_set_info.
6194 * c-errors.c (pedwarn_c99): Likewise.
6195 (pedwarn_c90): Likewise.
6196 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6197 for textinfo::set_location.
6198
7a5e4956
CP
61992015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6200 Thomas Schwinge <thomas@codesourcery.com>
6201 James Norris <jnorris@codesourcery.com>
6202
6203 * c-parser.c (c_parser_omp_clause_name): Add support for
6204 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6205 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6206 default(none) in OpenACC.
6207 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6208 arguments.
6209 (c_parser_oacc_clause_tile): New function.
6210 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6211 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6212 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6213 TILE}.
6214 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6215 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6216 FIRSTPRIVATE}.
6217 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6218 (c_parser_oacc_update): Update the error message for missing clauses.
6219 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6220 and OMP_CLAUSE_INDEPENDENT.
6221
bfcfbfa0
MP
62222015-11-05 Marek Polacek <polacek@redhat.com>
6223
6224 PR c/68090
6225 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6226 deal with pre-evaluation on invalid types.
6227
e01d41e5
JJ
62282015-11-05 Jakub Jelinek <jakub@redhat.com>
6229 Ilya Verbin <ilya.verbin@intel.com>
6230
6231 * c-parser.c: Include context.h and gimple-expr.h.
6232 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6233 monotonic together with nonmonotonic.
6234 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6235 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6236 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6237 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6238 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6239 expressions on combined target teams before the target.
6240 (c_parser_omp_declare_target): If decl has "omp declare target" or
6241 "omp declare target link" attribute, and cgraph or varpool node already
6242 exists, then set corresponding flags. Call c_finish_omp_clauses
6243 in the parenthesized extended-list syntax case.
6244 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6245 declare target.
6246 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6247 on OMP_CLAUSE_REDUCTION array sections.
6248 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6249 into the constant offset, or for variable low-bound using
6250 POINTER_PLUS_EXPR. For structure element based array sections use
6251 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6252 (c_finish_omp_clauses): Drop generic_field_head, structure
6253 elements are now always mapped even as array section bases,
6254 diagnose same var in data sharing and mapping clauses. Diagnose if
6255 linear step on declare simd is neither a constant nor a uniform
6256 parameter. Look through POINTER_PLUS_EXPR for array section
6257 reductions. Diagnose the same var or function appearing multiple
6258 times on the same directive. Fix up wording for the to clause if t
6259 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6260 modifier on kinds other than dynamic or guided or nonmonotonic
6261 modifier together with ordered clause.
6262
4bf9e5a8
TS
62632015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6264 Chung-Lin Tang <cltang@codesourcery.com>
6265
6266 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6267
2adfab87
AM
62682015-10-29 Andrew MacLeod <amacleod@redhat.com>
6269
6270 * c-array-notation.c: Reorder #include's and remove duplicates.
6271 * c-aux-info.c: Likewise.
6272 * c-convert.c: Likewise.
6273 * c-decl.c: Likewise.
6274 * c-errors.c: Likewise.
6275 * c-lang.c: Likewise.
6276 * c-objc-common.c: Likewise.
6277 * c-parser.c: Likewise.
6278 * c-typeck.c: Likewise.
6279
e922069e
JW
62802015-10-26 Jim Wilson <jim.wilson@linaro.org>
6281
6282 PR debug/66068
6283 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6284 after calling build_qualified_type.
6285
765dd391
CP
62862015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6287 Thomas Schwinge <thomas@codesourcery.com>
6288 James Norris <jnorris@codesourcery.com>
6289 Joseph Myers <joseph@codesourcery.com>
6290 Julian Brown <julian@codesourcery.com>
6291 Bernd Schmidt <bschmidt@redhat.com>
6292
6293 * c-parser.c (c_parser_oacc_shape_clause): New.
6294 (c_parser_oacc_simple_clause): New.
6295 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6296 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6297
88bae6f4
TS
62982015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6299 James Norris <jnorris@codesourcery.com>
6300 Cesar Philippidis <cesar@codesourcery.com>
6301
6302 PR c/64765
6303 PR c/64880
6304 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6305 parameters, and handle these. Adjust all users.
6306 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6307 into...
6308 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6309 all users.
6310 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6311 declare functions.
6312 (c_finish_omp_construct): Declare function.
6313 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6314 Merge functions into...
6315 (c_finish_omp_construct): ... this new function.
6316
a8fc2579
RB
63172015-10-22 Richard Biener <rguenther@suse.de>
6318
6319 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6320 before folding a MINUS_EXPR.
6321
e9122ef6
MP
63222015-10-21 Marek Polacek <polacek@redhat.com>
6323
6324 PR c/68024
6325 * c-decl.c (start_function): Warn about vararg functions without
6326 a prototype.
6327
9f47c7e5
IE
63282015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6329
6330 * c-typeck.c (build_conditional_expr): Use boolean vector
6331 type for vector comparison.
6332 (build_vec_cmp): New.
6333 (build_binary_op): Use build_vec_cmp for comparison.
6334
fa60eeb9
MP
63352015-10-20 Marek Polacek <polacek@redhat.com>
6336
6337 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6338
2c7020eb
MP
63392015-10-20 Marek Polacek <polacek@redhat.com>
6340
6341 PR c/67964
6342 * c-parser.c (c_parser_attributes): Break out of the loop if the
6343 token after an attribute isn't a comma.
6344
d9a6bd32
JJ
63452015-10-13 Jakub Jelinek <jakub@redhat.com>
6346 Aldy Hernandez <aldyh@redhat.com>
6347
6348 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6349 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6350 (c_parser_omp_variable_list): Handle structure elements for
6351 map, to and from clauses. Handle array sections in reduction
6352 clause. Formatting fixes.
6353 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6354 if clause modifiers.
6355 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6356 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6357 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6358 c_parser_omp_clause_is_device_ptr): New functions.
6359 (c_parser_omp_clause_ordered): Parse optional parameter.
6360 (c_parser_omp_clause_reduction): Handle array reductions.
6361 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6362 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6363 functions.
6364 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6365 (c_parser_omp_clause_depend_sink): New function.
6366 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6367 (c_parser_omp_clause_map): Parse release/delete map kinds and
6368 optional always modifier.
6369 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6370 and c_finish_omp_clauses callers.
6371 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6372 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6373 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6374 (OMP_CRITICAL_CLAUSE_MASK): Define.
6375 (c_parser_omp_critical): Parse critical clauses.
6376 (c_parser_omp_for_loop): Handle doacross loops, adjust
6377 c_finish_omp_for and c_finish_omp_clauses callers.
6378 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6379 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6380 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6381 (c_parser_omp_for): Disallow ordered clause when combined with
6382 distribute. Disallow linear clause when combined with distribute
6383 and not combined with simd.
6384 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6385 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6386 parse clauses and if depend clause is found, don't parse a body.
6387 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6388 Allow target parallel without for after it.
6389 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6390 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6391 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6392 invalid kinds.
6393 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6394 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6395 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6396 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6397 functions.
6398 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6399 defaultmap and is_device_ptr clauses.
6400 (c_parser_omp_target): Parse target parallel and target simd. Set
6401 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6402 and target exit data. Diagnose invalid map kinds.
6403 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6404 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6405 construct.
6406 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6407 &omp_priv.
6408 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6409 (c_parser_omp_taskloop): New function.
6410 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6411 handle PRAGMA_OMP_TASKLOOP.
6412 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6413 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6414 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6415 Add IS_OMP argument, handle structure element bases, diagnose
6416 bitfields, pass IS_OMP recursively, diagnose known zero length
6417 array sections in depend clauses, handle array sections in reduction
6418 clause, diagnose negative length even for pointers.
6419 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6420 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6421 array sections in reduction clause, set
6422 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6423 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6424 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6425 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6426
21ba0cea
MP
64272015-10-06 Marek Polacek <polacek@redhat.com>
6428
6429 * c-parser.c (c_parser_statement_after_labels): Use
6430 protected_set_expr_location.
6431 (c_parser_omp_clause_num_gangs): Likewise.
6432 (c_parser_omp_clause_num_threads): Likewise.
6433 (c_parser_omp_clause_num_workers): Likewise.
6434 (c_parser_omp_clause_vector_length): Likewise.
6435 (c_parser_omp_clause_num_teams): Likewise.
6436 (c_parser_omp_clause_thread_limit): Likewise.
6437 * c-typeck.c (build_c_cast): Likewise.
6438 (c_cast_expr): Likewise.
6439
624d31fe
RS
64402015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6441
6442 * c-typeck.c (c_tree_equal): Use real_equal instead of
6443 REAL_VALUES_EQUAL.
6444
b8fd7909
JM
64452015-10-04 Jason Merrill <jason@redhat.com>
6446
6447 * c-parser.c (c_lex_one_token): Handle @synchronized.
6448 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6449 can change whether the function is transaction_safe.
6450
1c7485af
MP
64512015-10-02 Marek Polacek <polacek@redhat.com>
6452
6453 PR c/67730
6454 * c-typeck.c (convert_for_assignment): Use the expansion point
6455 location throughout.
6456
3e3b8d63
MP
64572015-10-02 Marek Polacek <polacek@redhat.com>
6458
6459 PR c/64249
6460 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6461 and pass it down to c_parser_if_statement.
6462 (c_parser_else_body): Add CHAIN parameter and pass it down to
6463 c_parser_statement_after_labels.
6464 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6465 duplicated if-else-if conditions.
6466
aabef2de
MP
64672015-10-01 Marek Polacek <polacek@redhat.com>
6468
6469 * c-typeck.c (convert_for_assignment): Improve commentary.
6470
de8ddd5f
MP
64712015-09-30 Marek Polacek <polacek@redhat.com>
6472
6473 PR c/67730
6474 * c-typeck.c (c_finish_return): Use the expansion point location for
6475 certain "return with value" warnings.
6476
c4914de6
MLI
64772015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6478
6479 * c-parser.c (pragma_lex): Add loc argument.
6480
0e36f5c7
MP
64812015-09-15 Marek Polacek <polacek@redhat.com>
6482
6483 PR c/67580
6484 * c-decl.c (tag_exists_p): New function.
6485 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6486 struct/union/enum keywords are missing.
6487 * c-tree.h (tag_exists_p): Declare.
6488
2f3bb934
MP
64892015-09-15 Marek Polacek <polacek@redhat.com>
6490
6491 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6492 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6493 Return NULL_TREE instead of 0.
6494 (lookup_name): Return NULL_TREE instead of 0.
6495 (lookup_name_in_scope): Likewise.
6496 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6497 (parser_xref_tag): Use false instead of 0.
6498 (start_struct): Use true instead of 1.
6499 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6500
aa256c4a
MP
65012015-09-14 Marek Polacek <polacek@redhat.com>
6502
6503 * c-typeck.c (set_nonincremental_init_from_string): Use
6504 HOST_WIDE_INT_M1U when shifting a negative value.
6505
dbb68221
MW
65062015-09-09 Mark Wielaard <mjw@redhat.com>
6507
6508 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6509 parm against NULL.
6510
a8a098ac
JJ
65112015-09-10 Jakub Jelinek <jakub@redhat.com>
6512
6513 PR c/67502
6514 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6515 into OMP_FOR_PRE_BODY rather than before the loop.
6516
f4b189d5
JJ
65172015-09-09 Jakub Jelinek <jakub@redhat.com>
6518
0bb99c11
JJ
6519 PR c/67501
6520 * c-parser.c (c_parser_oacc_all_clauses,
6521 c_parser_omp_all_clauses): Remove invalid clause from
6522 list of clauses even if parser->error is set.
6523
fce5e5e3
JJ
6524 PR c/67500
6525 * c-parser.c (c_parser_omp_clause_aligned,
6526 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6527 test for errors.
6528 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6529 error_mark_node.
6530
f4b189d5
JJ
6531 PR c/67495
6532 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6533 instead of c_parser_unary_expression. If the result is !lvalue_p,
6534 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6535
b2aaf235
MP
65362015-09-04 Marek Polacek <polacek@redhat.com>
6537
6538 PR sanitizer/67279
6539 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6540
1807ffc1
MS
65412015-09-03 Martin Sebor <msebor@redhat.com>
6542
6543 PR c/66516
8b652e65
JJ
6544 * c-typeck.c (convert_arguments, parser_build_unary_op,
6545 build_conditional_expr, c_cast_expr, convert_for_assignment,
6546 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6547 reject_gcc_builtin.
6548 (c_decl_implicit): Define.
6549
d04ff417
MP
65502015-09-02 Marek Polacek <polacek@redhat.com>
6551
6552 PR c/67432
6553 * c-parser.c (c_parser_enum_specifier): Give a better error for
6554 an empty enum.
6555
a79683d5
TS
65562015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6557
6558 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6559
191a6b94
MP
65602015-08-12 Marek Polacek <polacek@redhat.com>
6561
6562 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6563 LOC to it.
6564
420a9d9b
MP
65652015-08-03 Marek Polacek <polacek@redhat.com>
6566
6567 PR c/67088
6568 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6569 Use it.
6570 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6571
992118a1
PP
65722015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6573
6574 * c-parser.c (c_parser_if_body): Take token_indent_info
6575 argument. Call warn_for_misleading_indentation even when the
6576 body is a semicolon. Extract token_indent_infos corresponding
6577 to the guard, body and next tokens. Adjust call to
6578 warn_for_misleading_indentation accordingly.
6579 (c_parser_else_body): Likewise.
6580 (c_parser_if_statement): Likewise.
6581 (c_parser_while_statement): Likewise.
6582 (c_parser_for_statement): Likewise.
6583
46308474
LFSM
65842015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6585 Manuel López-Ibáñez <manu@gcc.gnu.org>
6586
6587 * c-decl.c (get_parm_info): Remove static var. Update warning
6588 message.
6589
05b28fd6
MP
65902015-07-27 Marek Polacek <polacek@redhat.com>
6591
6592 PR c++/66555
6593 PR c/54979
6594 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6595
451b5e48
MP
65962015-07-20 Marek Polacek <polacek@redhat.com>
6597
6598 PR c++/55095
6599 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6600 (build_binary_op): Warn about left shift overflows.
6601
1916bcb5
AM
66022015-07-09 Andrew MacLeod <amacleod@redhat.com>
6603
6604 * c-array-notation.c: Adjust includes for flags.h changes.
6605 * c-objc-common.c: Likewise.
6606
c7131fb2
AM
66072015-07-07 Andrew MacLeod <amacleod@redhat.com>
6608
6609 * c-array-notation.c: Adjust includes.
6610 * c-aux-info.c: Likewise.
6611 * c-convert.c: Likewise.
6612 * c-decl.c: Likewise.
6613 * c-errors.c: Likewise.
6614 * c-lang.c: Likewise.
6615 * c-objc-common.c: Likewise.
6616 * c-parser.c: Likewise.
6617 * c-typeck.c: Likewise.
6618
da2e71c9
MLI
66192015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6620
6621 PR fortran/66605
6622 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6623
b155cfd9
MP
66242015-06-29 Marek Polacek <polacek@redhat.com>
6625
6626 PR c/66322
6627 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6628 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6629 about -Wswitch-bool here.
6630 (do_case): Update c_add_case_label call.
6631 (c_finish_case): Update c_do_switch_warnings call.
6632
31521951
MP
66332015-06-27 Marek Polacek <polacek@redhat.com>
6634
6635 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6636
22d03525
MP
66372015-06-26 Marek Polacek <polacek@redhat.com>
6638
6639 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6640 INDIRECT_REF_P.
6641 * c-typeck.c (array_to_pointer_conversion): Likewise.
6642 (build_unary_op): Likewise.
6643 (c_finish_return): Likewise.
6644
f0889939
AM
66452015-06-25 Andrew MacLeod <amacleod@redhat.com>
6646
6647 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6648 * c-parser.c: Likewise.
6649
8d67ee55
RS
66502015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6651
6652 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6653 instead of pointer_hash.
6654 (detect_field_duplicates): Likewise.
6655
0ae9bd27
MP
66562015-06-25 Marek Polacek <polacek@redhat.com>
6657
6658 * c-array-notation.c: Use VAR_P throughout.
6659 * c-decl.c: Likewise.
6660 * c-objc-common.c: Likewise.
6661 * c-parser.c: Likewise.
6662 * c-typeck.c: Likewise.
6663
62f9079a
MP
66642015-06-25 Marek Polacek <polacek@redhat.com>
6665
6666 * c-decl.c: Use is_global_var throughout.
6667 * c-parser.c: Likewise.
6668 * c-typeck.c: Likewise.
6669
abb226c9
AM
66702015-06-17 Andrew MacLeod <amacleod@redhat.com>
6671
6672 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6673 * c-aux-info.c: Likewise.
6674 * c-convert.c: Likewise.
6675 * c-decl.c: Likewise.
6676 * c-errors.c: Likewise.
6677 * c-lang.c: Likewise.
6678 * c-objc-common.c: Likewise.
6679 * c-parser.c: Likewise.
6680 * c-typeck.c: Likewise.
6681
8cbababc
JH
66822015-06-11 Jan Hubicka <hubicka@ucw.cz>
6683
6684 PR middle-end/66325
6685 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6686 variants.
6687
a0349665
PMR
66882015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6689
6690 * c-decl.c (pop_scope): Register the main translation unit
6691 through the new debug hook.
6692
13fdf2e2
AM
66932015-06-08 Andrew MacLeod <amacleod@redhat.com>
6694
6695 * c-array-notation.c : Adjust include files.
6696 * c-aux-info.c : Likewise.
6697 * c-convert.c : Likewise.
6698 * c-decl.c : Likewise.
6699 * c-errors.c : Likewise.
6700 * c-lang.c : Likewise.
6701 * c-lang.h : Likewise.
6702 * c-objc-common.c : Likewise.
6703 * c-parser.c : Likewise.
6704 * c-typeck.c : Likewise.
6705
d7438551
AH
67062015-06-05 Aldy Hernandez <aldyh@redhat.com>
6707
6708 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6709 immediately clobber it.
6710 (c_write_global_declarations_1): Remove call to
6711 check_global_declaration_1.
6712 (c_write_global_declarations_2): Remove.
6713 (c_write_final_cleanups): Rename from c_write_global_declarations.
6714 Remove call to finalize_compilation_unit.
6715 Remove calls to debugging hooks.
6716 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6717 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6718 * c-tree.h: Remove c_write_global_declarations.
6719
ecb9f223
AM
67202015-06-04 Andrew MacLeod <amacleod@redhat.com>
6721
6722 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6723 * c-aux-info.c: Likewise.
6724 * c-convert.c: Likewise.
6725 * c-decl.c: Likewise.
6726 * c-errors.c: Likewise.
6727 * c-lang.c: Likewise.
6728 * c-objc-common.c: Likewise.
6729 * c-parser.c: Likewise.
6730 * c-typeck.c: Likewise.
6731
9482b620
MP
67322015-06-04 Marek Polacek <polacek@redhat.com>
6733
6734 PR c/66341
6735 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6736 it is a lvalue.
6737
bc51ace3
PK
67382015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6739
6740 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6741 Warn for empty struct.
6742 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6743
ea5b45b6
AT
67442015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6745
6746 * c-decl.c (start_function): Call plugin before parsing.
6747 (finish_function): Call plugin after parsing.
6748
c2d47482
PK
67492015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6750
6751 PR c/49551
6752 * c-decl.c (merge_decls): Merge DECL_COMMON.
6753
a95492ab
JW
67542015-05-22 Jim Wilson <jim.wilson@linaro.org>
6755
6756 * Make-lang.in (check_gcc_pallelize): Define.
6757
fd5c817a
MP
67582015-05-22 Marek Polacek <polacek@redhat.com>
6759
6760 PR c/47043
6761 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6762 attributes.
6763
c7b70a3c
MP
67642015-05-21 Marek Polacek <polacek@redhat.com>
6765
6766 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6767 DECL_BUILT_IN.
6768
21b634ae
MP
67692015-05-20 Marek Polacek <polacek@redhat.com>
6770
6771 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6772 * c-typeck.c: Likewise.
6773
296a8c2f
MP
67742015-05-19 Marek Polacek <polacek@redhat.com>
6775
6776 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6777
41b37d5e
JJ
67782015-05-19 Jakub Jelinek <jakub@redhat.com>
6779
6780 PR middle-end/66199
6781 * c-parser.c (c_parser_omp_for_loop): Don't add
6782 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6783 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6784 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6785 constructs.
6786
fab27f52
MM
67872015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6788
6789 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6790 swaps.
fab27f52 6791
40de31cf
MLI
67922015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6793
6794 PR fortran/44054
6795 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6796 accessor function.
6797
3aa3c9fc
MP
67982015-05-14 Marek Polacek <polacek@redhat.com>
6799
6800 PR c/66066
6801 PR c/66127
6802 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6803 rather than with 0.
6804
c3388e62
DM
68052015-05-12 David Malcolm <dmalcolm@redhat.com>
6806
6807 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6808 to add a call to warn_for_misleading_indentation.
6809 (c_parser_else_body): Likewise, adding param "else_loc".
6810 (c_parser_if_statement): Check for misleading indentation.
6811 (c_parser_while_statement): Likewise.
6812 (c_parser_for_statement): Likewise.
6813
755e528f
MP
68142015-05-08 Marek Polacek <polacek@redhat.com>
6815
6816 PR c/64918
6817 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6818 (output_init_element): Likewise.
6819
0173bd2a
MP
68202015-05-07 Marek Polacek <polacek@redhat.com>
6821
6822 PR c/65179
6823 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6824 value.
6825
9babc352
MP
68262015-04-30 Marek Polacek <polacek@redhat.com>
6827
6828 * c-typeck.c (set_init_label): Call error_at instead of error and
6829 pass LOC to it.
6830
ac9f18db
MP
6831 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6832 the type of a decl.
6833
ec3fba51
MP
6834 * c-typeck.c (c_build_va_arg): Clarify the error message.
6835
b811915d
TS
68362015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6837
6838 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6839 OMP_STANDALONE_CLAUSES.
6840
f3075008
MP
68412015-04-28 Marek Polacek <polacek@redhat.com>
6842
6843 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6844
4e81b788
MP
68452015-04-28 Marek Polacek <polacek@redhat.com>
6846
6847 PR c/65901
6848 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6849
6c1db78e
MP
68502015-04-25 Marek Polacek <polacek@redhat.com>
6851
6852 PR c/52085
6853 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6854 attribute.
6855
5c4abbb8
MP
68562015-04-23 Marek Polacek <polacek@redhat.com>
6857
6858 PR c/65345
6859 * c-decl.c (set_labels_context_r): New function.
6860 (store_parm_decls): Call it via walk_tree_without_duplicates.
6861 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6862 instead of create_tmp_var. Build TARGET_EXPR instead of
6863 COMPOUND_EXPR.
6864 (build_atomic_assign): Use create_tmp_var_raw instead of
6865 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6866
06aca1d5
IV
68672015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6868
6869 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6870 (c_parser_omp_target_update): Add missed %> to error_at ().
6871
8fba1830
BRF
68722015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6873
6874 PR target/55143
6875 * c-decl.c (c_default_pointer_mode): Remove definition.
6876 * c-tree.h (c_default_pointer_mode): Remove declaration.
6877
62021f64
TB
68782015-03-27 Tobias Burnus <burnus@net-b.de>
6879
6880 PR c/65586
6881 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6882 error out.
6883 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6884 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6885 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6886
9b65e171
JJ
68872015-03-19 Jakub Jelinek <jakub@redhat.com>
6888
6889 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6890 attribute for DECL_EXTERNAL VAR_DECLs.
6891
17958621
JJ
68922015-03-11 Jakub Jelinek <jakub@redhat.com>
6893
6894 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6895 argument.
6896
7ccb1a11
JJ
68972015-03-10 Jakub Jelinek <jakub@redhat.com>
6898
6899 PR c/65120
6900 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6901 before preparing arguments to warn_logical_not_parentheses.
6902
01177669
JJ
69032015-03-09 Jakub Jelinek <jakub@redhat.com>
6904
6905 PR c/65120
6906 * c-typeck.c (parser_build_binary_op): Don't warn for
6907 !!x == y or !b == y where b is _Bool.
6908
802ac282
MP
69092015-03-09 Marek Polacek <polacek@redhat.com>
6910
6911 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6912 * c-decl.c (grokdeclarator): Likewise.
6913 * c-typeck.c (build_binary_op): Likewise.
6914
e5165b60
MP
69152015-02-27 Marek Polacek <polacek@redhat.com>
6916
6917 PR c/65228
6918 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6919
065d214c
MP
69202015-02-14 Marek Polacek <polacek@redhat.com>
6921
6922 PR c/64768
6923 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6924 declared through a typedef name.
6925
e5d9235b
MP
69262015-02-13 Marek Polacek <polacek@redhat.com>
6927
6928 PR c/65050
6929 * c-decl.c (grokdeclarator): Print also the type when giving
6930 the error message about array's incomplete element type.
6931
fa01ffcc
JJ
69322015-02-11 Jakub Jelinek <jakub@redhat.com>
6933
6934 PR c/64824
6935 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6936 check in the POP macro.
6937
c3e38a03
MP
69382015-02-09 Marek Polacek <polacek@redhat.com>
6939
6940 PR c/64856
6941 * c-typeck.c (process_init_element): Don't always wrap
6942 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6943 initializing a range of elements.
6944
4886ec8e
JJ
69452015-02-04 Jakub Jelinek <jakub@redhat.com>
6946
6947 PR c/64824
6948 PR c/64868
6949 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6950
c3e38a03 69512015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6952
6953 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6954 processing enum declaration.
6955
7b33f0c8
MP
69562015-01-29 Marek Polacek <polacek@redhat.com>
6957
6958 PR c/64709
6959 * c-typeck.c (pop_init_level): If constructor_elements has
6960 exactly one element with integer_zerop value, set constructor_zeroinit
6961 to 1. Remove braces around warning_init call.
6962
dea63e49
JJ
69632015-01-27 Jakub Jelinek <jakub@redhat.com>
6964
6965 PR c/64766
6966 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6967 of FUNCTION_DECLs with error_mark_node.
6968
d38f7dce
JJ
69692015-01-26 Jakub Jelinek <jakub@redhat.com>
6970
6971 PR c/64778
6972 * c-typeck.c (convert_arguments): Return -1 if there are
6973 error_args, even if we've diagnosed too many arguments.
6974
cbf5d0e7
RB
69752015-01-21 Richard Biener <rguenther@suse.de>
6976
6977 PR middle-end/64313
6978 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6979 for builtins the user declared correctly.
6980
41dbbb37
TS
69812015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6982 Bernd Schmidt <bernds@codesourcery.com>
6983 Cesar Philippidis <cesar@codesourcery.com>
6984 James Norris <jnorris@codesourcery.com>
6985 Jakub Jelinek <jakub@redhat.com>
6986 Ilmir Usmanov <i.usmanov@samsung.com>
6987
6988 * c-parser.c: Include "gomp-constants.h".
6989 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6990 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6991 Use OMP_CLAUSE_SET_MAP_KIND.
6992 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6993 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6994 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6995 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6996 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6997 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6998 "copyout", "create", "delete", "deviceptr", "gang", "host",
6999 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7000 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7001 "present_or_create", "pcreate", "seq", "self", "vector",
7002 "vector_length", "wait", "worker".
7003 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7004 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7005 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7006 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7007 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7008 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7009 (c_parser_oacc_data_clause_deviceptr)
7010 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7011 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7012 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7013 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7014 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7015 (c_parser_oacc_parallel, c_parser_oacc_update)
7016 (c_parser_oacc_wait): New functions.
7017 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7018 (c_finish_oacc_data): New prototypes.
7019 * c-typeck.c: Include "gomp-constants.h".
7020 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7021 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7022 OMP_CLAUSE_SET_MAP_KIND.
7023 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7024 (c_finish_oacc_data): New functions.
7025 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7026 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7027 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7028 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7029 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7030 GOMP_MAP_FORCE_DEVICEPTR.
7031
adfac8df
JJ
70322015-01-09 Michael Collison <michael.collison@linaro.org>
7033
7034 * c-array-notation.c: Include hash-set.h, machmode.h,
7035 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7036 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7037 * c-aux-info.c: Ditto.
7038 * c-convert.c: Ditto.
7039 * c-decl.c: Ditto.
7040 * c-errors.c: Ditto.
7041 * c-lang.c: Dittoxs.
7042 * c-objc-common.c: Ditto.
7043 * c-parser.c: Ditto.
7044 * c-typeck.c: Include hash-set.h, machmode.h,
7045 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7046 fold-const.h, wide-int.h, inchash.h, real.h and
7047 fixed-value.h due to flattening of tree.h.
7048
2cc901dc
MP
70492015-01-07 Marek Polacek <polacek@redhat.com>
7050
7051 PR c/64417
7052 * c-typeck.c (process_init_element): Disallow initialization of
7053 a flexible array member with a string constant if the structure
7054 is in an array.
7055
5624e564
JJ
70562015-01-05 Jakub Jelinek <jakub@redhat.com>
7057
e5341100
JJ
7058 PR sanitizer/64344
7059 * c-typeck.c (convert_for_assignment, c_finish_return): For
7060 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7061 types also set in_late_binary_op around convert call.
7062 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7063 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7064 result on expr as last argument to ubsan_instrument_float_cast,
7065 if in_late_binary_op, don't use c_save_expr but save_expr.
7066
5624e564
JJ
7067 Update copyright years.
7068
5bd012f8
MP
70692015-01-05 Marek Polacek <polacek@redhat.com>
7070
7071 PR c/64423
7072 * c-typeck.c (build_array_ref): Pass loc down to
7073 warn_array_subscript_with_type_char.
7074
3f8257db 70752014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7076
7077 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 7078 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 7079 element type.
8e745a17 7080 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 7081 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 7082 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 7083 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 7084 to PEDWARN_FOR_QUALIFIERS.
768952be 7085
8f94a8c4
JJ
70862014-12-17 Jakub Jelinek <jakub@redhat.com>
7087
7088 PR sanitizer/64289
7089 * c-convert.c: Include ubsan.h.
7090 (convert): For real -> integral casts and
7091 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7092 instead instrument the float cast directly.
7093
b731b390
JJ
70942014-11-29 Jakub Jelinek <jakub@redhat.com>
7095
7096 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7097 c_finish_stmt_expr): Remove NULL last argument from
7098 create_tmp_var_raw and create_tmp_var calls.
7099 * c-array-notation.c (fix_builtin_array_notation_fn,
7100 build_array_notation_expr, fix_conditional_array_notations_1,
7101 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7102
541e35a6
MP
71032014-11-28 Marek Polacek <polacek@redhat.com>
7104
7105 PR c/63862
7106 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7107 convert the right operand to integer type.
7108
b286be94
MP
71092014-11-25 Marek Polacek <polacek@redhat.com>
7110
7111 PR c/63877
7112 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7113 for inline functions.
7114
aa7da51a
JJ
71152014-11-21 Jakub Jelinek <jakub@redhat.com>
7116
7117 PR target/63764
7118 * c-typeck.c (build_array_ref): Adjust
7119 convert_vector_to_pointer_for_subscript caller. If it returns true,
7120 call non_lvalue_loc on the result.
7121
d876207f
RB
71222014-11-11 Richard Biener <rguenther@suse.de>
7123
7124 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7125 to true.
7126
e5e44252
AK
71272014-11-10 Andi Kleen <ak@linux.intel.com>
7128
7129 PR c/60804
7130 * c-parser.c (c_parser_statement_after_labels): Call
7131 check_no_cilk.
7132 (c_parser_if_statement): Dito.
7133 (c_parser_switch_statement): Dito.
7134 (c_parser_while_statement): Dito.
7135 (c_parser_do_statement): Dito.
7136 (c_parser_for_statement): Dito.
7137 * c-typeck.c (c_finish_loop): Dito.
7138
13c21655
PC
71392014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7140
7141 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7142 OPT_Wshift_count_overflow in the warnings.
7143
2d51fcef
MP
71442014-10-30 Marek Polacek <polacek@redhat.com>
7145
7146 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7147 print the stripped version as well, if they're not the same.
7148
ef4bddc2
RS
71492014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7150
7151 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7152 machine_mode.
7153
c582198b
AM
71542014-10-28 Andrew MacLeod <amacleod@redhat.com>
7155
7156 * c-decl.c: Adjust include files.
7157 * c-parser.c: Ditto.
7158
ddc8de03
PM
71592014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7160 Tom Tromey <tromey@redhat.com>
7161
7162 * c-tree.h (enum c_oracle_request): New.
7163 (c_binding_oracle_function): New typedef.
7164 (c_binding_oracle, c_pushtag, c_bind): Declare.
7165 * c-decl.c (c_binding_oracle): New global.
7166 (I_SYMBOL_CHECKED): New macro.
7167 (i_symbol_binding): New function.
7168 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7169 (I_TAG_CHECKED): New macro.
7170 (i_tag_binding): New function.
7171 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7172 (I_LABEL_CHECKED): New macro.
7173 (i_label_binding): New function.
7174 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7175 (c_print_identifier): Save and restore c_binding_oracle.
7176 (c_pushtag, c_bind): New functions.
7177
60393bbc
AM
71782014-10-27 Andrew MacLeod <amacleod@redhat.com>
7179
7180 * c-typeck.c: Adjust include files.
7181
d723bb7c
MLI
71822014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7183
7184 PR c++/53061
7185 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7186 initialization here...
7187 (c_initialize_diagnostics): ... but here. Set defaults after
7188 building pretty-printer.
7189
1bc5a451
MP
71902014-10-23 Marek Polacek <polacek@redhat.com>
7191
7192 PR c/63626
7193 * c-decl.c (pop_scope): Don't print warning in external_scope.
7194
4435bb92
MP
71952014-10-19 Marek Polacek <polacek@redhat.com>
7196
7197 PR c/63567
7198 * c-typeck.c (output_init_element): Allow initializing objects with
7199 static storage duration with compound literals even in C99 and add
7200 pedwarn for it.
7201
7278465e
MP
72022014-10-17 Marek Polacek <polacek@redhat.com>
7203
7204 PR c/63567
7205 * c-typeck.c (digest_init): Allow initializing objects with static
7206 storage duration with compound literals even in C99 and add pedwarn
7207 for it.
7208
d9b7be2e
MP
72092014-10-17 Marek Polacek <polacek@redhat.com>
7210
7211 PR c/63543
7212 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7213 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7214 error multiple times. Print the type.
7215
f406ae1f
MP
72162014-10-17 Marek Polacek <polacek@redhat.com>
7217
7218 PR c/63549
7219 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7220 type.
7221
92574c7c
MP
72222014-10-17 Marek Polacek <polacek@redhat.com>
7223
7224 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7225 (start_function): Use OPT_Wimplicit_int instead of 0.
7226 (store_parm_decls_oldstyle): Likewise.
7227
1bc4a978
MT
72282014-10-17 Alan Modra <amodra@gmail.com>
7229
7230 PR middle-end/61848
7231 * c-decl.c (merge_decls): Don't merge section name or tls model
7232 to newdecl symtab node, instead merge to olddecl. Override
7233 existing olddecl section name. Set tls_model for all thread-local
7234 vars, not just OMP thread-private ones. Remove incorrect comment.
7235
83685514
AM
72362014-10-16 Andrew MacLeod <amacleod@redhat.com>
7237
7238 * c-decl.c: Adjust include files.
7239
78a7c317
DD
72402014-10-14 DJ Delorie <dj@redhat.com>
7241
7242 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7243 (c_token_starts_typename): Check all __intN, not just __int128.
7244 (c_token_starts_declspecs): Likewise.
7245 (c_parser_declspecs): Likewise.
7246 (c_parser_attribute_any_word): Likewise.
7247 (c_parser_objc_selector): Likewise.
7248 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7249 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7250 is specified.
7251 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7252 __int128.
7253 (finish_declspecs): Likewise.
7254
74d98c1e
AB
72552014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7256
8e745a17 7257 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 7258 the duplicate code.
8e745a17 7259 (c_parser_statement): Call the new function.
74d98c1e 7260
84937de2
MP
72612014-10-09 Marek Polacek <polacek@redhat.com>
7262
7263 PR c/63480
7264 * c-typeck.c (pop_init_level): Don't warn about initializing
7265 with { }.
7266
0382aaa0
MP
72672014-10-07 Marek Polacek <polacek@redhat.com>
7268
7269 PR c/59717
7270 * c-decl.c (header_for_builtin_fn): New function.
7271 (implicitly_declare): Suggest which header to include.
7272
7a0ca710
MP
72732014-10-07 Marek Polacek <polacek@redhat.com>
7274
7275 * c-convert.c (convert): Use error_operand_p.
7276 * c-typeck.c (require_complete_type): Likewise.
7277 (really_atomic_lvalue): Likewise.
7278 (digest_init): Likewise.
7279 (handle_omp_array_sections_1): Likewise.
7280
6bc8a126
MP
72812014-10-03 Marek Polacek <polacek@redhat.com>
7282
7283 PR c/63453
7284 * c-decl.c (pop_scope): Don't warn about "inline function declared
7285 but never defined" for functions marked with gnu_inline attribute.
7286
d90c0a59
JJ
72872014-09-25 Jakub Jelinek <jakub@redhat.com>
7288
7289 PR c++/63249
7290 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7291 on low_bound and length.
7292
083e891e
MP
72932014-09-24 Marek Polacek <polacek@redhat.com>
7294
7295 PR c/61405
7296 PR c/53874
7297 * c-parser.c: Don't define CPP_KEYWORD.
7298 (c_parser_switch_statement): Pass original type to c_finish_case.
7299 * c-tree.h (c_finish_case): Update declaration.
7300 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7301 conditionally to c_do_switch_warnings.
7302
8d95fe25
MP
73032014-09-03 Marek Polacek <polacek@redhat.com>
7304
7305 PR c/62024
7306 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7307 conversions.
7308
9a771876
JJ
73092014-09-02 Jakub Jelinek <jakub@redhat.com>
7310 Balaji V. Iyer <balaji.v.iyer@intel.com>
7311 Igor Zamyatin <igor.zamyatin@intel.com>
7312
7313 * c-parser.c (c_parser_cilk_for): New function.
7314 (c_parser_cilk_grainsize): Likewise.
7315 (c_get_temp_regvar): Likewise.
7316 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7317 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7318 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7319 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7320 case.
7321
b7679d96
CG
73222014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7323
7324 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7325 with using HOST_WIDE_INT without truncation to 'int'
7326
59ea0364
MP
73272014-08-22 Marek Polacek <polacek@redhat.com>
7328
7329 PR c++/62199
7330 * c-typeck.c (parser_build_binary_op): Adjust call to
7331 warn_logical_not_parentheses.
7332
671a475e
IZ
73332014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7334
7335 PR other/62008
7336 * c-parser.c (c_parser_array_notation): Check for correct
7337 type of an array added.
7338
04159acf
MP
73392014-08-19 Marek Polacek <polacek@redhat.com>
7340
7341 PR c++/62153
7342 * c-typeck.c (build_binary_op): If either operand of a comparison
7343 is a boolean expression, call maybe_warn_bool_compare.
7344
c77935ee
PP
73452014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7346
7347 PR c/45584
7348 * c-typeck.c (build_c_cast): Do a conversion even when the
7349 TYPE_MAIN_VARIANTs are the same.
7350
35aff4fb
MP
73512014-08-19 Marek Polacek <polacek@redhat.com>
7352
7353 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7354 pedwarn_c99 instead of pedwarn.
7355 (grokfield): Likewise.
7356 (warn_defaults_to): New function.
7357 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7358 Unconditionally call pedwarn_c99 instead of pedwarn.
7359 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7360 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7361 check flag_isoc11 before.
7362 * c-errors.c (pedwarn_c99): Change the return type to bool.
7363 Handle -Wc99-c11-compat.
7364 * c-parser.c (disable_extension_diagnostics): Handle
7365 warn_c99_c11_compat.
7366 (restore_extension_diagnostics): Likewise.
7367 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7368 instead of pedwarn, don't check flag_isoc11 before.
7369 (c_parser_declspecs): Likewise.
7370 (c_parser_alignas_specifier): Likewise.
7371 (c_parser_alignof_expression): Likewise.
7372 (c_parser_generic_selection): Likewise.
7373 * c-tree.h (pedwarn_c99): Update declaration.
7374 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7375 of pedwarn_c99.
7376
177cce46
MP
73772014-08-19 Marek Polacek <polacek@redhat.com>
7378
7379 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7380 to pedwarn_c90.
7381 * c-errors.c: Include "opts.h".
7382 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7383 * c-parser.c (disable_extension_diagnostics): Handle negative value
7384 of warn_c90_c99_compat, too.
7385 (restore_extension_diagnostics): Likewise.
7386 (c_parser_compound_statement_nostart): Pass
7387 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7388
6dc99c33
MP
73892014-08-12 Marek Polacek <polacek@redhat.com>
7390
7391 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7392 Add pedwarn.
7393 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7394 Likewise.
7395 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7396
3f8257db 73972014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
7398
7399 PR c/51849
7400 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7401 Call pedwarn_c90 instead of pedwarn.
7402 (check_bitfield_type_and_width): Likewise.
7403 (declspecs_add_qual): Likewise.
7404 (declspecs_add_type): Likewise.
7405 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7406 Adjust to only call pedwarn_c90.
7407 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7408 pedwarn_c90 instead of pedwarn.
7409 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7410 * c-parser.c (disable_extension_diagnostics): Handle
7411 warn_c90_c99_compat.
7412 (restore_extension_diagnostics): Likewise.
7413 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7414 pedwarn_c90 instead of pedwarn.
7415 (c_parser_initelt): Likewise.
7416 (c_parser_postfix_expression): Likewise.
7417 (c_parser_postfix_expression_after_paren_type): Likewise.
7418 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7419 * c-tree.h: Fix formatting.
7420 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7421 pedwarn_c90 instead of pedwarn.
7422
9f25a338
TS
74232014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7424
7425 * c-typeck.c: Remove include of pointer-set.h.
7426
044331a8
MP
74272014-08-07 Marek Polacek <polacek@redhat.com>
7428
7429 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7430
b787e7a2
TS
74312014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7432
7433 * c-typeck.c: Use hash_map instead of pointer_map.
7434
6e2830c3
TS
74352014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7436
7437 * c-decl.c: Use hash_set instead of pointer_set.
7438
a7ee52fb
IZ
74392014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7440
7441 PR middle-end/61455
7442 * c-array-notation.c (expand_array_notations): Handling
7443 of DECL_EXPR added.
7444
b4dfdc11
MG
74452014-07-31 Marc Glisse <marc.glisse@inria.fr>
7446
7447 PR c++/60517
7448 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7449 a local variable.
7450
976d5a22
TT
74512014-07-30 Tom Tromey <tromey@redhat.com>
7452
7453 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7454 field.
7455 (really_start_incremental_init, push_init_level): Initialize
7456 designator_depth.
7457 (pop_init_level): Set global designator_depth.
7458 (process_init_element): Check for designated_init attribute.
7459
30281de2
MP
74602014-07-20 Marek Polacek <polacek@redhat.com>
7461
7462 PR c/61852
7463 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7464 (implicitly_declare): Pass location to implicit_decl_warning.
7465
b108f48f
JJ
74662014-07-14 Jakub Jelinek <jakub@redhat.com>
7467
7468 PR middle-end/61294
7469 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7470 If non-NULL, call c_parser_check_literal_zero.
7471 (c_parser_check_literal_zero): New function.
7472 (c_parser_postfix_expression_after_primary): Adjust
7473 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7474
773ec47f
MP
74752014-07-06 Marek Polacek <polacek@redhat.com>
7476
7477 PR c/6940
7478 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7479 * c-tree.h (C_ARRAY_PARAMETER): Define.
7480 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7481 function parameter.
7482
22e1cf1c 74832014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7484 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7485
7486 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7487 releasing symbol.
7488
52ec0ea3
MP
74892014-07-01 Marek Polacek <polacek@redhat.com>
7490
7491 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7492 instead of 0 to WARN_FOR_ASSIGNMENT.
7493
d5c3d343
MP
74942014-07-01 Marek Polacek <polacek@redhat.com>
7495
7496 PR c/58286
7497 * c-typeck.c (convert_for_assignment): Pass
7498 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7499
6a7253a4
MP
75002014-06-30 Marek Polacek <polacek@redhat.com>
7501
7502 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7503 has no_sanitize_undefined attribute.
7504
5e88a8f4
IZ
75052014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7506
7507 PR middle-end/57541
7508 * c-array-notation.c (fix_builtin_array_notation_fn):
7509 Check for 0 arguments in builtin call. Check that bultin argument is
7510 correct.
7511 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7512 index.
7513
9698b078
SH
75142014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7515
7516 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7517 qualifiers in __auto_type for atomic types.
7518 (c_parser_typeof_specifier): Discard all type qualifiers in
7519 __typeof__ for atomic types.
7520
6e07c515
MP
75212014-06-25 Marek Polacek <polacek@redhat.com>
7522
7523 PR c/61162
7524 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7525 the return expression to c_finish_return.
7526
da6f124d
JJ
75272014-06-25 Jakub Jelinek <jakub@redhat.com>
7528
7529 * c-typeck.c (c_finish_omp_clauses): Make sure
7530 OMP_CLAUSE_LINEAR_STEP has correct type.
7531
c203e8a7
TS
75322014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7533
7534 * c-decl.c: Adjust.
7535
56ad0e38
JJ
75362014-06-24 Jakub Jelinek <jakub@redhat.com>
7537
7538 * c-parser.c (c_parser_omp_for_loop): For
7539 #pragma omp parallel for simd move lastprivate clause from parallel
7540 to for rather than simd.
7541
47c2554f
MP
75422014-06-23 Marek Polacek <polacek@redhat.com>
7543
7544 * c-typeck.c (parser_build_binary_op): Don't call
7545 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7546
56363ffd
JH
75472014-06-15 Jan Hubicka <hubicka@ucw.cz>
7548
7549 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7550 * c-decl.c (merge_decls): Likewise.
7551
d7ff7ae5
MP
75522014-06-09 Marek Polacek <polacek@redhat.com>
7553
7554 PR c/36446
7555 * c-typeck.c (error_init): Call inform instead of error_at.
7556 (pedwarn_init): Call inform instead of pedwarn.
7557 (warning_init): Call inform instead of warning_at.
7558
24d047a3
JH
75592014-06-07 Jan Hubicka <hubicka@ucw.cz>
7560
7561 * c-decl.c (merge_decls): Use set_decl_section_name.
7562 (duplicate_decls): Remove node if it exists.
7563
9bac5cbb
G
75642014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7565
7566 PR c/53119
7567 * c-typeck.c (push_init_level, process_init_element,
7568 pop_init_level): Correct check for zero initialization, move
7569 missing brace warning to respect zero initialization.
7570
8ffcdea8
MP
75712014-06-05 Marek Polacek <polacek@redhat.com>
7572
7573 PR c/56724
7574 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7575
742938c9
MP
75762014-06-05 Marek Polacek <polacek@redhat.com>
7577
7578 PR c/49706
7579 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7580 on the left hand side operand of a comparison.
742938c9 7581
6447c55d
MP
75822014-06-05 Marek Polacek <polacek@redhat.com>
7583
7584 PR c/48062
7585 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7586 Print note only if the warning was printed.
7587
9dc7743c
IZ
75882014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7589
7590 PR c/58942
7591 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7592 with a pointer.
7593
fedfecef
MP
75942014-06-03 Marek Polacek <polacek@redhat.com>
7595
7596 PR c/60439
7597 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7598 c_start_case.
7599 * c-tree.h (c_start_case): Update.
7600 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7601 switch condition has boolean value.
7602
9b2b7279
AM
76032014-06-02 Andrew MacLeod <amacleod@redhat.com>
7604
7605 * c-decl.c: Include builtins.h.
7606 * c-parser.c: Likewise.
7607
5c1bc275
MP
76082014-05-27 Marek Polacek <polacek@redhat.com>
7609
7610 PR c/56724
7611 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7612 error and warning calls to error_at and warning_at. Pass location of
7613 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7614 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7615 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7616
97563bc8
IZ
76172014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7618
7619 PR c/61191
7620 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7621 function parameters.
7622
aede2c10
JH
76232014-05-23 Jan Hubicka <hubicka@ucw.cz>
7624
7625 * c-decl.c (merge_decls): Preserve symtab node pointers.
7626 (duplicate_decls): Free new decl.
7627
edbba2ce
TS
76282014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7629
f3316c6d
TS
7630 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7631 initialization.
7632
edbba2ce
TS
7633 * c-parser.c (c_parser_omp_target): Return bool values.
7634
68c81f24
TS
76352014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7636
7637 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7638 num_teams_loc variable to num_thread_limit_loc.
7639
632f2871
RS
76402014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7641
7642 * c-array-notation.c (expand_array_notations): Use void_node
7643 instead of void_zero_node.
7644
766090c2
TS
76452014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7646
7647 * c-decl.c (finish_struct): Adjust.
7648 (finish_enum): Likewise.
7649 (bind): Adjust.
7650 (record_inline_static): Likewise.
7651 (push_scope): Likewise.
7652 (make_label): Likewise.
7653 (lookup_label_for_goto): Likewise.
7654 (finish_struct): Likewise.
7655 (finish_enum): Likewise.
7656 (store_parm_decls): Likewise.
7657 (c_push_function_context): Likewise.
7658 * c-lang.h: Remove usage of variable_size gty attribute.
7659 * c-parser.c (c_parse_init): Adjust.
7660 (c_parse_file): Likewise.
7661
2b107f6b
MP
76622014-05-13 Marek Polacek <polacek@redhat.com>
7663
7664 PR c/61162
7665 * c-typeck.c (convert_for_assignment): Pass location to
7666 WARN_FOR_ASSIGNMENT instead of input_location.
7667
d033409e
MP
76682014-05-10 Marek Polacek <polacek@redhat.com>
7669
7670 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7671 maybe_warn_string_init.
7672 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7673 maybe_warn_string_init.
7674 * c-tree.h (maybe_warn_string_init): Update declaration.
7675 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7676 Call pedwarn_init with loc instead of with input_location.
7677 (digest_init): Pass init_loc to maybe_warn_string_init.
7678 (pop_init_level): Call pedwarn_init with loc instead of with
7679 input_location.
7680 (set_init_index): Likewise.
7681 (process_init_element): Likewise.
7682
ea58ef42
MP
76832014-05-09 Marek Polacek <polacek@redhat.com>
7684
7685 PR c/61096
7686 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7687 (c_parser_initelt): Pass location to set_init_label. Pass array index
7688 location to set_init_index.
7689 * c-tree.h (push_init_level): Update declaration.
7690 (pop_init_level): Likewise.
7691 (set_init_index): Likewise.
7692 (set_init_label): Likewise.
7693 * c-typeck.c (error_init): Add location parameter. Call error_at
7694 instead of error.
7695 (digest_init): Pass init_loc to error_init.
7696 (really_start_incremental_init):
7697 (push_init_level): Add location parameter. Pass loc to pop_init_level
7698 and error_init.
7699 (pop_init_level): Likewise.
7700 (set_designator): Add location parameter. Pass loc to pop_init_level,
7701 push_init_level, and error_init.
7702 (set_init_index): Add location parameter. Pass loc to error_init and
7703 set_designator.
7704 (set_init_label): Likewise.
7705 (output_init_element): Pass loc to error_init.
7706 (process_init_element): Pass loc to error_init, pop_init_level,
7707 pedwarn_init, and push_init_level.
7708
661a0813
MP
77092014-05-09 Marek Polacek <polacek@redhat.com>
7710
7711 PR c/50459
7712 * c-parser.c (c_parser_attributes): Parse the arguments as an
7713 expression-list if the attribute takes identifier.
7714
2793eeab
MP
77152014-05-08 Marek Polacek <polacek@redhat.com>
7716
7717 PR c/61053
7718 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7719 TYPE_ALIGN_UNIT.
7720
f827930a
MP
77212014-05-08 Marek Polacek <polacek@redhat.com>
7722
7723 PR c/61077
7724 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7725 of main.
7726
1d60af08
KZ
77272014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7728 Mike Stump <mikestump@comcast.net>
7729 Richard Sandiford <rdsandiford@googlemail.com>
7730
7731 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7732 (finish_enum): Use wide-int interfaces.
7733 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7734 * c-typeck.c (build_c_cast): Likewise.
7735 (set_nonincremental_init_from_string): Likewise.
7736 (c_tree_equal): Likewise.
7737
a0e24419
MP
77382014-05-02 Marek Polacek <polacek@redhat.com>
7739
7740 PR c/25801
7741 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7742 Return size_one_node when the type is not complete.
7743 (pointer_diff): Remove comment.
7744 (build_unary_op): Improve error messages.
7745
19fc9faa
MP
77462014-05-02 Marek Polacek <polacek@redhat.com>
7747
7748 * c-typeck.c (c_finish_return): Separate warning_at calls.
7749
63bc4e87
MP
77502014-05-02 Marek Polacek <polacek@redhat.com>
7751
7752 * c-tree.h (error_init): Remove declaration.
7753 (pedwarn_init): Likewise.
7754 * c-typeck.c (error_init): Make static and move above.
7755 (pedwarn_init): Likewise.
7756 (warning_init): Move above.
7757 (maybe_warn_string_init): Likewise.
7758
4bd2511b
JL
77592014-05-01 Jeff Law <law@redhat.com>
7760
7761 Revert:
7762
7763 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7764 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7765 avoid goto.
7766
6a358dcb
MP
77672014-05-02 Marek Polacek <polacek@redhat.com>
7768
7769 PR c/60784
7770 * c-typeck.c (push_init_level): Set constructor_designated to
7771 p->designated for structures.
7772
ae5ebda4
MP
77732014-05-01 Marek Polacek <polacek@redhat.com>
7774
7775 PR c/60915
7776 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7777 function-definition has an attribute after the declarator.
7778
96b40f8d
MP
77792014-05-01 Marek Polacek <polacek@redhat.com>
7780
7781 PR c/60257
7782 * c-typeck.c (warning_init): Add location_t parameter. Call
7783 warning_at instead of warning.
7784 (push_init_level): Pass input_location to warning_init.
7785 (add_pending_init): Add location_t parameter. Pass loc to
7786 warning_init.
7787 (set_nonincremental_init): Pass input_location to add_pending_init.
7788 (set_nonincremental_init_from_string): Likewise.
7789 (output_init_element): Pass loc to warning_init and to
7790 add_pending_init.
7791
32e00768
MP
77922014-05-01 Marek Polacek <polacek@redhat.com>
7793
7794 PR c/43395
7795 * c-typeck.c (c_finish_return): Distinguish between label and variable
7796 when warning about returning local address.
7797
c9379ce2
MP
77982014-05-01 Marek Polacek <polacek@redhat.com>
7799
7800 PR c/29467
7801 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7802 in C89 mode.
7803
d00887e8
MP
78042014-05-01 Marek Polacek <polacek@redhat.com>
7805
7806 PR c/43245
7807 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7808 instead of 0 to WARN_FOR_QUALIFIERS.
7809
5436fa2e
MP
78102014-05-01 Marek Polacek <polacek@redhat.com>
7811
7812 PR c/56989
7813 * c-typeck.c (default_conversion): Use better location for
7814 error call.
7815
f8ed5150
MP
78162014-04-30 Marek Polacek <polacek@redhat.com>
7817
7818 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7819 also when SANITIZE_FLOAT_DIVIDE is on.
7820
8337d1db
MP
78212014-04-30 Marek Polacek <polacek@redhat.com>
7822
7823 PR c/60139
7824 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7825 and pedwarn_init. Use loc insted of input_location.
7826
c4bdc42f
MP
78272014-04-30 Marek Polacek <polacek@redhat.com>
7828
7829 PR c/60351
7830 * c-typeck.c (build_binary_op): Use location when warning about
7831 shift count.
7832
45484dcf
MP
78332014-04-25 Marek Polacek <polacek@redhat.com>
7834
7835 PR c/18079
7836 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7837 always_inline/noinline and hot/cold attributes.
7838
34cf811f
MP
78392014-04-25 Marek Polacek <polacek@redhat.com>
7840
7841 PR c/60114
7842 * c-parser.c (c_parser_initelt): Pass input_location to
7843 process_init_element.
7844 (c_parser_initval): Pass loc to process_init_element.
7845 * c-tree.h (process_init_element): Adjust declaration.
7846 * c-typeck.c (push_init_level): Pass input_location to
7847 process_init_element.
7848 (pop_init_level): Likewise.
7849 (set_designator): Likewise.
7850 (output_init_element): Add location_t parameter. Pass loc to
7851 digest_init.
7852 (output_pending_init_elements): Pass input_location to
7853 output_init_element.
7854 (process_init_element): Add location_t parameter. Pass loc to
7855 output_init_element.
7856
42056eac
JJ
78572014-04-24 Jakub Jelinek <jakub@redhat.com>
7858
7859 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7860 atomic-clause, allow comma in between atomic-clause and
7861 seq_cst.
7862
e162a134
JJ
78632014-04-22 Jakub Jelinek <jakub@redhat.com>
7864
7865 PR c/59073
7866 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7867 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7868
2f6babac
IZ
78692014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7870
7871 PR middle-end/60469
7872 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7873 create_tmp_var instead build_decl for creating temps.
7874 (build_array_notation_expr): Likewise.
7875 (fix_conditional_array_notations_1): Likewise.
7876 (fix_array_notation_expr): Likewise.
7877 (fix_array_notation_call_expr): Likewise.
7878
8edbfaa6
JJ
78792014-03-28 Jakub Jelinek <jakub@redhat.com>
7880
7881 PR c++/60689
7882 * c-tree.h (c_build_function_call_vec): New prototype.
7883 * c-typeck.c (build_function_call_vec): Don't call
7884 resolve_overloaded_builtin here.
7885 (c_build_function_call_vec): New wrapper function around
7886 build_function_call_vec. Call resolve_overloaded_builtin here.
7887 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7888 Call c_build_function_call_vec instead of build_function_call_vec.
7889 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7890 * c-decl.c (finish_decl): Likewise.
7891
7485aeea
MLI
78922014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7893
7894 PR c/55383
7895 * c-typeck.c: Use correct format string in cast-qual warning
7896
b17a8b07
TS
78972014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7898
7899 * c-decl.c (c_decl_attributes): Use
7900 lang_hooks.types.omp_mappable_type.
7901 * c-typeck.c (c_finish_omp_clauses): Likewise.
7902
3af9c5e9
MP
79032014-03-06 Marek Polacek <polacek@redhat.com>
7904
7905 PR c/60197
7906 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7907 of checking tree code.
7908
1c9f5f33
PK
79092014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7910
7911 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7912 (c_parser_parameter_declaration): Likewise.
7913
cc28fc7f
MP
79142014-02-19 Marek Polacek <polacek@redhat.com>
7915
7916 PR c/60195
7917 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7918 Call mark_exp_read on exp.value.
7919 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7920 TREE_ADDRESSABLE on old instead of val.
7921 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7922
b581c05c
PK
79232014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7924
7925 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7926 C_EXPR_APPEND by vec_safe_push.
7927 * c-tree.h (C_EXPR_APPEND): Remove.
7928
81e5eca8
MP
79292014-01-31 Marek Polacek <polacek@redhat.com>
7930
7931 PR c/59963
7932 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7933 build_function_call_vec.
7934 (build_function_call): Likewise.
7935 (build_atomic_assign): Likewise.
7936 (build_function_call_vec): Add arg_loc parameter. Use it.
7937 (convert_arguments): Likewise.
7938 (convert_for_assignment): Rename rhs_loc to expr_loc.
7939 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7940 (c_parser_objc_keywordexpr): Likewise.
7941 (c_parser_postfix_expression_after_primary): Call
7942 build_function_call_vec with expr_loc rather than op_loc.
7943 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7944 build_function_call_vec.
7945 (c_parser_expr_list): Add locations parameter. Fill it with locations
7946 of function arguments.
7947 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7948
68fca595
MP
79492014-01-30 Marek Polacek <polacek@redhat.com>
7950
7951 PR c/59940
7952 * c-typeck.c (build_function_call_vec): Use loc parameter.
7953 (convert_arguments): Add location parameter. Use it.
7954 (ep_convert_and_check): Likewise.
7955 (build_atomic_assign): Adjust convert_for_assignment call.
7956 (build_modify_expr): Likewise.
7957 (digest_init): Likewise.
7958 (c_finish_return): Likewise.
7959 (build_conditional_expr): Adjust ep_convert_and_check calls.
7960 (convert_for_assignment): Add rhs_loc parameter. Use it.
7961 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7962 calls.
7963
fa337f3a
RB
79642014-01-30 Richard Biener <rguenther@suse.de>
7965
7966 PR c/59905
7967 * c-typeck.c (build_function_call_vec): Do not replace calls
7968 to a function via an incompatible type with a runtime abort.
7969
b72271b9
BI
79702014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7971
7972 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7973 flag_enable_cilkplus with flag_cilkplus.
7974 (c_parser_direct_declarator_inner): Likewise.
7975 (c_parser_attribute_any_word): Likewise.
7976 (c_parser_attributes): Likewise.
7977 (c_parser_compound_statement): Likewise.
7978 (c_parser_statement_after_labels): Likewise.
7979 (c_parser_if_statement): Likewise.
7980 (c_parser_switch_statement): Likewise.
7981 (c_parser_do_statement): Likewise.
7982 (c_parser_for_statement): Likewise.
7983 (c_parser_unary_expression): Likewise.
7984 (c_parser_postfix_expression): Likewise.
7985 (c_parser_postfix_expression_after_primary): Likewise.
7986 (c_parser_postfix_expression_after_primary): Likewise.
7987 (c_parser_omp_clause_name): Likewise.
7988 (c_finish_omp_declare_simd): Likewise.
7989 (c_parser_cilk_verify_simd): Likewise.
7990 * c-typeck.c (build_array_ref): Likewise.
7991 (build_function_call_vec): Likewise.
7992 (convert_arguments): Likewise.
7993 (build_compound_expr): Likewise.
7994 (c_finish_return): Likewise.
7995 (c_finish_if_stmt): Likewise.
7996 (c_finish_loop): Likewise.
7997 (build_binary_op): Likewise.
7998
393e8e8b
MP
79992014-01-23 Marek Polacek <polacek@redhat.com>
8000
8001 PR c/59846
8002 * c-typeck.c (parser_build_binary_op): Use location instead of
8003 input_location.
8004 (build_binary_op): Pass location to shorten_compare.
8005
f04dda30
MP
80062014-01-23 Marek Polacek <polacek@redhat.com>
8007
8008 PR c/58346
8009 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8010 an empty aggregate.
8011
789eadcd
MP
80122014-01-23 Marek Polacek <polacek@redhat.com>
8013
8014 PR c/59871
8015 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8016 of a comma expression.
8017 (emit_side_effect_warnings): Likewise.
8018
40f14e9f
BI
80192014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8020
8021 PR c/59825
8022 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8023 function to use walk_tree and moved a lot of its functionality to
8024 expand_array_notations.
8025 (expand_array_notations): New function.
8026
74558dd9
BI
80272014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8028
8029 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8030 attribute an attribute without value.
8031
652fea39
JJ
80322014-01-23 Jakub Jelinek <jakub@redhat.com>
8033
8034 PR middle-end/58809
8035 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8036 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8037
f34f1c87
MP
80382014-01-22 Marek Polacek <polacek@redhat.com>
8039
8040 PR c/59891
8041 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8042 of remove_c_maybe_const_expr on op1 and op2.
8043
241f845a
JJ
80442014-01-15 Jakub Jelinek <jakub@redhat.com>
8045
8046 PR c/58943
8047 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8048 effects, preevaluate rhs using SAVE_EXPR first.
8049
9a74f20c
BI
80502014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8051
8052 PR c++/59631
8053 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8054 statements with if-elseif statements.
8055
96066ce1
MP
80562014-01-06 Marek Polacek <polacek@redhat.com>
8057
8058 PR c/57773
8059 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8060 defined bit-field types only in ISO C.
8061
23a5b65a
RS
80622014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8063
8064 Update copyright years
8065
f9030485
RS
80662014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8067
8068 * c-array-notation.c: Use the standard form for the copyright notice.
8069
41958c28
BI
80702013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8071
8072 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8073 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8074 field in parser is not empty. If not-empty, call the function
8075 c_parser_finish_omp_declare_simd.
8076 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8077 between SIMD-enabled functions and #pragma simd. Added new parameter.
8078 (c_parser_cilk_all_clauses): Modified the usage of the function
8079 c_parser_cilk_clause_vectorlength as mentioned above.
8080 (c_parser_cilk_simd_fn_vector_attrs): New function.
8081 (c_finish_cilk_simd_fn_tokens): Likewise.
8082 (is_cilkplus_vector_p): Likewise.
8083 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8084 "nomask," and "mask" strings in clause name.
8085 (c_parser_omp_all_clauses): Added 3 new case statements:
8086 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8087 PRAGMA_CILK_CLAUSE_NOMASK.
8088 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8089 check for vector attribute and if so call the function
8090 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8091 called the function c_finish_cilk_simd_fn_tokens.
8092 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8093 parser field is non-empty. If so, parse them as you would parse
8094 the omp declare simd pragma.
8095 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8096 Added a check when step is a parameter and flag it as error.
8097 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8098 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8099 pragma_omp_clause.
8100
cef0fd0e
TS
81012013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8102
8103 * c-parser.c (c_parser_omp_parallel): Fix description.
8104
12893402
BI
81052013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8106
8107 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8108 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8109 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8110 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8111
296674db
JM
81122013-12-04 Joseph Myers <joseph@codesourcery.com>
8113
8114 PR c/52023
8115 * c-parser.c (c_parser_alignas_specifier): Use
8116 c_sizeof_or_alignof_type instead of c_alignof.
8117 (c_parser_alignof_expression): Likewise, with min_alignof
8118 parameter depending on alignof spelling used.
8119
edd28054
MP
81202013-12-04 Marek Polacek <polacek@redhat.com>
8121
8122 PR c/54113
8123 * c-decl.c (start_function): Don't warn for missing prototype for
8124 inline functions.
8125
da0fc454
MP
81262013-12-03 Marek Polacek <polacek@redhat.com>
8127
8128 PR c/59351
8129 * c-decl.c (build_compound_literal): Allow compound literals with
8130 empty initial value.
8131
4c2ecab0
JM
81322013-12-02 Joseph Myers <joseph@codesourcery.com>
8133
8134 PR c/58235
8135 * c-typeck.c (build_modify_expr): Diagnose assignment to
8136 expression with array type.
8137
340baef7
JM
81382013-11-29 Joseph Myers <joseph@codesourcery.com>
8139
8140 PR c/42262
8141 * c-typeck.c (process_init_element): Do not treat a string as
8142 initializing a whole array when used with a designator for an
8143 individual element.
8144
6763b9f7
JM
81452013-11-29 Joseph Myers <joseph@codesourcery.com>
8146
8147 PR c/57574
8148 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8149 an inline function following a static declaration.
8150
e7bd1de1
JJ
81512013-11-28 Jakub Jelinek <jakub@redhat.com>
8152
8153 PR c/59310
8154 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8155 to p_name before calling c_parser_omp_teams instead of after.
8156 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8157 argument. Remove unused p_name variable.
8158
0136f8f0
AH
81592013-11-27 Aldy Hernandez <aldyh@redhat.com>
8160 Jakub Jelinek <jakub@redhat.com>
8161
8162 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8163 external_scope is NULL.
8164
241b71bb
TV
81652013-11-27 Tom de Vries <tom@codesourcery.com>
8166 Marc Glisse <marc.glisse@inria.fr>
8167
8168 PR c++/59032
8169 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8170
2fb9a547
AM
81712013-11-22 Andrew MacLeod <amacleod@redhat.com>
8172
8173 * c-typeck.c: Add required include files from gimple.h.
8174
8400e75e
DM
81752013-11-22 David Malcolm <dmalcolm@redhat.com>
8176
8177 * c-decl.c (define_label, shadow_tag_warned)
8178 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8179 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8180 (declspecs_add_type): Remove use of in_system_header macro.
8181 * c-parser.c (c_parser_unary_expression): Likewise.
8182 * c-typeck.c (store_init_value, process_init_element)
8183 (c_start_case): Likewise.
8184
8185 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8186 macro.
8187
8188 * c-parser.c (c_parser_set_source_position_from_token): Remove
8189 reference to in_system_header from comment.
8190
386b1f1f
RS
81912013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8192
8193 * c-decl.c (grokdeclarator): Update comment to refer to
8194 tree_to_[su]hwi rather than tree_low_cst.
8195
ae7e9ddd
RS
81962013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8197
8198 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8199 tree_to_uhwi throughout.
8200
9439e9a1
RS
82012013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8202
8203 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8204 throughout.
8205
9541ffee
RS
82062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8207
8208 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8209 throughout.
8210
c02065fc
AH
82112013-11-15 Aldy Hernandez <aldyh@redhat.com>
8212
8213 * c-parser.c (c_parser_cilk_simd): New.
8214 (c_parser_cilk_verify_simd): New.
8215 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8216 (c_parser_omp_for_loop): Add case for NE_EXPR.
8217 Set c_break_label for CILK_SIMD.
8218 (c_parser_cilk_clause_vectorlength): New.
8219 (c_parser_cilk_clause_linear): New.
8220 (c_parser_cilk_clause_name): New.
8221 (c_parser_cilk_all_clauses): New.
8222 * c-typeck.c (build_unary_op): Pass location argument to
8223 readonly_error.
8224 (build_modify_expr): Same.
8225 (build_asm_expr): Same.
8226 (c_finish_bc_stmt): Error on break/continue in loops.
8227
18f429e2
AM
82282013-11-14 Andrew MacLeod <amacleod@redhat.com>
8229
8230 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8231
d8a2d370
DN
82322013-11-14 Diego Novillo <dnovillo@google.com>
8233
8234 * c-decl.c: Include print-tree.h.
8235 Include stor-layout.h.
8236 Include varasm.h.
8237 Include attribs.h.
8238 Include stringpool.h.
8239 * c-lang.c: Include fold-const.h.
8240 * c-parser.c: Include stringpool.h.
8241 Include attribs.h.
8242 Include stor-layout.h.
8243 Include varasm.h.
8244 Include trans-mem.h.
8245 * c-typeck.c: Include stor-layout.h.
8246 Include trans-mem.h.
8247 Include varasm.h.
8248 Include stmt.h.
8249
38b7bc7f
JM
82502013-11-13 Joseph Myers <joseph@codesourcery.com>
8251
8252 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8253 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8254 __auto_type.
8255 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8256 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8257 RID_AUTO_TYPE.
8258 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8259 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8260 (c_parser_declarator, c_parser_direct_declarator_inner)
8261 (c_parser_parameter_declaration, c_parser_type_name): All callers
8262 changed.
8263 (c_parser_declaration_or_fndef): Handle declarations with type
8264 determined from the initializer.
8265
45b0be94
AM
82662013-11-12 Andrew MacLeod <amacleod@redhat.com>
8267
18f429e2 8268 * c-typeck.c: Include gimplify.h.
45b0be94 8269
582d9b50
JM
82702013-11-12 Joseph Myers <joseph@codesourcery.com>
8271
8272 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8273 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8274 comment.
8275 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8276 or _Thread_local as appropriate in diagnostics.
8277 (build_null_declspecs): Initialize ret->thread_gnu_p.
8278 (declspecs_add_scspec): Handle either __thread or _Thread_local
8279 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8280 pedantic. Do not disallow _Thread_local extern and _Thread_local
8281 static.
8282
267bac10
JM
82832013-11-07 Joseph Myers <joseph@codesourcery.com>
8284 Andrew MacLeod <amacleod@redhat.com>
8285
8286 * c-aux-info.c (gen_type): Handle atomic qualifier.
8287 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8288 qualifiers when compating types.
8289 (shadow_tag_warned): Handle atomic_p in declspecs.
8290 (quals_from_declspecs): Likewise.
8291 (start_decl): Use c_type_promotes_to when promoting argument
8292 types.
8293 (grokdeclarator): Handle _Atomic.
8294 (get_parm_info): Diagnose any qualifier on "void" as only
8295 parameter.
8296 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8297 comparing types. Use c_type_promotes_to when promoting argument
8298 types.
8299 (finish_function): Use c_type_promotes_to when promoting argument
8300 types.
8301 (build_null_declspecs): Handle atomic_p in declspecs.
8302 (declspecs_add_qual): Handle RID_ATOMIC.
8303 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8304 (c_token_starts_declspecs): Handle RID_ATOMIC.
8305 (c_parser_declspecs): Handle atomic type specifiers and
8306 qualifiers.
8307 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8308 from types of expressions with atomic type.
8309 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8310 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8311 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8312 (c_parser_statement_after_labels, c_parser_switch_statement)
8313 (c_parser_for_statement, c_parser_expr_no_commas)
8314 (c_parser_conditional_expression, c_parser_binary_expression)
8315 (c_parser_cast_expression, c_parser_unary_expression)
8316 (c_parser_postfix_expression)
8317 (c_parser_postfix_expression_after_primary, c_parser_expression):
8318 Use convert_lvalue_to_rvalue.
8319 (c_parser_expression_conv, c_parser_expr_list): Document
8320 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8321 (c_parser_objc_synchronized_statement): Use
8322 convert_lvalue_to_rvalue.
8323 (c_parser_objc_selector): Handle RID_ATOMIC.
8324 (c_parser_objc_receiver, c_parser_array_notation): Use
8325 convert_lvalue_to_rvalue.
8326 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8327 _Atomic (type-name).
8328 (struct c_declspecs): Add atomic_p field.
8329 (convert_lvalue_to_rvalue): Declare.
8330 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8331 corresponding atomic types.
8332 (qualify_type): Don't add _Atomic qualifiers from second argument.
8333 (comp_target_types): Do not allow _Atomic mismatches.
8334 (type_lists_compatible_p): Do not remove atomic qualifiers when
8335 comparing types.
8336 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8337 (build_atomic_assign): New functions.
8338 (build_unary_op): Use build_atomic_assign for atomic increment and
8339 decrement.
8340 (build_conditional_expr): Do not treat _Atomic void as a qualified
8341 version of void.
8342 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8343 (find_anonymous_field_with_type, convert_to_anonymous_field)
8344 (convert_for_assignment): Do not remove atomic qualifiers when
8345 comparing types.
8346 (digest_init): Do not accept initialization of arrays of atomic
8347 elements by string constants.
8348 (build_asm_expr): Use convert_lvalue_to_rvalue.
8349 (build_binary_op): Do not treat _Atomic void as a qualified
8350 version of void.
8351
0c249d4b
DD
83522013-11-06 DJ Delorie <dj@redhat.com>
8353
8354 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8355 both explicit and builtin, print the location of the explicit one.
8356
6d7f7e0a
TB
83572013-11-05 Tobias Burnus <burnus@net-b.de>
8358
8359 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8360 c_parser_omp_distribute, c_parser_omp_teams,
8361 c_parser_omp_target, c_parser_omp_declare): Handle
8362 -fopenmp-simd.
8363
b906f4ca
MP
83642013-11-03 Marek Polacek <polacek@redhat.com>
8365
8366 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8367
ee1d5a02
JJ
83682013-11-01 Jakub Jelinek <jakub@redhat.com>
8369
8370 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8371 check_dup_generic at the end, unless remove is true.
8372 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8373 remove = true;.
8374 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8375
5a9785fb
JJ
83762013-10-31 Jakub Jelinek <jakub@redhat.com>
8377
8378 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8379 with decl that is not pointer nor array.
8380
939b37da
BI
83812013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8382
8383 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8384 a spawning function is found.
8385 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8386 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8387 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8388 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8389 case.
8390 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8391 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8392 expr.
8393 (c_finish_return): Added a check to reject _Cilk_spawn in return
8394 expression.
8395 (build_cilk_spawn): New function.
8396 (build_cilk_sync): Likewise.
8397 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 8398
d4af74d4
TB
83992013-10-27 Tobias Burnus <burnus@net-b.de>
8400
8401 PR other/33426
8402 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8403 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8404 (c_parser_statement_after_labels): Update calls.
8405
d73749df 84062013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8407
8408 PR other/33426
8409 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8410 Handle PRAGMA_IVDEP.
8411 (c_parser_statement_after_labels): Update call.
8412
f28aa681
MP
84132013-10-24 Marek Polacek <polacek@redhat.com>
8414
8415 * c-parser.c (c_parser_struct_declaration): Add a comment.
8416 (c_parser_declarator): Don't allow _Alignas here.
8417
0645c1a2
AM
84182013-10-17 Andrew MacLeod <amacleod@redhat.com>
8419
8420 * c-parser.c: Include omp-low.h.
8421 * c-typeck.c: Likewise.
8422
568a31f2
MP
84232013-10-17 Marek Polacek <polacek@redhat.com>
8424
8425 PR c/58267
8426 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8427 Document syntax of the array-declarator.
8428 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8429 are not permitted.
8430 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8431 (c_parser_struct_declaration): Likewise.
8432 (c_parser_declarator): Likewise.
8433 (c_parser_direct_declarator_inner): Likewise.
8434 (c_parser_parameter_declaration): Likewise.
8435 (c_parser_type_name): Likewise.
8436
acf0174b
JJ
84372013-10-11 Jakub Jelinek <jakub@redhat.com>
8438
8439 * c-lang.h (current_omp_declare_target_attribute): New extern
8440 decl.
8441 * c-parser.c: Include c-lang.h.
8442 (struct c_parser): Change tokens to c_token *.
8443 Add tokens_buf field. Change tokens_avail type to unsigned int.
8444 (c_parser_consume_token): If parser->tokens isn't
8445 &parser->tokens_buf[0], increment parser->tokens.
8446 (c_parser_consume_pragma): Likewise.
8447 (enum pragma_context): Add pragma_struct and pragma_param.
8448 (c_parser_external_declaration): Adjust
8449 c_parser_declaration_or_fndef caller.
8450 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8451 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8452 Adjust recursive call.
8453 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8454 of pragma_external.
8455 (c_parser_parameter_declaration): Use pragma_param instead of
8456 pragma_external.
8457 (c_parser_compound_statement_nostart, c_parser_label,
8458 c_parser_for_statement): Adjust
8459 c_parser_declaration_or_fndef callers.
8460 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8461 it through to c_parser_conditional_expression.
8462 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8463 pass it through to c_parser_binary_expression. Adjust recursive
8464 call.
8465 (c_parser_binary_expression): Remove prec argument, add
8466 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8467 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8468 binop matches it, use build2 instead of parser_build_binary_op.
8469 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8470 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8471 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8472 Handle pragma_struct and pragma_param the same as pragma_external.
8473 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8474 (c_parser_omp_variable_list): Parse array sections for
8475 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8476 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8477 (c_parser_omp_clause_reduction): Handle user defined reductions.
8478 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8479 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8480 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8481 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8482 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8483 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8484 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8485 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8486 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8487 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8488 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8489 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8490 (c_parser_omp_for_loop): Add CODE argument, pass it through
8491 to c_finish_omp_for. Change last argument to cclauses,
8492 and adjust uses to grab parallel clauses from the array of all
8493 the split clauses. Adjust c_parser_binary_expression,
8494 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8495 (omp_split_clauses): New function.
8496 (c_parser_omp_simd): New function.
8497 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8498 Allow the function to be called also when parsing combined constructs,
8499 and call c_parser_omp_simd when parsing for simd.
8500 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8501 #pragma omp section, require exactly one structured-block instead of
8502 sequence of statements.
8503 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8504 Allow the function to be called also when parsing combined constructs.
8505 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8506 Allow the function to be called also when parsing combined
8507 constructs.
8508 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8509 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8510 c_parser_omp_teams, c_parser_omp_target_data,
8511 c_parser_omp_target_update, c_parser_omp_target,
8512 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8513 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8514 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8515 (c_parser_omp_construct): Add p_name and mask vars. Handle
8516 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8517 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8518 and c_parser_omp_sections callers.
8519 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8520 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8521 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8522 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8523 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8524 OMP_CLAUSE_DEPEND.
8525 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8526 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8527 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8528 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8529 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8530 * c-typeck.c: Include tree-inline.h.
8531 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8532 handle_omp_array_sections_1, handle_omp_array_sections,
8533 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8534 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8535 user defined reductions.
8536 (c_tree_equal): New function.
8537 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8538 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8539 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8540 c_check_omp_declare_reduction_r): New prototypes.
8541 * c-decl.c (current_omp_declare_target_attribute): New variable.
8542 (c_decl_attributes): New function.
8543 (start_decl, start_function): Use it instead of decl_attributes.
8544 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8545 c_omp_reduction_decl, c_omp_reduction_lookup,
8546 c_check_omp_declare_reduction_r): New functions.
8547
0a6c2227
TT
85482013-09-25 Tom Tromey <tromey@redhat.com>
8549
8550 * Make-lang.in (c/gccspec.o): Remove.
8551 (CFLAGS-c/gccspec.o): New variable.
8552 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8553 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8554 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8555
f3bc55f0
TT
85562013-09-25 Tom Tromey <tromey@redhat.com>
8557
8558 * Make-lang.in (c/gccspec.o): Don't use subshell.
8559
a24d975c
MP
85602013-09-18 Marek Polacek <polacek@redhat.com>
8561
8562 PR sanitize/58443
8563 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8564 Remove unnecessary check.
8565
ce6923c5
MP
85662013-09-18 Marek Polacek <polacek@redhat.com>
8567
8568 PR sanitizer/58411
8569 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8570 no_sanitize_undefined attribute.
8571
a1e51df9
KT
85722013-09-13 Kai Tietz <ktietz@redhat.com>
8573
8574 PR target/57848
8575 * c-decl.c (c_builtin_function_ext_scope): Remove
8576 wrong assumption that it is never called on prexisting
8577 symbol.
8578
0af94e6f
JR
85792013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8580
8581 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8582
20059c8b
GDR
85832013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8584
8585 * c-objc-common.c (c_tree_printer): Tidy.
8586
de5a5fa1
MP
85872013-08-30 Marek Polacek <polacek@redhat.com>
8588
8589 * c-typeck.c (build_binary_op): Add division by zero and shift
8590 instrumentation.
8591
2531a1d9 85922013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8593 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8594
6e2bcc98 8595 PR c/35649
2531a1d9
JR
8596 * c-typeck.c (c_common_type): Prefer double_type_node over
8597 other REAL_TYPE types with the same precision.
8598 (convert_arguments): Likewise.
8599
025311c4
GDR
86002013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8601
8602 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8603 (c_initialize_diagnostics): Call a destructor for the early printer.
8604
da6ca2b5
GDR
86052013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8606
8607 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8608 printer initialization.
8609
318cda85 86102013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8611
318cda85
BI
8612 PR c/57490
8613 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8614 check for truth values.
8615 (expand_array_notation_exprs): Added truth values case. Removed an
8616 unwanted else. Added for-loop to walk through subtrees in default
8617 case.
8618
b066401f
GDR
86192013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8620
8621 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8622
fb48aadc
JM
86232013-07-23 Joseph Myers <joseph@codesourcery.com>
8624
8625 * c-parser.c (struct c_generic_association): Fix typo.
8626
433cc7b0
TT
86272013-07-23 Tom Tromey <tromey@redhat.com>
8628 Joseph Myers <joseph@codesourcery.com>
8629
8630 * c-parser.c (struct c_generic_association): New.
8631 (c_generic_association_d): New typedef.
8632 (c_parser_generic_selection): New function.
8633 (c_parser_postfix_expression): Handle RID_GENERIC.
8634
26d40c3d
JM
86352013-07-13 Jason Merrill <jason@redhat.com>
8636
8637 PR c++/57793
8638 * c-decl.c (finish_struct): Check for too-large class.
8639
ecdbd01a 86402013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8641
8642 PR c/57821
8643 * c-typeck.c (set_init_index): When folding, check for index overflow.
8644
1141ed3f
BI
86452013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8646
8647 * c-parser.c (c_parser_array_notation): Removed rejection of array
8648 notations in an array of function pointers.
8649
713b46fa
BI
86502013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8651
8652 * c-array-notation.c (make_triplet_val_inv): New function.
8653 (create_cmp_incr): Likewise.
8654 (create_array_refs): Likewise.
8655 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8656 Also modularized common parts between functions and called the function.
8657 (build_array_notation_expr): Likewise.
8658 (fix_conditional_array_notations_1): Likewise.
8659 (fix_array_notation_expr): Likewise.
8660 (fix_array_notation_call_expr): Likewise.
8661
92f20202
MP
86622013-06-18 Marek Polacek <polacek@redhat.com>
8663
8664 PR c/57630
8665 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8666
73a23b06
BI
86672013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8668
8669 * c-array-notation.c (build_array_notation_expr): Reject array notation
8670 mismatch between LHS and RHS even inside a call_expr. Also, removed
8671 a couple while statements that were dead code.
8672
00b8517d
BI
86732013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8674
8675 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8676 excessive precision expressions in function parameters. Also removed
8677 couple unwanted while statements.
8678
1509bdda
BI
86792013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8680
8681 * c-array-notation.c (expand_array_notation_exprs): Added
8682 ARRAY_NOTATION_REF case.
ab20d992 8683
d60f1706
BI
86842013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8685
8686 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8687 function to c-family/array-notation-common.c.
8688 (is_cilkplus_reduce_builtin): Likewise.
8689 (find_rank): Likewise.
8690 (extract_array_notation_exprs): Likewise.
8691 (replace_array_notations): Likewise.
8692 (find_inv_trees): Likewise.
8693 (replace_inv_trees): Likewise.
8694 (contains_array_notation_expr): Likewise.
8695 (find_correct_array_notation_type): Likewise.
8696 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8697 (struct inv_list): Moved this to c-family/array-notation-common.c.
8698 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8699
6d6efbb3
BI
87002013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8701
8702 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8703 reduction functions outside the for-loop. Added a check if the fundecl
8704 is non-NULL. Finally, removed an unwanted if-statement, and made the
8705 body unconditional.
8706
25c22937
BI
87072013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8708
8709 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8710 condition of the if-statement matches the rank of else-block and then-
8711 block when array notations are used.
8712 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8713 expression after the entire function body is parsed.
8714 (c_parser_expr_no_commas): Delayed creating array notation expressions
8715 to the end of function parsing.
8716 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8717 whole if-statement instead of just the condition.
ab20d992 8718 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8719
edd25645
BI
87202013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8721
8722 PR c/57474
8723 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8724 array to NULL_TREE if they are unused. Also added a check for the
8725 field to be NULL before its fields are used in future.
ab20d992 8726
065ce7f1
RO
87272013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8728
8729 PR bootstrap/57450
8730 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8731 (build_array_notation_expr): Likewise.
8732
36536d79
BI
87332013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8734
8735 * c-typeck.c (build_array_ref): Added a check to see if array's
8736 index is greater than one. If true, then emit an error.
8737 (build_function_call_vec): Exclude error reporting and checking
8738 for builtin array-notation functions.
8739 (convert_arguments): Likewise.
8740 (c_finish_return): Added a check for array notations as a return
8741 expression. If true, then emit an error.
8742 (c_finish_loop): Added a check for array notations in a loop
8743 condition. If true then emit an error.
8744 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8745 (build_binary_op): Added a check for array notation expr inside
8746 op1 and op0. If present, we call another function to find correct
8747 type.
8748 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8749 * c-parser.c (c_parser_compound_statement): Check if array
8750 notation code is used in tree, if so, then transform them into
8751 appropriate C code.
8752 (c_parser_expr_no_commas): Check if array notation is used in LHS
8753 or RHS, if so, then build array notation expression instead of
8754 regular modify.
8755 (c_parser_postfix_expression_after_primary): Added a check for
8756 colon(s) after square braces, if so then handle it like an array
8757 notation. Also, break up array notations in unary op if found.
8758 (c_parser_direct_declarator_inner): Added a check for array
8759 notation.
8760 (c_parser_compound_statement): Added a check for array notation in
8761 a stmt. If one is present, then expand array notation expr.
8762 (c_parser_if_statement): Likewise.
8763 (c_parser_switch_statement): Added a check for array notations in
8764 a switch statement's condition. If true, then output an error.
8765 (c_parser_while_statement): Similarly, but for a while.
8766 (c_parser_do_statement): Similarly, but for a do-while.
8767 (c_parser_for_statement): Similarly, but for a for-loop.
8768 (c_parser_unary_expression): Check if array notation is used in a
8769 pre-increment or pre-decrement expression. If true, then expand
8770 them.
8771 (c_parser_array_notation): New function.
8772 * c-array-notation.c: New file.
8773 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8774
cd192ccc
MS
87752013-05-23 Mike Stump <mikestump@comcast.net>
8776
8777 * c-typeck.c (convert_for_assignment): Handle references to memory
8778 spaces better.
8779
427b248d
JM
87802013-05-16 Jason Merrill <jason@redhat.com>
8781
8782 * Make-lang.in (cc1$(exeext)): Use link mutex.
8783
44d90fe1
PC
87842013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8785
8786 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8787 to simply use OPT_Wpointer_arith.
8788 (build_unary_op): Likewise.
8789
4e7d7b3d
JJ
87902013-04-03 Jakub Jelinek <jakub@redhat.com>
8791
8792 PR c/19449
8793 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8794 argument. If set, or it temporarily for parsing of the first
8795 argument into force_folding_builtin_constant_p.
8796 (c_parser_postfix_expression): Adjust callers.
8797
839b422f
RB
87982013-03-21 Richard Biener <rguenther@suse.de>
8799
8800 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8801 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8802
2ee028f1
MP
88032013-02-12 Marek Polacek <polacek@redhat.com>
8804
8805 PR c/44938
8806 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8807 origtypes to NULL.
8808
8824edff
JJ
88092013-01-24 Jakub Jelinek <jakub@redhat.com>
8810
8811 PR c/56078
8812 * c-typeck.c (set_nonincremental_init_from_string): If
8813 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8814 returned false.
8815 (process_init_element): Likewise.
8816
eadd3d0d
JJ
88172012-12-20 Jakub Jelinek <jakub@redhat.com>
8818
8819 PR c++/55619
8820 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8821 argument, don't call default_function_array_conversion
8822 nor c_fully_fold here.
8823 (c_parser_asm_statement): Adjust callers.
8824 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8825 and outputs here, and call default_function_array_conversion
8826 on inputs that don't need to be addressable.
8827
f8a93a2e
JJ
88282012-12-18 Jakub Jelinek <jakub@redhat.com>
8829
8830 PR c/39464
8831 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8832 warning require that both c_common_unsigned_type as well as
8833 c_common_signed_type is the same for both mvl and mvr types.
8834
9771b263
DN
88352012-11-16 Diego Novillo <dnovillo@google.com>
8836
8837 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8838
8839 * c-common.c: Use new vec API in vec.h.
8840 * c-common.h: Likewise.
8841 * c-gimplify.c: Likewise.
8842 * c-pragma.c: Likewise.
8843 * c-pretty-print.c: Likewise.
8844 * c-pretty-print.h: Likewise.
8845 * c-semantics.c: Likewise.
8846 * c-decl.c: Likewise.
8847 * c-parser.c: Likewise.
8848 * c-tree.h: Likewise.
8849 * c-typeck.c: Likewise.
8850
880661a4
JW
88512012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8852
8853 PR c++/54930
8854 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8855
077d1abe
MLI
88562012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8857
8858 PR c/53066
8859 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8860 shadows a function, unless the variable is a function or a
8861 pointer-to-function.
8862
3a785c97
JJ
88632012-10-12 Jakub Jelinek <jakub@redhat.com>
8864
8865 PR c/54381
8866 * c-parser.c (struct c_tree_loc_pair): Removed.
8867 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8868 add location_t * and tree * arguments, fill in array of 3
8869 sizeof_arg trees and corresponding locs.
8870 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8871 c_parser_expr_list callers.
8872 (c_parser_postfix_expression_after_primary): Likewise. Pass
8873 array of 3 sizeof_arg trees and locs (corresponding to first
8874 3 arguments) to sizeof_pointer_memaccess_warning.
8875
703c8606
LC
88762012-10-09 Lawrence Crowl <crowl@google.com>
8877
8878 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8879 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8880 hash table.
8881
5d9de0d0
PC
88822012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8883
8884 PR c++/54194
8885 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8886 call.
8887
a212e43f
MG
88882012-10-09 Marc Glisse <marc.glisse@inria.fr>
8889
8890 PR c++/54427
8891 * c-typeck.c: Include c-common.h.
8892 (enum stv_conv): Moved to c-common.h.
8893 (scalar_to_vector): Moved to c-common.c.
8894 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8895 * Make-lang.in: c-typeck.c depends on c-common.h.
8896
3b78de56
AC
88972012-10-04 Arnaud Charlet <charlet@adacore.com>
8898
8899 * c-decl.c (c_write_global_declarations): Fix handling of
8900 -fdump-ada-spec*.
8901
78c60e3d
SS
89022012-09-30 Sharad Singhai <singhai@google.com>
8903
8904 * c-decl.c (c_write_global_declarations): Use a different method
8905 to determine if the dump has ben initialized.
8906
9f33203d
JM
89072012-09-14 Joseph Myers <joseph@codesourcery.com>
8908
8909 PR c/54552
8910 * c-typeck.c (c_cast_expr): When casting to a type requiring
8911 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8912 c_fully_fold first.
8913
a27d595d
JM
89142012-09-14 Joseph Myers <joseph@codesourcery.com>
8915
8916 PR c/54103
8917 * c-typeck.c (build_unary_op): Pass original argument of
8918 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8919 any C_MAYBE_CONST_EXPR, if it has integer operands.
8920 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8921 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8922 to c_objc_common_truthvalue_conversion, then remove any
8923 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8924 c_objc_common_truthvalue_conversion not
8925 c_common_truthvalue_conversion.
8926 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8927 call note_integer_operands for arguments with integer operands
8928 that are not integer constants.
8929
9feb29df
JJ
89302012-09-13 Jakub Jelinek <jakub@redhat.com>
8931
8932 PR c/54559
8933 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8934 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8935
d409320c
JJ
89362012-08-31 Jakub Jelinek <jakub@redhat.com>
8937
8938 PR c/54428
8939 * c-convert.c (convert): Don't call fold_convert_loc if
8940 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8941 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8942 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8943
6265d07c
JJ
89442012-08-24 Jakub Jelinek <jakub@redhat.com>
8945
8946 PR c/54355
8947 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8948 for nested and empty_ok arguments in the call to
8949 c_parser_declaration_or_fndef.
8950
1a4049e7
JJ
89512012-08-17 Jakub Jelinek <jakub@redhat.com>
8952
8953 * c-tree.h (c_last_sizeof_arg): Declare.
8954 * c-parser.c (struct c_tree_loc_pair): New type.
8955 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8956 non-NULL.
8957 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8958 (c_parser_postfix_expression_after_primary): Likewise. Call
8959 sizeof_pointer_memaccess_warning if needed.
8960 (sizeof_ptr_memacc_comptypes): New function.
8961 * c-typeck.c (c_last_sizeof_arg): New global variable.
8962 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8963
0229aee9
UB
89642012-07-24 Uros Bizjak <ubizjak@gmail.com>
8965
8966 * c-lang.h (lang_decl): Add variable_size GTY option.
8967
7ee2468b
SB
89682012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8969
8970 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8971 * Make-lang.in: Fix dependencies.
8972
d4a10d0a
SB
89732012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8974
8975 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8976 and add language Makefile hooks.
8977 * config-lang.in: New file.
8978 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8979 add the required "normal" config-lang.in rules.
8980 * c-lang.h: Moved from gcc/ to here.
8981 * c-tree.h: Likewise.
8982 * c-objc-common.c: Likewise.
8983 * c-objc-common.h: Likewise.
8984 * c-typeck.c: Likewise.
8985 * c-convert.c: Likewise.
8986 * c-lang.c: Likewise.
8987 * c-aux-info.c: Likewise.
8988 * c-errors.c: Likewise.
8989 * gccspec.c: Likewise.
8990 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8991 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8992\f
68127a8e 8993Copyright (C) 2012-2023 Free Software Foundation, Inc.
d4a10d0a
SB
8994
8995Copying and distribution of this file, with or without modification,
8996are permitted in any medium without royalty provided the copyright
8997notice and this notice are preserved.