]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Update gcc de.po
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c8065441
GA
12023-03-10 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/108079
4 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
5 after diagnosing it.
6
6f9e2f14
GA
72023-02-28 Jakub Jelinek <jakub@redhat.com>
8
9 PR sanitizer/108894
10 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
11 and rename to c_strict_flex_array_level_of.
12 (is_flexible_array_member_p): Adjust caller.
13
0263e9d5
GA
142023-02-18 Martin Uecker <uecker@tugraz.at>
15
16 PR c/108375
17 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
18 (diagnose_mismatched_decl): Dito.
19 (warn_about_goto): Dito:
20 (c_check_switch_jump_warnings): Dito.
21 (finish_decl): Dito.
22 (finish_struct): Dito.
23 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
24 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
25 * c-objc-common.cc (c_var_mod_p): New function.
26 (c_var_unspec_p): Remove.
27 * c-objc-common.h: Set lang hook.
28 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
29 (c_parser_typeof_specifier): Dito.
30 (c_parser_has_attribute_expression): Dito.
31 (c_parser_generic_selection): Dito.
32 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
33 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
34
88cc4495
GA
352023-02-16 Patrick Palka <ppalka@redhat.com>
36
37 * c-parser.h: Mechanically drop static from static inline
38 functions via s/^static inline/inline/g.
39
d7a47ed1
GA
402023-02-10 Joseph Myers <joseph@codesourcery.com>
41
42 * c-convert.cc (c_convert): Allow conversion of a null pointer
43 constant to nullptr_t.
44 * c-typeck.cc (null_pointer_constant_p): Remove static.
45 (convert_for_assignment): Allow conversion of a null pointer
46 constant to nullptr_t.
47 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
48 * c-tree.h (null_pointer_constant_p): Declare.
49
e92e2c96
GA
502023-02-09 Tobias Burnus <tobias@codesourcery.com>
51
52 * c-parser.cc (c_parser_omp_allocate): Parse align
53 clause and check for restrictions.
54
f6fc79d0
GA
552023-02-08 Joseph Myers <joseph@codesourcery.com>
56
57 * c-typeck.cc (check_constexpr_init): Remove argument
58 null_pointer_constant. Only check pointer initializers for being
59 null.
60 (digest_init): Update calls to check_constexpr_init.
61
a37a0cb3
GA
622023-02-02 Joseph Myers <joseph@codesourcery.com>
63
64 * c-typeck.cc (build_binary_op): Allow comparisons between
65 pointers and nullptr_t values that are not null pointer constants.
66
672023-02-02 Joseph Myers <joseph@codesourcery.com>
68
69 * c-typeck.cc: Include "realmpfr.h".
70 (constexpr_init_fits_real_type): Do not allow signaling NaN
71 conversions to different types with the same mode. Handle
72 conversions from binary to decimal types.
73 (check_constexpr_init): Do not disallow real initializers for
74 complex types. Do not disallow binary initializers for decimal
75 floating types.
76
317525b0
GA
772023-01-31 Marek Polacek <polacek@redhat.com>
78
79 PR c++/107593
80 PR c++/108597
81 * c-objc-common.cc (instantiation_dependent_expression_p): New.
82
338eb0f0
GA
832023-01-27 Joseph Myers <joseph@codesourcery.com>
84
85 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
86 around auto initializer.
87
f457a62e
GA
882023-01-16 Jakub Jelinek <jakub@redhat.com>
89
90 PR c++/105593
91 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
92 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
93 of warn_init_self.
94
5013c3bb
GA
952023-01-14 Jakub Jelinek <jakub@redhat.com>
96
97 PR c++/108365
98 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
99 division or modulo.
100
1012023-01-13 Qing Zhao <qing.zhao@oracle.com>
102
103 * c-decl.cc (strict_flex_array_level_of): ... here.
104
81ed98bc
GA
1052023-01-11 Jakub Jelinek <jakub@redhat.com>
106
107 PR c/105972
108 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
109 markers for K&R function parameter declarations of nested functions.
110
84723aca
GA
1112023-01-09 Joseph Myers <joseph@codesourcery.com>
112
113 * c-decl.cc (build_compound_literal): Call record_inline_static.
114
d808db1f
GA
1152023-01-06 Joseph Myers <joseph@codesourcery.com>
116
117 * c-parser.cc (c_parser_postfix_expression): Handle integer
118 generic arguments to functions passed to __builtin_tgmath as
119 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
120 Do not handle integer arguments to some narrowing functions as
121 _Float64.
122
d2ef2327
GA
1232022-12-19 Jakub Jelinek <jakub@redhat.com>
124
125 PR c/108043
126 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
127 compound literals with function type.
128
4bc2d9f6
GA
1292022-12-07 Joseph Myers <joseph@codesourcery.com>
130
131 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
132 auto, constexpr and a type used together.
133
3fe66f7f
GA
1342022-12-06 Qing Zhao <qing.zhao@oracle.com>
135
136 * c-decl.cc (is_flexible_array_member_p): Call new function
137 strict_flex_array_level_of.
138
9a1b4f1d
GA
1392022-11-24 Florian Weimer <fweimer@redhat.com>
140
141 PR c/107805
142 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
143 from type to specs.
144
add89840
GA
1452022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
146
147 * c-decl.cc (start_function): Set the result decl source
148 location to the location of the typespec.
149
1502022-11-17 David Malcolm <dmalcolm@redhat.com>
151
152 PR analyzer/107711
153 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
154 to cpp_create_reader, rather than ident_hash, so that the new
155 reader gets its own hash table.
156
cdc34229
GA
1572022-11-15 David Malcolm <dmalcolm@redhat.com>
158
159 PR analyzer/106302
160 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
161 (class ana::c_translation_unit): New.
162 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
163
30d77d49
GA
1642022-11-12 Joseph Myers <joseph@codesourcery.com>
165
166 * c-decl.cc (start_underspecified_init)
167 (finish_underspecified_init): Handle name == NULL_TREE for
168 compound literals.
169 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
170 (shadow_tag_warned): Check for constexpr.
171 (start_decl): Add parameter do_push.
172 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
173 (grokdeclarator): Handle constexpr.
174 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
175 (declspecs_add_scspec): Handle constexpr.
176 * c-parser.cc (c_token_starts_compound_literal)
177 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
178 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
179 (c_parser_compound_literal_scspecs)
180 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
181 Update calls to start_init.
182 (c_parser_declaration_or_fndef, c_parser_initializer)
183 (c_parser_initval): Pass true for new argument of
184 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
185 constexpr compound literals.
186 (c_parser_static_assert_declaration_no_semi)
187 (c_parser_enum_specifier, c_parser_struct_declaration)
188 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
189 Call convert_lvalue_to_rvalue on expressions required to be
190 integer constant expressions.
191 (c_parser_omp_declare_reduction): Update call to start_init.
192 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
193 (C_DECL_DECLARED_CONSTEXPR): New macros.
194 (struct c_declspecs): Add constexpr_p.
195 (start_decl, convert_lvalue_to_rvalue, start_init): Update
196 prototypes.
197 * c-typeck.cc (require_constant_value, require_constant_elements):
198 Change to bool.
199 (require_constexpr_value, maybe_get_constexpr_init)
200 (constexpr_init_fits_real_type, check_constexpr_init): New.
201 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
202 maybe_get_constexpr_init.
203 (store_init_value): Update call to digest_init.
204 (digest_init): Add parameters int_const_expr, arith_const_expr and
205 require_constexpr. Check constexpr initializers.
206 (constructor_top_level): Remove.
207 (struct initializer_stack): Remove top_level. Add
208 require_constexpr_value.
209 (start_init): Remove parameter top_level. Add parameters
210 init_require_constant and init_require_constexpr. Save
211 require_constexpr_value on stack.
212 (pop_init_level): Use a null pointer constant for zero initializer
213 of pointer initialized with {}.
214 (output_init_element): Update call to digest_init. Avoid passing
215 null pointer constants of pointer type through digest_init a
216 second time when initializing a constexpr object.
217
d29260ce
GA
2182022-11-03 Joseph Myers <joseph@codesourcery.com>
219
220 * c-decl.cc (in_underspecified_init, start_underspecified_init)
221 (finish_underspecified_init): New.
222 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
223 Give errors inside initializers of underspecified declarations.
224 (grokdeclarator): Handle (erroneous) case of C2X auto on a
225 parameter.
226 (declspecs_add_type): Handle c2x_auto_p case.
227 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
228 C2X mode.
229 (finish_declspecs): Handle c2x_auto_p.
230 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
231 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
232 (struct c_declspecs): Add c2x_auto_p.
233 (start_underspecified_init, finish_underspecified_init): New
234 prototypes.
235 * c-typeck.cc (build_external_ref): Give error for underspecified
236 declaration referenced in its initializer.
237
3055829a
GA
2382022-10-28 Joseph Myers <joseph@codesourcery.com>
239
240 * c-decl.cc (grokdeclarator): Pass
241 arg_info->no_named_args_stdarg_p to build_function_type.
242 (grokparms): Check arg_info->no_named_args_stdarg_p before
243 converting () to (void).
244 (build_arg_info): Initialize no_named_args_stdarg_p.
245 (get_parm_info): Set no_named_args_stdarg_p.
246 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
247 build_function_type.
248 (store_parm_decls): Count (...) functions as prototyped.
249 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
250 parenthesis to start parameter list.
251 (c_parser_parms_list_declarator): Always allow '...' with no
252 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
253 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
254 * c-typeck.cc (composite_type): Handle
255 TYPE_NO_NAMED_ARGS_STDARG_P.
256 (function_types_compatible_p): Compare
257 TYPE_NO_NAMED_ARGS_STDARG_P.
258
2592022-10-28 Jakub Jelinek <jakub@redhat.com>
260
261 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
262 comma before the first clause.
263 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
264 c_parser_omp_flush, c_parser_omp_scan_loop_body,
265 c_parser_omp_ordered, c_finish_omp_declare_variant,
266 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
267 c_parser_omp_requires, c_parser_omp_error,
268 c_parser_omp_assumption_clauses): Likewise.
269
2702022-10-28 Joseph Myers <joseph@codesourcery.com>
271
272 PR c/61469
273 * c-convert.cc (c_convert): Handle enums with underlying boolean
274 type like bool.
275 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
276 enums with enum type specifier, but give errors for storage class
277 specifiers, qualifiers or alignment specifiers in non-definition
278 declarations of such enums.
279 (grokdeclarator): Give error for non-definition use of type
280 specifier with an enum type specifier.
281 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
282 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
283 (xref_tag): Update call to parser_xref_tag.
284 (start_enum): Add argument fixed_underlying_type. Complete enum
285 type with a fixed underlying type given in the definition. Give
286 error for defining without a fixed underlying type in the
287 definition if one was given in a prior declaration. Do not mark
288 enums with fixed underlying type as packed for -fshort-enums.
289 Store the enum type in the_enum.
290 (finish_enum): Do not adjust types of values or check their range
291 for an enum with a fixed underlying type. Set underlying type of
292 enum and variants.
293 (build_enumerator): Check enumeration constants for enum with
294 fixed underlying type against that type and convert to that type.
295 Increment in the underlying integer type, with handling for bool.
296 (c_simulate_enum_decl): Update call to start_enum.
297 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
298 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
299 rather than recomputing an underlying type based on size.
300 * c-parser.cc (c_parser_declspecs)
301 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
302 Set has_enum_type_specifier for type specifiers.
303 (c_parser_enum_specifier): Handle enum type specifiers.
304 (c_parser_struct_or_union_specifier): Update call to
305 parser_xref_tag.
306 (c_parser_omp_atomic): Check for boolean increment or decrement
307 using C_BOOLEAN_TYPE_P.
308 * c-tree.h (C_BOOLEAN_TYPE_P): New.
309 (struct c_typespec): Add has_enum_type_specifier.
310 (struct c_declspecs): Add enum_type_specifier_ref_p.
311 (struct c_enum_contents): Add enum_type.
312 (start_enum, parser_xref_tag): Update prototypes.
313 * c-typeck.cc (composite_type): Allow for enumerated types
314 compatible with bool.
315 (common_type, comptypes_internal, perform_integral_promotions):
316 Use ENUM_UNDERLYING_TYPE.
317 (parser_build_binary_op, build_unary_op, convert_for_assignment)
318 (c_finish_return, c_start_switch, build_binary_op): Check for
319 boolean types using C_BOOLEAN_TYPE_P.
320
4e939ae1
GA
3212022-10-24 Jakub Jelinek <jakub@redhat.com>
322
323 PR c++/107358
324 * c-typeck.cc (build_binary_op): Pass operands before excess precision
325 promotions to scalar_to_vector call.
326
3272022-10-24 Arsen Arsenović <arsen@aarsen.me>
328
329 * c-decl.cc (finish_function): Ignore hosted when deciding
330 whether to implicitly return zero, but check noreturn.
331 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
332 requirements to just MAIN_NAME_P when hosted, or `int main'
333 otherwise.
334
47a6ae56
GA
3352022-10-20 Richard Biener <rguenther@suse.de>
336
337 PR c/107305
338 PR c/107306
339 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
340 the parsed IL and zap the body on error.
341
21de009f
GA
3422022-10-18 Joseph Myers <joseph@codesourcery.com>
343
344 PR c/107164
345 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
346 with previous declaration visible.
347
3482022-10-18 Joseph Myers <joseph@codesourcery.com>
349
350 PR c/36113
351 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
352 convert all to the type of the enumeration. pedwarn if no integer
353 type fits all enumerators and default to
354 widest_integer_literal_type_node in that case. Otherwise pedwarn
355 for type wider than intmax_t.
356 (build_enumerator): pedwarn for enumerators outside the range of
357 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
358 enumerators outside the range of int. On overflow, attempt to
359 find a wider type that can hold the value of the next enumerator.
360 Do not convert value to type determined with
361 c_common_type_for_size.
362
baeec7cc
GA
3632022-10-14 Jakub Jelinek <jakub@redhat.com>
364
365 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
366 double.
367
3682022-10-14 Joseph Myers <joseph@codesourcery.com>
369
370 * c-decl.cc (build_compound_literal): Add parameter scspecs.
371 Handle storage class specifiers.
372 * c-parser.cc (c_token_starts_compound_literal)
373 (c_parser_compound_literal_scspecs): New.
374 (c_parser_postfix_expression_after_paren_type): Add parameter
375 scspecs. Call pedwarn_c11 for use of storage class specifiers.
376 Update call to build_compound_literal.
377 (c_parser_cast_expression, c_parser_sizeof_expression)
378 (c_parser_alignof_expression): Handle storage class specifiers for
379 compound literals. Update calls to
380 c_parser_postfix_expression_after_paren_type.
381 (c_parser_postfix_expression): Update syntax comment.
382 * c-tree.h (build_compound_literal): Update prototype.
383 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
384 register compound literal.
385
9ff6c33e
GA
3862022-10-07 Qing Zhao <qing.zhao@oracle.com>
387
388 * c-decl.cc (flexible_array_member_type_p): New function.
389 (one_element_array_type_p): Likewise.
390 (zero_length_array_type_p): Likewise.
391 (add_flexible_array_elts_to_size): Call new utility
392 routine flexible_array_member_type_p.
393 (is_flexible_array_member_p): New function.
394 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
395
629d04d3
GA
3962022-10-06 Joseph Myers <joseph@codesourcery.com>
397
398 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
399 and not C2x.
400 (c_keyword_starts_typename, c_token_starts_declspecs)
401 (c_parser_declspecs, c_parser_objc_selector): Handle
402 RID_TYPEOF_UNQUAL.
403 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
404 Distinguish typeof for C2x from __typeof__ for all standard
405 versions and typeof before C2x.
406 * c-typeck.cc (build_function_call_vec): Use unqualified version
407 of non-void return type.
408 (build_unary_op): Use unqualified type for increment and
409 decrement.
410
4112022-10-06 Jakub Jelinek <jakub@redhat.com>
412
413 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
414 call for holds clause on assume construct.
415
4162022-10-06 Jakub Jelinek <jakub@redhat.com>
417
418 PR c++/106654
419 * c-parser.cc (handle_assume_attribute): New function.
420 (c_parser_declaration_or_fndef): Handle assume attribute.
421 (c_parser_attribute_arguments): Add assume_attr argument,
422 if true, parse first argument as conditional expression.
423 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
424 c_parser_attribute_arguments callers.
425 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
426 assume attribute.
427
85872a69
GA
4282022-10-04 Jakub Jelinek <jakub@redhat.com>
429
430 * c-lang.h (struct c_omp_declare_target_attr): New type.
431 (current_omp_declare_target_attribute): Change type from
432 int to vec<c_omp_declare_target_attr, va_gc> *.
433 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
434 If last pushed directive was begin declare target, use different
435 wording and simplify format strings for easier translations.
436 (c_parser_omp_clause_device_type): Uncomment
437 check_no_duplicate_clause call.
438 (c_parser_omp_declare_target): Adjust for the
439 current_omp_declare_target_attribute type change, push { -1 }.
440 Use error_at rather than warning_at for declare target with
441 only device_type clauses.
442 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
443 (c_parser_omp_begin): Add begin declare target support.
444 (c_parser_omp_end): Adjust for the
445 current_omp_declare_target_attribute type change, adjust
446 diagnostics wording and simplify format strings for easier
447 translations.
448 * c-decl.cc (current_omp_declare_target_attribute): Change type from
449 int to vec<c_omp_declare_target_attr, va_gc> *.
450 (c_decl_attributes): Adjust for the
451 current_omp_declare_target_attribute type change. If device_type
452 was present on begin declare target, add "omp declare target host"
453 and/or "omp declare target nohost" attributes.
454
bbdcdf5c
GA
4552022-09-29 Joseph Myers <joseph@codesourcery.com>
456
457 * c-decl.cc (handle_std_noreturn_attribute): New function.
458 (std_attribute_table): Add _Noreturn and noreturn.
459
1f16a020
GA
4602022-09-27 Jakub Jelinek <jakub@redhat.com>
461
462 * c-lang.h (current_omp_begin_assumes): Declare.
463 * c-parser.cc: Include bitmap.h.
464 (c_parser_omp_end_declare_target): Rename to ...
465 (c_parser_omp_end): ... this. Handle also end assumes.
466 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
467 c_parser_omp_assumes, c_parser_omp_assume): New functions.
468 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
469 without corresponding #pragma omp end assumes.
470 (c_parser_pragma): Use %s in may only be used at file scope
471 diagnostics to decrease number of translatable messages. Handle
472 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
473 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
474 for it rather than c_parser_omp_end_declare_target.
475 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
476 * c-decl.cc (current_omp_begin_assumes): Define.
477
28a61ecd
GA
4782022-09-24 Jakub Jelinek <jakub@redhat.com>
479
480 PR c/106981
481 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
482 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
483 t2 have different types.
484
279c6715
GA
4852022-09-22 David Malcolm <dmalcolm@redhat.com>
486
487 PR c/106830
488 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
489 (c_parser_cast_expression): Likewise.
490 (c_parser_alignof_expression): Likewise.
491 (c_parser_postfix_expression_after_paren_type): Likewise.
492 (c_parser_postfix_expression_after_primary): Likewise.
493 (c_parser_expression): Likewise.
494 (c_parser_omp_variable_list): Likewise.
495 (c_parser_transaction_expression): Likewise.
496 * c-tree.h (c_expr::set_error): Likewise.
497 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
498 (parser_build_unary_op): Likewise.
499 (parser_build_binary_op): Likewise.
500 (digest_init): Likewise.
501 (pop_init_level): Likewise.
502 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
503
43be56c4
GA
5042022-09-19 Marek Polacek <polacek@redhat.com>
505
506 PR c/106947
507 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
508 notes.
509
d0fc05e8
GA
5102022-09-15 Richard Biener <rguenther@suse.de>
511
512 * c-decl.cc (build_void_list_node): Remove.
513
ff822367
GA
5142022-09-14 Julian Brown <julian@codesourcery.com>
515
516 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
517 on error.
518
fe2a8ce9
GA
5192022-09-07 Joseph Myers <joseph@codesourcery.com>
520
521 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
522 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
523 for C2x spellings of keywords.
524 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
525
25aeb922
GA
5262022-09-06 Jakub Jelinek <jakub@redhat.com>
527
528 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
529 in omp_cur_iteration - 1 has integer_type_node type.
530
83f2f228
GA
5312022-09-03 Jakub Jelinek <jakub@redhat.com>
532
533 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
534 (c_parser_omp_clause_depend_sink): Renamed to ...
535 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
536 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
537 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
538 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
539 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
540 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
541 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
542 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
543 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
544 (c_parser_omp_clause_doacross): New function.
545 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
546 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
547 OMP_CLAUSE_DEPEND_SOURCE.
548 (c_parser_omp_for_loop): Don't diagnose here linear clause together
549 with ordered with argument.
550 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
551 for simd.
552 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
553 (c_parser_omp_ordered): Handle also doacross and adjust for it
554 diagnostic wording.
555 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
556 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
557
c64b0947
GA
5582022-09-02 David Malcolm <dmalcolm@redhat.com>
559
560 PR c/90885
561 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
562 (c_parser_expr_no_commas): Likewise.
563 (c_parser_conditional_expression): Likewise.
564 (c_parser_binary_expression): Clear m_decimal when popping the
565 stack.
566 (c_parser_unary_expression): Clear ret.m_decimal.
567 (c_parser_has_attribute_expression): Likewise for result.
568 (c_parser_predefined_identifier): Likewise for expr.
569 (c_parser_postfix_expression): Likewise for expr.
570 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
571 token.
572 * c-tree.h (c_expr::m_decimal): New bitfield.
573 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
574 (parser_build_binary_op): Call check_for_xor_used_as_pow.
575
bb0a1556
GA
5762022-09-01 Joseph Myers <joseph@codesourcery.com>
577
578 * c-decl.cc (grokparms): Handle () in a function declaration the
579 same as (void) for C2X.
580
542c60c4
GA
5812022-08-31 Joseph Myers <joseph@codesourcery.com>
582
583 * c-parser.cc (c_parser_label): Pass attributes to do_case.
584 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
585 c_add_case_label.
586
16f542d6
GA
5872022-08-26 Jakub Jelinek <jakub@redhat.com>
588
589 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
590
5d4389dc
GA
5912022-08-25 Marek Polacek <polacek@redhat.com>
592
593 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
594 Give a better diagnostic when converting to nullptr_t.
595 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
596 initialization.
597 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
598 (c_parser_postfix_expression): Handle RID_NULLPTR.
599 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
600 nullptr_node.
601 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
602 (build_conditional_expr): Handle the case when the second/third operand
603 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
604 (convert_for_assignment): Handle converting an expression of type
605 nullptr_t to pointer/bool.
606 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
607 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
608
6092022-08-25 Joseph Myers <joseph@codesourcery.com>
610
611 * c-decl.cc (start_decl): Do not diagnose initialization of
612 variable-sized objects here.
613 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
614 callers changed.
615 (c_parser_initializer): Diagnose initialization of variable-sized
616 objects other than with braced initializer.
617 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
618 braces and update diagnostic text. Diagnose initialization of
619 variable-sized objects with nonempty braces.
620 * c-typeck.cc (digest_init): Update diagnostic for initialization
621 of variable-sized objects.
622 (really_start_incremental_init, set_designator)
623 (process_init_element): Update comments.
624 (pop_init_level): Allow scalar empty initializers.
625
0342f034
GA
6262022-08-17 Tobias Burnus <tobias@codesourcery.com>
627 Chung-Lin Tang <cltang@codesourcery.com>
628
629 PR c++/104493
630 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
631 instead of removed langhook.
632 * c-typeck.cc (c_finish_omp_clauses): Likewise.
633
5cd525f0
GA
6342022-08-11 Marek Polacek <polacek@redhat.com>
635
636 PR middle-end/102633
637 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
638 Call suppress_warning.
639 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
640 (c_parser_omp_declare_reduction): Pass omp_priv down to
641 c_parser_initializer.
642
5f17badb
GA
6432022-08-08 Tom Honermann <tom@honermann.net>
644
645 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
646 of CPP_UTF8STRING when char8_t support is enabled.
647 * c-typeck.cc (digest_init): Allow initialization of an array
648 of character type by a string literal with type array of
649 char8_t.
650
32510382
GA
6512022-08-01 David Malcolm <dmalcolm@redhat.com>
652
653 * c-typeck.cc (build_c_cast): Quote names of address spaces in
654 diagnostics.
655 (convert_for_assignment): Add a note to address space mismatch
656 diagnostics, specifying the expected and actual types.
657
b53ebbc5
GA
6582022-07-10 Lewis Hyatt <lhyatt@gmail.com>
659
660 PR preprocessor/97498
661 * c-parser.cc (c_parser_pragma): Set input_location to the
662 location of the pragma, rather than the start of the line.
663
8467574d
GA
6642022-07-04 Tobias Burnus <tobias@codesourcery.com>
665 Chung-Lin Tang <cltang@codesourcery.com>
666 Thomas Schwinge <thomas@codesourcery.com>
667
668 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
669 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
670 OMP_REQUIRES_TARGET_USED.
671 (c_parser_omp_requires): Remove sorry.
672
ed974488
GA
6732022-07-01 Tobias Burnus <tobias@codesourcery.com>
674
675 * c-parser.cc (c_parser_omp_target_enter_data,
676 c_parser_omp_target_exit_data): Accept tofrom
677 map-type modifier but use 'to' / 'from' internally.
678
bc7e9f76
GA
6792022-06-16 David Malcolm <dmalcolm@redhat.com>
680
681 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
682 group the warning with any note.
683 (warn_about_goto): Likewise to group error or warning with note.
684 Bail out if the warning wasn't emitted, to avoid emitting orphan
685 notes.
686 (lookup_label_for_goto): Add auto_diagnostic_group to
687 group the error with the note.
688 (check_earlier_gotos): Likewise.
689 (c_check_switch_jump_warnings): Likewise for any error/warning.
690 Conditionalize emission of the notes.
691 (diagnose_uninitialized_cst_member): Likewise for warning,
692 conditionalizing emission of the note.
693 (grokdeclarator): Add auto_diagnostic_group to group the "array
694 type has incomplete element type" error with any note.
695 (parser_xref_tag): Add auto_diagnostic_group to group warnings
696 with their notes. Conditionalize emission of notes.
697 (start_struct): Add auto_diagnostic_group to group the
698 "redefinition of" errors with any note.
699 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
700 (check_for_loop_decls): Likewise for pre-C99 error.
701
445ba599
GA
7022022-06-07 Jakub Jelinek <jakub@redhat.com>
703
704 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
705 style linear clause modifiers. Set
706 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
707 old style modifiers are used.
708 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
709 with val modifier on simd or for if the old style modifiers are
710 used.
711
b168441c
GA
7122022-06-02 David Malcolm <dmalcolm@redhat.com>
713
714 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
715 (c_get_sarif_source_language): New.
716 * c-tree.h (c_get_sarif_source_language): New decl.
717
820ead45
GA
7182022-05-31 Jason Merrill <jason@redhat.com>
719
720 * Make-lang.in (c.tags): Look at *.cc.
721
7222022-05-31 Jakub Jelinek <jakub@redhat.com>
723
724 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
725 clauses.
726
37b3b5da
GA
7272022-05-28 Jakub Jelinek <jakub@redhat.com>
728
729 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
730 seen first, use "%<to%>" or "%<enter%>" depending on
731 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
732 "%<to%> or %<enter%>" wording.
733
d9176e64
GA
7342022-05-27 Jakub Jelinek <jakub@redhat.com>
735
736 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
737 (c_parser_omp_all_clauses): For to clause on declare target, use
738 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
739 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
740 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
741 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
742 OMP_CLAUSE_TO_DECLARE.
743 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
744 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
745 name in diagnostics instead of
746 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
747
3dff965c
GA
7482022-05-25 Jakub Jelinek <jakub@redhat.com>
749
750 PR c/91134
751 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
752 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
753 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
754 diagnostic and fixit hint if DATUM has pointer type.
755 * c-parser.cc (c_parser_postfix_expression,
756 c_parser_omp_variable_list): Adjust build_component_ref callers.
757 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
758 Likewise.
759
768f49a2
GA
7602022-05-24 Jakub Jelinek <jakub@redhat.com>
761
762 PR c/105378
763 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
764
1cda629f
GA
7652022-05-18 Marek Polacek <polacek@redhat.com>
766
767 PR c/105131
768 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
769 mismatches.
770 * c-tree.h (comptypes_check_enum_int): Declare.
771 * c-typeck.cc (comptypes): No longer static.
772
3d9439b1
GA
7732022-05-17 Marek Polacek <polacek@redhat.com>
774
775 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
776 its value.
777
7782022-05-17 Jakub Jelinek <jakub@redhat.com>
779
780 * c-parser.cc (c_parser_omp_clause_depend): Parse
781 inoutset depend-kind.
782 (c_parser_omp_depobj): Likewise.
783
702bd11f
GA
7842022-05-16 Martin Liska <mliska@suse.cz>
785
786 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
787
49ace834
GA
7882022-05-12 Jakub Jelinek <jakub@redhat.com>
789
790 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
791 if flag_openmp.
792 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
793 in postfix expressions.
794 (c_parser_omp_variable_list): Handle omp_all_memory in depend
795 clause.
796 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
797 keyword in depend clause as null_pointer_node, diagnose invalid
798 uses.
799
bd022ff9
GA
8002022-05-09 Martin Liska <mliska@suse.cz>
801
802 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
803 macros.
804 (c_parser_binary_expression): Likewise.
805
a1947c92
GA
8062022-05-07 Marek Polacek <polacek@redhat.com>
807
808 PR c++/101833
809 PR c++/47634
810 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
811
405eda0d
GA
8122022-04-08 Jakub Jelinek <jakub@redhat.com>
813
814 PR c/105149
815 * c-typeck.cc (c_build_va_arg): Reject function types.
816
a2287813
GA
8172022-03-22 Marek Polacek <polacek@redhat.com>
818
819 PR c/82283
820 PR c/84685
821 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
822 (start_init): Set it.
823 (finish_init): Restore constructor_designated.
824 (push_init_level): Set constructor_designated to the value of
825 constructor_designated in the upper constructor_stack.
826
57eeedda
GA
8272022-03-12 Thomas Schwinge <thomas@codesourcery.com>
828
829 PR other/65095
830 * c-typeck.cc (handle_omp_array_sections_1)
831 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
832 instead of 'c_omp_map_clause_name'.
833
8cc4f9cd
GA
8342022-03-09 Joseph Myers <joseph@codesourcery.com>
835
836 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
837 differently from earlier standards for unprototyped function type
838 compatibility.
839
8402022-03-09 Jakub Jelinek <jakub@redhat.com>
841
842 PR c/104711
843 * c-fold.cc (c_fully_fold_internal): Don't emit
844 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
845 * c-typeck.cc (build_binary_op): Likewise.
846
e6533e2e
GA
8472022-03-07 Jakub Jelinek <jakub@redhat.com>
848
849 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
850 literal.
851
4bf3bac1
GA
8522022-02-23 Richard Biener <rguenther@suse.de>
853
854 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
855 SSA names without definition.
856 (c_parser_gimple_declaration): Handle pointer typed SSA names.
857
0bdb0498
GA
8582022-02-17 Jakub Jelinek <jakub@redhat.com>
859
860 PR c/104532
861 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
862 convert_lvalue_to_rvalue and build_indirect_ref instead of
863 build_simple_mem_ref.
864
e8d68f0a
GA
8652022-02-11 Richard Biener <rguenther@suse.de>
866
867 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
868 VEC_COND_EXPRs.
869
a645583d
GA
8702022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
871
872 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
873 clause.
874 (c_parser_omp_variable_list): Handle array sections.
875 (c_parser_omp_clause_has_device_addr): Added.
876 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
877 case.
878 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
879 OMP_CLAUSE_MASK.
880 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
881 (c_finish_omp_clauses): Handle array sections.
882
3adf509f
GA
8832022-02-09 Jakub Jelinek <jakub@redhat.com>
884
885 PR c/104427
886 * c-parser.cc (c_parser_postfix_expression)
887 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
888 instead of build1_loc to build PAREN_EXPR.
889 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
890 * c-fold.cc (c_fully_fold_internal): Likewise.
891
fc829782
GA
8922022-01-17 Martin Liska <mliska@suse.cz>
893
894 * Make-lang.in: Rename .c names to .cc.
895 * c-convert.cc: Likewise.
896 * c-decl.cc (struct lang_identifier): Likewise.
897 (pop_scope): Likewise.
898 (finish_decl): Likewise.
899 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
900 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
901 * c-parser.h (GCC_C_PARSER_H): Likewise.
902 * c-tree.h (c_keyword_starts_typename): Likewise.
903 (finish_declspecs): Likewise.
904 (c_get_alias_set): Likewise.
905 (enum c_oracle_request): Likewise.
906 (tag_exists_p): Likewise.
907 (set_c_expr_source_range): Likewise.
908 * c-typeck.cc (c_common_type): Likewise.
909 (c_finish_omp_clauses): Likewise.
910 * config-lang.in: Likewise.
911
9122022-01-17 Martin Liska <mliska@suse.cz>
913
914 * c-aux-info.c: Moved to...
915 * c-aux-info.cc: ...here.
916 * c-convert.c: Moved to...
917 * c-convert.cc: ...here.
918 * c-decl.c: Moved to...
919 * c-decl.cc: ...here.
920 * c-errors.c: Moved to...
921 * c-errors.cc: ...here.
922 * c-fold.c: Moved to...
923 * c-fold.cc: ...here.
924 * c-lang.c: Moved to...
925 * c-lang.cc: ...here.
926 * c-objc-common.c: Moved to...
927 * c-objc-common.cc: ...here.
928 * c-parser.c: Moved to...
929 * c-parser.cc: ...here.
930 * c-typeck.c: Moved to...
931 * c-typeck.cc: ...here.
932 * gccspec.c: Moved to...
933 * gccspec.cc: ...here.
934 * gimple-parser.c: Moved to...
935 * gimple-parser.cc: ...here.
936
9372022-01-17 Andrew Stubbs <ams@codesourcery.com>
938
939 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
940
617db51d
GA
9412022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
942
943 PR c++/103705
944 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
945 outer node for ARRAY_REFs.
946
62eb5308
GA
9472022-01-01 Jakub Jelinek <jakub@redhat.com>
948
949 PR objc/103639
950 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
951 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
952
2554e2da
GA
9532021-12-17 Marek Polacek <polacek@redhat.com>
954
955 PR c/103649
956 * c-decl.c (c_warn_unused_attributes): Don't warn for
957 attribute_ignored_p.
958 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
959 arguments when the attribute is ignored.
960
9c6586bc
GA
9612021-12-14 Jakub Jelinek <jakub@redhat.com>
962
963 PR c/103587
964 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
965 consume the pragma and silently skip to the pragma eol.
966
c8dcf64b
GA
9672021-12-12 Jonathan Wakely <jwakely@redhat.com>
968
969 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
970 * c-parser.c: Likewise.
971
4b4839e3
GA
9722021-12-09 Jakub Jelinek <jakub@redhat.com>
973
974 PR pch/71934
975 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
976 to resort_data.new_value.
977
641ff219
GA
9782021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
979
980 * c-parser.c (struct omp_dim): New struct type for use inside
981 c_parser_omp_variable_list.
982 (c_parser_omp_variable_list): Allow multiple levels of array and
983 component accesses in array section base-pointer expression.
984 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
985 c_parser_omp_var_list_parens.
986 (c_parser_omp_clause_from): Likewise.
987 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
988 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
989 POINTER_PLUS_EXPR.
990 (c_finish_omp_clauses): Extend allowed ranged of expressions
991 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
992
9932021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
994
995 PR middle-end/92120
996 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
997 call to c_parser_omp_variable_list to 'true'.
998 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
999 array base handling.
1000 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1001
c177e806
GA
10022021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1003
1004 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1005 orphan loop" checking.
1006
10072021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1008 Thomas Schwinge <thomas@codesourcery.com>
1009
1010 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1011 OpenACC gang reductions.
1012
10132021-11-30 Richard Biener <rguenther@suse.de>
1014
1015 * gimple-parser.c (c_parser_gimple_postfix_expression):
1016 avoid unreachable code after break.
1017
87cd82c8
GA
10182021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1019
1020 PR other/103021
1021 * Make-lang.in: Use ETAGS variable in TAGS target.
1022
10232021-11-29 Richard Biener <rguenther@suse.de>
1024
1025 * c-typeck.c (c_tree_equal): Remove unreachable return.
1026 * c-parser.c (get_matching_symbol): Likewise.
1027
e1d43592
GA
10282021-11-23 Jakub Jelinek <jakub@redhat.com>
1029
1030 * c-typeck.c (c_clone_omp_udr): Don't initialize
1031 id.transform_lang_insert_block.
1032
9c077398
GA
10332021-11-19 Martin Sebor <msebor@redhat.com>
1034
1035 PR c++/33925
1036 PR c/102867
1037 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1038 code resulting from macro expansion.
1039
10402021-11-19 Martin Liska <mliska@suse.cz>
1041
1042 Revert:
1043 2021-11-19 Martin Liska <mliska@suse.cz>
1044
1045 * c-parser.c (add_debug_begin_stmt): Use option directly.
1046
483092d3
GA
10472021-11-18 Matthias Kretz <m.kretz@gsi.de>
1048
1049 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1050 * c-parser.c (c_parser_postfix_expression): Likewise.
1051
10522021-11-18 Martin Liska <mliska@suse.cz>
1053
1054 * c-parser.c (add_debug_begin_stmt): Use option directly.
1055
280d2838
GA
10562021-11-17 Martin Sebor <msebor@redhat.com>
1057
1058 PR c/101702
1059 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1060 bounds before deciding if they're constant.
1061
e2b57363
GA
10622021-11-15 Jakub Jelinek <jakub@redhat.com>
1063
1064 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1065 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1066
b39265d4
GA
10672021-11-11 Jakub Jelinek <jakub@redhat.com>
1068
1069 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1070 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1071 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1072 OMP_CLAUSE_NUM_TEAMS_EXPR.
1073 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1074 combined target teams even lower-bound expression.
1075
10762021-11-11 Richard Biener <rguenther@suse.de>
1077
1078 * gimple-parser.c: Shuffle bitmap.h include.
1079
18ae471f
GA
10802021-11-03 Joseph Myers <joseph@codesourcery.com>
1081
1082 PR c/103031
1083 * c-convert.c (c_convert): New function, based on convert.
1084 (convert): Make into wrapper of c_convert.
1085 (convert_init): New function.
1086 * c-typeck.c (enum impl_conv): Add ic_init_const.
1087 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1088 new argument to convert_and_check call.
1089 (digest_init): Pass ic_init_const to convert_for_assignment for
1090 initializers required to be constant.
1091
b4df2dd3
GA
10922021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1093
1094 * c-tree.h (c_simulate_record_decl): Declare.
1095 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1096 * c-decl.c (c_simulate_record_decl): New function.
1097
c2bd5d8a
GA
10982021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1099
1100 PR other/102663
1101 * Make-lang.in: Add dummy c.install-dvi target.
1102
93d183a5
GA
11032021-10-15 Richard Biener <rguenther@suse.de>
1104
1105 PR c/102763
1106 * gimple-parser.c
1107 (c_parser_gimple_postfix_expression_after_primary): Check
1108 for a pointer do be dereferenced by ->.
1109
5d5885c9
GA
11102021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1111
1112 * c-parser.c (c_finish_omp_declare_variant): Change call from
1113 c_omp_check_context_selector to omp_check_context_selector. Change
1114 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1115
c9db17b8
GA
11162021-10-09 Jakub Jelinek <jakub@redhat.com>
1117
1118 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1119 (c_parser_omp_scan_loop_body): Use it.
1120 (c_parser_omp_sections_scope): Likewise.
1121
50e20ee6
GA
11222021-10-07 Richard Biener <rguenther@suse.de>
1123
1124 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1125
bb6194e0
GA
11262021-10-05 Richard Biener <rguenther@suse.de>
1127
1128 PR c/102605
1129 * gimple-parser.c (c_parser_gimple_postfix_expression):
1130 Accept more address _Literals.
1131
da9c5f78
GA
11322021-10-04 Marek Polacek <polacek@redhat.com>
1133
1134 PR c++/97573
1135 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1136
9d116bcc
GA
11372021-10-01 Martin Sebor <msebor@redhat.com>
1138
1139 PR c/102103
1140 * c-typeck.c (maybe_warn_for_null_address): New function.
1141 (build_binary_op): Call it.
1142
11432021-10-01 Jakub Jelinek <jakub@redhat.com>
1144 Richard Biener <rguenther@suse.de>
1145
1146 PR sanitizer/102515
1147 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1148 for division even for SANITIZE_SI_OVERFLOW.
1149
11502021-10-01 Jakub Jelinek <jakub@redhat.com>
1151
1152 * c-parser.c (c_parser_omp_clause_order): Set
1153 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1154
fd133479
GA
11552021-09-28 Andrew Pinski <apinski@marvell.com>
1156
1157 PR c/32122
1158 * c-parser.c (c_parser_statement_after_labels): Pass
1159 the c_expr instead of the tree to c_finish_goto_ptr.
1160 * c-typeck.c (c_finish_goto_ptr): Change the second
1161 argument type to c_expr.
1162 * c-tree.h (c_finish_goto_ptr): Likewise.
1163 Error out if the expression was not of a pointer type.
1164
e4777439
GA
11652021-09-22 Jakub Jelinek <jakub@redhat.com>
1166
1167 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1168 modifiers.
1169
cf74e7b5
GA
11702021-09-18 Jakub Jelinek <jakub@redhat.com>
1171
1172 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1173 and reproducible modifiers.
1174 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1175
11762021-09-18 Jakub Jelinek <jakub@redhat.com>
1177
1178 * c-parser.c (c_parser_omp_clause_default): Handle private and
1179 firstprivate arguments, adjust diagnostics on unknown argument.
1180
0a4cb439
GA
11812021-09-17 Jakub Jelinek <jakub@redhat.com>
1182
1183 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1184 is true.
1185
a26206ec
GA
11862021-09-10 Jakub Jelinek <jakub@redhat.com>
1187
1188 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1189 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1190 don't call build_conditional_expr, instead build a COND_EXPR directly.
1191 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1192 if omp_atomic_lhs even in more cases for >, < or ==.
1193 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1194 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1195 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1196 * c-typeck.c (build_binary_op): For flag_openmp only handle
1197 MIN_EXPR/MAX_EXPR.
1198
b2748138
GA
11992021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1200
1201 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1202 directive.
1203
e11c6046
GA
12042021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1205
1206 * c-decl.c (enum deprecated_states): Add unavailable state.
1207 (merge_decls): Copy unavailability.
1208 (quals_from_declspecs): Handle unavailable case.
1209 (start_decl): Amend the logic handling suppression of nested
1210 deprecation states to include unavailability.
1211 (smallest_type_quals_location): Amend comment.
1212 (grokdeclarator): Handle the unavailable deprecation state.
1213 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1214 * c-tree.h (struct c_declspecs): Add unavailable_p.
1215 * c-typeck.c (build_component_ref): Handle unavailability.
1216 (build_external_ref): Likewise.
1217
12182021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1219 Joseph Myers <joseph@codesourcery.com>
1220
1221 PR c/79412
1222 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1223 types of both (non-function) decls as error_mark_node, so that the
1224 middle-end can see the code is malformed.
1225 (free_attr_access_data): Don't process if the type has been set to
1226 error_mark_node.
1227
6d51ee43
GA
12282021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1229
1230 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1231 and 'ancestor' in 'target device' clauses.
1232
38b19c5b
GA
12332021-08-23 Jakub Jelinek <jakub@redhat.com>
1234
1235 * c-parser.c (c_parser_omp_clause_num_tasks,
1236 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1237
5b2876f9
GA
12382021-08-22 Martin Uecker <muecker@gwdg.de>
1239
1240 PR c/98397
1241 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1242 for pointers to arrays with qualifiers.
1243 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1244 to arrays when the other pointer is a void pointer. Update warnings.
1245 (convert_for_assignment): Update warnings for C2X when converting from
1246 void* with qualifiers to a pointer to array with the same qualifiers.
1247
7c9e1645
GA
12482021-08-20 Jakub Jelinek <jakub@redhat.com>
1249
1250 * c-parser.c (c_parser_omp_error): New function.
1251 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1252
12532021-08-20 Jakub Jelinek <jakub@redhat.com>
1254
1255 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1256 comma at the end of list.
1257 (c_parser_omp_requires): Likewise.
1258
b57fba5e
GA
12592021-08-19 Jakub Jelinek <jakub@redhat.com>
1260
1261 * c-parser.c (c_parser_omp_requires): Don't call
1262 c_parser_peek_2nd_token and optionally consume token if current
1263 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1264
6e529985
GA
12652021-08-18 Jakub Jelinek <jakub@redhat.com>
1266
1267 * c-parser.c (c_parser_omp_nothing): New function.
1268 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1269
12702021-08-18 Jakub Jelinek <jakub@redhat.com>
1271
1272 * c-parser.c (c_parser_statement_after_labels): Add restart label
1273 near the start of the function. If c_parser_pragma returns false,
1274 goto restart.
1275 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1276 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1277 return what c_parser_omp_declare returned. Return true instead of
1278 false after emitting errors that the directive is not allowed in
1279 pragma_stmt context.
1280 (c_parser_omp_ordered): Return true instead of
1281 false after emitting errors that the directive is not allowed in
1282 pragma_stmt context.
1283 (c_parser_omp_target_update): Likewise.
1284 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1285 Change return type from tree to bool, return false if the
1286 directive should be ignored in pragma_stmt contexts.
1287 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1288 return their result directly.
1289 (c_parser_omp_cancellation_point): Change return type from void to
1290 bool, return false if the directive should be ignored in pragma_stmt
1291 contexts.
1292 (c_parser_omp_declare): Likewise.
1293
2d14d64b
GA
12942021-08-17 Jakub Jelinek <jakub@redhat.com>
1295
1296 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1297 (c_parser_omp_scope): New function.
1298 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1299
72be20e2
GA
13002021-08-12 Jakub Jelinek <jakub@redhat.com>
1301
1302 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1303 (c_parser_omp_clause_filter): New function.
1304 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1305 (OMP_MASKED_CLAUSE_MASK): Define.
1306 (c_parser_omp_masked): New function.
1307 (c_parser_omp_parallel): Handle parallel masked.
1308 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1309 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1310
13112021-08-12 Martin Uecker <muecker@gwdg.de>
1312
1313 PR c/101838
1314 PR c/29970
1315 * c-typeck.c (c_expr_sizeof_type): Evaluate
1316 size expressions for structs of variable size.
1317
13182021-08-12 Tobias Burnus <tobias@codesourcery.com>
1319
1320 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1321 'primary' as alias for 'master'.
1322
3ae564ea
GA
13232021-08-10 Martin Uecker <muecker@gwdg.de>
1324
1325 PR c/29970
1326 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1327 size expressions for structs of variable size.
1328
f92f4778
GA
13292021-08-06 Tamar Christina <tamar.christina@arm.com>
1330
1331 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1332 * c-tree.h (c_simulate_enum_decl): Likewise.
1333
13342021-08-06 Martin Sebor <msebor@redhat.com>
1335
1336 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1337 vec arguments to by-reference.
1338 (c_finish_omp_declare_simd): Same.
1339 (c_parser_compound_statement_nostart): Same.
1340 (c_parser_for_statement): Same.
1341 (c_parser_objc_methodprotolist): Same.
1342 (c_parser_oacc_routine): Same.
1343 (c_parser_omp_for_loop): Same.
1344 (c_parser_omp_declare_simd): Same.
1345
419c6c68
GA
13462021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1347 Joseph Myers <joseph@codesourcery.com>
1348 Cesar Philippidis <cesar@codesourcery.com>
1349
1350 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1351 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1352 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1353 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1354
92d45509
GA
13552021-07-20 Martin Sebor <msebor@redhat.com>
1356
1357 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1358 by-const-reference.
1359 * c-typeck.c (c_build_function_call_vec): Same.
1360
d97d71a1
GA
13612021-07-15 Martin Sebor <msebor@redhat.com>
1362
1363 PR c/101289
1364 PR c/97548
1365 * c-decl.c (get_parm_array_spec): Strip nops.
1366
6fba0eea
GA
13672021-07-06 Martin Sebor <msebor@redhat.com>
1368
1369 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1370
7a60a6e8
GA
13712021-07-02 Jakub Jelinek <jakub@redhat.com>
1372
1373 PR c/101297
1374 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1375 appears before a CPP_NAME.
1376
90708f87
GA
13772021-06-25 Martin Sebor <msebor@redhat.com>
1378
1379 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1380 warning_suppressed_p, suppress_warning, and copy_no_warning.
1381 (diagnose_mismatched_decls): Same.
1382 (duplicate_decls): Same.
1383 (grokdeclarator): Same.
1384 (finish_function): Same.
1385 (c_write_global_declarations_1): Same.
1386 * c-fold.c (c_fully_fold_internal): Same.
1387 * c-parser.c (c_parser_expr_no_commas): Same.
1388 (c_parser_postfix_expression): Same.
1389 * c-typeck.c (array_to_pointer_conversion): Same.
1390 (function_to_pointer_conversion): Same.
1391 (default_function_array_conversion): Same.
1392 (convert_lvalue_to_rvalue): Same.
1393 (default_conversion): Same.
1394 (build_indirect_ref): Same.
1395 (build_function_call_vec): Same.
1396 (build_atomic_assign): Same.
1397 (build_unary_op): Same.
1398 (c_finish_return): Same.
1399 (emit_side_effect_warnings): Same.
1400 (c_finish_stmt_expr): Same.
1401 (c_omp_clause_copy_ctor): Same.
1402
9aa8327e
GA
14032021-06-24 Jakub Jelinek <jakub@redhat.com>
1404
1405 PR c/101176
1406 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1407 the result.
1408
14092021-06-24 Jakub Jelinek <jakub@redhat.com>
1410
1411 PR c/101171
1412 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1413 error_mark_node.
1414
14152021-06-24 Jakub Jelinek <jakub@redhat.com>
1416
1417 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1418 C_ORT_OMP for clauses on target construct.
1419 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1420 (c_parser_omp_target): For non-combined target add
1421 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1422 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1423 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1424 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1425 never present on C_ORT_*DECLARE_SIMD.
1426 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1427 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1428 corresponding map clauses.
1429
2f080224
GA
14302021-06-21 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR inline-asm/100785
1433 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1434 bit-fields addressable.
1435
ede6c356
GA
14362021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1437
1438 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1439 similar.
1440
8dc48181
GA
14412021-06-14 Tobias Burnus <tobias@codesourcery.com>
1442
1443 PR c/100913
1444 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1445 var in the error case.
1446
438aac59
GA
14472021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1448
1449 PR c/100920
1450 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1451 spot built-in functions.
1452
7d6987e9
GA
14532021-06-06 Jakub Jelinek <jakub@redhat.com>
1454
1455 PR c/100902
1456 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1457 even when target is combined with other constructs.
1458
14592021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1460
1461 PR c/100920
1462 * c-decl.c (finish_struct): Fix thinko in previous change.
1463 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1464 assignment and initialization for storage order purposes if the
1465 RHS is a call to a DECL_IS_MALLOC function.
1466
600f90cb
GA
14672021-06-04 Martin Sebor <msebor@redhat.com>
1468
1469 PR c/100783
1470 * c-objc-common.c (print_type): Handle erroneous types.
1471
440c8a0a
GA
14722021-06-03 Jakub Jelinek <jakub@redhat.com>
1473
1474 PR c++/100859
1475 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1476 after depend only cases.
1477
ee682192
GA
14782021-05-31 Richard Biener <rguenther@suse.de>
1479
1480 PR c++/88601
1481 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1482 * c-parser.c (c_parser_postfix_expression): Likewise.
1483
48166757
GA
14842021-05-28 Richard Biener <rguenther@suse.de>
1485
1486 PR c/100803
1487 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1488 invalid if conditions.
1489
14902021-05-28 Jakub Jelinek <jakub@redhat.com>
1491
1492 PR middle-end/99928
1493 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1494 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1495 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1496 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1497 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1498 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1499 if present in map_head, map_field_head or map_firstprivate_head
1500 bitmaps.
1501
15022021-05-28 Tobias Burnus <tobias@codesourcery.com>
1503
1504 * c-parser.c (c_parser_omp_clause_affinity): New.
1505 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1506 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1507 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1508 c_finish_omp_clauses): Likewise.
1509
01c59ef2
GA
15102021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1511
1512 PR c/100653
1513 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1514 field with a differing scalar storage order.
1515
2832d51b
GA
15162021-05-21 Jakub Jelinek <jakub@redhat.com>
1517
1518 PR middle-end/99928
1519 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1520 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1521 if a decl is mentioned both in map clause and in such firstprivate
1522 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1523
65f32e5d
GA
15242021-05-19 Jakub Jelinek <jakub@redhat.com>
1525
1526 PR middle-end/99928
1527 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1528 master when combined with taskloop.
1529 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1530 parallel master when not combined with taskloop.
1531
a8daf9a1
GA
15322021-05-18 Richard Biener <rguenther@suse.de>
1533
1534 PR c/100522
1535 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1536 Diagnose calls to non-functions.
1537 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1538
a7ffc1ef
GA
15392021-05-17 Richard Biener <rguenther@suse.de>
1540
1541 PR c/100625
1542 * gimple-parser.c (c_parser_gimple_label): Avoid building
1543 a GIMPLE label with NULL label decl.
1544
f9af11c7
GA
15452021-05-13 Martin Sebor <msebor@redhat.com>
1546
1547 PR c/100550
1548 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1549
0ff3a0f2
GA
15502021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1551
1552 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1553 'close'.
1554
aa891c56
GA
15552021-05-10 Martin Liska <mliska@suse.cz>
1556
1557 * c-aux-info.c (affix_data_type): Use startswith
1558 function instead of strncmp.
1559 * c-typeck.c (build_function_call_vec): Likewise.
1560 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1561
62d87a32
GA
15622021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1563
1564 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1565 on the address of a pointer field in a record with reverse SSO.
1566
99e8df7a
GA
15672021-05-04 Tobias Burnus <tobias@codesourcery.com>
1568
1569 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1570 for || and && reductions.
1571
3c8e539d
GA
15722021-04-29 Joseph Myers <joseph@codesourcery.com>
1573
1574 * c-typeck.c (function_types_compatible_p): For C2X, treat
1575 unprototyped function as compatible with non-variadic prototyped
1576 function even if some argument types are changed by the default
1577 argument promotions.
1578
ee351f7f
GA
15792021-04-15 Martin Sebor <msebor@redhat.com>
1580
1581 PR c/99420
1582 PR c/99972
1583 * c-decl.c (pushdecl): Always propagate type attribute.
1584
15852021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1586
1587 PR c/98852
1588 * c-typeck.c (c_common_type): Do not drop attributes that
1589 affect type identity.
1590
1d54b138
GA
15912021-04-10 Jakub Jelinek <jakub@redhat.com>
1592
1593 PR c/99990
1594 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1595 error_mark_node.
1596
4493b1c1
GA
15972021-03-25 Jakub Jelinek <jakub@redhat.com>
1598
1599 PR c++/99565
1600 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1601 to operand_equal_p.
1602
5f256a70
GA
16032021-03-19 Jakub Jelinek <jakub@redhat.com>
1604
1605 PR c/99588
1606 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1607 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1608 if found.
1609 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1610 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1611 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1612
3c5b6d24
GA
16132021-03-15 Tobias Burnus <tobias@codesourcery.com>
1614
1615 PR c++/99509
1616 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1617 ensure that the varpool node is marked as offloadable.
1618
ceae9533
GA
16192021-03-05 Tobias Burnus <tobias@codesourcery.com>
1620
1621 PR c/99137
1622 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1623
4028d01a
GA
16242021-02-24 Martin Sebor <msebor@redhat.com>
1625
1626 PR middle-end/97172
1627 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1628
bf81237e
GA
16292021-02-18 Jakub Jelinek <jakub@redhat.com>
1630
1631 PR c/99136
1632 * c-typeck.c (c_finish_return): Don't wrap retval into
1633 EXCESS_PRECISION_EXPR in functions that return void.
1634
0c5cdb31
GA
16352021-02-11 Marek Polacek <polacek@redhat.com>
1636
1637 * c-parser.c (c_parser_if_statement): Use vec_free.
1638
a19dd5e6
GA
16392021-02-04 Martin Sebor <msebor@redhat.com>
1640
1641 PR c/97882
1642 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1643 (diagnose_mismatched_decls): Same.
1644 (start_function): Introduce temporaries for better readability.
1645 * c-typeck.c (comptypes_internal): Only consider complete enum
1646 types in comparisons with integers.
1647
f7884fb1
GA
16482021-02-01 Martin Sebor <msebor@redhat.com>
1649
1650 PR middle-end/97172
1651 * c-decl.c (free_attr_access_data): New function.
1652 (c_parse_final_cleanups): Call free_attr_access_data.
1653
59cf67d1
GA
16542021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1655
1656 * c-parser.c (c_parser_omp_clause_detach): New.
1657 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1658 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1659 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1660 clause. Prevent use of detach with mergeable and overriding the
1661 data sharing mode of the event handle.
1662
2f7f0d32
GA
16632021-01-15 Jakub Jelinek <jakub@redhat.com>
1664
1665 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1666 unqualified element type and then call c_build_qualified_type on the
1667 ARRAY_TYPE.
1668
7d187e4f
GA
16692021-01-07 Richard Biener <rguenther@suse.de>
1670
1671 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1672 reallocate loop array if it is too small.
1673
eefe499f
GA
16742020-12-16 Martin Uecker <muecker@gwdg.de>
1675
1676 PR c/98047
1677 * c-typeck.c (build_modify_expr): Drop qualifiers.
1678
16792020-12-16 Martin Uecker <muecker@gwdg.de>
1680
1681 PR c/98260
1682 * c-parser.c (c_parser_expression): Look into
1683 nop expression when marking expressions as read.
1684
d52945ce
GA
16852020-12-14 Martin Liska <mliska@suse.cz>
1686
1687 PR sanitizer/98204
1688 * c-typeck.c (pointer_diff): Do not emit a top-level
1689 sanitization.
1690 (build_binary_op): Likewise.
1691
ca2bd949
GA
16922020-12-09 Tobias Burnus <tobias@codesourcery.com>
1693
1694 * c-parser.c (c_parser_omp_allocate): New.
1695 (c_parser_omp_construct): Call it.
1696
16972020-12-09 Richard Biener <rguenther@suse.de>
1698
1699 PR c/98200
1700 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1701 early on error.
1702
bc8a7013
GA
17032020-12-07 Martin Uecker <muecker@gwdg.de>
1704
1705 PR c/97981
1706 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1707 that drops qualifiers to the end of the function.
1708
d48df6f2
GA
17092020-11-26 Martin Uecker <muecker@gwdg.de>
1710
1711 PR c/65455
1712 PR c/92935
1713 * c-parser.c (c_parser_declaration_or_fndef): Remove
1714 redundant code to drop qualifiers of _Atomic types for __auto_type.
1715 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1716 types for __typeof__.
1717
1e2c9a27
GA
17182020-11-24 Jakub Jelinek <jakub@redhat.com>
1719
1720 PR c/97958
1721 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1722 expressions, use make_node instead of build2 to avoid checking build2
1723 performs.
1724
8e6198d0
GA
17252020-11-23 Joseph Myers <joseph@codesourcery.com>
1726
1727 PR c/95630
1728 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1729 for comparisons of complete and incomplete pointers.
1730
7a97e2fc
GA
17312020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1732
1733 * c-aux-info.c (gen_type): Support opaque types.
1734
82e5048e
GA
17352020-11-20 Martin Sebor <msebor@redhat.com>
1736
1737 PR middle-end/97879
1738 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1739
17402020-11-20 Jakub Jelinek <jakub@redhat.com>
1741
1742 PR other/97911
1743 * Make-lang.in (c.serial): Change from goal to a variable.
1744 (.PHONY): Drop c.serial.
1745
17462020-11-20 Martin Uecker <muecker@gwdg.de>
1747
1748 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1749
d62586ee
GA
17502020-11-19 Jakub Jelinek <jakub@redhat.com>
1751
1752 PR c/97860
1753 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1754 error_operand_p.
1755
25bb75f8
GA
17562020-11-18 Jakub Jelinek <jakub@redhat.com>
1757
1758 * Make-lang.in (c.serial): New goal.
1759 (.PHONY): Add c.serial c.prev.
1760 (cc1$(exeext)): Call LINK_PROGRESS.
1761
77f67db2
GA
17622020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1763
1764 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1765 goto too.
1766 * c-typeck.c (build_asm_expr): Remove an assert checking output
1767 absence for asm goto.
1768
17692020-11-13 Jakub Jelinek <jakub@redhat.com>
1770
1771 * c-typeck.c (c_finish_omp_clauses): Don't clear
1772 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1773
17742020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1775
1776 PR objc/77404
1777 * c-parser.c (c_parser_objc_class_definition): Pass the
1778 location of the class name to the interface declaration.
1779
bb622641
GA
17802020-11-10 Strager Neds <strager.nds@gmail.com>
1781
1782 * c-decl.c (merge_decls): Use new overload of
1783 set_decl_section_name.
1784
17852020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1786
1787 * c-parser.c (c_parser_omp_target_data): Add use of
1788 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1789 handled map clause kind.
1790 (c_parser_omp_target_enter_data): Likewise.
1791 (c_parser_omp_target_exit_data): Likewise.
1792 (c_parser_omp_target): Likewise.
1793 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1794 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1795 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1796 same struct field access to co-exist on OpenMP construct.
1797
2da7ee05
GA
17982020-11-07 Martin Uecker <muecker@gwdg.de>
1799
1800 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1801 (c_parser_all_labels): Likewise.
1802
44cab2d8
GA
18032020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1804
1805 * c-parser.c (c_parser_objc_at_property_declaration):
1806 Improve parsing fidelity. Associate better location info
1807 with @property attributes. Clean up the interface to
1808 objc_add_property_declaration ().
1809
18102020-11-06 Nathan Sidwell <nathan@acm.org>
1811
1812 * c-decl.c (diagnose_mismatched_decls): Rename
1813 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1814 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1815 (collect_source_refs): Likewise.
1816 * c-typeck.c (inform_declaration, inform_for_arg)
1817 (convert_for_assignment): Likewise.
1818
18192020-11-06 Tobias Burnus <tobias@codesourcery.com>
1820
1821 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1822 OpenACC matching.
1823 (c_parser_omp_construct): Update call.
1824
35c125cb
GA
18252020-11-04 Jakub Jelinek <jakub@redhat.com>
1826
1827 PR c++/97670
1828 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1829 find underlying decl to clear in the aligned_head bitmap.
1830
18312020-11-04 Joseph Myers <joseph@codesourcery.com>
1832
1833 * c-decl.c (handle_nodiscard_attribute): New.
1834 (std_attribute_table): Add nodiscard.
1835 * c-parser.c (c_parser_std_attribute): Expect argument to
1836 nodiscard attribute to be a string. Do not special-case ignoring
1837 nodiscard.
1838 * c-typeck.c (maybe_warn_nodiscard): New.
1839 (build_compound_expr, emit_side_effect_warnings): Call
1840 maybe_warn_nodiscard.
1841 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1842 emit_side_effect_warnings if warn_unused_result.
1843
4f0606fe
GA
18442020-10-29 Asher Gordon <AsDaGo@posteo.net>
1845
1846 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1847 with XDELETE.
1848 (finish_init): Likewise.
1849 (pop_init_level): Likewise.
1850
e93aae4a
GA
18512020-10-28 Joseph Myers <joseph@codesourcery.com>
1852
1853 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1854 error_at for omitted parameter name.
1855
18562020-10-28 Jakub Jelinek <jakub@redhat.com>
1857
1858 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1859 (c_parser_omp_clause_allocate): New function.
1860 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1861 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1862 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1863 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1864 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1865 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1866 PRAGMA_OMP_CLAUSE_ALLOCATE.
1867 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1868
89bb01e7
GA
18692020-10-27 Joseph Myers <joseph@codesourcery.com>
1870
1871 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1872 standard attributes.
1873
efe71fcc
GA
18742020-10-23 Marek Polacek <polacek@redhat.com>
1875
1876 PR c++/91741
1877 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1878 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1879 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1880 * c-tree.h (char_type_p): Declare.
1881 * c-typeck.c (char_type_p): No longer static.
1882
18832020-10-23 Martin Sebor <msebor@redhat.com>
1884
1885 PR middle-end/97552
1886 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1887
2fe5b7d1
GA
18882020-09-19 Martin Sebor <msebor@redhat.com>
1889
1890 PR c/50584
1891 * c-decl.c (lookup_last_decl): Define new function.
1892 (c_decl_attributes): Call it.
1893 (start_decl): Add argument and use it.
1894 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1895 (get_parm_array_spec): Define new function.
1896 (push_parm_decl): Call get_parm_array_spec.
1897 (start_function): Call warn_parm_array_mismatch. Build attribute
1898 access and add it to current function.
1899 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1900 in forms of array parameters.
1901 * c-tree.h (start_decl): Add argument.
1902
19032020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1904
1905 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1906 with...
1907 (in_statement): New.
1908 (start_function): Adjust for above change.
1909 (c_push_function_context, c_pop_function_context): Likewise.
1910 * c-lang.h (struct language_function): Likewise.
1911 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1912 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1913 New.
1914 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1915 (c_parser_switch_statement): Adjust break/switch context handling
1916 and calls to renamed functions.
1917 (c_parser_while_statement): Adjust break/switch context handling and
1918 build a WHILE_STMT.
1919 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1920 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1921 (c_parser_omp_for_loop): Adjust break/switch context handling.
1922 * c-tree.h (c_break_label, c_cont_label): Delete.
1923 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1924 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1925 (in_statement, switch_statement_break_seen_p): Declare.
1926 (c_start_case, c_finish_case): Renamed to...
1927 (c_start_switch, c_finish_switch).
1928 (c_finish_bc_stmt): Adjust arguments.
1929 * c-typeck.c (build_function_call_vec): Don't try to print
1930 statements with %qE format.
1931 (struct c_switch): Rename switch_expr field to switch_stmt.
1932 Add break_stmt_seen_p field.
1933 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1934 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1935 (do_case): Update for changes to struct c_switch.
1936 (c_finish_case): Rename to c_finish_switch. Update for changes to
1937 struct c_switch and change of representation from SWITCH_EXPR to
1938 SWITCH_STMT.
1939 (c_finish_loop): Delete.
1940 (c_finish_bc_stmt): Update to reflect changes to break/continue
1941 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1942 of a GOTO_EXPR except for objc foreach loops.
1943
e1a4a8a0
GA
19442020-09-01 Jakub Jelinek <jakub@redhat.com>
1945
1946 PR c++/96867
1947 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1948 only on PARM_DECLs.
1949
8f7ea26a
GA
19502020-08-28 Martin Sebor <msebor@redhat.com>
1951
1952 PR c/96596
1953 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1954 argument type.
1955
8b394f01
GA
19562020-08-27 Martin Liska <mliska@suse.cz>
1957
1958 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1959 growth function to true.
1960
db0f6efe
GA
19612020-08-25 Tobias Burnus <tobias@codesourcery.com>
1962
1963 PR c/96678
1964 * c-typeck.c (handle_omp_array_sections_1): Talk about
1965 array function parameter in the error message.
1966
5c265693
GA
19672020-08-18 Jakub Jelinek <jakub@redhat.com>
1968
1969 PR c/96571
1970 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1971 to int, holding index of the match. Call mark_exp_read on the selector
1972 expression and on expressions other than the selected one.
1973
4967ca2f
GA
19742020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1975
1976 PR c/96377
1977 * c-typeck.c (process_init_element): Split test for whether to
1978 recurse into a record, union or array into...
1979 (initialize_elementwise_p): ...this new function. Don't recurse
1980 into a vector type if the initialization value is also a vector.
1981
48cc2e46
GA
19822020-07-31 Richard Biener <rguenther@suse.de>
1983
1984 PR debug/96383
1985 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1986 Define to c_common_finalize_early_debug.
1987
3ea9abca
GA
19882020-07-22 Tobias Burnus <tobias@codesourcery.com>
1989
1990 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1991 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1992 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1993
30430061
GA
19942020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1995
1996 PR target/95237
1997 * c-decl.c (finish_decl): Call target hook
1998 lower_local_decl_alignment to lower local decl alignment.
1999
3f8ca9cb
GA
20002020-07-09 Julian Brown <julian@codesourcery.com>
2001 Thomas Schwinge <thomas@codesourcery.com>
2002
2003 PR middle-end/95270
2004 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2005 for standalone attach/detach clauses.
2006
a82c4c4c 20072020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2008
2009 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2010 set, warn for conversion between pointers that point to incompatible
2011 scalar storage orders.
2012
f60ee68d
GA
20132020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2014
2015 * c-parser.c (c_parser_statement_after_labels): Pass correct
2016 parameters to c_parser_do_statement.
2017
56638b9b
GA
20182020-06-16 Jakub Jelinek <jakub@redhat.com>
2019
2020 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2021 c_in_omp_for.
2022 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2023 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2024 c_finish_omp_for.
2025 * c-tree.h (c_in_omp_for): Declare.
2026 * c-typeck.c (c_in_omp_for): Define.
2027 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2028 (digest_init): Likewise.
2029 (build_binary_op): Likewise.
2030
20312020-06-16 Jakub Jelinek <jakub@redhat.com>
2032
2033 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2034 from kind by comma rather than colon.
2035
1a59f3db
GA
20362020-06-05 Mark Wielaard <mark@klomp.org>
2037
2038 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2039 an undeclared builtin, then add a fixit header hint, if found.
2040 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2041 warning_at about implicit builtin declaration type mismatch.
2042
9a5b7438
GA
20432020-06-03 Mark Wielaard <mark@klomp.org>
2044
2045 * c-parser.c (struct c_parser): Add seen_string_literal
2046 bitfield.
2047 (c_parser_consume_token): Reset seen_string_literal.
2048 (c_parser_error_richloc): Add name_hint if seen_string_literal
2049 and next token is a CPP_NAME and we have a missing header
2050 suggestion for the name.
2051 (c_parser_string_literal): Set seen_string_literal.
2052
20532020-06-03 Mark Wielaard <mark@klomp.org>
2054
2055 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2056 scope with matching_parens after CPP_OPEN_PAREN.
2057
20582020-06-03 Tobias Burnus <tobias@codesourcery.com>
2059
2060 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2061
53ffb43a
GA
20622020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2063
2064 * Make-lang.in: Remove extra slash.
2065
8f66f175
ML
20662020-05-19 Martin Liska <mliska@suse.cz>
2067
2068 * c-parser.c: Fix typo.
2069
49ddde69
JJ
20702020-05-14 Jakub Jelinek <jakub@redhat.com>
2071
2072 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2073
eb72dc66
RB
20742020-05-07 Richard Biener <rguenther@suse.de>
2075
2076 PR middle-end/94703
2077 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2078 DECL_GIMPLE_REG_P.
2079
bf915591
JJ
20802020-04-30 Jakub Jelinek <jakub@redhat.com>
2081
2082 PR c/94842
2083 * c-decl.c (set_labels_context_r): In addition to context-less
2084 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2085 parent function if any.
2086 (store_parm_decls): Adjust comment.
2087
e1113ffb
JJ
20882020-04-19 Jakub Jelinek <jakub@redhat.com>
2089
2090 PR objc/94637
2091 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2092 two CPP_COLON tokens.
2093
2e389749
JJ
20942020-04-17 Jakub Jelinek <jakub@redhat.com>
2095
2096 PR other/94629
2097 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2098 to data.clauses.
2099
2dc9294c
JJ
21002020-04-15 Jakub Jelinek <jakub@redhat.com>
2101
2102 PR c/94593
2103 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2104 requires directive when not at file scope.
2105
13e41d8b
TB
21062020-04-08 Tobias Burnus <tobias@codesourcery.com>
2107
2108 PR middle-end/94120
2109 * c-decl.c (c_check_in_current_scope): New function.
2110 * c-tree.h (c_check_in_current_scope): Declare it.
2111 * c-parser.c (c_parser_oacc_declare): Add check that variables
2112 are declared in the same scope as the directive. Fix handling
2113 of namespace vars.
2114
4df50a05
JJ
21152020-04-07 Jakub Jelinek <jakub@redhat.com>
2116
2117 PR c++/94512
2118 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2119 if c_parser_omp_master succeeded.
2120
5db9e893
JJ
21212020-03-23 Jakub Jelinek <jakub@redhat.com>
2122
2123 PR gcov-profile/94029
2124 PR c/94239
2125 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2126 the function_start_locus location. Don't do that afterwards for the
2127 __GIMPLE body parsing.
2128
9def91e9
JJ
21292020-03-19 Jakub Jelinek <jakub@redhat.com>
2130
2131 PR gcov-profile/94029
2132 * c-tree.h (finish_function): Add location_t argument defaulted to
2133 input_location.
2134 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2135 set it to the locus of closing } if non-NULL.
2136 (c_parser_compound_statement_nostart): Return locus of closing }.
2137 (c_parser_parse_rtl_body): Likewise.
2138 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2139 finish_function.
2140 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2141 input_location to set function_end_locus.
2142
046c5890
JJ
21432020-03-17 Jakub Jelinek <jakub@redhat.com>
2144
2145 PR c/94172
2146 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2147 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2148 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2149 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2150 ENUMERAL_TYPEs.
2151 (finish_incomplete_vars): New function, moved from finish_struct. Use
2152 relayout_decl instead of layout_decl.
2153 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2154 being TYPE_VFIELD. Use finish_incomplete_vars.
2155 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2156 finish_incomplete_vars.
2157 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2158 also on ENUMERAL_TYPEs.
2159
c015ff8c
JJ
21602020-03-16 Jakub Jelinek <jakub@redhat.com>
2161
2162 PR c/94179
2163 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2164
f2e9fe5f
MS
21652020-03-13 Martin Sebor <msebor@redhat.com>
2166
2167 PR c/94040
2168 * c-decl.c (builtin_structptr_type_count): New constant.
2169 (match_builtin_function_types): Reject decls that are incompatible
2170 in types pointed to by pointers.
2171 (diagnose_mismatched_decls): Adjust comments.
2172
c9d70946
JM
21732020-03-05 Joseph Myers <joseph@codesourcery.com>
2174
2175 PR c/93577
2176 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2177 empty when initialized type is error_mark_node.
2178 (set_designator, process_init_element): Ignore initializers for
2179 elements of a variable-size type or of error_mark_node.
2180
726e292d
MS
21812020-03-01 Martin Sebor <msebor@redhat.com>
2182
2183 PR middle-end/93926
2184 * c-decl.c (types_close_enough_to_match): New function.
2185 (match_builtin_function_types):
2186 (diagnose_mismatched_decls): Add missing inform call to a warning.
2187
a499c2f8
MS
21882020-03-01 Martin Sebor <msebor@redhat.com>
2189
2190 PR c/93812
2191 * c-typeck.c (build_functype_attribute_variant): New function.
2192 (composite_type): Call it.
2193
9c3da8cc
JJ
21942020-02-25 Jakub Jelinek <jakub@redhat.com>
2195
2196 PR other/93912
2197 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2198 Rename last argument from probablity to probability.
2199
bacdd5e9
JJ
22002020-02-13 Jakub Jelinek <jakub@redhat.com>
2201
2202 PR c/93576
2203 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2204 *expr if it has side effects.
2205
f9eb0973
JL
22062020-01-30 Jeff Law <law@redhat.com>
2207
2208 PR c/88660
2209 * c-parser.c (c_parser_switch_statement): Make sure to request
2210 marking the switch expr as used.
2211
ac68e287
JM
22122020-01-22 Joseph Myers <joseph@codesourcery.com>
2213
2214 PR c/93348
2215 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2216 argument with integer operands.
2217
852f0ae8
KK
22182020-01-16 Kerem Kat <keremkat@gmail.com>
2219
2220 PR c/92833
2221 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2222 to support 4 available tokens.
2223
e2346a33
JM
22242020-01-15 Joseph Myers <joseph@codesourcery.com>
2225
2226 PR c/93072
2227 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2228 determine whether to set DECL_CONTEXT.
2229
3d77686d
JM
22302020-01-13 Joseph Myers <joseph@codesourcery.com>
2231
2232 PR c/93241
2233 * c-typeck.c (build_c_cast): Check for expressions with integer
2234 operands that can occur in an unevaluated part of an integer
2235 constant expression and call note_integer_operands as needed.
2236
f74c4b2c
RB
22372019-01-08 Richard Biener <rguenther@suse.de>
2238
2239 PR middle-end/93199
2240 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2241 permanently.
2242
8d9254fc
JJ
22432020-01-01 Jakub Jelinek <jakub@redhat.com>
2244
2245 Update copyright years.
2246
39292e25
EB
22472019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2248
2249 * c-decl.c (collect_source_ref_cb): Delete.
2250 (for_each_global_decl): Rename into...
2251 (collect_source_refs): ...this. Call collect_source_ref directly.
2252 (c_parse_final_cleanups): Always call collect_source_ref on the main
2253 input filename.
2254
519d7496
JB
22552019-12-19 Julian Brown <julian@codesourcery.com>
2256 Cesar Philippidis <cesar@codesourcery.com>
2257
2258 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2259 detach clauses.
2260 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2261 Allow deref (->) in variable lists if true.
2262 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2263 Pass to c_parser_omp_variable_list.
2264 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2265 call to c_parser_omp_variable_list.
2266 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2267 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2268 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2269 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2270 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2271 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2272 and detach. Support deref.
2273 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2274 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2275 (c_oacc_check_attachments): New function.
2276 (c_finish_omp_clauses): Check attach/detach arguments for being
2277 pointers using above. Support deref.
2278
a6163563
JB
22792019-12-19 Julian Brown <julian@codesourcery.com>
2280 Maciej W. Rozycki <macro@codesourcery.com>
2281 Tobias Burnus <tobias@codesourcery.com>
2282 Thomas Schwinge <thomas@codesourcery.com>
2283
2284 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2285 (c_parser_oacc_data_clause): Likewise.
2286 (c_parser_oacc_all_clauses): Likewise.
2287 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2288 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2289 PRAGMA_OACC_CLAUSE_NO_CREATE.
2290 * c-typeck.c (handle_omp_array_sections): Support
2291 GOMP_MAP_NO_ALLOC.
2292
d68f5d45
DM
22932019-12-09 David Malcolm <dmalcolm@redhat.com>
2294
2295 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2296 Replace label_text ctor calls.
2297
4691bf46
JM
22982019-12-04 Joseph Myers <joseph@codesourcery.com>
2299
2300 PR c/36941
2301 PR c/88827
2302 * c-typeck.c (convert_lvalue_to_rvalue): Call
2303 require_complete_type for arguments not of void types.
2304 (build_indirect_ref): Do not diagnose dereferencing pointers to
2305 incomplete types.
2306 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2307
85d11957
JM
23082019-12-03 Joseph Myers <joseph@codesourcery.com>
2309
2310 PR c/88704
2311 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2312 old-style parameter definitions.
2313
4569f8b3
SL
23142019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2315
2316 PR target/92499
2317
2318 * c-decl.c (flexible_array_type_p): Move to common code.
2319
65ef05d0
RS
23202019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2321
2322 * c-decl.c (start_decl): Allow initialization of variables whose
2323 size is a POLY_INT_CST.
2324 (finish_decl): Use verify_type_context to check whether the target
2325 allows variables with a particular type to have static or thread-local
2326 storage duration. Don't raise a second error if such variables do
2327 not have a constant size.
2328 (grokdeclarator): Use verify_type_context to check whether the
2329 target allows fields or array elements to have a particular type.
2330 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2331 the target allows pointer difference for the types involved.
2332 (build_unary_op): Likewise for pointer increment and decrement.
2333
34b43828
JM
23342019-11-29 Joseph Myers <joseph@codesourcery.com>
2335
2336 * c-parser.c (struct c_parser): Add members raw_tokens and
2337 raw_tokens_used.
2338 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2339 using previously-lexed raw tokens.
2340 (c_parser_peek_nth_token_raw)
2341 (c_parser_check_balanced_raw_token_sequence): New functions.
2342 (c_parser_nth_token_starts_std_attributes): Use
2343 c_parser_check_balanced_raw_token_sequence for Objective-C.
2344
5b8d9367
JM
23452019-11-25 Joseph Myers <joseph@codesourcery.com>
2346
2347 PR c/91985
2348 * c-decl.c (finish_declspecs): Use int instead of decimal
2349 floating-point types if decimal floating-point not supported.
2350
1723e1be
JM
23512019-11-25 Joseph Myers <joseph@codesourcery.com>
2352
2353 * c-tree.h (struct c_declarator): Use a structure for id member.
2354 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2355 declarators at the start, not when handling individual declarators
2356 later. Use u.id.id instead of u.id.
2357 (grokfield): Use u.id.id instead of u.id.
2358 (build_id_declarator): Set u.id.id and u.id.attrs.
2359 (finish_declspecs): Handle postfix attributes in case of typedef
2360 name or typeof used.
2361 * c-parser.c (c_parser_direct_declarator)
2362 (c_parser_direct_declarator_inner): Place declarator for
2363 attributes inside that for function or array, not outside. Set
2364 u.id.attrs for identifiers.
2365 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2366 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2367 instead of u.id.
2368
bdaf8be1
JJ
23692019-11-22 Jakub Jelinek <jakub@redhat.com>
2370
2371 PR c/90677
2372 * c-decl.c (identifier_global_tag): Define.
2373
3e00ba47
RB
23742019-11-20 Richard Biener <rguenther@suse.de>
2375
2376 PR c/92088
2377 * c-decl.c (grokdeclarator): Prevent inlining of nested
2378 function with VLA arguments.
2379
8c5b727a
JM
23802019-11-20 Joseph Myers <joseph@codesourcery.com>
2381
2382 * c-decl.c (c_warn_type_attributes): New function.
2383 (groktypename, grokdeclarator, finish_declspecs): Call
2384 c_warn_type_attributes before applying attributes to types.
2385 * c-tree.h (c_warn_type_attributes): Declare.
2386
192961ff
JM
23872019-11-19 Joseph Myers <joseph@codesourcery.com>
2388
2389 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2390 standard attributes.
2391 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2392 pedwarn for unknown standard attributes and return error_mark_node
2393 for them.
2394
20a38017
MM
23952019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2396
2397 * c-parser.c (c_parser_parse_rtl_body): Always call
2398 run_rtl_passes, even if startwith pass is not provided.
2399
d5fbe5e0
JM
24002019-11-15 Joseph Myers <joseph@codesourcery.com>
2401
2402 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2403 duplicate standard attributes.
2404
97cc1187
JM
24052019-11-15 Joseph Myers <joseph@codesourcery.com>
2406
2407 * c-decl.c (std_attribute_table): Add maybe_unused.
2408
f8aea5e3
JM
24092019-11-15 Joseph Myers <joseph@codesourcery.com>
2410
2411 * c-decl.c (std_attribute_table): Add fallthrough.
2412 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2413 attribute at top level.
2414
2cc94aa8
JM
24152019-11-15 Joseph Myers <joseph@codesourcery.com>
2416
2417 * c-decl.c (std_attribute_table): New.
2418 (c_init_decl_processing): Register attributes from
2419 std_attribute_table.
2420 * c-parser.c (c_parser_attribute_arguments): Add arguments
2421 require_string and allow_empty_args. All callers changed.
2422 (c_parser_std_attribute): Set require_string argument for
2423 "deprecated" attribute.
2424
7c5890cc
JM
24252019-11-14 Joseph Myers <joseph@codesourcery.com>
2426
2427 * c-parser.c (c_parser_postfix_expression)
2428 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2429 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2430
e8738f4e
RS
24312019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2432
2433 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2434 of build_same_sized_truth_vector_type.
2435 (build_vec_cmp): Likewise.
2436
b2417b59
JJ
24372019-11-14 Jakub Jelinek <jakub@redhat.com>
2438
bedb7f04
JJ
2439 * c-parser.c (c_parser_omp_context_selector): Don't require score
2440 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2441 negative score.
2442
b2417b59
JJ
2443 * c-parser.c (c_parser_omp_context_selector): Rename
2444 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2445 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2446 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2447 and string literals.
2448
4e03c3a7
JM
24492019-11-14 Joseph Myers <joseph@codesourcery.com>
2450
2451 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2452 ctsk_tagfirstref_attrs.
2453 (struct c_declspecs): Update description of attrs. Add
2454 postfix_attrs and non_std_attrs_seen_p. Increase size of
2455 typespec_kind bit-field.
2456 (c_warn_unused_attributes): New declaration.
2457 (parser_xref_tag): Update prototype.
2458 * c-decl.c (c_warn_unused_attributes): New function.
2459 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2460 ctsk_tagref_attrs. Handle attribute declarations.
2461 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2462 (grokdeclarator): Handle standard attributes.
2463 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2464 attributes to incomplete type reference.
2465 (xref_tag): Update call to parser_xref_tag.
2466 (declspecs_add_addrspace, declspecs_add_type)
2467 (declspecs_add_scspec, declspecs_add_attrs): Set
2468 non_std_attrs_seen_p.
2469 (finish_declspecs): Apply postfix standard attributes to type.
2470 * c-parser.c (c_token_starts_declspecs)
2471 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2472 (c_parser_next_tokens_start_declaration): Update comments.
2473 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2474 parser->tokens[2] to parser->tokens[1].
2475 (c_parser_nth_token_starts_std_attributes)
2476 (c_parser_std_attribute_specifier_sequence): New functions.
2477 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2478 attrs. All callers changed. Handle standard attributes.
2479 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2480 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2481 All callers changed.
2482 (c_parser_declspecs): Add arguments start_std_attr_ok and
2483 end_std_attr_ok. All callers changed. Handle standard
2484 attributes.
2485 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2486 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2487 (c_parser_compound_statement_nostart, c_parser_all_labels)
2488 (c_parser_label, c_parser_statement, c_parser_for_statement):
2489 Handle standard attributes.
2490 * c-parser.h (c_parser_declspecs): Update prototype.
2491 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2492 c_parser_declspecs.
2493
0c29cac4
ML
24942019-11-12 Martin Liska <mliska@suse.cz>
2495
2496 * gimple-parser.c: Do not include params.h.
2497
028d4092
ML
24982019-11-12 Martin Liska <mliska@suse.cz>
2499
2500 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2501 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2502 macro.
2503
62aee289
MR
25042019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2505 Frederik Harwath <frederik@codesourcery.com>
2506
2507 gcc/c/
2508 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2509 (c_parser_oacc_kernels_parallel): Rename function to...
2510 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2511 (c_parser_omp_construct): Update accordingly.
2512
2513
7cec9588
JJ
25142019-11-11 Jakub Jelinek <jakub@redhat.com>
2515
2516 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2517 without corresponding end declare target.
2518
f486280c
RS
25192019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2520
2521 * c-convert.c (convert): Only handle vector conversions if one of
2522 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2523 allows it.
2524 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2525 vectors satisfy gnu_vector_type_p.
2526 (build_unary_op): Only allow unary operators to be applied to
2527 vectors if they satisfy gnu_vector_type_p.
2528 (digest_init): Only allow by-element initialization of vectors
2529 if they satisfy gnu_vector_type_p.
2530 (really_start_incremental_init): Likewise.
2531 (push_init_level): Likewise.
2532 (pop_init_level): Likewise.
2533 (process_init_element): Likewise.
2534 (build_binary_op): Only allow binary operators to be applied to
2535 vectors if they satisfy gnu_vector_type_p.
2536
017c6491
JM
25372019-11-08 Joseph Myers <joseph@codesourcery.com>
2538
2539 * c-decl.c (grokparms): Convert () in a function definition to
2540 (void) for C2x.
2541 (store_parm_decls_oldstyle): Pedwarn for C2x.
2542 (store_parm_decls): Update comment about () not generating a
2543 prototype.
2544
c01bd174
JM
25452019-11-07 Joseph Myers <joseph@codesourcery.com>
2546
2547 * c-parser.c (c_parser_attribute_arguments): New function.
2548 Factored out of c_parser_gnu_attribute.
2549 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2550 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2551 (c_parser_std_attribute_specifier): New functions.
2552 (c_parser_transaction_attributes): Use
2553 c_parser_std_attribute_specifier.
2554
471c5330
JM
25552019-11-07 Joseph Myers <joseph@codesourcery.com>
2556
2557 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2558 lex_joined_string and translate_strings_p.
2559 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2560 c_lex_with_flags.
2561 (c_parser_string_literal): New function.
2562 (c_parser_static_assert_declaration_no_semi): Use
2563 c_parser_string_literal. Do not set lex_untranslated_string.
2564 (c_parser_asm_string_literal): Use c_parser_string_literal.
2565 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2566 (c_parser_gnu_attributes): Set and restore translate_strings_p
2567 instead of lex_untranslated_string.
2568 (c_parser_asm_statement): Do not set lex_untranslated_string.
2569 (c_parser_asm_operands): Likewise.
2570 (c_parser_has_attribute_expression): Set and restore
2571 translate_strings_p instead of lex_untranslated_string.
2572 (c_parser_postfix_expression): Use c_parser_string_literal.
2573 (pragma_lex): Likewise.
2574 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2575 (c_parse_file): Set translate_strings_p.
2576 * gimple-parser.c (c_parser_gimple_postfix_expression)
2577 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2578 * c-parser.c (c_parser_string_literal): Declare function.
2579
d0c464d2
JJ
25802019-11-02 Jakub Jelinek <jakub@redhat.com>
2581
2582 * c-parser.c (c_finish_omp_declare_variant): Use
2583 omp_get_context_selector instead of c_omp_get_context_selector.
2584
ac2cfa6c
RS
25852019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2586
2587 * c-tree.h (c_simulate_enum_decl): Declare.
2588 * c-decl.c (c_simulate_enum_decl): New function.
2589 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2590
74078538
RS
25912019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2592
2593 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2594 * c-decl.c (c_simulate_builtin_function_decl): New function.
2595 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2596 to the above.
2597
ad1539d5
MS
25982019-10-28 Martin Sebor <msebor@redhat.com>
2599
2600 PR c/66970
2601 * c-decl.c (names_builtin_p): Define a new function.
2602
cb73e4e7
RB
26032019-10-28 Richard Biener <rguenther@suse.de>
2604
2605 PR c/92249
2606 * gimple-parser.c (c_parser_parse_gimple_body): Make
2607 current_bb the entry block initially to easier recover
2608 from errors.
2609 (c_parser_gimple_compound_statement): Adjust.
2610
135df52c
JJ
26112019-10-24 Jakub Jelinek <jakub@redhat.com>
2612
2613 * c-parser.c (c_finish_omp_declare_variant): Use
2614 omp_context_selector_matches instead of
2615 c_omp_context_selector_matches.
2616 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2617 attribute in between declare target and end declare target
2618 pragmas.
2619
783bfe5e
JM
26202019-10-15 Joseph Myers <joseph@codesourcery.com>
2621
2622 * c-parser.c (c_parser_attribute_any_word): Rename to
2623 c_parser_gnu_attribute_any_word. All callers changed.
2624 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2625 callers changed.
2626 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2627 callers changed.
2628 (c_parser_declaration_or_fndef, c_parser_declspecs)
2629 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2630 (c_parser_struct_declaration, c_parser_declarator)
2631 (c_parser_gnu_attribute, c_parser_compound_statement)
2632 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2633 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2634 attribute-related syntax productions.
2635
56898e43
RS
26362019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2637
2638 * c-objc-common.c (useful_aka_type_p): Replace with...
2639 (get_aka_type): ...this new function. Given the original type,
2640 decide which aka type to print (if any). Only look through typedefs
2641 if user_facing_original_type_p.
2642 (print_type): Update accordingly.
2643
b9424661
JJ
26442019-10-14 Jakub Jelinek <jakub@redhat.com>
2645
2646 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2647 into int NESTED, if it is 2, diagnose missing commas in between
2648 clauses.
2649 (c_parser_omp_context_selector): Pass 2 as last argument to
2650 c_parser_omp_all_clauses.
2651
20de9568
JJ
26522019-10-12 Jakub Jelinek <jakub@redhat.com>
2653
2654 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2655 For simd properties, put them directly into TREE_VALUE.
2656 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2657 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2658 add "omp declare variant base" attribute rather than
2659 "omp declare variant".
2660
fe2bc27c
JM
26612019-10-11 Joseph Myers <joseph@codesourcery.com>
2662
2663 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2664
94e7f906
JJ
26652019-10-10 Jakub Jelinek <jakub@redhat.com>
2666
2667 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2668 true, terminate processing on closing paren and don't skip to end of
2669 pragma line.
2670 (c_parser_omp_declare_simd): Handle also declare variant.
2671 (omp_construct_selectors, omp_device_selectors,
2672 omp_implementation_selectors, omp_user_selectors): New variables.
2673 (c_parser_omp_context_selector,
2674 c_parser_omp_context_selector_specification,
2675 c_finish_omp_declare_variant): New functions.
2676 (c_finish_omp_declare_simd): Handle both declare simd and
2677 declare variant.
2678 (c_parser_omp_declare): Handle declare variant.
2679
93313b94
JM
26802019-10-02 Joseph Myers <joseph@codesourcery.com>
2681
2682 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2683 CPP_COLON tokens.
2684
55879815
RS
26852019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2686
2687 * c-objc-common.c (useful_aka_type_p): New function.
2688 (print_type): Use it to decide whether an aka type is worth printing.
2689
59bc434a
JJ
26902019-09-27 Jakub Jelinek <jakub@redhat.com>
2691
2692 PR c++/88203
2693 * c-parser.c (c_parser_predefined_identifier): New function.
2694 (c_parser_postfix_expression): Use it.
2695 (c_parser_omp_variable_list): Parse predefined identifiers.
2696 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2697 in shared and firstprivate clauses, even when they are predetermined
2698 shared.
2699
c6447c20
RS
27002019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2701
2702 * c-typeck.c (build_function_call_vec): Take the original function
2703 decl as an optional final parameter. Pass all built-in calls to
2704 check_builtin_function_arguments.
2705
522da4c2
EB
27062019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2707
2708 PR c/91815
2709 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2710 of identifiers in the external scope only for variables and functions.
2711
68e2c199
PK
27122019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2713
2714 PR c/78736
2715 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2716
22f8849d
IS
27172019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2718
2719 PR pch/61250
2720 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2721 after determining that the first token is not
2722 PRAGMA_GCC_PCH_PREPROCESS.
2723
db376f45
EB
27242019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2725
2726 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2727 FUNCTION_DECL to the right value in the presence of nested declarators.
2728
4d732405
RS
27292019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2730
2731 PR middle-end/91421
2732 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2733
cb1180d5
RS
27342019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2735
2736 PR middle-end/91421
2737 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2738 of a built_in_function.
2739 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2740
77eb117f
JJ
27412019-08-10 Jakub Jelinek <jakub@redhat.com>
2742
2743 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2744 (c_parser_omp_clause_device_type): New function.
2745 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2746 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2747 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2748 diagnostics for declare target with clauses nested in clause-less
2749 declare target declaration-definition-seq.
2750 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2751
2c3b8bad
JJ
27522019-08-09 Jakub Jelinek <jakub@redhat.com>
2753
bb522e2e
JJ
2754 * c-parser.c (check_no_duplicate_clause): Simplify using
2755 omp_find_clause.
2756 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2757 directive name modifiers.
2758 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2759
2c3b8bad
JJ
2760 PR c/91401
2761 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2762 check_no_duplicate_clause call. Comment it out, instead emit a
2763 warning for duplicate dist_schedule clauses.
2764
99769e7f
RS
27652019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2766
2767 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2768
8860d270
JJ
27692019-08-08 Jakub Jelinek <jakub@redhat.com>
2770
2771 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2772 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2773 instead of generic_head to track duplicates.
2774
398e3feb
JJ
27752019-08-07 Jakub Jelinek <jakub@redhat.com>
2776
2777 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2778 (c_parser_omp_clause_use_device_addr): New function.
2779 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2780 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2781 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2782 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2783 map or use_device_* clauses.
2784 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2785 in OpenMP, require pointer type rather than pointer or array type.
2786 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2787
a28351e7
JJ
27882019-07-31 Jakub Jelinek <jakub@redhat.com>
2789
2790 PR c/91192
2791 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2792 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2793 case.
2794
6343b6bf
ML
27952019-07-25 Martin Liska <mliska@suse.cz>
2796 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2797
2798 PR c++/23383
2799 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2800
cb50701e
ML
28012019-07-25 Martin Liska <mliska@suse.cz>
2802
2803 * c-decl.c (merge_decls): Use new macros
2804 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2805
62e3e66f
RB
28062019-07-23 Richard Biener <rguenther@suse.de>
2807
2808 PR tree-optimization/83518
2809 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2810 a CFG also rebuild cgraph edges.
2811
554a530f
JJ
28122019-07-20 Jakub Jelinek <jakub@redhat.com>
2813
2814 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2815 (c_parser_omp_clause_bind): New function.
2816 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2817 (OMP_LOOP_CLAUSE_MASK): Define.
2818 (c_parser_omp_loop): New function.
2819 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2820 loop combined with parallel or teams.
2821 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2822 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2823
d119bf79
RS
28242019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2825
2826 PR c/53633
2827 * c-decl.c (finish_function): Check targetm.warn_func_return
2828 before issuing a -Wreturn-type warning.
2829
ab20d992 28302019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2831
2832 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2833 (c_parser_compound_statement): Call it.
2834
1fdd6f04
JJ
28352019-07-12 Jakub Jelinek <jakub@redhat.com>
2836
2837 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2838 (c_parser_omp_clause_order): New function.
2839 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2840 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2841 PRAGMA_OMP_CLAUSE_ORDER.
2842 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2843
8389386c
RB
28442019-07-10 Richard Biener <rguenther@suse.de>
2845
2846 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2847 _Literal (int *) &x for address literals.
2848
99b1c316
MS
28492019-07-09 Martin Sebor <msebor@redhat.com>
2850
2851 PR c++/61339
2852 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2853 to class.
2854 (field_decl_cmp): Same.
2855 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2856 * c-tree.h: Same.
2857 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2858
6c1dae73
MS
28592019-07-09 Martin Sebor <msebor@redhat.com>
2860
2861 PR c++/61339
2862 * c-decl.c: Change class-key from class to struct and vice versa
2863 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2864 * gimple-parser.c: Same.
2865
69b5279e
RB
28662019-07-01 Richard Biener <rguenther@suse.de>
2867
2868 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2869 _Literal (char *) &"foo" for address literals pointing to
2870 STRING_CSTs.
2871
ab20d992
JJ
28722019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2873
2874 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2875 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2876 C incompatibility if alternate "__intN__" form is used.
2877
1e3d475e
MS
28782019-06-24 Martin Sebor <msebor@redhat.com>
2879
2880 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2881
bf38f7e9
JJ
28822019-06-10 Jakub Jelinek <jakub@redhat.com>
2883
2884 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2885 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2886 (c_parser_omp_scan_loop_body): New function.
2887 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2888 inscan reduction clauses.
2889 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2890 non-inscan reductions on the same construct, or inscan reductions with
2891 ordered or schedule clauses, or inscan array reductions.
2892
65985d78
MS
28932019-06-05 Martin Sebor <msebor@redhat.com>
2894
2895 PR c/90737
2896 * c-typeck.c (c_finish_return): Only consider functions returning
2897 pointers as candidates for -Wreturn-local-addr.
2898
0ecf545c
MS
28992019-06-05 Martin Sebor <msebor@redhat.com>
2900
2901 * c-decl.c (start_decl): Adjust quoting and hyphenation
2902 in diagnostics.
2903 (finish_decl): Same.
2904 (finish_enum): Same.
2905 (start_function): Same.
2906 (declspecs_add_type): Same.
2907 * c-parser.c (warn_for_abs): Same.
2908 * c-typeck.c (build_binary_op): Same.
2909
e03436e7
TS
29102019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2911
b48f44bf
TS
2912 PR c/89433
2913 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2914 marked with an OpenACC 'routine' directive.
2915
5bf04509
TS
2916 PR c/89433
2917 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2918 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2919
e03436e7
TS
2920 PR c/89433
2921 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2922 clauses from "omp declare target" attribute.
2923
a9c697b8
MS
29242019-05-16 Martin Sebor <msebor@redhat.com>
2925
ab20d992
JJ
2926 * c-decl.c (start_decl): Quote keywords, operators, and
2927 types in diagnostics.
2928 (finish_decl): Same.
2929 * c-parser.c (c_parser_asm_statement): Same.
2930 (c_parser_conditional_expression): Same.
2931 (c_parser_transaction_cancel): Same.
2932 * c-typeck.c (c_common_type): Same.
2933 (build_conditional_expr): Same.
2934 (digest_init): Same.
2935 (process_init_element): Same.
2936 (build_binary_op): Same.
a9c697b8 2937
c4499192
RB
29382019-05-17 Richard Biener <rguenther@suse.de>
2939
2940 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2941 (c_parser_gimple_unary_expression): Likewise.
2942 (c_parser_gimple_parentized_ternary_expression): New function.
2943
adfe6e4b
RB
29442019-05-16 Richard Biener <rguenther@suse.de>
2945
2946 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2947 (c_parser_gimple_unary_expression): Likewise.
2948
186dabf2
RB
29492019-05-15 Richard Biener <rguenther@suse.de>
2950
2951 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2952 __BIT_FIELD_REF.
2953
1158c5b4
RB
29542019-05-14 Richard Biener <rguenther@suse.de>
2955
2956 * gimple-parser.c (c_parser_gimple_statement): Remove
2957 questionable auto-promotion to VIEW_CONVERT_EXPR.
2958 (c_parser_gimple_typespec): Split out from __MEM parsing.
2959 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2960 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2961 as __VIEW_CONVERT with -gimple.
2962
fd4485aa
ML
29632019-05-09 Martin Liska <mliska@suse.cz>
2964
2965 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2966 __MAX.
2967 (c_parser_gimple_unary_expression): Parse also binary expression
2968 __MIN and __MAX.
2969 (c_parser_gimple_parentized_binary_expression): New function.
2970
d276406a
ML
29712019-05-09 Martin Liska <mliska@suse.cz>
2972
2973 * gimple-parser.c (struct gimple_parser): Add probability.
2974 for gimple_parser_edge.
2975 (gimple_parser::push_edge): Add new argument probability.
2976 (c_parser_gimple_parse_bb_spec): Parse also probability
2977 if present.
2978 (c_parser_parse_gimple_body): Set edge probability.
2979 (c_parser_gimple_compound_statement): Consume token
2980 before calling c_parser_gimple_goto_stmt.
2981 Parse BB counts.
2982 (c_parser_gimple_statement): Pass new argument.
2983 (c_parser_gimple_goto_stmt): Likewise.
2984 (c_parser_gimple_if_stmt): Likewise.
2985 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2986 * c-parser.c (c_parser_declaration_or_fndef): Pass
2987 hot_bb_threshold argument.
2988 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2989 field.
2990 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2991
f179b64e
JJ
29922019-04-26 Jakub Jelinek <jakub@redhat.com>
2993
2994 PR debug/90197
2995 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2996 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2997 (c_parser_do_statement): Likewise.
2998 (c_parser_for_statement): Likewise. Formatting fixes.
2999 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3000 emit DEBUG_BEGIN_STMTs if needed.
3001
e7178413
JJ
30022019-04-19 Jakub Jelinek <jakub@redhat.com>
3003
c280b7ee
JJ
3004 PR c/89888
3005 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3006 (c_start_case): Don't clear it.
3007 (do_case): Adjust c_add_case_label caller.
3008 (c_finish_case): Adjust c_do_switch_warnings caller.
3009
e7178413
JJ
3010 PR c++/90108
3011 * c-decl.c (merge_decls): If remove is main variant and
3012 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3013 variant that has newdecl as TYPE_NAME if any.
3014
60a2c645
JJ
30152019-04-12 Jakub Jelinek <jakub@redhat.com>
3016
3017 PR c/89933
3018 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3019 don't try to remove it from the variant list, but instead assert
3020 it has no variants.
3021
2a82beaa
RB
30222019-04-01 Richard Biener <rguenther@suse.de>
3023
3024 PR c/71598
3025 * c-tree.h (c_get_alias_set): Declare.
3026 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3027 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3028 as the underlying integer type.
3029
bec1da64
MS
30302019-03-19 Martin Sebor <msebor@redhat.com>
3031
3032 PR tree-optimization/89688
3033 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3034 kinds of initializers.
3035
855cd9b1
JJ
30362019-03-19 Jakub Jelinek <jakub@redhat.com>
3037
3038 PR c/89734
3039 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3040 return type even if quals_used is 0. Formatting fixes.
3041
baa09dc5
RB
30422019-03-14 Richard Biener <rguenther@suse.de>
3043
3044 * c-tree.h (enum c_declspec_il): New.
3045 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3046 enum bitfield.
3047 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3048 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3049 (c_parser_declspecs): Adjust.
3050 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3051 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3052 and bitmap.h.
3053 (struct gimple_parser): New.
3054 (gimple_parser::push_edge): New method.
3055 (c_parser_gimple_parse_bb_spec): New helper.
3056 (c_parser_parse_gimple_body): Get start pass and IL specification.
3057 Initialize SSA and CFG.
3058 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3059 Build a gimple_parser parsing state and pass it along.
3060 (c_parser_gimple_statement): Change intermittend __PHI internal
3061 function argument for the edge.
3062 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3063 (c_parser_gimple_goto_stmt): Record edges to build.
3064 (c_parser_gimple_if_stmt): Likewise.
3065 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3066 (c_parser_gimple_or_rtl_pass_list): Likewise.
3067
a3f9f006
ML
30682019-03-11 Martin Liska <mliska@suse.cz>
3069
3070 * c-decl.c (check_for_loop_decls): Wrap an option name
3071 in a string format message and fix GNU coding style.
3072 * c-parser.c (c_parser_declspecs): Likewise.
3073
1db01ff9
JJ
30742019-03-08 Jakub Jelinek <jakub@redhat.com>
3075
3076 PR tree-optimization/89550
3077 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3078 returned true.
3079 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3080 or warning returned true.
3081
66dcb747
JJ
30822019-02-28 Jakub Jelinek <jakub@redhat.com>
3083
3084 PR c/89525
3085 * c-typeck.c (convert_arguments): Call inform_declaration only if
3086 the previous warning_at call returned true.
3087
2263c9f2
TS
30882019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3089
3090 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3091 parameter. Adjust all users.
3092 (c_parser_oacc_simple_clause): Replace parser with loc formal
3093 parameter. Adjust all users.
3094
ab20d992 30952019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
3096
3097 PR c/87924
3098 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3099 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3100
5f88ba10
JJ
31012019-02-15 Jakub Jelinek <jakub@redhat.com>
3102
3103 PR c/89340
3104 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3105 before c_decl_attributes rather than after it.
3106
cfc30fd1
JJ
31072019-02-06 Jakub Jelinek <jakub@redhat.com>
3108
3109 PR c/89211
3110 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3111 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3112 instead of 3 nested ifs.
3113
fbe83e6b
JM
31142019-02-06 Joseph Myers <joseph@codesourcery.com>
3115
3116 PR c/88584
3117 * c-decl.c (finish_decl): Do not complete array types for arrays
3118 with external linkage not at file scope.
3119
f461f938
RB
31202019-02-05 Richard Biener <rguenther@suse.de>
3121
3122 PR c/88606
3123 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3124 all type variants when not supported.
3125
fe509359
JJ
31262019-01-30 Jakub Jelinek <jakub@redhat.com>
3127
3128 PR c/89061
3129 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3130 * c-decl.c (decl_jump_unsafe): Return false for
3131 C_DECL_COMPOUND_LITERAL_P decls.
3132 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3133
6a335b96
JJ
31342019-01-29 Jakub Jelinek <jakub@redhat.com>
3135
f4b7e754
JJ
3136 PR c/89045
3137 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3138 scope.
3139
6a335b96
JJ
3140 PR c/86125
3141 * c-decl.c (last_fileptr_type): Remove.
3142 (last_structptr_types): New variable.
3143 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3144 {old,new}rettype instead of the types themselves. Assert
3145 last_structptr_types array has the same number of elements
3146 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3147 argument oldtype and newtype. Instead of handling
3148 just fileptr_type_node specially, handle all builtin_structptr_types
3149 pointer nodes. Formatting fix.
3150
d8b5a1a0
MS
31512019-01-24 Martin Sebor <msebor@redhat.com>
3152
3153 PR c/86125
3154 PR c/88886
3155 PR middle-end/86308
3156 * c-decl.c (match_builtin_function_types): Add arguments.
3157 (diagnose_mismatched_decls): Diagnose mismatched declarations
3158 of built-ins more strictly.
3159
e21c4491
JJ
31602019-01-24 Jakub Jelinek <jakub@redhat.com>
3161
3162 PR c++/88976
3163 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3164 on #pragma omp cancel with different modifiers.
3165
420183d9
L
31662019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3167
3168 PR c/51628
3169 PR c/88664
3170 * c-typeck.c (convert_for_assignment): Upate the
3171 warn_for_address_or_pointer_of_packed_member call.
3172
17ad43dd
TH
31732019-01-16 Tom Honermann <tom@honermann.net>
3174 Jason Merrill <jason@redhat.com>
3175
3176 * c-typeck.c (digest_init): Revised the error message produced for
3177 ill-formed cases of array initialization with a string literal.
3178 (error_init): Make variadic.
3179
5f07d78a
JJ
31802019-01-12 Jakub Jelinek <jakub@redhat.com>
3181
3182 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3183
c4581bbf
JJ
31842019-01-07 Jakub Jelinek <jakub@redhat.com>
3185
3186 PR c/88701
3187 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3188 if current_function_decl is non-NULL.
3189
65c5b1eb
JM
31902019-01-07 Joseph Myers <joseph@codesourcery.com>
3191
3192 PR c/88720
3193 PR c/88726
3194 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3195 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3196 functions declared but never defined only for external scope, not
3197 for other scopes.
3198
d8fcab68
JJ
31992019-01-07 Jakub Jelinek <jakub@redhat.com>
3200
3201 PR c++/85052
3202 * c-parser.c (c_parser_postfix_expression): Parse
3203 __builtin_convertvector.
3204
a5544970
JJ
32052019-01-01 Jakub Jelinek <jakub@redhat.com>
3206
3207 Update copyright years.
3208
da77eace
L
32092018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3210
3211 PR c/51628
3212 * c-typeck.c (convert_for_assignment): Call
3213 warn_for_address_or_pointer_of_packed_member.
3214
1edf8866
SB
32152018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3216
3217 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3218 a more specific error message (instead of just falling through).
3219
db4fd626
SB
32202018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3221
3222 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3223 asm qualifier is first seen; use that to give nicer "duplicate asm
3224 qualifier" messages. Delete 'quals" variable, instead pass the
3225 "is_volatile_ flag to build_asm_stmt directly.
3226 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3227 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3228
9c9cfcbb
SB
32292018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3230
3231 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3232 "done" boolean variable.
3233
a14feb3c
DM
32342018-12-19 David Malcolm <dmalcolm@redhat.com>
3235
3236 PR c++/87504
3237 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3238 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3239 (build_binary_op): Use struct op_location_t and
3240 class binary_op_rich_location.
3241
6d939173
JJ
32422018-12-11 Jakub Jelinek <jakub@redhat.com>
3243
3244 PR sanitizer/88426
3245 * c-convert.c (convert): Call c_fully_fold before calling
3246 ubsan_instrument_float_cast.
3247
b7055028
SB
32482018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3249
3250 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3251 setting "quals".
3252
5b76e75f
SB
32532018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3254
3255 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3256 after asm. Pass a flag for it to build_asm_expr.
3257 * c-tree.h (build_asm_expr): Update declaration.
3258 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3259 set ASM_INLINE_P.
3260
30bd42b9
SB
32612018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3262
3263 PR inline-asm/55681
3264 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3265 combination of volatile and goto, in any order, without repetitions.
3266
9df6c0e4
JB
32672018-12-04 James Norris <jnorris@codesourcery.com>
3268 Cesar Philippidis <cesar@codesourcery.com>
3269 Julian Brown <julian@codesourcery.com>
3270
3271 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3272 code.
3273
f44697b7
RB
32742018-11-30 Richard Biener <rguenther@suse.de>
3275
3276 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3277 _Literal (type) { ... } as empty aggregate or vector constructor.
3278
550dfbdc
MS
32792018-11-29 Martin Sebor <msebor@redhat.com>
3280
3281 PR c/88091
3282 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3283 (convert_arguments): Add comments. Pass additional argument to
3284 the function above.
3285
673670da
MS
32862018-11-29 Martin Sebor <msebor@redhat.com>
3287
3288 PR c/88172
3289 PR testsuite/88208
3290 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3291
db1d09b0
MS
32922018-11-23 Martin Sebor <msebor@redhat.com>
3293
3294 PR testsuite/88098
3295 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3296 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3297
98f08eb8
MS
32982018-11-20 Martin Sebor <msebor@redhat.com>
3299
3300 * c-parser.c (c_parser_has_attribute_expression): New function.
3301 (c_parser_attribute): New function.
3302 (c_parser_attributes): Move code into c_parser_attribute.
3303 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3304
cd5da983
MS
33052018-11-15 Martin Sebor <msebor@redhat.com>
3306
3307 PR c/83656
3308 * c-decl.c (header_for_builtin_fn): Declare.
3309 (diagnose_mismatched_decls): Diagnose declarations of built-in
3310 functions without a prototype.
3311 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3312 (convert_argument): Same.
3313 (convert_arguments): Factor code out into convert_argument.
3314 Detect mismatches between built-in formal arguments in calls
3315 to built-in without prototype.
3316 (build_conditional_expr): Same.
3317 (type_or_builtin_type): New function.
3318 (convert_for_assignment): Add argument. Conditionally issue
3319 warnings instead of errors for mismatches.
3320
620e594b
DM
33212018-11-13 David Malcolm <dmalcolm@redhat.com>
3322
3323 * c-decl.c: Replace "source_location" with "location_t".
3324 * c-tree.h: Likewise.
3325 * c-typeck.c: Likewise.
3326 * gimple-parser.c: Likewise.
3327
3179ebae
JJ
33282018-11-09 Jakub Jelinek <jakub@redhat.com>
3329
81a227c6
JJ
3330 * c-parser.c (c_parser_omp_clause_final): Use
3331 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3332 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3333 parsing instead of c_parser_paren_condition.
3334 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3335 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3336 c_fully_fold instead of c_parser_condition.
3337 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3338 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3339 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3340 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3341 c_parser_expr_no_commas instead of c_parser_expression.
3342
98c91c56
JJ
3343 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3344 reduction clause with inscan modifier.
3345
3179ebae
JJ
3346 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3347 clauses other than atomic_default_mem_order.
3348
28567c40
JJ
33492018-11-08 Jakub Jelinek <jakub@redhat.com>
3350
3351 * c-parser.c: Include memmode.h.
3352 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3353 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3354 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3355 task_reduction clauses.
3356 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3357 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3358 section, or lvalue assignment expression.
3359 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3360 (c_parser_omp_clause_lastprivate): Parse optional
3361 conditional: modifier.
3362 (c_parser_omp_clause_hint): Require constant integer expression rather
3363 than just integer expression.
3364 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3365 clause.
3366 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3367 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3368 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3369 functions.
3370 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3371 iterators. Parse mutexinoutset and depobj kinds.
3372 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3373 callers.
3374 (c_parser_omp_all_clauses): Likewise. Handle
3375 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3376 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3377 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3378 default memory order from requires directive if any. Adjust
3379 c_finish_omp_atomic caller.
3380 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3381 (c_parser_omp_flush): Parse flush with memory-order-clause.
3382 (c_parser_omp_for_loop): Allow NE_EXPR even in
3383 OpenMP loops, adjust c_finish_omp_for caller.
3384 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3385 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3386 Allow to be called while parsing combined parallel master.
3387 Parse combined master taskloop{, simd}.
3388 (c_parser_omp_parallel): Parse combined
3389 parallel master{, taskloop{, simd}} constructs.
3390 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3391 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3392 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3393 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3394 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3395 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3396 around teams body. Use SET_EXPR_LOCATION.
3397 (c_parser_omp_target_data): Allow target data
3398 with only use_device_ptr clauses.
3399 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3400 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3401 (c_parser_omp_requires): New function.
3402 (c_finish_taskloop_clauses): New function.
3403 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3404 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3405 declaration. Disallow in_reduction clause when combined with parallel
3406 master.
3407 (c_parser_omp_construct): Adjust c_parser_omp_master and
3408 c_parser_omp_taskgroup callers.
3409 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3410 other than cancel.
3411 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3412 like OMP_CLAUSE_REDUCTION.
3413 (handle_omp_array_sections): Likewise. Call save_expr on array
3414 reductions before calling build_index_type. Handle depend clauses
3415 with iterators.
3416 (struct c_find_omp_var_s): New type.
3417 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3418 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3419 with static, runtime or auto schedule kinds. Call save_expr for whole
3420 array reduction sizes. Diagnose reductions with zero sized elements
3421 or variable length structures. Diagnose nogroup clause used with
3422 reduction clause(s). Handle depend clause with
3423 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3424 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3425 some different type for other kinds. Use build_unary_op with
3426 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3427 Handle depend clauses with iterators. Remove no longer needed special
3428 case that predetermined const qualified vars may be specified in
3429 firstprivate clause. Complain if const qualified vars are mentioned
3430 in data-sharing clauses other than firstprivate or shared. Use
3431 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3432 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3433 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3434 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3435
7e2de6df
DM
34362018-10-29 David Malcolm <dmalcolm@redhat.com>
3437
3438 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3439 logic for change to name_hint::operator bool.
3440 (undeclared_variable): Likewise.
3441 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3442 (c_parser_parameter_declaration): Likewise.
3443
9f936c86
JM
34442018-10-17 Joseph Myers <joseph@codesourcery.com>
3445
3446 * c-errors.c (pedwarn_c11): New function.
3447 * c-parser.c (disable_extension_diagnostics): Save
3448 warn_c11_c2x_compat and set it to 0.
3449 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3450 (c_parser_static_assert_declaration_no_semi): Handle
3451 _Static_assert without string constant.
3452 * c-tree.h (pedwarn_c11): New prototype.
3453
033eb567
DM
34542018-10-17 David Malcolm <dmalcolm@redhat.com>
3455
3456 * Make-lang.in (selftest-c): New.
3457 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3458 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3459 from gcc/Makefile.in.
3460
0edf3afe
RB
34612018-10-02 Richard Biener <rguenther@suse.de>
3462
3463 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3464
8313a764
JM
34652018-09-26 Joseph Myers <joseph@codesourcery.com>
3466
3467 PR c/87390
3468 * c-typeck.c (build_binary_op): Use excess precision for
3469 comparisons of integers and floating-point for C11 and later.
3470
ce6f0888
MJ
34712018-09-26 Martin Jambor <mjambor@suse.cz>
3472
3473 PR c/87347
3474 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 3475 comment.
ce6f0888 3476
9c4a4b3c
DM
34772018-09-17 David Malcolm <dmalcolm@redhat.com>
3478
3479 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3480 Update for new param.
3481 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3482 Likewise.
3483
80c6d1f4
MJ
34842018-09-17 Martin Jambor <mjambor@suse.cz>
3485
3486 PR c/63886
3487 * c-parser.c: (warn_for_abs): New function.
3488 (c_parser_postfix_expression_after_primary): Call it.
3489
4a426e36
BE
34902018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3491
3492 * c-typeck.c (digest_init): Shorten overlength strings.
3493
6d900107
BE
34942018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3495
3496 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3497
b5764229
BE
34982018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3499
3500 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3501 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3502
22eea6b2
AM
35032018-08-30 Alexander Monakov <amonakov@ispras.ru>
3504
3505 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3506 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3507
85204e23
DM
35082018-08-27 David Malcolm <dmalcolm@redhat.com>
3509
3510 PR 87091
3511 * c-decl.c (implicitly_declare): Update call to
3512 maybe_add_include_fixit to suggest overriding the location, as it
3513 is for a note.
3514 * c-objc-common.c (c_tree_printer): Update for conversion of
3515 show_caret_p to a tri-state.
3516
3d78e008
ML
35172018-08-27 Martin Liska <mliska@suse.cz>
3518
3519 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
3520 fndecl_built_in_p and remove check for FUNCTION_DECL if
3521 possible.
3d78e008
ML
3522 (diagnose_mismatched_decls): Likewise.
3523 (merge_decls): Likewise.
3524 (warn_if_shadowing): Likewise.
3525 (pushdecl): Likewise.
3526 (implicitly_declare): Likewise.
3527 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3528 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3529 * c-typeck.c (build_function_call_vec): Likewise.
3530 (convert_arguments): Likewise.
3531
097f82ec
DM
35322018-08-20 David Malcolm <dmalcolm@redhat.com>
3533
3534 PR other/84889
3535 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3536 (diagnose_mismatched_decls): Likewise, in various places.
3537 (warn_if_shadowing): Likewise.
3538 (implicit_decl_warning): Likewise.
3539 (implicitly_declare): Likewise.
3540 (undeclared_variable): Likewise.
3541 (declare_label): Likewise.
3542 (grokdeclarator): Likewise.
3543 (start_function): Likewise.
3544 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3545 (c_parser_parameter_declaration): Likewise.
3546 (c_parser_binary_expression): Likewise.
3547 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3548 (parser_build_binary_op): Likewise.
3549 (build_unary_op): Likewise.
3550 (error_init): Likewise.
3551 (pedwarn_init): Likewise.
3552 (warning_init): Likewise.
3553 (convert_for_assignment): Likewise.
3554
96e6ae57
DM
35552018-08-15 David Malcolm <dmalcolm@redhat.com>
3556
3557 * c-objc-common.c: Include "gcc-rich-location.h".
3558 (c_tree_printer): Move implemenation of '%T' to...
3559 (print_type): ...this new function.
3560 (range_label_for_type_mismatch::get_text): New function.
3561 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3562 range for the various ic_argpass cases.
3563 (class maybe_range_label_for_tree_type_mismatch): New class.
3564 (build_binary_op): Use it when calling binary_op_error.
3565
0cd020ae 35662018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3567
0cd020ae
PK
3568 * c-decl.c (start_decl): Do not warn if variables is named as main
3569 and is a local variable.
3570
72733314
IS
35712018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3572
3573 PR c/19315
3574 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3575 objects of unknown size.
3576
23aa9f7c
MS
35772018-08-13 Martin Sebor <msebor@redhat.com>
3578
3579 PR tree-optimization/71625
3580 * c-parser.c (c_parser_declaration_or_fndef): Call
3581 braced_list_to_string.
3582
e5e7e50d
BH
35832018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3584
3585 PR c/86690
3586 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3587 errors.
3588
8a45b051
MS
35892018-08-01 Martin Sebor <msebor@redhat.com>
3590
3591 PR tree-optimization/86650
3592 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3593 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3594
5922dcb5
JJ
35952018-08-01 Jakub Jelinek <jakub@redhat.com>
3596
3597 PR c/85704
3598 * c-typeck.c (init_field_decl_cmp): New function.
3599 (output_pending_init_elements): Use it for field comparisons
3600 instead of pure bit_position comparisons.
3601
9b452033
JJ
36022018-07-12 Jakub Jelinek <jakub@redhat.com>
3603
3604 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3605 type here, instead add "omp declare target implicit" attribute.
3606 (finish_decl): Diagnose vars without mappable type here.
3607
ab20d992
JJ
36082018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3609 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3610 Cesar Philippidis <cesar@codesourcery.com>
3611
3612 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3613 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3614 to their non-present_or_* counterparts. Make 'self' an alias to
3615 PRAGMA_OACC_CLAUSE_HOST.
3616 (c_parser_oacc_data_clause): Update GOMP mappings for
3617 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3618 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3619 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3620 Remove support for present_or_* clauses.
3621 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3622 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3623 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3624 (OACC_DATA_CLAUSE_MASK): Likewise.
3625 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3626 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3627 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3628 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3629 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3630
e197e64e
KV
36312018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3632
3633 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3634 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3635 (c_parser_gimple_unary_expression): Likewise.
3636
487f2f61
JJ
36372018-06-15 Jakub Jelinek <jakub@redhat.com>
3638
3639 PR c/86093
3640 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3641 before doing POINTER_DIFF_EXPR.
3642
e4d44a37
MP
36432018-06-07 Marek Polacek <polacek@redhat.com>
3644
3645 PR c/85318
3646 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3647 for loop initial declarations.
3648
b67b9225
DP
36492018-05-30 David Pagan <dave.pagan@oracle.com>
3650
3651 PR c/55976
3652 * c-decl.c (grokdeclarator): Update check for return type warnings.
3653 (start_function): Likewise.
3654 (finish_function): Likewise.
3655 * c-typeck.c (c_finish_return): Update check for return type warnings.
3656 Pass OPT_Wreturn_type to pedwarn when appropriate.
3657
c566cc9f
RS
36582018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3659
3660 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3661 __FMA_EXPR handlng.
3662
e4f81565
RS
36632018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3664
3665 * gimple-parser.c: Include internal-fn.h.
3666 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3667 (c_parser_gimple_call_internal): New function.
3668 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3669 Fix typos in comment.
3670
79e7b1fe
JJ
36712018-05-10 Jakub Jelinek <jakub@redhat.com>
3672
3673 PR c++/85662
3674 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3675 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3676 fold_convert_loc.
3677 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3678 fold_offsetof_1, pass argtype as TYPE to it and drop the
3679 fold_convert_loc.
3680
f7584c81
DP
36812018-05-02 David Pagan <dave.pagan@oracle.com>
3682
3683 PR c/30552
3684 * c-decl.c (old_style_parameter_scope): New function.
3685 * c-parser.c (c_parser_postfix_expression): Check for statement
3686 expressions in old-style function parameter list declarations.
3687 * c-parser.h (old_style_parameter_scope): New extern declaration.
3688
b33a0cb3
JJ
36892018-04-25 Jakub Jelinek <jakub@redhat.com>
3690
3691 PR sanitizer/84307
3692 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3693 it is not TREE_STATIC.
3694 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3695 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3696 its COMPOUND_LITERAL_EXPR_DECL.
3697
c5c5822a
JM
36982018-03-21 Joseph Myers <joseph@codesourcery.com>
3699
3700 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3701 where all functions return the same _FloatN or _FloatNx type,
3702 treat integer types as _Float64 instead of double.
3703
aa1c9429
JJ
37042018-03-21 Jakub Jelinek <jakub@redhat.com>
3705
3706 PR c/84999
3707 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3708 building vector comparison, diagnose it and return error_mark_node.
3709
9bb45a95
JJ
37102018-03-15 Jakub Jelinek <jakub@redhat.com>
3711
3712 PR c/84853
3713 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3714 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3715 INTEGER_TYPE element type.
3716
ada6bad9
DP
37172018-03-13 David Pagan <dave.pagan@oracle.com>
3718
3719 PR c/46921
3720 * c-typeck.c (output_init_element): Ensure field initializer
3721 expression is always evaluated if there are side effects.
3722
849bbdb9
JJ
37232018-03-06 Jakub Jelinek <jakub@redhat.com>
3724
3725 PR c/84721
3726 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3727 !building_stmt_list_p ().
3728
d74641bd
RS
37292018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3730
3731 PR c/84305
3732 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3733 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3734 and include the BIND_EXPR in the list of things that need to be
3735 pre-evaluated.
3736
0444aa9c
NS
37372018-02-09 Nathan Sidwell <nathan@acm.org>
3738
3739 PR c/84293
3740 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3741 to strict_aliasing_warning.
3742
7c30b12a
PC
37432018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3744
3745 * c-typeck.c (really_start_incremental_init, push_init_level,
3746 set_nonincremental_init, output_init_element, process_init_element):
3747 Use DECL_UNNAMED_BIT_FIELD.
3748
2be4dfcb
MP
37492018-01-31 Marek Polacek <polacek@redhat.com>
3750
3751 PR c/81779
3752 * c-parser.c (c_parser_compound_statement_nostart): Call
3753 expansion_point_location_if_in_system_header.
3754
bb9869d5
DM
37552018-01-17 David Malcolm <dmalcolm@redhat.com>
3756
3757 PR c++/83814
3758 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3759 the C part.
3760
b4923738
JJ
37612018-01-13 Jakub Jelinek <jakub@redhat.com>
3762
3763 PR c/83801
3764 * c-tree.h (decl_constant_value_1): Add a bool argument.
3765 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3766 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3767 (decl_constant_value): Adjust caller.
3768 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3769 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3770 decl_constant_value returns initializer that has BLKmode or
3771 array type.
3772 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3773
928686b1
RS
37742018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3775 Alan Hayward <alan.hayward@arm.com>
3776 David Sherwood <david.sherwood@arm.com>
3777
3778 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3779 TYPE_VECTOR_SUBPARTS.
3780
85ec4feb
JJ
37812018-01-03 Jakub Jelinek <jakub@redhat.com>
3782
3783 Update copyright years.
3784
913884f7
JJ
37852018-01-01 Jakub Jelinek <jakub@redhat.com>
3786
3787 PR c/83595
3788 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3789 c_parser_conditional_expression, c_parser_cast_expression,
3790 c_parser_sizeof_expression, c_parser_alignof_expression,
3791 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3792 c_parser_transaction_expression): Use set_error () method instead
3793 of setting value member to error_mark_node.
3794
c6cfa2bf
MM
37952017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3796
3797 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3798 and _Float<N>X built-in functions.
3799
11d29d63
JJ
38002017-12-22 Jakub Jelinek <jakub@redhat.com>
3801
14ec014e
JJ
3802 PR debug/83550
3803 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3804 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3805 incomplete vars rather than after it.
3806
11d29d63
JJ
3807 PR debug/83547
3808 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3809 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3810 and consider empty ones if there are no other stmts. For
3811 -Wunused-value walk all statements before the one only followed by
3812 DEBUG_BEGIN_STMTs.
3813
170a8bd6 38142017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3815 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3816
3817 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3818 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3819 (c_parser_do_statement): Likewise.
3820 (c_parser_for_statement): Likewise.
3821 (c_parser_statement_after_labels): Adjust calls to above.
3822 (c_parse_pragma_ivdep): New static function.
3823 (c_parser_pragma_unroll): Likewise.
3824 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3825 <PRAGMA_UNROLL>: New case.
3826
01512446
JJ
38272017-12-19 Jakub Jelinek <jakub@redhat.com>
3828
3829 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3830 perform_integral_promotions, digest_init): Replace Yoda conditions
3831 with typical order conditions.
3832 * c-decl.c (check_bitfield_type_and_width): Likewise.
3833
c65e18d3
BE
38342017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3835
3836 * c-typeck.c (c_safe_arg_type_equiv_p,
3837 c_safe_function_type_cast_p): New function.
3838 (build_c_cast): Implement -Wcast-function-type.
3839
b7280579
RB
38402017-12-14 Richard Biener <rguenther@suse.de>
3841
3842 PR c/83415
3843 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3844 like REALPART_EXPR for the behavior of whether its operand
3845 is an lvalue.
3846
49e6a6c0
MP
38472017-12-12 Marek Polacek <polacek@redhat.com>
3848
3849 PR c/82679
3850 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3851
ab20d992 38522017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3853
3854 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3855 * c-parser.c (add_debug_begin_stmt): New.
3856 (c_parser_declaration_or_fndef): Call it.
3857 (c_parser_compound_statement_nostart): Likewise.
3858 (c_parser_statement_after_labels): Likewise.
3859 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3860
4b2b493f
JM
38612017-12-07 Joseph Myers <joseph@codesourcery.com>
3862
3863 * c-decl.c (build_compound_literal): Add parameter alignas_align
3864 and set alignment of decl if nonzero.
3865 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3866 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3867 qualifier.
3868 (c_parser_struct_declaration): Update syntax comment.
3869 (c_parser_type_name): Add alignas_ok argument and pass it to
3870 c_parser_declspecs.
3871 (c_parser_cast_expression): Pass true to c_parser_type_name and
3872 give error if a cast used an _Alignas specifier.
3873 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3874 give error if sizeof (type-name) used an _Alignas specifier.
3875 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3876 give error if _Alignof (type-name) used an _Alignas specifier.
3877 (c_parser_postfix_expression_after_paren_type): Check specified
3878 alignment for a compound literal and pass it to
3879 build_compound_literal.
3880 * c-parser.h (c_parser_type_name): Update prototype.
3881 * c-tree.h (build_compound_literal): Update prototype.
3882
5d9ae53d
MS
38832017-12-07 Martin Sebor <msebor@redhat.com>
3884
3885 PR c/81544
3886 * c-decl.c (c_decl_attributes): Look up existing declaration and
3887 pass it to decl_attributes.
3888
c79144f8
DM
38892017-12-06 David Malcolm <dmalcolm@redhat.com>
3890
3891 PR c/83236
3892 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3893 reserved for use by the implementation.
3894
613bc14f
DM
38952017-12-06 David Malcolm <dmalcolm@redhat.com>
3896
3897 * c-decl.c: Include "c-family/c-spellcheck.h".
3898
05abad4c
ML
38992017-12-05 Martin Liska <mliska@suse.cz>
3900 Jakub Jelinek <jakub@redhat.com>
3901
3902 * c-typeck.c (pointer_diff): Add new argument and instrument
3903 pointer subtraction.
3904 (build_binary_op): Similar for pointer comparison.
3905
cc6534d4
JJ
39062017-12-01 Jakub Jelinek <jakub@redhat.com>
3907
65791f42
JJ
3908 PR c/79153
3909 * c-parser.c: Include tree-iterator.h.
3910 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3911 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3912 on it.
3913
cc6534d4
JJ
3914 PR c/83222
3915 * c-tree.h (decl_constant_value_1): Declare.
3916 * c-typeck.c (decl_constant_value_1): New function.
3917 (decl_constant_value): Use it.
3918 * c-fold.c (c_fully_fold_internal): If in_init, use
3919 decl_constant_value_1 instead of decl_constant_value.
3920
5de73c05
JJ
39212017-11-30 Jakub Jelinek <jakub@redhat.com>
3922
3923 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3924
058f0b9e
JJ
39252017-11-28 Jakub Jelinek <jakub@redhat.com>
3926
3927 PR sanitizer/81275
3928 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3929 c_switch_covers_all_cases_p returns true.
3930
5e9d6aa4 39312017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3932 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3933
3934 * Make-lang.in (c/c-array-notation.o): Remove.
3935 * c-array-notation.c: Delete.
3936 * c-decl.c: Remove cilkplus condition.
3937 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3938 c_parser_cilk_verify_simd, c_parser_array_notation,
3939 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3940 c_parser_cilk_simd_fn_vector_attrs,
3941 c_finish_cilk_simd_fn_tokens): Delete.
3942 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3943 (c_parser_direct_declarator_inner): Ditto.
3944 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3945 (c_parser_attributes, c_parser_compound_statement,
3946 c_parser_statement_after_labels, c_parser_if_statement,
3947 c_parser_switch_statement, c_parser_while_statement,
3948 c_parser_do_statement, c_parser_for_statement,
3949 c_parser_unary_expression, c_parser_postfix_expression,
3950 c_parser_postfix_expression_after_primary,
3951 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3952 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3953 support.
3954 * c-typeck.c (build_array_ref, build_function_call_vec,
3955 convert_arguments,
3956 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3957 c_finish_loop, build_binary_op): Remove cilkplus support.
3958
9e851845
JJ
39592017-11-28 Jakub Jelinek <jakub@redhat.com>
3960
3961 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3962 of build3.
3963
ab20d992 39642017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3965
3966 * Make-lang.in (c.install-plugin): Install backend import library.
3967
41521dee
JJ
39682017-11-23 Jakub Jelinek <jakub@redhat.com>
3969
3970 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3971 pragma_stmt context.
3972
ac9effed
EB
39732017-11-23 Mike Stump <mikestump@comcast.net>
3974 Eric Botcazou <ebotcazou@adacore.com>
3975
3976 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3977 ANNOTATE_EXPR.
3978 (c_parser_do_statement): Likewise.
3979 (c_parser_for_statement): Likewise.
3980
ce95abc4
DM
39812017-11-22 David Malcolm <dmalcolm@redhat.com>
3982
3983 PR c++/62170
3984 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3985 bool to bool *. Within '%T' handling, if showing an "aka", use
3986 "quoted" param to add appropriate quoting.
3987
974aedcc
MP
39882017-11-22 Marek Polacek <polacek@redhat.com>
3989
3990 PR c++/60336
3991 PR middle-end/67239
3992 PR target/68355
3993 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3994
d4300cc6
DM
39952017-11-21 David Malcolm <dmalcolm@redhat.com>
3996
3997 PR c/83056
3998 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3999 earlier failed lookups.
4000
1af4ebf5
MG
40012017-11-21 Marc Glisse <marc.glisse@inria.fr>
4002
4003 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4004 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4005
26edace6
DM
40062017-11-20 David Malcolm <dmalcolm@redhat.com>
4007
4008 PR c/81404
4009 * c-decl.c: Include "c-family/known-headers.h".
4010 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4011 to known-headers.cc.
4012 (class suggest_missing_header): Move to known-header.h.
4013 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4014 than get_c_name_hint.
4015
b1212255
DM
40162017-11-20 David Malcolm <dmalcolm@redhat.com>
4017
4018 * c-decl.c (get_c_name_hint): New function.
4019 (class suggest_missing_header): New class.
4020 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4021 suggest missing headers to the user.
4022
6c7a259b
DM
40232017-11-20 David Malcolm <dmalcolm@redhat.com>
4024
4025 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4026 Include "c-family/name-hint.h"
4027 (implicit_decl_warning): Convert "hint" from
4028 const char * to name_hint. Pass location to
4029 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4030 warning was not printed.
4031 (undeclared_variable): Likewise for "guessed_id".
4032 (lookup_name_fuzzy): Convert return type from const char *
4033 to name_hint. Add location_t param.
4034 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4035 Include "c-family/name-hint.h"
4036 (c_parser_declaration_or_fndef): Convert "hint" from
4037 const char * to name_hint. Pass location to lookup_name_fuzzy.
4038 (c_parser_parameter_declaration): Likewise.
4039
f9c59f7e
JJ
40402017-11-19 Jakub Jelinek <jakub@redhat.com>
4041
4042 PR c/66618
4043 PR c/69960
4044 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4045 where needed.
4046 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4047 handle_omp_array_sections): Likewise.
4048 (digest_init): Don't call decl_constant_value_for_optimization.
4049 * c-tree.h (decl_constant_value_for_optimization): Removed.
4050 * c-fold.c (c_fold_array_ref): New function.
4051 (c_fully_fold_internal): Add LVAL argument, propagate it through
4052 recursive calls. For VAR_P call decl_constant_value and
4053 unshare if not LVAL and either optimizing or IN_INIT. Remove
4054 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4055 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4056 (c_fully_fold): Add LVAL argument, pass it through to
4057 c_fully_fold_internal.
4058 (decl_constant_value_for_optimization): Removed.
4059
3ca0dc60
JM
40602017-11-15 Joseph Myers <joseph@codesourcery.com>
4061
4062 PR c/81156
4063 * c-parser.c (check_tgmath_function): New function.
4064 (enum tgmath_parm_kind): New enum.
4065 (c_parser_postfix_expression): Handle __builtin_tgmath.
4066
64a5912c
DM
40672017-10-31 David Malcolm <dmalcolm@redhat.com>
4068
4069 * c-decl.c (implicit_decl_warning): Update for renaming of
4070 pedwarn_at_rich_loc and warning_at_rich_loc.
4071 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4072 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4073 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4074 (c_parser_struct_or_union_specifier): Likewise for renaming of
4075 pedwarn_at_rich_loc.
4076 (c_parser_parameter_declaration): Likewise for renaming of
4077 error_at_rich_loc.
4078 * c-typeck.c (build_component_ref): Likewise.
4079 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4080 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4081 (set_init_label): Likewise for renaming of error_at_rich_loc.
4082
c1136864
RB
40832017-10-30 Richard Biener <rguenther@suse.de>
4084
4085 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4086 stmts.
4087
ee5fd23a
MM
40882017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4089
4090 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4091 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4092
1a59ccf2
DM
40932017-10-25 David Malcolm <dmalcolm@redhat.com>
4094
4095 PR c/7356
4096 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4097 semicolons.
4098
bc1a75dd
JJ
40992017-10-25 Jakub Jelinek <jakub@redhat.com>
4100
4101 PR libstdc++/81706
4102 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4103 newdecl to corresponding __builtin_ if any.
4104
ff1ff960
PC
41052017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4106
4107 PR c++/82466
4108 * c-decl.c (diagnose_mismatched_decls): Use
4109 OPT_Wbuiltin_declaration_mismatch.
4110
62e1c678
DM
41112017-10-12 David Malcolm <dmalcolm@redhat.com>
4112
4113 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4114 use it to guard calls to maybe_suggest_missing_token_insertion.
4115 (c_parser_parms_list_declarator): Override default value of new
4116 "type_is_unique" param to c_parser_require.
4117 (c_parser_asm_statement): Likewise.
4118 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4119 defaulting to true.
4120
a92f6726
NS
41212017-10-11 Nathan Sidwell <nathan@acm.org>
4122
4123 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4124
8e6cdc90
RS
41252017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4126
4127 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4128 operating on trees as wide_ints.
4129 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4130 (c_tree_equal): Likewise.
4131
8139a48e
DM
41322017-10-04 David Malcolm <dmalcolm@redhat.com>
4133
4134 * c-decl.c (push_parm_decl): Store c_parm's location into the
4135 PARAM_DECL.
4136 (build_c_parm): Add "loc" param and store it within the c_parm.
4137 * c-parser.c (struct c_parser): Add "last_token_location" field.
4138 (c_parser_consume_token): Store location of the token into the
4139 new field.
4140 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4141 when handling a FUNCTION_DECL, if it doesn't already have them.
4142 (c_parser_parameter_declaration): Generate a location for the
4143 parameter, and pass it to the call to build_c_parm.
4144 * c-tree.h (struct c_parm): Add field "loc".
4145 (build_c_parm): Add location_t param.
4146 * c-typeck.c (get_fndecl_argument_location): New function.
4147 (inform_for_arg): New function.
4148 (convert_for_assignment): Use inform_for_arg when dealing with
4149 ic_argpass.
4150
2a389958
JJ
41512017-09-29 Jakub Jelinek <jakub@redhat.com>
4152
7d386d45
JJ
4153 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4154 width is non-NULL.
4155 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4156 don't SET_DECL_C_BIT_FIELD here.
4157
2a389958
JJ
4158 PR c/82340
4159 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4160 instead of trying to set just TREE_READONLY manually.
4161
ebc6a85e
TV
41622017-09-16 Tom de Vries <tom@codesourcery.com>
4163
4164 PR c/81875
4165 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4166 cond itself.
4167
bb75facd
JM
41682017-09-15 Joseph Myers <joseph@codesourcery.com>
4169
4170 PR c/82071
4171 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4172 for C11.
4173 (build_conditional_expr): For C11, generate result with excess
4174 precision when one argument is an integer and the other is of a
4175 type using excess precision.
4176
1d933576
BE
41772017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4178
4179 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4180
267bbb6f
MP
41812017-09-13 Marek Polacek <polacek@redhat.com>
4182
4183 PR c/82167
4184 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4185 than expr.original_type.
4186
6836632e
NS
41872017-09-12 Nathan Sidwell <nathan@acm.org>
4188
4189 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4190 resort_sorted_fields): Moved from c-family/c-common.c.
4191 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4192
e035be33
JM
41932017-09-01 Joseph Myers <joseph@codesourcery.com>
4194
4195 PR c/82071
4196 * c-typeck.c (build_atomic_assign): Handle argument with excess
4197 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4198 argument passed to build_binary_op and convert_for_assignment but
4199 not for call to c_fully_fold.
4200 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4201 Ensure build_binary_op is called with argument with original
4202 semantic type. Avoid calling c_fully_fold with an
4203 EXCESS_PRECISION_EXPR from build_binary_op.
4204
d2e05fcb
JJ
42052017-09-01 Jakub Jelinek <jakub@redhat.com>
4206
4207 PR c/81887
4208 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4209
b397965c
RS
42102017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4211 Alan Hayward <alan.hayward@arm.com>
4212 David Sherwood <david.sherwood@arm.com>
4213
4214 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4215 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4216 m1 and m2 to the signed equivalent of a fixed-point
4217 SCALAR_TYPE_MODE.
4218
14e18d71
DM
42192017-08-24 David Malcolm <dmalcolm@redhat.com>
4220
4221 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4222 than CAN_HAVE_LOCATION_P when determining whether to use the
4223 location_t value within "value".
4224
7f204c0f
DM
42252017-08-21 David Malcolm <dmalcolm@redhat.com>
4226
4227 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4228 rather than peeking the location of the first token.
4229 * c-tree.h (c_expr::get_location): New method.
4230
2f687306
DM
42312017-08-21 David Malcolm <dmalcolm@redhat.com>
4232
4233 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4234 to check_function_arguments.
4235
3e7b80d7
MP
42362017-08-18 Marek Polacek <polacek@redhat.com>
4237
4238 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4239 commentary.
4240
00aa1fa2
L
42412017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4242
4243 PR c/53037
4244 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4245 (check_bitfield_type_and_width): Don't allow bit-field with
4246 warn_if_not_aligned type.
4247
da67acb9
MS
42482017-08-14 Martin Sebor <msebor@redhat.com>
4249
4250 PR c/81117
4251 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4252
bb85aa74
MP
42532017-08-11 Marek Polacek <polacek@redhat.com>
4254
4255 PR c/81795
4256 * c-decl.c (pushtag): Only print inform if the warning was printed.
4257 (grokdeclarator): Likewise.
4258
32129a17
DM
42592017-08-10 David Malcolm <dmalcolm@redhat.com>
4260
4261 * c-parser.c (c_parser_error): Rename to...
4262 (c_parser_error_richloc): ...this, making static, and adding
4263 "richloc" parameter, passing it to the c_parse_error call,
4264 rather than calling c_parser_set_source_position_from_token.
4265 (c_parser_error): Reintroduce, reimplementing in terms of the
4266 above, converting return type from void to bool.
4267 (class token_pair): New class.
4268 (struct matching_paren_traits): New struct.
4269 (matching_parens): New typedef.
4270 (struct matching_brace_traits): New struct.
4271 (matching_braces): New typedef.
4272 (get_matching_symbol): New function.
4273 (c_parser_require): Add param MATCHING_LOCATION, using it to
4274 highlight matching "opening" tokens for missing "closing" tokens.
4275 (c_parser_skip_until_found): Likewise.
4276 (c_parser_static_assert_declaration_no_semi): Convert explicit
4277 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4278 class matching_parens, so that the pertinent open parenthesis is
4279 highlighted when there are problems locating the close
4280 parenthesis.
4281 (c_parser_struct_or_union_specifier): Likewise.
4282 (c_parser_typeof_specifier): Likewise.
4283 (c_parser_alignas_specifier): Likewise.
4284 (c_parser_simple_asm_expr): Likewise.
4285 (c_parser_braced_init): Likewise, for matching_braces.
4286 (c_parser_paren_condition): Likewise, for matching_parens.
4287 (c_parser_switch_statement): Likewise.
4288 (c_parser_for_statement): Likewise.
4289 (c_parser_asm_statement): Likewise.
4290 (c_parser_asm_operands): Likewise.
4291 (c_parser_cast_expression): Likewise.
4292 (c_parser_sizeof_expression): Likewise.
4293 (c_parser_alignof_expression): Likewise.
4294 (c_parser_generic_selection): Likewise.
4295 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4296 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4297 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4298 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4299 c_parser_skip_until_found call.
4300 (c_parser_objc_class_definition): Use class matching_parens as
4301 above.
4302 (c_parser_objc_method_decl): Likewise.
4303 (c_parser_objc_try_catch_finally_statement): Likewise.
4304 (c_parser_objc_synchronized_statement): Likewise.
4305 (c_parser_objc_at_property_declaration): Likewise.
4306 (c_parser_oacc_wait_list): Likewise.
4307 (c_parser_omp_var_list_parens): Likewise.
4308 (c_parser_omp_clause_collapse): Likewise.
4309 (c_parser_omp_clause_default): Likewise.
4310 (c_parser_omp_clause_if): Likewise.
4311 (c_parser_omp_clause_num_threads): Likewise.
4312 (c_parser_omp_clause_num_tasks): Likewise.
4313 (c_parser_omp_clause_grainsize): Likewise.
4314 (c_parser_omp_clause_priority): Likewise.
4315 (c_parser_omp_clause_hint): Likewise.
4316 (c_parser_omp_clause_defaultmap): Likewise.
4317 (c_parser_oacc_single_int_clause): Likewise.
4318 (c_parser_omp_clause_ordered): Likewise.
4319 (c_parser_omp_clause_reduction): Likewise.
4320 (c_parser_omp_clause_schedule): Likewise.
4321 (c_parser_omp_clause_num_teams): Likewise.
4322 (c_parser_omp_clause_thread_limit): Likewise.
4323 (c_parser_omp_clause_aligned): Likewise.
4324 (c_parser_omp_clause_linear): Likewise.
4325 (c_parser_omp_clause_safelen): Likewise.
4326 (c_parser_omp_clause_simdlen): Likewise.
4327 (c_parser_omp_clause_depend): Likewise.
4328 (c_parser_omp_clause_map): Likewise.
4329 (c_parser_omp_clause_device): Likewise.
4330 (c_parser_omp_clause_dist_schedule): Likewise.
4331 (c_parser_omp_clause_proc_bind): Likewise.
4332 (c_parser_omp_clause_uniform): Likewise.
4333 (c_parser_omp_for_loop): Likewise.
4334 (c_parser_cilk_clause_vectorlength): Likewise.
4335 (c_parser_cilk_clause_linear): Likewise.
4336 (c_parser_transaction_expression): Likewise.
4337 * c-parser.h (c_parser_require): Add param matching_location with
4338 default UNKNOWN_LOCATION.
4339 (c_parser_error): Convert return type from void to bool.
4340 (c_parser_skip_until_found): Add param matching_location with
4341 default UNKNOWN_LOCATION.
4342
30af3a2b
MP
43432017-08-09 Marek Polacek <polacek@redhat.com>
4344
4345 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4346 * c-tree.h (build_external_ref): Update declaration.
4347 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4348 (build_external_ref): Change the type of a parameter to bool.
4349 (parser_build_binary_op): Use true/false instead of 1/0.
4350 (pointer_diff): Likewise.
4351 (build_modify_expr): Likewise.
4352 (set_designator): Change the type of a parameter to bool.
4353 (set_init_index): Use true/false instead of 1/0.
4354 (set_init_label): Likewise.
4355 (output_init_element): Change the type of a parameter to bool.
4356 (output_pending_init_elements): Use true/false instead of 1/0.
4357 (process_init_element): Likewise.
4358 (build_binary_op): Change the type of a parameter to bool.
4359
296c53ac
MP
43602017-08-09 Marek Polacek <polacek@redhat.com>
4361
4362 PR c/81233
4363 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4364 Call emit_diagnostic_valist instead of pedwarn.
4365 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4366 Print the relevant types in diagnostics.
4367
a32c8316
MP
43682017-08-09 Marek Polacek <polacek@redhat.com>
4369
4370 PR c/81417
4371 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 4372 build_conditional_expr.
a32c8316
MP
4373 * c-parser.c (c_parser_conditional_expression): Create locations for
4374 EXP1 and EXP2 from their source ranges. Pass the locations down to
4375 build_conditional_expr.
4376 * c-tree.h (build_conditional_expr): Update declaration.
4377 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4378 For -Wsign-compare, also print the types.
4379
314e6352
ML
43802017-08-08 Martin Liska <mliska@suse.cz>
4381
4382 * c-convert.c: Include header files.
4383 * c-typeck.c: Likewise.
4384
577eec56
ML
43852017-08-07 Martin Liska <mliska@suse.cz>
4386
4387 * c-parser.c (c_parser_attributes): Canonicalize name of an
4388 attribute.
4389
f7b6353a
MP
43902017-08-02 Marek Polacek <polacek@redhat.com>
4391
4392 PR c/81289
4393 * c-parser.c (c_parser_unary_expression): Use set_error.
4394
8a6eab34
MP
4395 PR c/81448
4396 PR c/81306
4397 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4398 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4399
ab20d992 44002017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
4401 Martin Liska <mliska@suse.cz>
4402
4403 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 4404 statement.
7fef86d3 4405
f34ebeb2
ML
44062017-07-31 Martin Liska <mliska@suse.cz>
4407
4408 PR sanitize/81530
4409 * c-convert.c (convert): Guard condition with flag_sanitize_p
4410 also with current_function_decl non-null equality.
4411 * c-decl.c (grokdeclarator): Likewise.
4412 * c-typeck.c (build_binary_op): Likewise.
4413
8595f67b
MP
44142017-07-25 Marek Polacek <polacek@redhat.com>
4415
4416 * c-decl.c (grokfield): Remove local variable.
4417
d49718d6
MP
44182017-07-25 Marek Polacek <polacek@redhat.com>
4419
4420 PR c/81364
4421 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4422 macro expansion if the body is in { }.
4423 (c_parser_while_statement): Likewise.
4424 (c_parser_for_statement): Likewise.
4425
ff22eb12
NS
44262017-07-18 Nathan Sidwell <nathan@acm.org>
4427
4428 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4429
eea77d1f
DM
44302017-07-14 David Malcolm <dmalcolm@redhat.com>
4431
4432 * c-decl.c (implicitly_declare): When suggesting a missing
4433 #include, provide a fix-it hint.
4434
b6f43128
DM
44352017-07-06 David Malcolm <dmalcolm@redhat.com>
4436
4437 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4438 and call that instead.
4439 * c-tree.h (selftest::run_c_tests): New decl.
4440
3e2becc4
MP
44412017-06-26 Marek Polacek <polacek@redhat.com>
4442
4443 PR c/80116
4444 * c-parser.c (c_parser_if_body): Set the location of the
4445 body of the conditional after parsing all the labels. Call
4446 warn_for_multistatement_macros.
4447 (c_parser_else_body): Likewise.
4448 (c_parser_switch_statement): Likewise.
4449 (c_parser_while_statement): Likewise.
4450 (c_parser_for_statement): Likewise.
4451 (c_parser_statement): Add a default argument. Save the location
4452 after labels have been parsed.
4453 (c_parser_c99_block_statement): Likewise.
4454
343ae898
RB
44552017-06-19 Richard Biener <rguenther@suse.de>
4456
4457 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4458 negated _Literals to parse _Literal (int) -1.
4459
45b2222a
ML
44602017-06-13 Martin Liska <mliska@suse.cz>
4461
4462 PR sanitize/78204
4463 * c-convert.c (convert): Use sanitize_flags_p.
4464 * c-decl.c (grokdeclarator): Likewise.
4465 * c-typeck.c (convert_for_assignment): Likewise.
4466 (c_finish_return): Likewise.
4467 (build_binary_op): Likewise.
4468
8ab7005b
JJ
44692017-06-08 Jakub Jelinek <jakub@redhat.com>
4470
4471 PR c/81006
4472 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4473 to sizetype before size_binop.
4474
363dc72c
JJ
44752017-06-07 Jakub Jelinek <jakub@redhat.com>
4476
4477 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4478 of TDI_generic.
4479
dc949728
MP
44802017-06-06 Marek Polacek <polacek@redhat.com>
4481
4482 PR c/79983
4483 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4484 ref.
4485 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4486
40ffd95f
BE
44872017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4488
4489 * c-parser.c (c_parser_binary_expression): Implement the
4490 -Wsizeof_pointer_div warning.
4491 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4492 from a parenthesized expression.
4493 (c_parser_expr_list): Use c_last_sizeof_loc.
4494 * c-tree.h (c_last_sizeof_loc): New external.
4495 * c-typeck.c (c_last_sizeof_loc): New variable.
4496 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4497
9fc5e7a4
MM
44982017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4499
4500 PR testsuite/80580
4501 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4502
f012c8ef
DM
45032017-05-30 David Malcolm <dmalcolm@redhat.com>
4504
4505 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4506 parameters.
4507
3cd211af
MS
45082017-05-24 Martin Sebor <msebor@redhat.com>
4509
4510 PR c/80731
4511 * c-fold.c (c_fully_fold_internal): Adjust.
4512 * c-typeck.c (parser_build_unary_op): Adjust.
4513
fd71a9a2
TS
45142017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4515
4516 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4517 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4518 "VECTOR_LENGTH".
4519
92fa0f9e
MP
45202017-05-23 Marek Polacek <polacek@redhat.com>
4521
4522 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4523 quotes.
4524
d11c168a
JJ
45252017-05-22 Jakub Jelinek <jakub@redhat.com>
4526
4527 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4528 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4529 it returned invariant. Call tree_invariant_p unconditionally
4530 afterwards to decide whether to return expr or op0.
4531
58aca9d9
NS
45322017-05-22 Nathan Sidwell <nathan@acm.org>
4533
4534 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4535
7fd549d2
TS
45362017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4537
4538 * c-parser.c (c_parser_omp_clause_default): Handle
4539 "OMP_CLAUSE_DEFAULT_PRESENT".
4540
6ecd2339
BE
45412017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4542
4543 * config-lang.in (gtfiles): Add c-family/c-format.c.
4544
8a57ecff
NS
45452017-05-18 Nathan Sidwell <nathan@acm.org>
4546
4547 * c-decl.c (pushdecl_top_level): Delete unused function.
4548
6574d78e
MP
45492017-05-18 Marek Polacek <polacek@redhat.com>
4550
4551 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4552 (check_earlier_gotos): Likewise.
4553 (define_label): Likewise.
4554 (pending_xref_error): Likewise.
4555 (smallest_type_quals_location): Likewise.
4556 (grokdeclarator): Likewise.
4557 (grokparms): Likewise.
4558 (identifier_global_value): Likewise.
4559 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4560 (find_init_member): Likewise.
4561
e3455240
MP
45622017-05-18 Marek Polacek <polacek@redhat.com>
4563
4564 * c-decl.c (start_decl): Use false/true instead of 0/1.
4565 (grokdeclarator): Likewise.
4566 (finish_struct): Likewise.
4567 (start_function): Change the return type to bool. Use false/true
4568 instead of 0/1.
4569 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4570 * c-tree.h (start_function): Update.
4571 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4572 (set_designator): Change the return type to bool. Use false/true
4573 instead of 0/1.
4574
3fa8871b
MP
45752017-05-17 Marek Polacek <polacek@redhat.com>
4576
4577 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4578 * c-typeck.c: Likewise.
4579
142473df
MP
45802017-05-17 Marek Polacek <polacek@redhat.com>
4581
4582 PR sanitizer/80659
4583 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4584 DECL_IGNORED_P even for non-static compound literals.
4585
1a817418
ML
45862017-05-17 Martin Liska <mliska@suse.cz>
4587
4588 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4589 use it instead of int type.
4590
b2fa0a8b
MP
45912017-05-17 Marek Polacek <polacek@redhat.com>
4592
4593 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4594 call c_fully_fold.
4595 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4596 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4597 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4598 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4599 save_expr.
4600 (c_parser_conditional_expression): Likewise.
4601 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4602 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4603 (process_init_element): Likewise.
4604 (build_binary_op): Likewise.
4605 (handle_omp_array_sections_1): Likewise.
4606
1e47f02b
TS
46072017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4608
4609 * c-parser.c (c_parser_omp_clause_num_gangs)
4610 (c_parser_omp_clause_num_workers)
4611 (c_parser_omp_clause_vector_length): Merge functions into...
4612 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4613 all users.
4614
c24e924f
NS
46152017-05-11 Nathan Sidwell <nathan@acm.org>
4616
4617 * gimple-parser.c: Don't #include tree-dump.h.
4618
c587104e
MM
46192017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4620
4621 PR testsuite/80580
4622 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4623
67ac9a9d
MM
46242017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4625
4626 PR testsuite/80580
4627 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4628 incorrect __MEM syntax.
4629
ac4eb40f
MM
46302017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4631
4632 PR testsuite/80580
4633 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4634 type of unary '*'.
4635
641da50a
NS
46362017-05-09 Nathan Sidwell <nathan@acm.org>
4637
4638 * c-tree.h (pushdecl): Declare.
4639
56d35585
DM
46402017-05-05 David Malcolm <dmalcolm@redhat.com>
4641
4642 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4643 with diagnostic_report_diagnostic.
4644 * c-errors.c (pedwarn_c99): Likewise.
4645 (pedwarn_c90): Likewise.
4646
815d9cc6
XR
46472017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4648
92a285c1 4649 PR c++/80038
815d9cc6
XR
4650 * c-gimplify.c (c_gimplify_expr): Remove calls to
4651 cilk_gimplifY_call_params_in_spawned_fn.
4652
1c4ea66f
DM
46532017-04-25 David Malcolm <dmalcolm@redhat.com>
4654
4655 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4656 hint for removing extra semicolon.
4657
666f7903
JJ
46582017-04-21 Jakub Jelinek <jakub@redhat.com>
4659
4660 PR c/80468
4661 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4662 enabled, set specs->type to integer_type_node.
4663
5764ee3c
JW
46642017-04-03 Jonathan Wakely <jwakely@redhat.com>
4665
4666 * c-array-notation.c: Fix typo in comment.
4667
10fa8dfb
MP
46682017-03-29 Marek Polacek <polacek@redhat.com>
4669
4670 PR c/79730
4671 * c-decl.c (finish_decl): Check VAR_P.
4672
a9e4a1a5
JJ
46732017-03-27 Jakub Jelinek <jakub@redhat.com>
4674
4675 PR middle-end/80162
4676 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4677 * c-typeck.c (c_mark_addressable): Likewise. Look through
4678 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4679 to ARRAY_TYPE.
4680 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4681
ee3ff394
MP
46822017-03-23 Marek Polacek <polacek@redhat.com>
4683
4684 * c-tree.h: Remove a C_RID_YYCODE reference.
4685
4d1b8e70
JJ
46862017-03-21 Jakub Jelinek <jakub@redhat.com>
4687
4688 PR c/80097
4689 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4690 optional COMPOUND_EXPR with ubsan instrumentation.
4691
31dc71a8
MP
46922017-03-17 Marek Polacek <polacek@redhat.com>
4693
4694 * c-parser.c: Add C11 references.
4695
d579c385
MP
46962017-03-15 Marek Polacek <polacek@redhat.com>
4697
4698 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4699
85059a38
MP
47002017-03-11 Marek Polacek <polacek@redhat.com>
4701
4702 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4703
2f6f187a
DM
47042017-03-10 David Malcolm <dmalcolm@redhat.com>
4705
4706 PR translation/79848
4707 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4708 "%qs".
4709 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4710
36618428
MP
47112017-03-09 Marek Polacek <polacek@redhat.com>
4712
4713 PR sanitizer/79757
4714 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4715 parameter declarations with initializers.
4716
01e5af5a
JJ
47172017-03-09 Jakub Jelinek <jakub@redhat.com>
4718
4719 PR c/79969
4720 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4721 TYPE_STUB_DECL.
4722
a71dbc63
JJ
47232017-03-07 Jakub Jelinek <jakub@redhat.com>
4724
4725 PR c/79834
4726 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4727 for "may only be used in compound statements" diagnostics, change it
4728 such that the same translatable string is used for all pragmas. For
4729 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4730 diagnostics.
4731 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4732 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4733 "may only be used in compound statements" diagnostics, such that the
4734 same translatable string is used for all pragmas.
4735
1ff4bae6
MP
47362017-03-04 Marek Polacek <polacek@redhat.com>
4737
4738 PR c/79847
4739 * c-decl.c (implicit_decl_warning): Add missing space.
4740
7f5a7d78
MP
47412017-03-03 Marek Polacek <polacek@redhat.com>
4742
4743 PR c/79758
4744 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4745 current_function_prototype_arg_types is error_mark_node. Fix
4746 formatting. Use TREE_VALUE instead of TREE_TYPE.
4747
883c8f06
JJ
47482017-03-03 Jakub Jelinek <jakub@redhat.com>
4749
79c9b7a8
JJ
4750 PR c/79837
4751 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4752 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4753 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4754 diagnostics.
4755
883c8f06
JJ
4756 PR c/79836
4757 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4758 instead of %<_Generic>.
4759 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4760 (c_parser_omp_target_exit_data): Use %<release%> instead of
4761 %<release>.
4762
324ff1a0
JJ
47632017-02-28 Jakub Jelinek <jakub@redhat.com>
4764
4765 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4766 instead of just cond ? "..." : "...".
4767 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4768 for "enter"/"exit" keyword.
4769 (c_finish_oacc_routine): Don't use %s to supply portions of the
4770 message.
4771
4227c9ad
JJ
47722017-02-24 Jakub Jelinek <jakub@redhat.com>
4773
4774 PR c++/79588
4775 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4776 handle -Wrestrict here.
4777 * c-typeck.c (build_function_call_vec): Adjust
4778 check_function_arguments caller.
4779
5d972e66
RB
47802017-02-23 Richard Biener <rguenther@suse.de>
4781
4782 PR c/79684
4783 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4784 to initialize c_exprs to return.
4785 (c_parser_gimple_binary_expression): Likewise.
4786 (c_parser_gimple_unary_expression): Likewise.
4787 (c_parser_gimple_postfix_expression): Likewise.
4788
61ac5ebe
MP
47892017-02-22 Marek Polacek <polacek@redhat.com>
4790
4791 PR c/79662
4792 * c-typeck.c (convert_arguments): Handle error_mark_node.
4793
41d1b0b1
PK
47942017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4795
4796 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4797 value of c_parser_parse_ssa_name against error_mark_node and emit
4798 error if ssa name is anonymous and written as default definition.
4799
eab1f169
PK
48002017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4801
4802 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4803 FMA_EXPR.
4804
bcac0b4d
JJ
48052017-02-16 Jakub Jelinek <jakub@redhat.com>
4806
4807 PR c++/79512
4808 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4809 ignore #pragma omp target even when not followed by identifier.
4810
1be33173
PK
48112017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4812
4813 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4814 (c_parser_gimple_unary_expression): Likewise.
4815
aa326bfb
JJ
48162017-02-13 Jakub Jelinek <jakub@redhat.com>
4817
4818 * c-parser.c (c_parser_oacc_declare): Add missing space in
4819 diagnostics.
4820
8a398bc5
PK
48212017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4822
4823 PR c/79478
4824 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4825 set_c_expr_source_range when parsing ssa-name.
4826
3dcde5ef 48272017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4828 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4829
4830 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4831 building IL when arguments are error_mark_node.
4832 (c_parser_gimple_unary_expression): Likewise.
4833 (c_parser_gimple_if_stmt): Likewise.
4834 (c_parser_gimple_switch_stmt): Likewise.
4835 (c_parser_gimple_return_stmt): Likewise.
4836 (c_parser_parse_ssa_name): When name lookup fails do not build
4837 an SSA name. Use undeclared rather than not declared in error
4838 reporting.
4839
192b048b
MP
48402017-02-09 Marek Polacek <polacek@redhat.com>
4841
4842 PR c/79428
4843 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4844 instead of c_parser_skip_until_found.
4845
56f71478
JJ
48462017-02-09 Jakub Jelinek <jakub@redhat.com>
4847
4848 PR c/79431
4849 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4850 symtab_node::get on automatic variables.
4851
02889d23
CLT
48522016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4853 Chung-Lin Tang <cltang@codesourcery.com>
4854
4855 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4856 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4857 semantic checking.
4858 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4859
7af4b20d
RB
48602017-02-07 Richard Biener <rguenther@suse.de>
4861
4862 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4863 (c_parser_gimple_postfix_expression_after_primary):
4864 Do not use c_build_function_call_vec to avoid folding and promotion.
4865 Simplify.
4866
e5e391d6
MO
48672017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4868
4869 PR lto/79061
4870 * c-decl.c (pop_scope): Pass main_input_filename to
4871 build_translation_unit_decl.
4872
c2e84327
DM
48732017-01-24 David Malcolm <dmalcolm@redhat.com>
4874
4875 * c-parser.c: Include "read-rtl-function.h" and
4876 "run-rtl-passes.h".
4877 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4878 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4879 production. Update for renaming of field "gimple_pass" to
4880 "gimple_or_rtl_pass". If __RTL was seen, call
4881 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4882 to an auto_timevar, to cope with early exit.
4883 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4884 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4885 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4886 Handle RID_RTL.
4887 (c_parser_parse_rtl_body): New function.
4888 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4889 (struct c_declspecs): Rename field "gimple_pass" to
4890 "gimple_or_rtl_pass". Add field "rtl_p".
4891 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4892 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4893 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4894 (c_parser_gimple_or_rtl_pass_list): ...this.
4895
2ebd93e1
MP
48962017-01-20 Marek Polacek <polacek@redhat.com>
4897
4898 PR c/64279
4899 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4900
b1c95bb5
RB
49012017-01-13 Richard Biener <rguenther@suse.de>
4902
4903 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4904 nops.
4905
25329913
RB
49062017-01-13 Richard Biener <rguenther@suse.de>
4907
4908 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4909 _Literal ( type-name ) number.
4910
6bb4ea5c
RB
49112017-01-12 Richard Biener <rguenther@suse.de>
4912
4913 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4914 __MEM.
4915
6b5b4e9c
JJ
49162017-01-11 Jakub Jelinek <jakub@redhat.com>
4917
4918 PR c++/72813
4919 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4920 PCH file.
4921
e3252775
RB
49222017-01-11 Richard Biener <rguenther@suse.de>
4923
4924 PR bootstrap/79052
4925 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4926 returns on parse errors.
4927
a9342885
MP
49282017-01-04 Marek Polacek <polacek@redhat.com>
4929
4930 PR c++/64767
4931 * c-parser.c (c_parser_postfix_expression): Mark zero character
4932 constants by setting original_type in c_expr.
4933 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4934 with a zero character constant.
4935 (char_type_p): New function.
4936
5dd9a9d0
DM
49372017-01-04 David Malcolm <dmalcolm@redhat.com>
4938
4939 * c-parser.c (c_parser_declaration_or_fndef): Create a
4940 rich_location at init_loc and parse it to start_init.
4941 (last_init_list_comma): New global.
4942 (c_parser_braced_init): Update last_init_list_comma when parsing
4943 commas. Pass it to pop_init_level. Pass location of closing
4944 brace to pop_init_level.
4945 (c_parser_postfix_expression_after_paren_type): Create a
4946 rich_location at type_loc and parse it to start_init.
4947 (c_parser_omp_declare_reduction): Likewise for loc.
4948 * c-tree.h (start_init): Add rich_location * param.
4949 (pop_init_level): Add location_t param.
4950 * c-typeck.c (struct initializer_stack): Add field
4951 "missing_brace_richloc".
4952 (start_init): Add richloc param, use it to initialize
4953 the stack node's missing_brace_richloc.
4954 (last_init_list_comma): New decl.
4955 (finish_implicit_inits): Pass last_init_list_comma to
4956 pop_init_level.
4957 (push_init_level): When finding missing open braces, add fix-it
4958 hints to the richloc.
4959 (pop_init_level): Add "insert_before" param and pass it
4960 when calling pop_init_level. Add fixits about missing
4961 close braces to any richloc. Use the richloc for the
4962 -Wmissing-braces warning.
4963 (set_designator): Pass last_init_list_comma to pop_init_level.
4964 (process_init_element): Likewise.
4965
cbe34bb5
JJ
49662017-01-01 Jakub Jelinek <jakub@redhat.com>
4967
4968 Update copyright years.
4969
d17680f3
JJ
49702016-12-21 Jakub Jelinek <jakub@redhat.com>
4971
0dba7960
JJ
4972 PR bootstrap/78817
4973 * c-typeck.c (build_function_call_vec): If check_function_arguments
4974 returns true, set TREE_NO_WARNING on CALL_EXPR.
4975
d17680f3
JJ
4976 PR c/77767
4977 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4978 to *expr instead of overwriting it.
4979
aa90531e
RB
49802016-12-20 Richard Biener <rguenther@suse.de>
4981
4982 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4983 error recovery.
4984 (c_parser_gimple_statement): Only build assigns for non-error
4985 stmts.
4986 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4987
629b3d75
MJ
49882016-12-14 Martin Jambor <mjambor@suse.cz>
4989
4990 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4991 omp-low.h.
4992 (c_finish_oacc_routine): Adjusted call to
4993 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4994 to use their new names.
4995 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4996 use its new name.
4997 (c_parser_oacc_update): Likewise.
4998 (c_parser_omp_simd): Likewise.
4999 (c_parser_omp_target_update): Likewise.
5000 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5001 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5002 name.
5003 (c_finish_omp_cancellation_point): Likewise.
5004 * gimple-parser.c: Do not include omp-low.h
5005
c5af52eb
CP
50062016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5007 James Norris <jnorris@codesourcery.com>
5008
5009 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5010 EXIT_DATA,WAIT} are not used in compound statements.
5011 (c_parser_oacc_enter_exit_data): Update diagnostics.
5012
48330c93
BE
50132016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5014
5015 PR c++/71973
5016 * c-decl.c (diagnose_mismatched_decls): Use
5017 OPT_Wbuiltin_declaration_mismatch here too.
5018
899ca90e 50192016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
5020 Alan Hayward <alan.hayward@arm.com>
5021 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
5022
5023 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5024 (make_label, finish_struct): Likewise.
5025
1ee62b92 50262016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 5027 Richard Biener <rguenther@suse.de>
22b15758 5028
8e745a17
JJ
5029 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5030 * config-lang.in (gtfiles): Add c/c-parser.h.
5031 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5032 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5033 * c-parser.c (enum c_id_kind, struct c_token,
5034 c_parser_next_token_is, c_parser_next_token_is_not,
5035 c_parser_next_token_is_keyword,
5036 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5037 Split out to ...
5038 * c-parser.h: ... new header.
5039 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 5040 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
5041 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5042 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5043 c_parser_error, c_parser_require, c_parser_skip_until_found,
5044 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5045 c_parser_type_name): Export.
5046 (c_parser_tokens_buf): New function.
5047 (c_parser_error): Likewise.
5048 (c_parser_set_error): Likewise.
5049 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
5050 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5051 via c_parser_parse_gimple_body.
8e745a17
JJ
5052 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5053 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5054 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5055 c_parser_error, c_parser_require, c_parser_skip_until_found,
5056 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5057 c_parser_type_name): Declare.
1ee62b92
PG
5058 (struct c_parser): Declare forward.
5059 (c_parser_tokens_buf): Declare.
8e745a17
JJ
5060 (c_parser_error): Likewise.
5061 (c_parser_set_error): Likewise.
5062 * gimple-parser.c: New file.
5063 * gimple-parser.h: Likewise.
1ee62b92 5064
22b15758
UB
50652016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5066
5067 PR c/35503
5068 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5069 warn_for_restrict.
5070
84ff4775
LCW
50712016-09-11 Le-Chun Wu <lcwu@google.com>
5072 Mark Wielaard <mjw@redhat.com>
5073
5074 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5075 to the given -Wshadow= variant.
5076
4d0cdd0c
TP
50772016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5078
5079 * c-typeck.c: Include memmodel.h.
5080
1202f33e
JJ
50812016-10-13 Jakub Jelinek <jakub@redhat.com>
5082
5083 PR target/77957
5084 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5085 instead of lhd_return_null_tree_v.
5086
8a14afd0
BS
50872016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5088
5089 PR c++/69733
5090 * c-decl.c (smallest_type_quals_location): New static function.
5091 (grokdeclarator): Try to find the correct location for an ignored
5092 qualifier.
5093
81fea426
MP
50942016-09-26 Marek Polacek <polacek@redhat.com>
5095
5096 PR c/7652
5097 * c-decl.c (pop_scope): Add gcc_fallthrough.
5098
50992016-09-26 Marek Polacek <polacek@redhat.com>
5100
5101 PR c/7652
5102 * c-parser.c (struct c_token): Add flags field.
5103 (c_lex_one_token): Pass it to c_lex_with_flags.
5104 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5105 into IFN_FALLTHROUGH.
5106 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5107 attribute fallthrough after a case label or default label.
5108 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5109
9a2300e9
MP
51102016-09-24 Marek Polacek <polacek@redhat.com>
5111
5112 PR c/77490
5113 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5114 have boolean value. Warn about ++/-- on booleans.
5115
7de76362
JJ
51162016-09-23 Jakub Jelinek <jakub@redhat.com>
5117
5118 * c-parser.c (incomplete_record_decls): Remove unnecessary
5119 = vNULL initialization of file scope vec.
5120
5b73d2ab
MP
51212016-09-16 Marek Polacek <polacek@redhat.com>
5122
5123 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5124
e51fbec3
MP
51252016-09-14 Marek Polacek <polacek@redhat.com>
5126
5127 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5128 (fix_array_notation_expr): Likewise.
5129 * c-decl.c (finish_decl): Likewise.
5130 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5131 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5132 (function_to_pointer_conversion): Use false instead of 0.
5133 (convert_lvalue_to_rvalue): Likewise.
5134 (parser_build_unary_op): Likewise.
5135 (build_atomic_assign): Likewise.
5136 (build_unary_op): Change nonconvert parameter type to bool, use
5137 true/false instead of 1/0.
5138 (build_binary_op): Use true instead of 1.
5139
254830ba
DM
51402016-09-13 David Malcolm <dmalcolm@redhat.com>
5141
5142 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5143 of add_fixit_insert to add_fixit_insert_before.
5144
4c13ba17
MP
51452016-09-13 Marek Polacek <polacek@redhat.com>
5146
5147 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5148 it.
5149
54dcdb88
BE
51502016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5151
5152 PR c++/77496
5153 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5154 COMPOUND_EXPR to warn_for_omitted_condop.
5155
e5106e27
DM
51562016-09-07 David Malcolm <dmalcolm@redhat.com>
5157
5158 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5159 c_get_substring_location for this new langhook.
5160
9dc5773f
JJ
51612016-09-02 Jakub Jelinek <jakub@redhat.com>
5162
5163 PR c/65467
5164 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5165 flag_openmp.
5166 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5167 instead of mark_exp_read on low_bound/length expression.
5168 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5169 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5170 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5171 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5172 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5173 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5174 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5175 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5176 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5177 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5178 instead of mark_expr_read.
5179 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5180 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5181 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5182 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5183 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5184 array section bases outside of depend clause, for depend clause
5185 use convert_lvalue_to_rvalue on the base.
5186 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5187 linear, aligned, map, to and from clauses.
5188 (c_omp_clause_copy_ctor): New function.
5189
295844f6
MP
51902016-09-01 Marek Polacek <polacek@redhat.com>
5191
5192 PR c/7652
5193 * c-typeck.c (composite_type): Add FALLTHRU comment.
5194
089af25c
DM
51952016-08-31 David Malcolm <dmalcolm@redhat.com>
5196
5197 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5198 to the insertion fixits for "struct", "union", and "enum".
5199
f9087798
DM
52002016-08-30 David Malcolm <dmalcolm@redhat.com>
5201
5202 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5203 rather than add_fixit_misspelled_id.
5204 (undeclared_variable): Likewise.
5205 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5206 now-redundant "here" params from add_fixit_insert method calls.
5207 (c_parser_parameter_declaration): Likewise.
5208 * c-typeck.c (build_component_ref): Remove now-redundant range
5209 param from add_fixit_replace method calls.
5210
ebef225f
MP
52112016-08-25 Marek Polacek <polacek@redhat.com>
5212
5213 * c-typeck.c (parser_build_binary_op): Pass LHS to
5214 warn_logical_not_parentheses.
5215
fe377a48
MP
52162016-08-25 Marek Polacek <polacek@redhat.com>
5217
5218 PR c/77323
5219 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5220 or _FloatN or _FloatNx is not supported.
5221 (finish_declspecs): Set type to integer_type_node when _FloatN or
5222 _FloatNx is not supported.
5223
c65699ef
JM
52242016-08-19 Joseph Myers <joseph@codesourcery.com>
5225
5226 PR c/32187
5227 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5228 (struct c_declspecs): Add field floatn_nx_idx.
5229 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5230 and _FloatNx type specifiers.
5231 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5232 (c_parser_declspecs, c_parser_attribute_any_word)
5233 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5234 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5235 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5236 narrower than double.
5237
2f1364c2
JJ
52382016-08-12 Jakub Jelinek <jakub@redhat.com>
5239 Martin Liska <mliska@suse.cz>
5240
5241 PR c/67410
5242 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5243 % to determine val element to change. Assert that
5244 wchar_bytes * charwidth fits into val array.
5245
191816a3
MP
52462016-08-12 Marek Polacek <polacek@redhat.com>
5247
5248 PR c/7652
5249 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5250 (c_parser_postfix_expression): Likewise.
5251 * c-typeck.c (build_unary_op): Adjust fall through comment.
5252 (c_mark_addressable): Likewise.
5253
b95a64bb
JJ
52542016-08-11 Jakub Jelinek <jakub@redhat.com>
5255
5256 PR c/72816
5257 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5258 array member through typedef, for orig_qual_indirect == 0 clear
5259 orig_qual_type.
5260
895aa8e1
DM
52612016-08-08 David Malcolm <dmalcolm@redhat.com>
5262
5263 PR c/64955
5264 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5265 this up to selftest::run_c_tests.
5266 (selftest::run_c_tests): New function.
5267
0b212d8c
TS
52682016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5269
ae9281fc
TS
5270 * c-parser.c (struct oacc_routine_data): Add error_seen and
5271 fndecl_seen members.
5272 (c_finish_oacc_routine): Use these.
5273 (c_parser_declaration_or_fndef): Adjust.
5274 (c_parser_oacc_routine): Likewise. Support more C language
5275 constructs, and improve diagnostics. Move pragma context
5276 checking...
5277 (c_parser_pragma): ... here.
5278
0b212d8c
TS
5279 * c-parser.c (struct oacc_routine_data): New.
5280 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5281 Simplify code.
5282 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5283 declare target" attribute.
5284
76e2c821
JB
52852016-08-01 Jan Beulich <jbeulich@suse.com>
5286
5287 * c-fold.c (c_fully_fold_internal): Also emit shift count
5288 warnings for vector types.
5289 * c-typeck.c (build_binary_op): Likewise.
5290
f618a472
MP
52912016-07-29 Marek Polacek <polacek@redhat.com>
5292
5293 PR c/71742
5294 * c-decl.c (finish_struct): Rephrase an error message.
5295
efd0786f
MP
5296 PR c/71853
5297 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5298 to error node for invalid code.
5299
e00dceaf
MP
5300 PR c/71573
5301 * c-decl.c (implicitly_declare): Return decl early not only for
5302 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5303
673a107a
JJ
53042016-07-29 Jakub Jelinek <jakub@redhat.com>
5305
5306 PR c/71969
5307 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5308 on GNU extern inline functions.
5309
a5b5c8b6
MP
53102016-07-29 Marek Polacek <polacek@redhat.com>
5311
5312 PR c/71583
5313 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5314 check expr.value.
5315
e3fe09c1
UB
53162016-07-22 Uros Bizjak <ubizjak@gmail.com>
5317
5318 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5319
7c8f7eaa
DM
53202016-07-20 David Malcolm <dmalcolm@redhat.com>
5321
5322 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5323 spellcheck-tree.h
5324 (best_macro_match): Likewise, converting from a typedef to a
5325 subclass.
5326 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5327 (lookup_name_fuzzy): Update for change of best_macro_match to a
5328 subclass with a ctor that calls cpp_forall_identifiers.
5329
de6a69ee
DM
53302016-07-20 David Malcolm <dmalcolm@redhat.com>
5331
5332 * c-decl.c (implicit_decl_warning): Update for conversion of
5333 return type of lookup_name_fuzzy to const char *.
5334 (undeclared_variable): Likewise.
5335 (lookup_name_fuzzy): Convert return type from tree to
5336 const char *.
5337 * c-parser.c (c_parser_declaration_or_fndef): Update for
5338 conversion of return type of lookup_name_fuzzy to const char *.
5339 (c_parser_parameter_declaration): Likewise.
5340
b1c9c068
CP
53412016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5342
5343 * c-parser.c (c_parser_oacc_declare): Don't scan for
5344 GOMP_MAP_POINTER.
5345 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5346 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5347 zero-length subarrays.
5348
ddbbcb19
JJ
53492016-07-15 Jakub Jelinek <jakub@redhat.com>
5350
5351 PR c/71858
5352 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5353 instead of FUZZY_LOOKUP_NAME.
5354 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5355 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5356
dd36b877
JJ
53572016-07-14 Jakub Jelinek <jakub@redhat.com>
5358
5359 PR c/71858
5360 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5361
8c681247
TS
53622016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5363
5364 * c-parser.c (c_parser_generic_selection): Make type of variable
5365 auto_vec.
5366 (c_parser_omp_declare_simd): Likewise.
5367
bf4fa671
TS
53682016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5369
5370 * c-decl.c (struct c_struct_parse_info): Change member types
5371 from vec to auto_vec.
5372 (start_struct): Adjust.
5373 (finish_struct): Likewise.
5374
557e8c49
JJ
53752016-07-02 Jakub Jelinek <jakub@redhat.com>
5376
5377 PR c/71719
5378 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5379
54d19c3b
TS
53802016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5381
5382 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5383 Move pragma context checking into...
5384 (c_parser_omp_cancellation_point): ... here, and improve
5385 diagnostic messages.
5386 * c-typeck.c (c_finish_omp_cancel)
5387 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5388
152ef731
JJ
53892016-06-29 Jakub Jelinek <jakub@redhat.com>
5390
5391 PR c/71685
5392 * c-typeck.c (c_build_qualified_type): Don't clear
5393 C_TYPE_INCOMPLETE_VARS for the main variant.
5394
53952016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
5396
5397 PR c/71552
5398 * c-typeck.c (output_init_element): Diagnose incompatible types
5399 before non-constant initializers.
5400
e9ac1f86
JJ
54012016-06-28 Jakub Jelinek <jakub@redhat.com>
5402
5403 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5404
277d7ee0
AK
54052016-06-23 Andi Kleen <ak@linux.intel.com>
5406
5407 * Make-lang.in: Add support for autofdo.
5408
1a4f11c8
DM
54092016-06-22 David Malcolm <dmalcolm@redhat.com>
5410
5411 PR c/70339
5412 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5413 (implicit_decl_warning): When issuing warnings for implicit
5414 declarations, attempt to provide a suggestion via
5415 lookup_name_fuzzy.
5416 (undeclared_variable): Likewise when issuing errors.
5417 (lookup_name_in_scope): Likewise.
5418 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5419 (best_macro_match): New typedef.
5420 (find_closest_macro_cpp_cb): New function.
5421 (lookup_name_fuzzy): New function.
5422 * c-parser.c: Include gcc-rich-location.h.
5423 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5424 (c_keyword_starts_typename): ...this new function.
5425 (c_parser_declaration_or_fndef): When issuing errors about
5426 missing "struct" etc, add a fixit. For other kinds of errors,
5427 attempt to provide a suggestion via lookup_name_fuzzy.
5428 (c_parser_parms_declarator): When looking ahead to detect typos in
5429 type names, also reject CPP_KEYWORD.
5430 (c_parser_parameter_declaration): When issuing errors about
5431 unknown type names, attempt to provide a suggestion via
5432 lookup_name_fuzzy.
5433 * c-tree.h (c_keyword_starts_typename): New prototype.
5434
5a578671
JM
54352016-06-20 Joseph Myers <joseph@codesourcery.com>
5436
5437 PR c/71601
5438 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5439 c_common_type returns error_mark_node.
5440
3f8257db 54412016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
5442
5443 PR c/69507
5444 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5445 __alignof__ (expression).
5446
6a3f203c
DM
54472016-06-14 David Malcolm <dmalcolm@redhat.com>
5448
5449 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5450
264757fb
DM
54512016-06-14 David Malcolm <dmalcolm@redhat.com>
5452
5453 * c-typeck.c (build_component_ref): Simplify fixit code by
5454 using gcc_rich_location::add_fixit_misspelled_id.
5455 (set_init_label): Likewise.
5456
f7e4f2e3
DM
54572016-06-13 David Malcolm <dmalcolm@redhat.com>
5458
5459 * c-parser.c (c_parser_initelt): Provide location of name for new
5460 location_t param of set_init_label.
5461 * c-tree.h (set_init_label): Add location_t param.
5462 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5463 param and use it when issuing error messages about unrecognized
5464 field names. Attempt to provide a fixit hint if appropriate,
5465 otherwise update the error message to provide the type name.
5466
4b1ffdb1
TS
54672016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5468
5469 PR c/71381
5470 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5471 Loosen checking.
5472
44a845ca
MS
54732016-06-08 Martin Sebor <msebor@redhat.com>
5474 Jakub Jelinek <jakub@redhat.com>
5475
5476 PR c++/70507
5477 PR c/68120
5478 * c-typeck.c (convert_arguments): Don't promote last argument
5479 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5480
92a5f2ba
MP
54812016-06-08 Marek Polacek <polacek@redhat.com>
5482
5483 PR c/71418
5484 * c-decl.c (grokdeclarator): Check TYPE_P.
5485
08203f73
MP
5486 PR c/71426
5487 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5488 code.
5489
6ffd47b7
DM
54902016-06-07 David Malcolm <dmalcolm@redhat.com>
5491
5492 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5493 and structure element reference, capture the location of the
5494 element name token and pass it to build_component_ref.
5495 (c_parser_postfix_expression_after_primary): Likewise for
5496 structure element dereference.
5497 (c_parser_omp_variable_list): Likewise for
5498 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5499 * c-tree.h (build_component_ref): Add location_t param.
5500 * c-typeck.c (build_component_ref): Add location_t param
5501 COMPONENT_LOC. Use it, if available, when issuing hints about
5502 mispelled member names to provide a fixit replacement hint.
5503
1f40cff3
MP
55042016-06-06 Marek Polacek <polacek@redhat.com>
5505
5506 PR c/71362
5507 * c-parser.c (c_parser_direct_declarator): Set location.
5508
5545a907
MP
55092016-06-06 Marek Polacek <polacek@redhat.com>
5510
5511 * c-typeck.c (comptypes_internal): Handle comparisons of
5512 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5513 TYPE_REF_CAN_ALIAS_ALL.
5514
b605f663
CLT
55152016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5516
5517 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5518 arguments as addressable when async clause exists.
5519
00631022
JJ
55202016-05-30 Jakub Jelinek <jakub@redhat.com>
5521
5522 PR c++/71349
5523 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5524 when combined with target construct.
5525
7211a097
JJ
55262016-05-26 Jakub Jelinek <jakub@redhat.com>
5527
5528 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5529 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5530
95efe6b6
MP
55312016-05-25 Marek Polacek <polacek@redhat.com>
5532
5533 PR c/71265
5534 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5535
a23faf7a
MP
5536 PR c/71266
5537 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5538
e46c7770
CP
55392016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5540
5541 * c-parser.c (c_parser_oacc_declare): Add support for
5542 GOMP_MAP_FIRSTPRIVATE_POINTER.
5543 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5544 argument with enum c_omp_region_type ort.
5545 (handle_omp_array_sections): Likewise. Update call to
5546 handle_omp_array_sections_1.
5547 (c_finish_omp_clauses): Add specific errors and warning messages for
5548 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5549 call to handle_omp_array_sections.
5550
a04e69c0
TS
55512016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5552
5553 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5554
f17a223d
RB
55552016-05-24 Richard Biener <rguenther@suse.de>
5556
5557 PR middle-end/70434
5558 PR c/69504
5559 * c-typeck.c (build_array_ref): Do not complain about indexing
5560 non-lvalue vectors. Adjust for function name change.
5561
79063edd
MS
55622016-05-20 Martin Sebor <msebor@redhat.com>
5563
5564 PR c/71115
5565 * c-typeck.c (error_init): Use
5566 expansion_point_location_if_in_system_header.
5567 (warning_init): Same.
5568
8a40fef3
DM
55692016-05-19 David Malcolm <dmalcolm@redhat.com>
5570
5571 PR c/71171
5572 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5573 in error-handling.
5574 (c_parser_postfix_expression): Likewise.
5575 * c-tree.h (c_expr::set_error): New method.
5576 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5577 that result's range is initialized.
5578
e9892350
JG
55792016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5580
5581 * c-typeck.c (parser_build_unary_op): Fix formatting.
5582
8fad45f5
MW
55832016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5584
5585 * c-decl.c (grokdeclarator): Remove errmsg and use of
5586 targetm.invalid_return_type.
5587 (grokparms): Remove errmsg and use of
5588 targetm.invalid_parameter_type.
5589
aa4b467b
JM
55902016-05-13 Joseph Myers <joseph@codesourcery.com>
5591
5592 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5593 function return type.
5594
4f2e1536
MP
55952016-05-12 Marek Polacek <polacek@redhat.com>
5596
5597 PR c/70756
5598 * c-decl.c (build_compound_literal): Pass LOC down to
5599 c_incomplete_type_error.
5600 * c-tree.h (require_complete_type): Adjust declaration.
5601 (c_incomplete_type_error): Likewise.
5602 * c-typeck.c (require_complete_type): Add location parameter, pass it
5603 down to c_incomplete_type_error.
5604 (c_incomplete_type_error): Add location parameter, pass it down to
5605 error_at.
5606 (build_component_ref): Pass location down to c_incomplete_type_error.
5607 (default_conversion): Pass location down to require_complete_type.
5608 (build_array_ref): Likewise.
5609 (build_function_call_vec): Likewise.
5610 (convert_arguments): Likewise.
5611 (build_unary_op): Likewise.
5612 (build_c_cast): Likewise.
5613 (build_modify_expr): Likewise.
5614 (convert_for_assignment): Likewise.
5615 (c_finish_omp_clauses): Likewise.
5616
d6e83a8d
MM
56172016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5618
5619 PR c/43651
5620 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5621 is enabled.
5622 * c-errors.c (pedwarn_c90): Return true if warned.
5623 * c-tree.h (pedwarn_c90): Change return type to bool.
5624 (enum c_declspec_word): Add new enumerator cdw_atomic.
5625
5c3a10fb
MP
56262016-05-11 Marek Polacek <polacek@redhat.com>
5627
5628 PR c++/71024
5629 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5630 diagnose_mismatched_attributes and call it.
5631
cf68d92c
MP
56322016-05-10 Marek Polacek <polacek@redhat.com>
5633
5634 PR c/70255
5635 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5636 on a declaration following the definition.
5637
351f85c5
JJ
56382016-05-05 Jakub Jelinek <jakub@redhat.com>
5639
5640 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5641 parse it through to c_parser_c99_block_statement.
5642 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5643 caller.
5644
deef7113
MP
56452016-05-04 Marek Polacek <polacek@redhat.com>
5646
5647 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5648 OPT_Wdangling_else.
5649
de55efd5
MP
56502016-05-04 Marek Polacek <polacek@redhat.com>
5651
5652 PR c/48778
5653 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5654 for macro expansions.
5655
79ce98bc
MP
56562016-05-03 Marek Polacek <polacek@redhat.com>
5657
5658 PR c/70859
5659 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5660 check_builtin_function_arguments.
5661
fb2647aa
RB
56622016-05-03 Richard Biener <rguenther@suse.de>
5663
5664 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5665 the checksum from the previous stage.
5666
77886428
CP
56672016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5668
5669 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5670 c_finish_omp_clauses.
5671 (c_parser_omp_all_clauses): Likewise.
5672 (c_parser_oacc_cache): Likewise.
5673 (c_parser_oacc_loop): Likewise.
5674 (omp_split_clauses): Likewise.
5675 (c_parser_omp_declare_target): Likewise.
5676 (c_parser_cilk_all_clauses): Likewise.
5677 (c_parser_cilk_for): Likewise.
5678 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5679 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5680
7176a4a0
MP
56812016-05-02 Marek Polacek <polacek@redhat.com>
5682
5683 PR c/70851
5684 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5685 incomplete type.
5686
e7ff0319
CP
56872016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5688
5689 PR middle-end/70626
5690 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5691 OACC_LOOP_CLAUSE_MASK.
5692 (c_parser_oacc_kernels_parallel): Update call to
5693 c_oacc_split_loop_clauses.
5694
9f405ce1
AM
56952016-04-28 Andrew MacLeod <amacleod@redhat.com>
5696
5697 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5698 argument to build_modify_expr in two cases.
5699
c1e1f433
BS
57002016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5701
5702 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5703 warn_for_memset instead of warning directly here.
5704
2448a956
MP
57052016-04-26 Marek Polacek <polacek@redhat.com>
5706
5707 PR c/67784
5708 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5709 out of ...
5710 (c_parser_for_statement): ... here.
5711 (c_parser_if_statement): Use it.
5712 (c_parser_switch_statement): Use it.
5713 (c_parser_while_statement): Use it.
5714
b02a5e26
MP
5715 PR c/70791
5716 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5717
477d4906
IV
57182016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5719
5720 PR c++/69363
5721 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5722 instead of c_finish_cilk_clauses.
5723 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5724 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5725 floating-point variables in the linear clause for Cilk Plus.
5726
fe37c7af
MM
57272016-04-18 Michael Matz <matz@suse.de>
5728
5729 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5730 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5731
949505a9
MP
57322016-04-15 Marek Polacek <polacek@redhat.com>
5733
5734 PR c/70671
5735 * c-typeck.c (build_unary_op): Pass location down to error and
5736 warning call.
5737
dda1bf61
JJ
57382016-04-15 Jakub Jelinek <jakub@redhat.com>
5739
5740 PR c/70436
5741 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5742 where needed.
5743 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5744 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5745 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5746 Adjust c_parser_pragma callers.
5747 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5748 caller.
5749 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5750 c_parser_statement.
5751 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5752 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5753 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5754 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5755 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5756 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5757 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5758 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5759 down where needed.
5760 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5761 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5762 calls.
5763
99cd9857
MP
57642016-04-13 Marek Polacek <polacek@redhat.com>
5765
5766 PR c/70436
5767 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5768 adjust callers.
5769 (c_parser_statement): Likewise.
5770 (c_parser_c99_block_statement): Likewise.
5771 (c_parser_while_statement): Likewise.
5772 (c_parser_for_statement): Likewise.
5773 (c_parser_if_body): Don't set IF_P here.
5774 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5775 about dangling else here.
5776 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5777 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5778 warn about dangling else here.
5779
f13355da
MP
57802016-04-04 Marek Polacek <polacek@redhat.com>
5781
5782 PR c/70307
5783 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5784
5fde6a45
MP
57852016-03-31 Marek Polacek <polacek@redhat.com>
5786
5787 PR c/70297
5788 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5789
4bbf545b
DM
57902016-03-18 David Malcolm <dmalcolm@redhat.com>
5791
5792 PR c/70281
5793 * c-parser.c (c_parser_postfix_expression): Set the source range
5794 for uses of "__builtin_types_compatible_p".
5795
fcc2b74f
JJ
57962016-03-17 Jakub Jelinek <jakub@redhat.com>
5797
5798 PR c/70280
5799 * c-typeck.c (composite_type): Don't count void_list_node
5800 into len, if the list is terminated by void_list_node, start
5801 with void_list_node instead of NULL for newargs. Stop
5802 at void_list_node.
5803
ab4c578f
MP
58042016-03-16 Marek Polacek <polacek@redhat.com>
5805
5806 PR c/70093
5807 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5808 nested functions returning VM types.
5809
96b3c82d
CP
58102016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5811
5812 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5813 when calling c_finish_omp_clauses.
5814
29b9828f
BS
58152016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5816
5817 PR c/69824
5818 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5819 for later.
5820
7ff6ca38
MP
58212016-03-04 Marek Polacek <polacek@redhat.com>
5822
5823 PR c/69798
5824 * c-parser.c (c_parser_postfix_expression): Call
5825 c_parser_cast_expression rather than c_parser_postfix_expression.
5826
686e2237
JJ
58272016-03-01 Jakub Jelinek <jakub@redhat.com>
5828
5829 PR c/69796
5830 PR c/69974
5831 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5832 of incomplete decls to error_mark_node.
5833
0b05329b
MP
58342016-02-24 Marek Polacek <polacek@redhat.com>
5835
5836 PR c/69819
5837 * c-decl.c (finish_decl): Don't update the copy of the type of a
5838 different decl type.
5839
067fbd8b
JJ
58402016-02-23 Jakub Jelinek <jakub@redhat.com>
5841
5842 PR objc/69844
5843 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5844 in id_kind reclassification.
5845
bf14eba2
JJ
58462016-02-16 Jakub Jelinek <jakub@redhat.com>
5847
5848 PR c/69835
5849 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5850
ba539195
JN
58512016-02-16 James Norris <jnorris@codesourcery.com>
5852
5853 PR c/64748
5854 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5855
16595a1f
BS
58562016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5857
f48dfe98
BS
5858 * c-decl.c (build_null_declspecs): Zero the entire struct.
5859
16595a1f
BS
5860 PR c/69522
5861 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5862 callers changed. If nested_p is true, use it to call
5863 finish_implicit_inits.
5864 * c-tree.h (finish_implicit_inits): Declare.
5865 * c-typeck.c (finish_implicit_inits): New function. Move code
5866 from ...
5867 (push_init_level): ... here.
5868 (set_designator, process_init_element): Call finish_implicit_inits.
5869
66756373
JJ
58702016-02-11 Jakub Jelinek <jakub@redhat.com>
5871
5872 PR c/69768
5873 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5874 arguments for -Waddress warning.
5875
1066e9b5
JJ
58762016-02-04 Jakub Jelinek <jakub@redhat.com>
5877
5878 PR c/69669
5879 * c-decl.c (finish_enum): When honoring mode attribute,
5880 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5881
3a5d2ba4
JJ
58822016-01-29 Jakub Jelinek <jakub@redhat.com>
5883
5884 PR debug/69518
5885 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5886 all type variants, not just TYPE_MAIN_VARIANT.
5887
cbdd8ae0
JJ
58882016-01-27 Jakub Jelinek <jakub@redhat.com>
5889
5890 PR debug/66869
5891 * c-decl.c (c_write_global_declarations_1): Warn with
5892 warn_unused_function if static prototype without definition
5893 is not C_DECL_USED.
5894
fa74a4bc
MP
58952016-01-27 Marek Polacek <polacek@redhat.com>
5896
5897 PR c/68062
5898 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5899 to unsigned, if needed. Add -Wsign-compare warning.
5900
13f92e8d
JJ
59012016-01-26 Jakub Jelinek <jakub@redhat.com>
5902
5903 PR tree-optimization/69483
5904 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5905
cd8e73dc 59062016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5907
5908 PR c/24293
5909 * c-tree.h (incomplete_record_decls): Declare.
5910 * c-parser.c (incomplete_record_decls): Define.
5911 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5912 report error if any decl has zero size.
5913 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5914 or enum type to incomplete_record_decls.
5915
e6d6ec9e
TV
59162016-01-14 Tom de Vries <tom@codesourcery.com>
5917
5918 PR tree-optimization/68773
5919 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5920 set force_output.
5921
00083992
MP
59222016-01-14 Marek Polacek <polacek@redhat.com>
5923
5924 PR c/69262
5925 * c-decl.c (grokdeclarator): Provide more information for invalid
5926 array declarations.
5927
7443cf13
DM
59282016-01-06 David Malcolm <dmalcolm@redhat.com>
5929
5930 * c-parser.c (c_parser_unary_expression): For dereferences, build
5931 a combined location before calling build_indirect_ref, so that
5932 error reports cover the full range, manually updating the c_expr
5933 src_range.
5934
6b131d5b
MP
59352016-01-06 Marek Polacek <polacek@redhat.com>
5936
5937 PR sanitizer/69099
5938 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5939 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5940 NULL.
5941
818ab71a
JJ
59422016-01-04 Jakub Jelinek <jakub@redhat.com>
5943
5944 Update copyright years.
5945
2fe0a208
MP
59462016-01-04 Marek Polacek <polacek@redhat.com>
5947
5948 PR c/68908
5949 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5950 optimization to use __atomic_fetch_* built-in if possible.
5951
c7b48c8a
TS
59522015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5953
5954 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5955 into...
5956 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5957 all users.
5958
fda5652f
MP
59592015-12-22 Marek Polacek <polacek@redhat.com>
5960
5961 PR c/69002
5962 * c-typeck.c (build_component_ref): Warn when acessing elements of
5963 atomic structures or unions.
5964
745e411d
DM
59652015-12-21 David Malcolm <dmalcolm@redhat.com>
5966
5967 * c-typeck.c: Include "gcc-rich-location.h".
5968 (build_binary_op): In the two places that call binary_op_error,
5969 create a gcc_rich_location and populate it with the location of
5970 the binary op and its two operands.
5971
94c40e19
DM
59722015-12-16 David Malcolm <dmalcolm@redhat.com>
5973
5974 * c-parser.c (c_parser_statement_after_labels): When calling
5975 c_finish_return, Use the return expression's location if it has
5976 one, falling back to the location of the first token within it.
5977 * c-typeck.c (c_finish_return): When issuing warnings about
5978 the incorrect presence/absence of a return value, issue a note
5979 showing the declaration of the function.
5980
de67c4c3
DM
59812015-12-16 David Malcolm <dmalcolm@redhat.com>
5982
5983 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5984 to 4.
5985 (c_parser_peek_nth_token): New function.
5986 (c_parser_peek_conflict_marker): New function.
5987 (c_parser_error): Detect conflict markers and report them as such.
5988
a10704e1
DM
59892015-12-16 David Malcolm <dmalcolm@redhat.com>
5990
5991 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5992 to preserve range information for the primary expression
5993 in the call to c_parser_postfix_expression_after_primary.
5994
8062bca6
DM
59952015-12-16 David Malcolm <dmalcolm@redhat.com>
5996
5997 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5998 expression location, falling back on the first token location,
5999 rather than always using the latter.
6000
d06f8b75
MP
60012015-12-16 Marek Polacek <polacek@redhat.com>
6002
6003 PR c/64637
6004 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6005 available.
6006
2994fb91
MP
60072015-12-15 Marek Polacek <polacek@redhat.com>
6008
6009 PR c/68907
6010 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6011 artificial decl.
6012
a1b93f8d
DM
60132015-12-08 David Malcolm <dmalcolm@redhat.com>
6014
6015 * c-parser.c (c_parser_alignof_expression): Capture location of
6016 closing parenthesis (if any), or of end of unary expression, and
6017 use it to build a src_range for the expression.
6018
46c6e1e2
DM
60192015-12-08 David Malcolm <dmalcolm@redhat.com>
6020
6021 PR c/68757
6022 * c-parser.c (c_parser_get_builtin_args): Add
6023 "out_close_paren_loc" param, and write back to it.
6024 (c_parser_postfix_expression): Capture the closing
6025 parenthesis location for RID_CHOOSE_EXPR,
6026 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6027 RID_BUILTIN_SHUFFLE and use it to set the source range
6028 for such expressions; within RID_BUILTIN_COMPLEX set
6029 the underlying location.
6030
66189108
MP
60312015-12-07 Marek Polacek <polacek@redhat.com>
6032
6033 PR c/68668
6034 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6035 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6036
f187980b
EB
60372015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6038
6039 * c-tree.h (c_build_va_arg): Adjust prototype.
6040 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6041 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6042 parameter, adjust throughout and issue an error if EXPR is a component
6043 with reverse storage order.
6044
4250754e
JM
60452015-12-02 Jason Merrill <jason@redhat.com>
6046
6047 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6048 (c_fully_fold_internal, decl_constant_value_for_optimization):
6049 Move from c-common.c.
6050 * c-tree.h: Declare decl_constant_value_for_optimization.
6051 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6052
e9e32ee6
JM
60532015-12-02 Joseph Myers <joseph@codesourcery.com>
6054
6055 PR c/68162
6056 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6057 following link from declarator to next declarator. Track original
6058 qualified type and pass it to c_build_qualified_type.
6059 * c-typeck.c (c_build_qualified_type): Add arguments
6060 orig_qual_type and orig_qual_indirect.
6061
ff7a55bf
TS
60622015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6063
6064 * c-parser.c (c_parser_omp_clause_name)
6065 (c_parser_oacc_all_clauses): Alphabetical sorting.
6066
657e4e47
JJ
60672015-12-02 Jakub Jelinek <jakub@redhat.com>
6068
6069 PR c/68533
6070 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6071 for diagnostics.
6072
37d5ad46
JB
60732015-12-01 Julian Brown <julian@codesourcery.com>
6074 Cesar Philippidis <cesar@codesourcery.com>
6075 James Norris <James_Norris@mentor.com>
6076
6077 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6078 (c_parser_oacc_clause_use_device): New function.
6079 (c_parser_oacc_all_clauses): Add use_device support.
6080 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6081 (c_parser_oacc_host_data): New function.
6082 (c_parser_omp_construct): Add host_data support.
6083 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6084 * c-typeck.c (c_finish_oacc_host_data): New function.
6085 (c_finish_omp_clauses): Add use_device support.
6086
a4850ce9
JH
60872015-11-29 Jan Hubicka <hubicka@ucw.cz>
6088
6089 PR c/67106
6090 * c-decl.c: Set TYPE_PACKED in variants.
6091
b58d3df2
ML
60922015-11-27 Martin Liska <mliska@suse.cz>
6093
6094 PR c++/68312
6095 * c-array-notation.c (fix_builtin_array_notation_fn):
6096 Use release_vec_vec instead of vec::release.
6097 (build_array_notation_expr): Likewise.
6098 (fix_conditional_array_notations_1): Likewise.
6099 (fix_array_notation_expr): Likewise.
6100 (fix_array_notation_call_expr): Likewise.
6101
aec17bfe
JJ
61022015-11-27 Jakub Jelinek <jakub@redhat.com>
6103
6104 PR c/63326
6105 * c-parser.c (c_parser_compound_statement_nostart): If
6106 last_label is true, use pragma_stmt instead of pragma_compound
6107 as second c_parser_pragma argument.
6108 (c_parser_omp_ordered, c_parser_omp_target_update,
6109 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6110 false as second argument to c_parser_skip_to_pragma_eol after
6111 diagnosing standalone directives used in pragma_stmt context.
6112
688c4de0
IV
61132015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6114
6115 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6116 with "if (ENABLE_OFFLOADING)".
6117
cbd03aee
DM
61182015-11-23 David Malcolm <dmalcolm@redhat.com>
6119
6120 PR objc/68438
6121 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6122 for various Objective-C constructs: Class.name syntax,
6123 @selector(), @protocol(), @encode(), and [] message syntax.
6124
a87a86e1
DM
61252015-11-20 David Malcolm <dmalcolm@redhat.com>
6126
6127 PR 62314
6128 * c-typeck.c (should_suggest_deref_p): New function.
6129 (build_component_ref): Special-case POINTER_TYPE when
6130 generating a "not a structure of union" error message, and
6131 suggest a "->" rather than a ".", providing a fix-it hint.
6132
8ece8dfb
DM
61332015-11-19 David Malcolm <dmalcolm@redhat.com>
6134
6135 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6136 candidate into a new function, find_closest_identifier.
6137
433068cc
MP
61382015-11-19 Marek Polacek <polacek@redhat.com>
6139
6140 PR c/68412
6141 * c-typeck.c (parser_build_binary_op): Properly handle
6142 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6143
bef08b71
DM
61442015-11-17 David Malcolm <dmalcolm@redhat.com>
6145
6146 * c-parser.c (set_c_expr_source_range): Bulletproof both
6147 overloaded implementations against NULL expr->value.
6148 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6149 values.
6150 (c_parser_unary_expression): Likewise when handling addresses of
6151 labels.
6152 (c_parser_postfix_expression): Likewise for statement expressions,
6153 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6154 __builtin_va_arg, and for __builtin_offset_of.
6155 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6156 src_range using the range of the braced initializer.
6157 (c_parser_transaction_expression): Set src_range for "ret" to a
6158 sane pair of values.
6159
fff77217
KY
61602015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6161
6162 * c-parser.c (c_finish_omp_declare_simd): Look for
6163 "simd" attribute as well. Update error message.
6164
1d899da2
TS
61652015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6166
6167 * c-parser.c (c_parser_omp_declare_target): Adjust.
6168
e4606348
JJ
61692015-11-14 Jakub Jelinek <jakub@redhat.com>
6170
6171 * c-typeck.c (c_finish_omp_clauses): Don't mark
6172 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6173
3e636daf
MP
61742015-11-14 Marek Polacek <polacek@redhat.com>
6175
6176 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6177 * c-typeck.c: Likewise.
6178
ebedc9a3
DM
61792015-11-13 David Malcolm <dmalcolm@redhat.com>
6180
6181 * c-decl.c (warn_defaults_to): Pass line_table to
6182 rich_location ctor.
6183 * c-errors.c (pedwarn_c99): Likewise.
6184 (pedwarn_c90): Likewise.
6185 * c-parser.c (set_c_expr_source_range): New functions.
6186 (c_token::get_range): New method.
6187 (c_token::get_finish): New method.
6188 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6189 based on the range from the start of the LHS to the end of the
6190 RHS.
6191 (c_parser_conditional_expression): Likewise, based on the range
6192 from the start of the cond.value to the end of exp2.value.
6193 (c_parser_binary_expression): Call set_c_expr_source_range on
6194 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6195 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6196 based on the cast_loc through to the end of the expr.
6197 (c_parser_unary_expression): Likewise, based on the
6198 op_loc through to the end of op.
6199 (c_parser_sizeof_expression) Likewise, based on the start of the
6200 sizeof token through to either the closing paren or the end of
6201 expr.
6202 (c_parser_postfix_expression): Likewise, using the token range,
6203 or from the open paren through to the close paren for
6204 parenthesized expressions.
6205 (c_parser_postfix_expression_after_primary): Likewise, for
6206 various kinds of expression.
6207 * c-tree.h (struct c_expr): Add field "src_range".
6208 (c_expr::get_start): New method.
6209 (c_expr::get_finish): New method.
6210 (set_c_expr_source_range): New decls.
6211 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6212 on ret for prefix unary ops.
6213 (parser_build_binary_op): Likewise, running from the start of
6214 arg1.value through to the end of arg2.value.
6215
ec8b536f
MP
62162015-11-13 Marek Polacek <polacek@redhat.com>
6217
6218 PR c/68320
6219 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6220
277fe616
DM
62212015-11-13 David Malcolm <dmalcolm@redhat.com>
6222
6223 * c-typeck.c: Include spellcheck.h.
6224 (lookup_field_fuzzy_find_candidates): New function.
6225 (lookup_field_fuzzy): New function.
6226 (build_component_ref): If the field was not found, try using
6227 lookup_field_fuzzy and potentially offer a suggestion.
6228
6e232ba4
JN
62292015-11-12 James Norris <jnorris@codesourcery.com>
6230 Joseph Myers <joseph@codesourcery.com>
6231
6232 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6233 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6234 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6235 and PRAGMA_OMP_CLAUSE_LINK.
6236 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6237 and PRAGMA_OACC_CLAUSE_LINK.
6238 (OACC_DECLARE_CLAUSE_MASK): New definition.
6239 (c_parser_oacc_declare): New function.
6240
9be4f715
MP
62412015-11-12 Marek Polacek <polacek@redhat.com>
6242
6243 PR c/67784
6244 * c-parser.c (c_parser_for_statement): Reclassify the token in
6245 a correct scope.
6246
e78bede6
MP
62472015-11-11 Marek Polacek <polacek@redhat.com>
6248
6249 PR c/68107
6250 PR c++/68266
6251 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6252 checking the size of an array.
6253
69f293c9
AM
62542015-11-11 Andrew MacLeod <amacleod@redhat.com>
6255
6256 * c-array-notation.c: Remove unused header files.
6257 * c-aux-info.c: Likewise.
6258 * c-convert.c: Likewise.
6259 * c-decl.c: Likewise.
6260 * c-errors.c: Likewise.
6261 * c-lang.c: Likewise.
6262 * c-objc-common.c: Likewise.
6263 * c-parser.c: Likewise.
6264 * c-typeck.c: Likewise.
6265 * gccspec.c: Likewise.
6266
3a40d81d
NS
62672015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6268 Cesar Philippidis <cesar@codesourcery.com>
6269 James Norris <jnorris@codesourcery.com>
6270 Julian Brown <julian@codesourcery.com>
6271 Nathan Sidwell <nathan@codesourcery.com>
6272
3a40d81d
NS
6273 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6274 routine arg.
6275 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6276 (c_parser_pragma): Parse 'acc routine'.
6277 (OACC_ROUTINE_CLAUSE_MARK): Define.
6278 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6279
fc402eec
AA
62802015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6281
6282 PR debug/67192
6283 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6284 location of the backward-goto to the start of the loop body.
6285
f6b0b3db
AA
62862015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6287
6288 PR debug/67192
6289 * c-parser.c (c_parser_while_statement): Finish the loop before
6290 parsing ahead for misleading indentation.
6291 (c_parser_for_statement): Likewise.
6292
ee45a32d
EB
62932015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6294
6295 * c-decl.c (finish_struct): If the structure has reverse storage
6296 order, rewrite the type of array fields with scalar component. Call
6297 maybe_apply_pragma_scalar_storage_order on entry.
6298 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6299 errors on bit-fields and reverse SSO here and not...
6300 (c_mark_addressable): ...here.
6301 (output_init_element): Adjust call to initializer_constant_valid_p.
6302 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6303
8a645150
DM
63042015-11-06 David Malcolm <dmalcolm@redhat.com>
6305
6306 * c-decl.c (warn_defaults_to): Update for change in signature
6307 of diagnostic_set_info.
6308 * c-errors.c (pedwarn_c99): Likewise.
6309 (pedwarn_c90): Likewise.
6310 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6311 for textinfo::set_location.
6312
7a5e4956
CP
63132015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6314 Thomas Schwinge <thomas@codesourcery.com>
6315 James Norris <jnorris@codesourcery.com>
6316
6317 * c-parser.c (c_parser_omp_clause_name): Add support for
6318 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6319 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6320 default(none) in OpenACC.
6321 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6322 arguments.
6323 (c_parser_oacc_clause_tile): New function.
6324 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6325 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6326 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6327 TILE}.
6328 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6329 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6330 FIRSTPRIVATE}.
6331 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6332 (c_parser_oacc_update): Update the error message for missing clauses.
6333 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6334 and OMP_CLAUSE_INDEPENDENT.
6335
bfcfbfa0
MP
63362015-11-05 Marek Polacek <polacek@redhat.com>
6337
6338 PR c/68090
6339 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6340 deal with pre-evaluation on invalid types.
6341
e01d41e5
JJ
63422015-11-05 Jakub Jelinek <jakub@redhat.com>
6343 Ilya Verbin <ilya.verbin@intel.com>
6344
6345 * c-parser.c: Include context.h and gimple-expr.h.
6346 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6347 monotonic together with nonmonotonic.
6348 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6349 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6350 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6351 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6352 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6353 expressions on combined target teams before the target.
6354 (c_parser_omp_declare_target): If decl has "omp declare target" or
6355 "omp declare target link" attribute, and cgraph or varpool node already
6356 exists, then set corresponding flags. Call c_finish_omp_clauses
6357 in the parenthesized extended-list syntax case.
6358 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6359 declare target.
6360 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6361 on OMP_CLAUSE_REDUCTION array sections.
6362 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6363 into the constant offset, or for variable low-bound using
6364 POINTER_PLUS_EXPR. For structure element based array sections use
6365 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6366 (c_finish_omp_clauses): Drop generic_field_head, structure
6367 elements are now always mapped even as array section bases,
6368 diagnose same var in data sharing and mapping clauses. Diagnose if
6369 linear step on declare simd is neither a constant nor a uniform
6370 parameter. Look through POINTER_PLUS_EXPR for array section
6371 reductions. Diagnose the same var or function appearing multiple
6372 times on the same directive. Fix up wording for the to clause if t
6373 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6374 modifier on kinds other than dynamic or guided or nonmonotonic
6375 modifier together with ordered clause.
6376
4bf9e5a8
TS
63772015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6378 Chung-Lin Tang <cltang@codesourcery.com>
6379
6380 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6381
2adfab87
AM
63822015-10-29 Andrew MacLeod <amacleod@redhat.com>
6383
6384 * c-array-notation.c: Reorder #include's and remove duplicates.
6385 * c-aux-info.c: Likewise.
6386 * c-convert.c: Likewise.
6387 * c-decl.c: Likewise.
6388 * c-errors.c: Likewise.
6389 * c-lang.c: Likewise.
6390 * c-objc-common.c: Likewise.
6391 * c-parser.c: Likewise.
6392 * c-typeck.c: Likewise.
6393
e922069e
JW
63942015-10-26 Jim Wilson <jim.wilson@linaro.org>
6395
6396 PR debug/66068
6397 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6398 after calling build_qualified_type.
6399
765dd391
CP
64002015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6401 Thomas Schwinge <thomas@codesourcery.com>
6402 James Norris <jnorris@codesourcery.com>
6403 Joseph Myers <joseph@codesourcery.com>
6404 Julian Brown <julian@codesourcery.com>
6405 Bernd Schmidt <bschmidt@redhat.com>
6406
6407 * c-parser.c (c_parser_oacc_shape_clause): New.
6408 (c_parser_oacc_simple_clause): New.
6409 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6410 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6411
88bae6f4
TS
64122015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6413 James Norris <jnorris@codesourcery.com>
6414 Cesar Philippidis <cesar@codesourcery.com>
6415
6416 PR c/64765
6417 PR c/64880
6418 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6419 parameters, and handle these. Adjust all users.
6420 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6421 into...
6422 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6423 all users.
6424 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6425 declare functions.
6426 (c_finish_omp_construct): Declare function.
6427 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6428 Merge functions into...
6429 (c_finish_omp_construct): ... this new function.
6430
a8fc2579
RB
64312015-10-22 Richard Biener <rguenther@suse.de>
6432
6433 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6434 before folding a MINUS_EXPR.
6435
e9122ef6
MP
64362015-10-21 Marek Polacek <polacek@redhat.com>
6437
6438 PR c/68024
6439 * c-decl.c (start_function): Warn about vararg functions without
6440 a prototype.
6441
9f47c7e5
IE
64422015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6443
6444 * c-typeck.c (build_conditional_expr): Use boolean vector
6445 type for vector comparison.
6446 (build_vec_cmp): New.
6447 (build_binary_op): Use build_vec_cmp for comparison.
6448
fa60eeb9
MP
64492015-10-20 Marek Polacek <polacek@redhat.com>
6450
6451 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6452
2c7020eb
MP
64532015-10-20 Marek Polacek <polacek@redhat.com>
6454
6455 PR c/67964
6456 * c-parser.c (c_parser_attributes): Break out of the loop if the
6457 token after an attribute isn't a comma.
6458
d9a6bd32
JJ
64592015-10-13 Jakub Jelinek <jakub@redhat.com>
6460 Aldy Hernandez <aldyh@redhat.com>
6461
6462 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6463 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6464 (c_parser_omp_variable_list): Handle structure elements for
6465 map, to and from clauses. Handle array sections in reduction
6466 clause. Formatting fixes.
6467 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6468 if clause modifiers.
6469 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6470 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6471 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6472 c_parser_omp_clause_is_device_ptr): New functions.
6473 (c_parser_omp_clause_ordered): Parse optional parameter.
6474 (c_parser_omp_clause_reduction): Handle array reductions.
6475 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6476 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6477 functions.
6478 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6479 (c_parser_omp_clause_depend_sink): New function.
6480 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6481 (c_parser_omp_clause_map): Parse release/delete map kinds and
6482 optional always modifier.
6483 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6484 and c_finish_omp_clauses callers.
6485 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6486 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6487 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6488 (OMP_CRITICAL_CLAUSE_MASK): Define.
6489 (c_parser_omp_critical): Parse critical clauses.
6490 (c_parser_omp_for_loop): Handle doacross loops, adjust
6491 c_finish_omp_for and c_finish_omp_clauses callers.
6492 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6493 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6494 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6495 (c_parser_omp_for): Disallow ordered clause when combined with
6496 distribute. Disallow linear clause when combined with distribute
6497 and not combined with simd.
6498 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6499 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6500 parse clauses and if depend clause is found, don't parse a body.
6501 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6502 Allow target parallel without for after it.
6503 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6504 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6505 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6506 invalid kinds.
6507 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6508 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6509 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6510 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6511 functions.
6512 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6513 defaultmap and is_device_ptr clauses.
6514 (c_parser_omp_target): Parse target parallel and target simd. Set
6515 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6516 and target exit data. Diagnose invalid map kinds.
6517 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6518 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6519 construct.
6520 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6521 &omp_priv.
6522 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6523 (c_parser_omp_taskloop): New function.
6524 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6525 handle PRAGMA_OMP_TASKLOOP.
6526 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6527 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6528 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6529 Add IS_OMP argument, handle structure element bases, diagnose
6530 bitfields, pass IS_OMP recursively, diagnose known zero length
6531 array sections in depend clauses, handle array sections in reduction
6532 clause, diagnose negative length even for pointers.
6533 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6534 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6535 array sections in reduction clause, set
6536 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6537 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6538 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6539 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6540
21ba0cea
MP
65412015-10-06 Marek Polacek <polacek@redhat.com>
6542
6543 * c-parser.c (c_parser_statement_after_labels): Use
6544 protected_set_expr_location.
6545 (c_parser_omp_clause_num_gangs): Likewise.
6546 (c_parser_omp_clause_num_threads): Likewise.
6547 (c_parser_omp_clause_num_workers): Likewise.
6548 (c_parser_omp_clause_vector_length): Likewise.
6549 (c_parser_omp_clause_num_teams): Likewise.
6550 (c_parser_omp_clause_thread_limit): Likewise.
6551 * c-typeck.c (build_c_cast): Likewise.
6552 (c_cast_expr): Likewise.
6553
624d31fe
RS
65542015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6555
6556 * c-typeck.c (c_tree_equal): Use real_equal instead of
6557 REAL_VALUES_EQUAL.
6558
b8fd7909
JM
65592015-10-04 Jason Merrill <jason@redhat.com>
6560
6561 * c-parser.c (c_lex_one_token): Handle @synchronized.
6562 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6563 can change whether the function is transaction_safe.
6564
1c7485af
MP
65652015-10-02 Marek Polacek <polacek@redhat.com>
6566
6567 PR c/67730
6568 * c-typeck.c (convert_for_assignment): Use the expansion point
6569 location throughout.
6570
3e3b8d63
MP
65712015-10-02 Marek Polacek <polacek@redhat.com>
6572
6573 PR c/64249
6574 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6575 and pass it down to c_parser_if_statement.
6576 (c_parser_else_body): Add CHAIN parameter and pass it down to
6577 c_parser_statement_after_labels.
6578 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6579 duplicated if-else-if conditions.
6580
aabef2de
MP
65812015-10-01 Marek Polacek <polacek@redhat.com>
6582
6583 * c-typeck.c (convert_for_assignment): Improve commentary.
6584
de8ddd5f
MP
65852015-09-30 Marek Polacek <polacek@redhat.com>
6586
6587 PR c/67730
6588 * c-typeck.c (c_finish_return): Use the expansion point location for
6589 certain "return with value" warnings.
6590
c4914de6
MLI
65912015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6592
6593 * c-parser.c (pragma_lex): Add loc argument.
6594
0e36f5c7
MP
65952015-09-15 Marek Polacek <polacek@redhat.com>
6596
6597 PR c/67580
6598 * c-decl.c (tag_exists_p): New function.
6599 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6600 struct/union/enum keywords are missing.
6601 * c-tree.h (tag_exists_p): Declare.
6602
2f3bb934
MP
66032015-09-15 Marek Polacek <polacek@redhat.com>
6604
6605 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6606 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6607 Return NULL_TREE instead of 0.
6608 (lookup_name): Return NULL_TREE instead of 0.
6609 (lookup_name_in_scope): Likewise.
6610 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6611 (parser_xref_tag): Use false instead of 0.
6612 (start_struct): Use true instead of 1.
6613 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6614
aa256c4a
MP
66152015-09-14 Marek Polacek <polacek@redhat.com>
6616
6617 * c-typeck.c (set_nonincremental_init_from_string): Use
6618 HOST_WIDE_INT_M1U when shifting a negative value.
6619
dbb68221
MW
66202015-09-09 Mark Wielaard <mjw@redhat.com>
6621
6622 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6623 parm against NULL.
6624
a8a098ac
JJ
66252015-09-10 Jakub Jelinek <jakub@redhat.com>
6626
6627 PR c/67502
6628 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6629 into OMP_FOR_PRE_BODY rather than before the loop.
6630
f4b189d5
JJ
66312015-09-09 Jakub Jelinek <jakub@redhat.com>
6632
0bb99c11
JJ
6633 PR c/67501
6634 * c-parser.c (c_parser_oacc_all_clauses,
6635 c_parser_omp_all_clauses): Remove invalid clause from
6636 list of clauses even if parser->error is set.
6637
fce5e5e3
JJ
6638 PR c/67500
6639 * c-parser.c (c_parser_omp_clause_aligned,
6640 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6641 test for errors.
6642 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6643 error_mark_node.
6644
f4b189d5
JJ
6645 PR c/67495
6646 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6647 instead of c_parser_unary_expression. If the result is !lvalue_p,
6648 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6649
b2aaf235
MP
66502015-09-04 Marek Polacek <polacek@redhat.com>
6651
6652 PR sanitizer/67279
6653 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6654
1807ffc1
MS
66552015-09-03 Martin Sebor <msebor@redhat.com>
6656
6657 PR c/66516
8b652e65
JJ
6658 * c-typeck.c (convert_arguments, parser_build_unary_op,
6659 build_conditional_expr, c_cast_expr, convert_for_assignment,
6660 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6661 reject_gcc_builtin.
6662 (c_decl_implicit): Define.
6663
d04ff417
MP
66642015-09-02 Marek Polacek <polacek@redhat.com>
6665
6666 PR c/67432
6667 * c-parser.c (c_parser_enum_specifier): Give a better error for
6668 an empty enum.
6669
a79683d5
TS
66702015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6671
6672 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6673
191a6b94
MP
66742015-08-12 Marek Polacek <polacek@redhat.com>
6675
6676 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6677 LOC to it.
6678
420a9d9b
MP
66792015-08-03 Marek Polacek <polacek@redhat.com>
6680
6681 PR c/67088
6682 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6683 Use it.
6684 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6685
992118a1
PP
66862015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6687
6688 * c-parser.c (c_parser_if_body): Take token_indent_info
6689 argument. Call warn_for_misleading_indentation even when the
6690 body is a semicolon. Extract token_indent_infos corresponding
6691 to the guard, body and next tokens. Adjust call to
6692 warn_for_misleading_indentation accordingly.
6693 (c_parser_else_body): Likewise.
6694 (c_parser_if_statement): Likewise.
6695 (c_parser_while_statement): Likewise.
6696 (c_parser_for_statement): Likewise.
6697
46308474
LFSM
66982015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6699 Manuel López-Ibáñez <manu@gcc.gnu.org>
6700
6701 * c-decl.c (get_parm_info): Remove static var. Update warning
6702 message.
6703
05b28fd6
MP
67042015-07-27 Marek Polacek <polacek@redhat.com>
6705
6706 PR c++/66555
6707 PR c/54979
6708 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6709
451b5e48
MP
67102015-07-20 Marek Polacek <polacek@redhat.com>
6711
6712 PR c++/55095
6713 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6714 (build_binary_op): Warn about left shift overflows.
6715
1916bcb5
AM
67162015-07-09 Andrew MacLeod <amacleod@redhat.com>
6717
6718 * c-array-notation.c: Adjust includes for flags.h changes.
6719 * c-objc-common.c: Likewise.
6720
c7131fb2
AM
67212015-07-07 Andrew MacLeod <amacleod@redhat.com>
6722
6723 * c-array-notation.c: Adjust includes.
6724 * c-aux-info.c: Likewise.
6725 * c-convert.c: Likewise.
6726 * c-decl.c: Likewise.
6727 * c-errors.c: Likewise.
6728 * c-lang.c: Likewise.
6729 * c-objc-common.c: Likewise.
6730 * c-parser.c: Likewise.
6731 * c-typeck.c: Likewise.
6732
da2e71c9
MLI
67332015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6734
6735 PR fortran/66605
6736 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6737
b155cfd9
MP
67382015-06-29 Marek Polacek <polacek@redhat.com>
6739
6740 PR c/66322
6741 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6742 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6743 about -Wswitch-bool here.
6744 (do_case): Update c_add_case_label call.
6745 (c_finish_case): Update c_do_switch_warnings call.
6746
31521951
MP
67472015-06-27 Marek Polacek <polacek@redhat.com>
6748
6749 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6750
22d03525
MP
67512015-06-26 Marek Polacek <polacek@redhat.com>
6752
6753 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6754 INDIRECT_REF_P.
6755 * c-typeck.c (array_to_pointer_conversion): Likewise.
6756 (build_unary_op): Likewise.
6757 (c_finish_return): Likewise.
6758
f0889939
AM
67592015-06-25 Andrew MacLeod <amacleod@redhat.com>
6760
6761 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6762 * c-parser.c: Likewise.
6763
8d67ee55
RS
67642015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6765
6766 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6767 instead of pointer_hash.
6768 (detect_field_duplicates): Likewise.
6769
0ae9bd27
MP
67702015-06-25 Marek Polacek <polacek@redhat.com>
6771
6772 * c-array-notation.c: Use VAR_P throughout.
6773 * c-decl.c: Likewise.
6774 * c-objc-common.c: Likewise.
6775 * c-parser.c: Likewise.
6776 * c-typeck.c: Likewise.
6777
62f9079a
MP
67782015-06-25 Marek Polacek <polacek@redhat.com>
6779
6780 * c-decl.c: Use is_global_var throughout.
6781 * c-parser.c: Likewise.
6782 * c-typeck.c: Likewise.
6783
abb226c9
AM
67842015-06-17 Andrew MacLeod <amacleod@redhat.com>
6785
6786 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6787 * c-aux-info.c: Likewise.
6788 * c-convert.c: Likewise.
6789 * c-decl.c: Likewise.
6790 * c-errors.c: Likewise.
6791 * c-lang.c: Likewise.
6792 * c-objc-common.c: Likewise.
6793 * c-parser.c: Likewise.
6794 * c-typeck.c: Likewise.
6795
8cbababc
JH
67962015-06-11 Jan Hubicka <hubicka@ucw.cz>
6797
6798 PR middle-end/66325
6799 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6800 variants.
6801
a0349665
PMR
68022015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6803
6804 * c-decl.c (pop_scope): Register the main translation unit
6805 through the new debug hook.
6806
13fdf2e2
AM
68072015-06-08 Andrew MacLeod <amacleod@redhat.com>
6808
6809 * c-array-notation.c : Adjust include files.
6810 * c-aux-info.c : Likewise.
6811 * c-convert.c : Likewise.
6812 * c-decl.c : Likewise.
6813 * c-errors.c : Likewise.
6814 * c-lang.c : Likewise.
6815 * c-lang.h : Likewise.
6816 * c-objc-common.c : Likewise.
6817 * c-parser.c : Likewise.
6818 * c-typeck.c : Likewise.
6819
d7438551
AH
68202015-06-05 Aldy Hernandez <aldyh@redhat.com>
6821
6822 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6823 immediately clobber it.
6824 (c_write_global_declarations_1): Remove call to
6825 check_global_declaration_1.
6826 (c_write_global_declarations_2): Remove.
6827 (c_write_final_cleanups): Rename from c_write_global_declarations.
6828 Remove call to finalize_compilation_unit.
6829 Remove calls to debugging hooks.
6830 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6831 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6832 * c-tree.h: Remove c_write_global_declarations.
6833
ecb9f223
AM
68342015-06-04 Andrew MacLeod <amacleod@redhat.com>
6835
6836 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6837 * c-aux-info.c: Likewise.
6838 * c-convert.c: Likewise.
6839 * c-decl.c: Likewise.
6840 * c-errors.c: Likewise.
6841 * c-lang.c: Likewise.
6842 * c-objc-common.c: Likewise.
6843 * c-parser.c: Likewise.
6844 * c-typeck.c: Likewise.
6845
9482b620
MP
68462015-06-04 Marek Polacek <polacek@redhat.com>
6847
6848 PR c/66341
6849 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6850 it is a lvalue.
6851
bc51ace3
PK
68522015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6853
6854 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6855 Warn for empty struct.
6856 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6857
ea5b45b6
AT
68582015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6859
6860 * c-decl.c (start_function): Call plugin before parsing.
6861 (finish_function): Call plugin after parsing.
6862
c2d47482
PK
68632015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6864
6865 PR c/49551
6866 * c-decl.c (merge_decls): Merge DECL_COMMON.
6867
a95492ab
JW
68682015-05-22 Jim Wilson <jim.wilson@linaro.org>
6869
6870 * Make-lang.in (check_gcc_pallelize): Define.
6871
fd5c817a
MP
68722015-05-22 Marek Polacek <polacek@redhat.com>
6873
6874 PR c/47043
6875 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6876 attributes.
6877
c7b70a3c
MP
68782015-05-21 Marek Polacek <polacek@redhat.com>
6879
6880 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6881 DECL_BUILT_IN.
6882
21b634ae
MP
68832015-05-20 Marek Polacek <polacek@redhat.com>
6884
6885 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6886 * c-typeck.c: Likewise.
6887
296a8c2f
MP
68882015-05-19 Marek Polacek <polacek@redhat.com>
6889
6890 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6891
41b37d5e
JJ
68922015-05-19 Jakub Jelinek <jakub@redhat.com>
6893
6894 PR middle-end/66199
6895 * c-parser.c (c_parser_omp_for_loop): Don't add
6896 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6897 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6898 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6899 constructs.
6900
fab27f52
MM
69012015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6902
6903 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6904 swaps.
fab27f52 6905
40de31cf
MLI
69062015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6907
6908 PR fortran/44054
6909 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6910 accessor function.
6911
3aa3c9fc
MP
69122015-05-14 Marek Polacek <polacek@redhat.com>
6913
6914 PR c/66066
6915 PR c/66127
6916 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6917 rather than with 0.
6918
c3388e62
DM
69192015-05-12 David Malcolm <dmalcolm@redhat.com>
6920
6921 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6922 to add a call to warn_for_misleading_indentation.
6923 (c_parser_else_body): Likewise, adding param "else_loc".
6924 (c_parser_if_statement): Check for misleading indentation.
6925 (c_parser_while_statement): Likewise.
6926 (c_parser_for_statement): Likewise.
6927
755e528f
MP
69282015-05-08 Marek Polacek <polacek@redhat.com>
6929
6930 PR c/64918
6931 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6932 (output_init_element): Likewise.
6933
0173bd2a
MP
69342015-05-07 Marek Polacek <polacek@redhat.com>
6935
6936 PR c/65179
6937 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6938 value.
6939
9babc352
MP
69402015-04-30 Marek Polacek <polacek@redhat.com>
6941
6942 * c-typeck.c (set_init_label): Call error_at instead of error and
6943 pass LOC to it.
6944
ac9f18db
MP
6945 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6946 the type of a decl.
6947
ec3fba51
MP
6948 * c-typeck.c (c_build_va_arg): Clarify the error message.
6949
b811915d
TS
69502015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6951
6952 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6953 OMP_STANDALONE_CLAUSES.
6954
f3075008
MP
69552015-04-28 Marek Polacek <polacek@redhat.com>
6956
6957 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6958
4e81b788
MP
69592015-04-28 Marek Polacek <polacek@redhat.com>
6960
6961 PR c/65901
6962 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6963
6c1db78e
MP
69642015-04-25 Marek Polacek <polacek@redhat.com>
6965
6966 PR c/52085
6967 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6968 attribute.
6969
5c4abbb8
MP
69702015-04-23 Marek Polacek <polacek@redhat.com>
6971
6972 PR c/65345
6973 * c-decl.c (set_labels_context_r): New function.
6974 (store_parm_decls): Call it via walk_tree_without_duplicates.
6975 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6976 instead of create_tmp_var. Build TARGET_EXPR instead of
6977 COMPOUND_EXPR.
6978 (build_atomic_assign): Use create_tmp_var_raw instead of
6979 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6980
06aca1d5
IV
69812015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6982
6983 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6984 (c_parser_omp_target_update): Add missed %> to error_at ().
6985
8fba1830
BRF
69862015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6987
6988 PR target/55143
6989 * c-decl.c (c_default_pointer_mode): Remove definition.
6990 * c-tree.h (c_default_pointer_mode): Remove declaration.
6991
62021f64
TB
69922015-03-27 Tobias Burnus <burnus@net-b.de>
6993
6994 PR c/65586
6995 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6996 error out.
6997 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6998 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6999 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7000
9b65e171
JJ
70012015-03-19 Jakub Jelinek <jakub@redhat.com>
7002
7003 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7004 attribute for DECL_EXTERNAL VAR_DECLs.
7005
17958621
JJ
70062015-03-11 Jakub Jelinek <jakub@redhat.com>
7007
7008 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7009 argument.
7010
7ccb1a11
JJ
70112015-03-10 Jakub Jelinek <jakub@redhat.com>
7012
7013 PR c/65120
7014 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7015 before preparing arguments to warn_logical_not_parentheses.
7016
01177669
JJ
70172015-03-09 Jakub Jelinek <jakub@redhat.com>
7018
7019 PR c/65120
7020 * c-typeck.c (parser_build_binary_op): Don't warn for
7021 !!x == y or !b == y where b is _Bool.
7022
802ac282
MP
70232015-03-09 Marek Polacek <polacek@redhat.com>
7024
7025 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7026 * c-decl.c (grokdeclarator): Likewise.
7027 * c-typeck.c (build_binary_op): Likewise.
7028
e5165b60
MP
70292015-02-27 Marek Polacek <polacek@redhat.com>
7030
7031 PR c/65228
7032 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7033
065d214c
MP
70342015-02-14 Marek Polacek <polacek@redhat.com>
7035
7036 PR c/64768
7037 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7038 declared through a typedef name.
7039
e5d9235b
MP
70402015-02-13 Marek Polacek <polacek@redhat.com>
7041
7042 PR c/65050
7043 * c-decl.c (grokdeclarator): Print also the type when giving
7044 the error message about array's incomplete element type.
7045
fa01ffcc
JJ
70462015-02-11 Jakub Jelinek <jakub@redhat.com>
7047
7048 PR c/64824
7049 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7050 check in the POP macro.
7051
c3e38a03
MP
70522015-02-09 Marek Polacek <polacek@redhat.com>
7053
7054 PR c/64856
7055 * c-typeck.c (process_init_element): Don't always wrap
7056 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7057 initializing a range of elements.
7058
4886ec8e
JJ
70592015-02-04 Jakub Jelinek <jakub@redhat.com>
7060
7061 PR c/64824
7062 PR c/64868
7063 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7064
c3e38a03 70652015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
7066
7067 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7068 processing enum declaration.
7069
7b33f0c8
MP
70702015-01-29 Marek Polacek <polacek@redhat.com>
7071
7072 PR c/64709
7073 * c-typeck.c (pop_init_level): If constructor_elements has
7074 exactly one element with integer_zerop value, set constructor_zeroinit
7075 to 1. Remove braces around warning_init call.
7076
dea63e49
JJ
70772015-01-27 Jakub Jelinek <jakub@redhat.com>
7078
7079 PR c/64766
7080 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7081 of FUNCTION_DECLs with error_mark_node.
7082
d38f7dce
JJ
70832015-01-26 Jakub Jelinek <jakub@redhat.com>
7084
7085 PR c/64778
7086 * c-typeck.c (convert_arguments): Return -1 if there are
7087 error_args, even if we've diagnosed too many arguments.
7088
cbf5d0e7
RB
70892015-01-21 Richard Biener <rguenther@suse.de>
7090
7091 PR middle-end/64313
7092 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7093 for builtins the user declared correctly.
7094
41dbbb37
TS
70952015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7096 Bernd Schmidt <bernds@codesourcery.com>
7097 Cesar Philippidis <cesar@codesourcery.com>
7098 James Norris <jnorris@codesourcery.com>
7099 Jakub Jelinek <jakub@redhat.com>
7100 Ilmir Usmanov <i.usmanov@samsung.com>
7101
7102 * c-parser.c: Include "gomp-constants.h".
7103 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7104 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7105 Use OMP_CLAUSE_SET_MAP_KIND.
7106 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7107 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7108 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7109 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7110 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7111 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7112 "copyout", "create", "delete", "deviceptr", "gang", "host",
7113 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7114 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7115 "present_or_create", "pcreate", "seq", "self", "vector",
7116 "vector_length", "wait", "worker".
7117 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7118 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7119 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7120 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7121 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7122 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7123 (c_parser_oacc_data_clause_deviceptr)
7124 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7125 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7126 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7127 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7128 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7129 (c_parser_oacc_parallel, c_parser_oacc_update)
7130 (c_parser_oacc_wait): New functions.
7131 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7132 (c_finish_oacc_data): New prototypes.
7133 * c-typeck.c: Include "gomp-constants.h".
7134 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7135 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7136 OMP_CLAUSE_SET_MAP_KIND.
7137 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7138 (c_finish_oacc_data): New functions.
7139 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7140 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7141 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7142 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7143 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7144 GOMP_MAP_FORCE_DEVICEPTR.
7145
adfac8df
JJ
71462015-01-09 Michael Collison <michael.collison@linaro.org>
7147
7148 * c-array-notation.c: Include hash-set.h, machmode.h,
7149 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7150 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7151 * c-aux-info.c: Ditto.
7152 * c-convert.c: Ditto.
7153 * c-decl.c: Ditto.
7154 * c-errors.c: Ditto.
7155 * c-lang.c: Dittoxs.
7156 * c-objc-common.c: Ditto.
7157 * c-parser.c: Ditto.
7158 * c-typeck.c: Include hash-set.h, machmode.h,
7159 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7160 fold-const.h, wide-int.h, inchash.h, real.h and
7161 fixed-value.h due to flattening of tree.h.
7162
2cc901dc
MP
71632015-01-07 Marek Polacek <polacek@redhat.com>
7164
7165 PR c/64417
7166 * c-typeck.c (process_init_element): Disallow initialization of
7167 a flexible array member with a string constant if the structure
7168 is in an array.
7169
5624e564
JJ
71702015-01-05 Jakub Jelinek <jakub@redhat.com>
7171
e5341100
JJ
7172 PR sanitizer/64344
7173 * c-typeck.c (convert_for_assignment, c_finish_return): For
7174 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7175 types also set in_late_binary_op around convert call.
7176 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7177 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7178 result on expr as last argument to ubsan_instrument_float_cast,
7179 if in_late_binary_op, don't use c_save_expr but save_expr.
7180
5624e564
JJ
7181 Update copyright years.
7182
5bd012f8
MP
71832015-01-05 Marek Polacek <polacek@redhat.com>
7184
7185 PR c/64423
7186 * c-typeck.c (build_array_ref): Pass loc down to
7187 warn_array_subscript_with_type_char.
7188
3f8257db 71892014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7190
7191 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 7192 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 7193 element type.
8e745a17 7194 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 7195 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 7196 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 7197 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 7198 to PEDWARN_FOR_QUALIFIERS.
768952be 7199
8f94a8c4
JJ
72002014-12-17 Jakub Jelinek <jakub@redhat.com>
7201
7202 PR sanitizer/64289
7203 * c-convert.c: Include ubsan.h.
7204 (convert): For real -> integral casts and
7205 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7206 instead instrument the float cast directly.
7207
b731b390
JJ
72082014-11-29 Jakub Jelinek <jakub@redhat.com>
7209
7210 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7211 c_finish_stmt_expr): Remove NULL last argument from
7212 create_tmp_var_raw and create_tmp_var calls.
7213 * c-array-notation.c (fix_builtin_array_notation_fn,
7214 build_array_notation_expr, fix_conditional_array_notations_1,
7215 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7216
541e35a6
MP
72172014-11-28 Marek Polacek <polacek@redhat.com>
7218
7219 PR c/63862
7220 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7221 convert the right operand to integer type.
7222
b286be94
MP
72232014-11-25 Marek Polacek <polacek@redhat.com>
7224
7225 PR c/63877
7226 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7227 for inline functions.
7228
aa7da51a
JJ
72292014-11-21 Jakub Jelinek <jakub@redhat.com>
7230
7231 PR target/63764
7232 * c-typeck.c (build_array_ref): Adjust
7233 convert_vector_to_pointer_for_subscript caller. If it returns true,
7234 call non_lvalue_loc on the result.
7235
d876207f
RB
72362014-11-11 Richard Biener <rguenther@suse.de>
7237
7238 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7239 to true.
7240
e5e44252
AK
72412014-11-10 Andi Kleen <ak@linux.intel.com>
7242
7243 PR c/60804
7244 * c-parser.c (c_parser_statement_after_labels): Call
7245 check_no_cilk.
7246 (c_parser_if_statement): Dito.
7247 (c_parser_switch_statement): Dito.
7248 (c_parser_while_statement): Dito.
7249 (c_parser_do_statement): Dito.
7250 (c_parser_for_statement): Dito.
7251 * c-typeck.c (c_finish_loop): Dito.
7252
13c21655
PC
72532014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7254
7255 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7256 OPT_Wshift_count_overflow in the warnings.
7257
2d51fcef
MP
72582014-10-30 Marek Polacek <polacek@redhat.com>
7259
7260 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7261 print the stripped version as well, if they're not the same.
7262
ef4bddc2
RS
72632014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7264
7265 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7266 machine_mode.
7267
c582198b
AM
72682014-10-28 Andrew MacLeod <amacleod@redhat.com>
7269
7270 * c-decl.c: Adjust include files.
7271 * c-parser.c: Ditto.
7272
ddc8de03
PM
72732014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7274 Tom Tromey <tromey@redhat.com>
7275
7276 * c-tree.h (enum c_oracle_request): New.
7277 (c_binding_oracle_function): New typedef.
7278 (c_binding_oracle, c_pushtag, c_bind): Declare.
7279 * c-decl.c (c_binding_oracle): New global.
7280 (I_SYMBOL_CHECKED): New macro.
7281 (i_symbol_binding): New function.
7282 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7283 (I_TAG_CHECKED): New macro.
7284 (i_tag_binding): New function.
7285 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7286 (I_LABEL_CHECKED): New macro.
7287 (i_label_binding): New function.
7288 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7289 (c_print_identifier): Save and restore c_binding_oracle.
7290 (c_pushtag, c_bind): New functions.
7291
60393bbc
AM
72922014-10-27 Andrew MacLeod <amacleod@redhat.com>
7293
7294 * c-typeck.c: Adjust include files.
7295
d723bb7c
MLI
72962014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7297
7298 PR c++/53061
7299 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7300 initialization here...
7301 (c_initialize_diagnostics): ... but here. Set defaults after
7302 building pretty-printer.
7303
1bc5a451
MP
73042014-10-23 Marek Polacek <polacek@redhat.com>
7305
7306 PR c/63626
7307 * c-decl.c (pop_scope): Don't print warning in external_scope.
7308
4435bb92
MP
73092014-10-19 Marek Polacek <polacek@redhat.com>
7310
7311 PR c/63567
7312 * c-typeck.c (output_init_element): Allow initializing objects with
7313 static storage duration with compound literals even in C99 and add
7314 pedwarn for it.
7315
7278465e
MP
73162014-10-17 Marek Polacek <polacek@redhat.com>
7317
7318 PR c/63567
7319 * c-typeck.c (digest_init): Allow initializing objects with static
7320 storage duration with compound literals even in C99 and add pedwarn
7321 for it.
7322
d9b7be2e
MP
73232014-10-17 Marek Polacek <polacek@redhat.com>
7324
7325 PR c/63543
7326 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7327 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7328 error multiple times. Print the type.
7329
f406ae1f
MP
73302014-10-17 Marek Polacek <polacek@redhat.com>
7331
7332 PR c/63549
7333 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7334 type.
7335
92574c7c
MP
73362014-10-17 Marek Polacek <polacek@redhat.com>
7337
7338 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7339 (start_function): Use OPT_Wimplicit_int instead of 0.
7340 (store_parm_decls_oldstyle): Likewise.
7341
1bc4a978
MT
73422014-10-17 Alan Modra <amodra@gmail.com>
7343
7344 PR middle-end/61848
7345 * c-decl.c (merge_decls): Don't merge section name or tls model
7346 to newdecl symtab node, instead merge to olddecl. Override
7347 existing olddecl section name. Set tls_model for all thread-local
7348 vars, not just OMP thread-private ones. Remove incorrect comment.
7349
83685514
AM
73502014-10-16 Andrew MacLeod <amacleod@redhat.com>
7351
7352 * c-decl.c: Adjust include files.
7353
78a7c317
DD
73542014-10-14 DJ Delorie <dj@redhat.com>
7355
7356 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7357 (c_token_starts_typename): Check all __intN, not just __int128.
7358 (c_token_starts_declspecs): Likewise.
7359 (c_parser_declspecs): Likewise.
7360 (c_parser_attribute_any_word): Likewise.
7361 (c_parser_objc_selector): Likewise.
7362 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7363 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7364 is specified.
7365 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7366 __int128.
7367 (finish_declspecs): Likewise.
7368
74d98c1e
AB
73692014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7370
8e745a17 7371 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 7372 the duplicate code.
8e745a17 7373 (c_parser_statement): Call the new function.
74d98c1e 7374
84937de2
MP
73752014-10-09 Marek Polacek <polacek@redhat.com>
7376
7377 PR c/63480
7378 * c-typeck.c (pop_init_level): Don't warn about initializing
7379 with { }.
7380
0382aaa0
MP
73812014-10-07 Marek Polacek <polacek@redhat.com>
7382
7383 PR c/59717
7384 * c-decl.c (header_for_builtin_fn): New function.
7385 (implicitly_declare): Suggest which header to include.
7386
7a0ca710
MP
73872014-10-07 Marek Polacek <polacek@redhat.com>
7388
7389 * c-convert.c (convert): Use error_operand_p.
7390 * c-typeck.c (require_complete_type): Likewise.
7391 (really_atomic_lvalue): Likewise.
7392 (digest_init): Likewise.
7393 (handle_omp_array_sections_1): Likewise.
7394
6bc8a126
MP
73952014-10-03 Marek Polacek <polacek@redhat.com>
7396
7397 PR c/63453
7398 * c-decl.c (pop_scope): Don't warn about "inline function declared
7399 but never defined" for functions marked with gnu_inline attribute.
7400
d90c0a59
JJ
74012014-09-25 Jakub Jelinek <jakub@redhat.com>
7402
7403 PR c++/63249
7404 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7405 on low_bound and length.
7406
083e891e
MP
74072014-09-24 Marek Polacek <polacek@redhat.com>
7408
7409 PR c/61405
7410 PR c/53874
7411 * c-parser.c: Don't define CPP_KEYWORD.
7412 (c_parser_switch_statement): Pass original type to c_finish_case.
7413 * c-tree.h (c_finish_case): Update declaration.
7414 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7415 conditionally to c_do_switch_warnings.
7416
8d95fe25
MP
74172014-09-03 Marek Polacek <polacek@redhat.com>
7418
7419 PR c/62024
7420 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7421 conversions.
7422
9a771876
JJ
74232014-09-02 Jakub Jelinek <jakub@redhat.com>
7424 Balaji V. Iyer <balaji.v.iyer@intel.com>
7425 Igor Zamyatin <igor.zamyatin@intel.com>
7426
7427 * c-parser.c (c_parser_cilk_for): New function.
7428 (c_parser_cilk_grainsize): Likewise.
7429 (c_get_temp_regvar): Likewise.
7430 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7431 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7432 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7433 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7434 case.
7435
b7679d96
CG
74362014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7437
7438 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7439 with using HOST_WIDE_INT without truncation to 'int'
7440
59ea0364
MP
74412014-08-22 Marek Polacek <polacek@redhat.com>
7442
7443 PR c++/62199
7444 * c-typeck.c (parser_build_binary_op): Adjust call to
7445 warn_logical_not_parentheses.
7446
671a475e
IZ
74472014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7448
7449 PR other/62008
7450 * c-parser.c (c_parser_array_notation): Check for correct
7451 type of an array added.
7452
04159acf
MP
74532014-08-19 Marek Polacek <polacek@redhat.com>
7454
7455 PR c++/62153
7456 * c-typeck.c (build_binary_op): If either operand of a comparison
7457 is a boolean expression, call maybe_warn_bool_compare.
7458
c77935ee
PP
74592014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7460
7461 PR c/45584
7462 * c-typeck.c (build_c_cast): Do a conversion even when the
7463 TYPE_MAIN_VARIANTs are the same.
7464
35aff4fb
MP
74652014-08-19 Marek Polacek <polacek@redhat.com>
7466
7467 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7468 pedwarn_c99 instead of pedwarn.
7469 (grokfield): Likewise.
7470 (warn_defaults_to): New function.
7471 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7472 Unconditionally call pedwarn_c99 instead of pedwarn.
7473 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7474 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7475 check flag_isoc11 before.
7476 * c-errors.c (pedwarn_c99): Change the return type to bool.
7477 Handle -Wc99-c11-compat.
7478 * c-parser.c (disable_extension_diagnostics): Handle
7479 warn_c99_c11_compat.
7480 (restore_extension_diagnostics): Likewise.
7481 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7482 instead of pedwarn, don't check flag_isoc11 before.
7483 (c_parser_declspecs): Likewise.
7484 (c_parser_alignas_specifier): Likewise.
7485 (c_parser_alignof_expression): Likewise.
7486 (c_parser_generic_selection): Likewise.
7487 * c-tree.h (pedwarn_c99): Update declaration.
7488 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7489 of pedwarn_c99.
7490
177cce46
MP
74912014-08-19 Marek Polacek <polacek@redhat.com>
7492
7493 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7494 to pedwarn_c90.
7495 * c-errors.c: Include "opts.h".
7496 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7497 * c-parser.c (disable_extension_diagnostics): Handle negative value
7498 of warn_c90_c99_compat, too.
7499 (restore_extension_diagnostics): Likewise.
7500 (c_parser_compound_statement_nostart): Pass
7501 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7502
6dc99c33
MP
75032014-08-12 Marek Polacek <polacek@redhat.com>
7504
7505 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7506 Add pedwarn.
7507 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7508 Likewise.
7509 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7510
3f8257db 75112014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
7512
7513 PR c/51849
7514 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7515 Call pedwarn_c90 instead of pedwarn.
7516 (check_bitfield_type_and_width): Likewise.
7517 (declspecs_add_qual): Likewise.
7518 (declspecs_add_type): Likewise.
7519 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7520 Adjust to only call pedwarn_c90.
7521 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7522 pedwarn_c90 instead of pedwarn.
7523 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7524 * c-parser.c (disable_extension_diagnostics): Handle
7525 warn_c90_c99_compat.
7526 (restore_extension_diagnostics): Likewise.
7527 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7528 pedwarn_c90 instead of pedwarn.
7529 (c_parser_initelt): Likewise.
7530 (c_parser_postfix_expression): Likewise.
7531 (c_parser_postfix_expression_after_paren_type): Likewise.
7532 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7533 * c-tree.h: Fix formatting.
7534 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7535 pedwarn_c90 instead of pedwarn.
7536
9f25a338
TS
75372014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7538
7539 * c-typeck.c: Remove include of pointer-set.h.
7540
044331a8
MP
75412014-08-07 Marek Polacek <polacek@redhat.com>
7542
7543 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7544
b787e7a2
TS
75452014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7546
7547 * c-typeck.c: Use hash_map instead of pointer_map.
7548
6e2830c3
TS
75492014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7550
7551 * c-decl.c: Use hash_set instead of pointer_set.
7552
a7ee52fb
IZ
75532014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7554
7555 PR middle-end/61455
7556 * c-array-notation.c (expand_array_notations): Handling
7557 of DECL_EXPR added.
7558
b4dfdc11
MG
75592014-07-31 Marc Glisse <marc.glisse@inria.fr>
7560
7561 PR c++/60517
7562 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7563 a local variable.
7564
976d5a22
TT
75652014-07-30 Tom Tromey <tromey@redhat.com>
7566
7567 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7568 field.
7569 (really_start_incremental_init, push_init_level): Initialize
7570 designator_depth.
7571 (pop_init_level): Set global designator_depth.
7572 (process_init_element): Check for designated_init attribute.
7573
30281de2
MP
75742014-07-20 Marek Polacek <polacek@redhat.com>
7575
7576 PR c/61852
7577 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7578 (implicitly_declare): Pass location to implicit_decl_warning.
7579
b108f48f
JJ
75802014-07-14 Jakub Jelinek <jakub@redhat.com>
7581
7582 PR middle-end/61294
7583 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7584 If non-NULL, call c_parser_check_literal_zero.
7585 (c_parser_check_literal_zero): New function.
7586 (c_parser_postfix_expression_after_primary): Adjust
7587 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7588
773ec47f
MP
75892014-07-06 Marek Polacek <polacek@redhat.com>
7590
7591 PR c/6940
7592 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7593 * c-tree.h (C_ARRAY_PARAMETER): Define.
7594 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7595 function parameter.
7596
22e1cf1c 75972014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7598 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7599
7600 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7601 releasing symbol.
7602
52ec0ea3
MP
76032014-07-01 Marek Polacek <polacek@redhat.com>
7604
7605 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7606 instead of 0 to WARN_FOR_ASSIGNMENT.
7607
d5c3d343
MP
76082014-07-01 Marek Polacek <polacek@redhat.com>
7609
7610 PR c/58286
7611 * c-typeck.c (convert_for_assignment): Pass
7612 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7613
6a7253a4
MP
76142014-06-30 Marek Polacek <polacek@redhat.com>
7615
7616 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7617 has no_sanitize_undefined attribute.
7618
5e88a8f4
IZ
76192014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7620
7621 PR middle-end/57541
7622 * c-array-notation.c (fix_builtin_array_notation_fn):
7623 Check for 0 arguments in builtin call. Check that bultin argument is
7624 correct.
7625 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7626 index.
7627
9698b078
SH
76282014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7629
7630 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7631 qualifiers in __auto_type for atomic types.
7632 (c_parser_typeof_specifier): Discard all type qualifiers in
7633 __typeof__ for atomic types.
7634
6e07c515
MP
76352014-06-25 Marek Polacek <polacek@redhat.com>
7636
7637 PR c/61162
7638 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7639 the return expression to c_finish_return.
7640
da6f124d
JJ
76412014-06-25 Jakub Jelinek <jakub@redhat.com>
7642
7643 * c-typeck.c (c_finish_omp_clauses): Make sure
7644 OMP_CLAUSE_LINEAR_STEP has correct type.
7645
c203e8a7
TS
76462014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7647
7648 * c-decl.c: Adjust.
7649
56ad0e38
JJ
76502014-06-24 Jakub Jelinek <jakub@redhat.com>
7651
7652 * c-parser.c (c_parser_omp_for_loop): For
7653 #pragma omp parallel for simd move lastprivate clause from parallel
7654 to for rather than simd.
7655
47c2554f
MP
76562014-06-23 Marek Polacek <polacek@redhat.com>
7657
7658 * c-typeck.c (parser_build_binary_op): Don't call
7659 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7660
56363ffd
JH
76612014-06-15 Jan Hubicka <hubicka@ucw.cz>
7662
7663 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7664 * c-decl.c (merge_decls): Likewise.
7665
d7ff7ae5
MP
76662014-06-09 Marek Polacek <polacek@redhat.com>
7667
7668 PR c/36446
7669 * c-typeck.c (error_init): Call inform instead of error_at.
7670 (pedwarn_init): Call inform instead of pedwarn.
7671 (warning_init): Call inform instead of warning_at.
7672
24d047a3
JH
76732014-06-07 Jan Hubicka <hubicka@ucw.cz>
7674
7675 * c-decl.c (merge_decls): Use set_decl_section_name.
7676 (duplicate_decls): Remove node if it exists.
7677
9bac5cbb
G
76782014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7679
7680 PR c/53119
7681 * c-typeck.c (push_init_level, process_init_element,
7682 pop_init_level): Correct check for zero initialization, move
7683 missing brace warning to respect zero initialization.
7684
8ffcdea8
MP
76852014-06-05 Marek Polacek <polacek@redhat.com>
7686
7687 PR c/56724
7688 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7689
742938c9
MP
76902014-06-05 Marek Polacek <polacek@redhat.com>
7691
7692 PR c/49706
7693 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7694 on the left hand side operand of a comparison.
742938c9 7695
6447c55d
MP
76962014-06-05 Marek Polacek <polacek@redhat.com>
7697
7698 PR c/48062
7699 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7700 Print note only if the warning was printed.
7701
9dc7743c
IZ
77022014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7703
7704 PR c/58942
7705 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7706 with a pointer.
7707
fedfecef
MP
77082014-06-03 Marek Polacek <polacek@redhat.com>
7709
7710 PR c/60439
7711 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7712 c_start_case.
7713 * c-tree.h (c_start_case): Update.
7714 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7715 switch condition has boolean value.
7716
9b2b7279
AM
77172014-06-02 Andrew MacLeod <amacleod@redhat.com>
7718
7719 * c-decl.c: Include builtins.h.
7720 * c-parser.c: Likewise.
7721
5c1bc275
MP
77222014-05-27 Marek Polacek <polacek@redhat.com>
7723
7724 PR c/56724
7725 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7726 error and warning calls to error_at and warning_at. Pass location of
7727 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7728 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7729 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7730
97563bc8
IZ
77312014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7732
7733 PR c/61191
7734 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7735 function parameters.
7736
aede2c10
JH
77372014-05-23 Jan Hubicka <hubicka@ucw.cz>
7738
7739 * c-decl.c (merge_decls): Preserve symtab node pointers.
7740 (duplicate_decls): Free new decl.
7741
edbba2ce
TS
77422014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7743
f3316c6d
TS
7744 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7745 initialization.
7746
edbba2ce
TS
7747 * c-parser.c (c_parser_omp_target): Return bool values.
7748
68c81f24
TS
77492014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7750
7751 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7752 num_teams_loc variable to num_thread_limit_loc.
7753
632f2871
RS
77542014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7755
7756 * c-array-notation.c (expand_array_notations): Use void_node
7757 instead of void_zero_node.
7758
766090c2
TS
77592014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7760
7761 * c-decl.c (finish_struct): Adjust.
7762 (finish_enum): Likewise.
7763 (bind): Adjust.
7764 (record_inline_static): Likewise.
7765 (push_scope): Likewise.
7766 (make_label): Likewise.
7767 (lookup_label_for_goto): Likewise.
7768 (finish_struct): Likewise.
7769 (finish_enum): Likewise.
7770 (store_parm_decls): Likewise.
7771 (c_push_function_context): Likewise.
7772 * c-lang.h: Remove usage of variable_size gty attribute.
7773 * c-parser.c (c_parse_init): Adjust.
7774 (c_parse_file): Likewise.
7775
2b107f6b
MP
77762014-05-13 Marek Polacek <polacek@redhat.com>
7777
7778 PR c/61162
7779 * c-typeck.c (convert_for_assignment): Pass location to
7780 WARN_FOR_ASSIGNMENT instead of input_location.
7781
d033409e
MP
77822014-05-10 Marek Polacek <polacek@redhat.com>
7783
7784 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7785 maybe_warn_string_init.
7786 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7787 maybe_warn_string_init.
7788 * c-tree.h (maybe_warn_string_init): Update declaration.
7789 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7790 Call pedwarn_init with loc instead of with input_location.
7791 (digest_init): Pass init_loc to maybe_warn_string_init.
7792 (pop_init_level): Call pedwarn_init with loc instead of with
7793 input_location.
7794 (set_init_index): Likewise.
7795 (process_init_element): Likewise.
7796
ea58ef42
MP
77972014-05-09 Marek Polacek <polacek@redhat.com>
7798
7799 PR c/61096
7800 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7801 (c_parser_initelt): Pass location to set_init_label. Pass array index
7802 location to set_init_index.
7803 * c-tree.h (push_init_level): Update declaration.
7804 (pop_init_level): Likewise.
7805 (set_init_index): Likewise.
7806 (set_init_label): Likewise.
7807 * c-typeck.c (error_init): Add location parameter. Call error_at
7808 instead of error.
7809 (digest_init): Pass init_loc to error_init.
7810 (really_start_incremental_init):
7811 (push_init_level): Add location parameter. Pass loc to pop_init_level
7812 and error_init.
7813 (pop_init_level): Likewise.
7814 (set_designator): Add location parameter. Pass loc to pop_init_level,
7815 push_init_level, and error_init.
7816 (set_init_index): Add location parameter. Pass loc to error_init and
7817 set_designator.
7818 (set_init_label): Likewise.
7819 (output_init_element): Pass loc to error_init.
7820 (process_init_element): Pass loc to error_init, pop_init_level,
7821 pedwarn_init, and push_init_level.
7822
661a0813
MP
78232014-05-09 Marek Polacek <polacek@redhat.com>
7824
7825 PR c/50459
7826 * c-parser.c (c_parser_attributes): Parse the arguments as an
7827 expression-list if the attribute takes identifier.
7828
2793eeab
MP
78292014-05-08 Marek Polacek <polacek@redhat.com>
7830
7831 PR c/61053
7832 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7833 TYPE_ALIGN_UNIT.
7834
f827930a
MP
78352014-05-08 Marek Polacek <polacek@redhat.com>
7836
7837 PR c/61077
7838 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7839 of main.
7840
1d60af08
KZ
78412014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7842 Mike Stump <mikestump@comcast.net>
7843 Richard Sandiford <rdsandiford@googlemail.com>
7844
7845 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7846 (finish_enum): Use wide-int interfaces.
7847 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7848 * c-typeck.c (build_c_cast): Likewise.
7849 (set_nonincremental_init_from_string): Likewise.
7850 (c_tree_equal): Likewise.
7851
a0e24419
MP
78522014-05-02 Marek Polacek <polacek@redhat.com>
7853
7854 PR c/25801
7855 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7856 Return size_one_node when the type is not complete.
7857 (pointer_diff): Remove comment.
7858 (build_unary_op): Improve error messages.
7859
19fc9faa
MP
78602014-05-02 Marek Polacek <polacek@redhat.com>
7861
7862 * c-typeck.c (c_finish_return): Separate warning_at calls.
7863
63bc4e87
MP
78642014-05-02 Marek Polacek <polacek@redhat.com>
7865
7866 * c-tree.h (error_init): Remove declaration.
7867 (pedwarn_init): Likewise.
7868 * c-typeck.c (error_init): Make static and move above.
7869 (pedwarn_init): Likewise.
7870 (warning_init): Move above.
7871 (maybe_warn_string_init): Likewise.
7872
4bd2511b
JL
78732014-05-01 Jeff Law <law@redhat.com>
7874
7875 Revert:
7876
7877 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7878 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7879 avoid goto.
7880
6a358dcb
MP
78812014-05-02 Marek Polacek <polacek@redhat.com>
7882
7883 PR c/60784
7884 * c-typeck.c (push_init_level): Set constructor_designated to
7885 p->designated for structures.
7886
ae5ebda4
MP
78872014-05-01 Marek Polacek <polacek@redhat.com>
7888
7889 PR c/60915
7890 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7891 function-definition has an attribute after the declarator.
7892
96b40f8d
MP
78932014-05-01 Marek Polacek <polacek@redhat.com>
7894
7895 PR c/60257
7896 * c-typeck.c (warning_init): Add location_t parameter. Call
7897 warning_at instead of warning.
7898 (push_init_level): Pass input_location to warning_init.
7899 (add_pending_init): Add location_t parameter. Pass loc to
7900 warning_init.
7901 (set_nonincremental_init): Pass input_location to add_pending_init.
7902 (set_nonincremental_init_from_string): Likewise.
7903 (output_init_element): Pass loc to warning_init and to
7904 add_pending_init.
7905
32e00768
MP
79062014-05-01 Marek Polacek <polacek@redhat.com>
7907
7908 PR c/43395
7909 * c-typeck.c (c_finish_return): Distinguish between label and variable
7910 when warning about returning local address.
7911
c9379ce2
MP
79122014-05-01 Marek Polacek <polacek@redhat.com>
7913
7914 PR c/29467
7915 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7916 in C89 mode.
7917
d00887e8
MP
79182014-05-01 Marek Polacek <polacek@redhat.com>
7919
7920 PR c/43245
7921 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7922 instead of 0 to WARN_FOR_QUALIFIERS.
7923
5436fa2e
MP
79242014-05-01 Marek Polacek <polacek@redhat.com>
7925
7926 PR c/56989
7927 * c-typeck.c (default_conversion): Use better location for
7928 error call.
7929
f8ed5150
MP
79302014-04-30 Marek Polacek <polacek@redhat.com>
7931
7932 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7933 also when SANITIZE_FLOAT_DIVIDE is on.
7934
8337d1db
MP
79352014-04-30 Marek Polacek <polacek@redhat.com>
7936
7937 PR c/60139
7938 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7939 and pedwarn_init. Use loc insted of input_location.
7940
c4bdc42f
MP
79412014-04-30 Marek Polacek <polacek@redhat.com>
7942
7943 PR c/60351
7944 * c-typeck.c (build_binary_op): Use location when warning about
7945 shift count.
7946
45484dcf
MP
79472014-04-25 Marek Polacek <polacek@redhat.com>
7948
7949 PR c/18079
7950 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7951 always_inline/noinline and hot/cold attributes.
7952
34cf811f
MP
79532014-04-25 Marek Polacek <polacek@redhat.com>
7954
7955 PR c/60114
7956 * c-parser.c (c_parser_initelt): Pass input_location to
7957 process_init_element.
7958 (c_parser_initval): Pass loc to process_init_element.
7959 * c-tree.h (process_init_element): Adjust declaration.
7960 * c-typeck.c (push_init_level): Pass input_location to
7961 process_init_element.
7962 (pop_init_level): Likewise.
7963 (set_designator): Likewise.
7964 (output_init_element): Add location_t parameter. Pass loc to
7965 digest_init.
7966 (output_pending_init_elements): Pass input_location to
7967 output_init_element.
7968 (process_init_element): Add location_t parameter. Pass loc to
7969 output_init_element.
7970
42056eac
JJ
79712014-04-24 Jakub Jelinek <jakub@redhat.com>
7972
7973 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7974 atomic-clause, allow comma in between atomic-clause and
7975 seq_cst.
7976
e162a134
JJ
79772014-04-22 Jakub Jelinek <jakub@redhat.com>
7978
7979 PR c/59073
7980 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7981 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7982
2f6babac
IZ
79832014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7984
7985 PR middle-end/60469
7986 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7987 create_tmp_var instead build_decl for creating temps.
7988 (build_array_notation_expr): Likewise.
7989 (fix_conditional_array_notations_1): Likewise.
7990 (fix_array_notation_expr): Likewise.
7991 (fix_array_notation_call_expr): Likewise.
7992
8edbfaa6
JJ
79932014-03-28 Jakub Jelinek <jakub@redhat.com>
7994
7995 PR c++/60689
7996 * c-tree.h (c_build_function_call_vec): New prototype.
7997 * c-typeck.c (build_function_call_vec): Don't call
7998 resolve_overloaded_builtin here.
7999 (c_build_function_call_vec): New wrapper function around
8000 build_function_call_vec. Call resolve_overloaded_builtin here.
8001 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8002 Call c_build_function_call_vec instead of build_function_call_vec.
8003 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8004 * c-decl.c (finish_decl): Likewise.
8005
7485aeea
MLI
80062014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8007
8008 PR c/55383
8009 * c-typeck.c: Use correct format string in cast-qual warning
8010
b17a8b07
TS
80112014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8012
8013 * c-decl.c (c_decl_attributes): Use
8014 lang_hooks.types.omp_mappable_type.
8015 * c-typeck.c (c_finish_omp_clauses): Likewise.
8016
3af9c5e9
MP
80172014-03-06 Marek Polacek <polacek@redhat.com>
8018
8019 PR c/60197
8020 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8021 of checking tree code.
8022
1c9f5f33
PK
80232014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8024
8025 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8026 (c_parser_parameter_declaration): Likewise.
8027
cc28fc7f
MP
80282014-02-19 Marek Polacek <polacek@redhat.com>
8029
8030 PR c/60195
8031 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8032 Call mark_exp_read on exp.value.
8033 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8034 TREE_ADDRESSABLE on old instead of val.
8035 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8036
b581c05c
PK
80372014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8038
8039 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8040 C_EXPR_APPEND by vec_safe_push.
8041 * c-tree.h (C_EXPR_APPEND): Remove.
8042
81e5eca8
MP
80432014-01-31 Marek Polacek <polacek@redhat.com>
8044
8045 PR c/59963
8046 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8047 build_function_call_vec.
8048 (build_function_call): Likewise.
8049 (build_atomic_assign): Likewise.
8050 (build_function_call_vec): Add arg_loc parameter. Use it.
8051 (convert_arguments): Likewise.
8052 (convert_for_assignment): Rename rhs_loc to expr_loc.
8053 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8054 (c_parser_objc_keywordexpr): Likewise.
8055 (c_parser_postfix_expression_after_primary): Call
8056 build_function_call_vec with expr_loc rather than op_loc.
8057 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8058 build_function_call_vec.
8059 (c_parser_expr_list): Add locations parameter. Fill it with locations
8060 of function arguments.
8061 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8062
68fca595
MP
80632014-01-30 Marek Polacek <polacek@redhat.com>
8064
8065 PR c/59940
8066 * c-typeck.c (build_function_call_vec): Use loc parameter.
8067 (convert_arguments): Add location parameter. Use it.
8068 (ep_convert_and_check): Likewise.
8069 (build_atomic_assign): Adjust convert_for_assignment call.
8070 (build_modify_expr): Likewise.
8071 (digest_init): Likewise.
8072 (c_finish_return): Likewise.
8073 (build_conditional_expr): Adjust ep_convert_and_check calls.
8074 (convert_for_assignment): Add rhs_loc parameter. Use it.
8075 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8076 calls.
8077
fa337f3a
RB
80782014-01-30 Richard Biener <rguenther@suse.de>
8079
8080 PR c/59905
8081 * c-typeck.c (build_function_call_vec): Do not replace calls
8082 to a function via an incompatible type with a runtime abort.
8083
b72271b9
BI
80842014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8085
8086 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8087 flag_enable_cilkplus with flag_cilkplus.
8088 (c_parser_direct_declarator_inner): Likewise.
8089 (c_parser_attribute_any_word): Likewise.
8090 (c_parser_attributes): Likewise.
8091 (c_parser_compound_statement): Likewise.
8092 (c_parser_statement_after_labels): Likewise.
8093 (c_parser_if_statement): Likewise.
8094 (c_parser_switch_statement): Likewise.
8095 (c_parser_do_statement): Likewise.
8096 (c_parser_for_statement): Likewise.
8097 (c_parser_unary_expression): Likewise.
8098 (c_parser_postfix_expression): Likewise.
8099 (c_parser_postfix_expression_after_primary): Likewise.
8100 (c_parser_postfix_expression_after_primary): Likewise.
8101 (c_parser_omp_clause_name): Likewise.
8102 (c_finish_omp_declare_simd): Likewise.
8103 (c_parser_cilk_verify_simd): Likewise.
8104 * c-typeck.c (build_array_ref): Likewise.
8105 (build_function_call_vec): Likewise.
8106 (convert_arguments): Likewise.
8107 (build_compound_expr): Likewise.
8108 (c_finish_return): Likewise.
8109 (c_finish_if_stmt): Likewise.
8110 (c_finish_loop): Likewise.
8111 (build_binary_op): Likewise.
8112
393e8e8b
MP
81132014-01-23 Marek Polacek <polacek@redhat.com>
8114
8115 PR c/59846
8116 * c-typeck.c (parser_build_binary_op): Use location instead of
8117 input_location.
8118 (build_binary_op): Pass location to shorten_compare.
8119
f04dda30
MP
81202014-01-23 Marek Polacek <polacek@redhat.com>
8121
8122 PR c/58346
8123 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8124 an empty aggregate.
8125
789eadcd
MP
81262014-01-23 Marek Polacek <polacek@redhat.com>
8127
8128 PR c/59871
8129 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8130 of a comma expression.
8131 (emit_side_effect_warnings): Likewise.
8132
40f14e9f
BI
81332014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8134
8135 PR c/59825
8136 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8137 function to use walk_tree and moved a lot of its functionality to
8138 expand_array_notations.
8139 (expand_array_notations): New function.
8140
74558dd9
BI
81412014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8142
8143 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8144 attribute an attribute without value.
8145
652fea39
JJ
81462014-01-23 Jakub Jelinek <jakub@redhat.com>
8147
8148 PR middle-end/58809
8149 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8150 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8151
f34f1c87
MP
81522014-01-22 Marek Polacek <polacek@redhat.com>
8153
8154 PR c/59891
8155 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8156 of remove_c_maybe_const_expr on op1 and op2.
8157
241f845a
JJ
81582014-01-15 Jakub Jelinek <jakub@redhat.com>
8159
8160 PR c/58943
8161 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8162 effects, preevaluate rhs using SAVE_EXPR first.
8163
9a74f20c
BI
81642014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8165
8166 PR c++/59631
8167 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8168 statements with if-elseif statements.
8169
96066ce1
MP
81702014-01-06 Marek Polacek <polacek@redhat.com>
8171
8172 PR c/57773
8173 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8174 defined bit-field types only in ISO C.
8175
23a5b65a
RS
81762014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8177
8178 Update copyright years
8179
f9030485
RS
81802014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8181
8182 * c-array-notation.c: Use the standard form for the copyright notice.
8183
41958c28
BI
81842013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8185
8186 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8187 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8188 field in parser is not empty. If not-empty, call the function
8189 c_parser_finish_omp_declare_simd.
8190 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8191 between SIMD-enabled functions and #pragma simd. Added new parameter.
8192 (c_parser_cilk_all_clauses): Modified the usage of the function
8193 c_parser_cilk_clause_vectorlength as mentioned above.
8194 (c_parser_cilk_simd_fn_vector_attrs): New function.
8195 (c_finish_cilk_simd_fn_tokens): Likewise.
8196 (is_cilkplus_vector_p): Likewise.
8197 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8198 "nomask," and "mask" strings in clause name.
8199 (c_parser_omp_all_clauses): Added 3 new case statements:
8200 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8201 PRAGMA_CILK_CLAUSE_NOMASK.
8202 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8203 check for vector attribute and if so call the function
8204 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8205 called the function c_finish_cilk_simd_fn_tokens.
8206 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8207 parser field is non-empty. If so, parse them as you would parse
8208 the omp declare simd pragma.
8209 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8210 Added a check when step is a parameter and flag it as error.
8211 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8212 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8213 pragma_omp_clause.
8214
cef0fd0e
TS
82152013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8216
8217 * c-parser.c (c_parser_omp_parallel): Fix description.
8218
12893402
BI
82192013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8220
8221 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8222 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8223 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8224 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8225
296674db
JM
82262013-12-04 Joseph Myers <joseph@codesourcery.com>
8227
8228 PR c/52023
8229 * c-parser.c (c_parser_alignas_specifier): Use
8230 c_sizeof_or_alignof_type instead of c_alignof.
8231 (c_parser_alignof_expression): Likewise, with min_alignof
8232 parameter depending on alignof spelling used.
8233
edd28054
MP
82342013-12-04 Marek Polacek <polacek@redhat.com>
8235
8236 PR c/54113
8237 * c-decl.c (start_function): Don't warn for missing prototype for
8238 inline functions.
8239
da0fc454
MP
82402013-12-03 Marek Polacek <polacek@redhat.com>
8241
8242 PR c/59351
8243 * c-decl.c (build_compound_literal): Allow compound literals with
8244 empty initial value.
8245
4c2ecab0
JM
82462013-12-02 Joseph Myers <joseph@codesourcery.com>
8247
8248 PR c/58235
8249 * c-typeck.c (build_modify_expr): Diagnose assignment to
8250 expression with array type.
8251
340baef7
JM
82522013-11-29 Joseph Myers <joseph@codesourcery.com>
8253
8254 PR c/42262
8255 * c-typeck.c (process_init_element): Do not treat a string as
8256 initializing a whole array when used with a designator for an
8257 individual element.
8258
6763b9f7
JM
82592013-11-29 Joseph Myers <joseph@codesourcery.com>
8260
8261 PR c/57574
8262 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8263 an inline function following a static declaration.
8264
e7bd1de1
JJ
82652013-11-28 Jakub Jelinek <jakub@redhat.com>
8266
8267 PR c/59310
8268 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8269 to p_name before calling c_parser_omp_teams instead of after.
8270 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8271 argument. Remove unused p_name variable.
8272
0136f8f0
AH
82732013-11-27 Aldy Hernandez <aldyh@redhat.com>
8274 Jakub Jelinek <jakub@redhat.com>
8275
8276 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8277 external_scope is NULL.
8278
241b71bb
TV
82792013-11-27 Tom de Vries <tom@codesourcery.com>
8280 Marc Glisse <marc.glisse@inria.fr>
8281
8282 PR c++/59032
8283 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8284
2fb9a547
AM
82852013-11-22 Andrew MacLeod <amacleod@redhat.com>
8286
8287 * c-typeck.c: Add required include files from gimple.h.
8288
8400e75e
DM
82892013-11-22 David Malcolm <dmalcolm@redhat.com>
8290
8291 * c-decl.c (define_label, shadow_tag_warned)
8292 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8293 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8294 (declspecs_add_type): Remove use of in_system_header macro.
8295 * c-parser.c (c_parser_unary_expression): Likewise.
8296 * c-typeck.c (store_init_value, process_init_element)
8297 (c_start_case): Likewise.
8298
8299 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8300 macro.
8301
8302 * c-parser.c (c_parser_set_source_position_from_token): Remove
8303 reference to in_system_header from comment.
8304
386b1f1f
RS
83052013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8306
8307 * c-decl.c (grokdeclarator): Update comment to refer to
8308 tree_to_[su]hwi rather than tree_low_cst.
8309
ae7e9ddd
RS
83102013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8311
8312 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8313 tree_to_uhwi throughout.
8314
9439e9a1
RS
83152013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8316
8317 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8318 throughout.
8319
9541ffee
RS
83202013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8321
8322 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8323 throughout.
8324
c02065fc
AH
83252013-11-15 Aldy Hernandez <aldyh@redhat.com>
8326
8327 * c-parser.c (c_parser_cilk_simd): New.
8328 (c_parser_cilk_verify_simd): New.
8329 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8330 (c_parser_omp_for_loop): Add case for NE_EXPR.
8331 Set c_break_label for CILK_SIMD.
8332 (c_parser_cilk_clause_vectorlength): New.
8333 (c_parser_cilk_clause_linear): New.
8334 (c_parser_cilk_clause_name): New.
8335 (c_parser_cilk_all_clauses): New.
8336 * c-typeck.c (build_unary_op): Pass location argument to
8337 readonly_error.
8338 (build_modify_expr): Same.
8339 (build_asm_expr): Same.
8340 (c_finish_bc_stmt): Error on break/continue in loops.
8341
18f429e2
AM
83422013-11-14 Andrew MacLeod <amacleod@redhat.com>
8343
8344 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8345
d8a2d370
DN
83462013-11-14 Diego Novillo <dnovillo@google.com>
8347
8348 * c-decl.c: Include print-tree.h.
8349 Include stor-layout.h.
8350 Include varasm.h.
8351 Include attribs.h.
8352 Include stringpool.h.
8353 * c-lang.c: Include fold-const.h.
8354 * c-parser.c: Include stringpool.h.
8355 Include attribs.h.
8356 Include stor-layout.h.
8357 Include varasm.h.
8358 Include trans-mem.h.
8359 * c-typeck.c: Include stor-layout.h.
8360 Include trans-mem.h.
8361 Include varasm.h.
8362 Include stmt.h.
8363
38b7bc7f
JM
83642013-11-13 Joseph Myers <joseph@codesourcery.com>
8365
8366 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8367 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8368 __auto_type.
8369 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8370 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8371 RID_AUTO_TYPE.
8372 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8373 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8374 (c_parser_declarator, c_parser_direct_declarator_inner)
8375 (c_parser_parameter_declaration, c_parser_type_name): All callers
8376 changed.
8377 (c_parser_declaration_or_fndef): Handle declarations with type
8378 determined from the initializer.
8379
45b0be94
AM
83802013-11-12 Andrew MacLeod <amacleod@redhat.com>
8381
18f429e2 8382 * c-typeck.c: Include gimplify.h.
45b0be94 8383
582d9b50
JM
83842013-11-12 Joseph Myers <joseph@codesourcery.com>
8385
8386 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8387 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8388 comment.
8389 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8390 or _Thread_local as appropriate in diagnostics.
8391 (build_null_declspecs): Initialize ret->thread_gnu_p.
8392 (declspecs_add_scspec): Handle either __thread or _Thread_local
8393 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8394 pedantic. Do not disallow _Thread_local extern and _Thread_local
8395 static.
8396
267bac10
JM
83972013-11-07 Joseph Myers <joseph@codesourcery.com>
8398 Andrew MacLeod <amacleod@redhat.com>
8399
8400 * c-aux-info.c (gen_type): Handle atomic qualifier.
8401 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8402 qualifiers when compating types.
8403 (shadow_tag_warned): Handle atomic_p in declspecs.
8404 (quals_from_declspecs): Likewise.
8405 (start_decl): Use c_type_promotes_to when promoting argument
8406 types.
8407 (grokdeclarator): Handle _Atomic.
8408 (get_parm_info): Diagnose any qualifier on "void" as only
8409 parameter.
8410 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8411 comparing types. Use c_type_promotes_to when promoting argument
8412 types.
8413 (finish_function): Use c_type_promotes_to when promoting argument
8414 types.
8415 (build_null_declspecs): Handle atomic_p in declspecs.
8416 (declspecs_add_qual): Handle RID_ATOMIC.
8417 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8418 (c_token_starts_declspecs): Handle RID_ATOMIC.
8419 (c_parser_declspecs): Handle atomic type specifiers and
8420 qualifiers.
8421 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8422 from types of expressions with atomic type.
8423 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8424 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8425 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8426 (c_parser_statement_after_labels, c_parser_switch_statement)
8427 (c_parser_for_statement, c_parser_expr_no_commas)
8428 (c_parser_conditional_expression, c_parser_binary_expression)
8429 (c_parser_cast_expression, c_parser_unary_expression)
8430 (c_parser_postfix_expression)
8431 (c_parser_postfix_expression_after_primary, c_parser_expression):
8432 Use convert_lvalue_to_rvalue.
8433 (c_parser_expression_conv, c_parser_expr_list): Document
8434 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8435 (c_parser_objc_synchronized_statement): Use
8436 convert_lvalue_to_rvalue.
8437 (c_parser_objc_selector): Handle RID_ATOMIC.
8438 (c_parser_objc_receiver, c_parser_array_notation): Use
8439 convert_lvalue_to_rvalue.
8440 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8441 _Atomic (type-name).
8442 (struct c_declspecs): Add atomic_p field.
8443 (convert_lvalue_to_rvalue): Declare.
8444 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8445 corresponding atomic types.
8446 (qualify_type): Don't add _Atomic qualifiers from second argument.
8447 (comp_target_types): Do not allow _Atomic mismatches.
8448 (type_lists_compatible_p): Do not remove atomic qualifiers when
8449 comparing types.
8450 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8451 (build_atomic_assign): New functions.
8452 (build_unary_op): Use build_atomic_assign for atomic increment and
8453 decrement.
8454 (build_conditional_expr): Do not treat _Atomic void as a qualified
8455 version of void.
8456 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8457 (find_anonymous_field_with_type, convert_to_anonymous_field)
8458 (convert_for_assignment): Do not remove atomic qualifiers when
8459 comparing types.
8460 (digest_init): Do not accept initialization of arrays of atomic
8461 elements by string constants.
8462 (build_asm_expr): Use convert_lvalue_to_rvalue.
8463 (build_binary_op): Do not treat _Atomic void as a qualified
8464 version of void.
8465
0c249d4b
DD
84662013-11-06 DJ Delorie <dj@redhat.com>
8467
8468 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8469 both explicit and builtin, print the location of the explicit one.
8470
6d7f7e0a
TB
84712013-11-05 Tobias Burnus <burnus@net-b.de>
8472
8473 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8474 c_parser_omp_distribute, c_parser_omp_teams,
8475 c_parser_omp_target, c_parser_omp_declare): Handle
8476 -fopenmp-simd.
8477
b906f4ca
MP
84782013-11-03 Marek Polacek <polacek@redhat.com>
8479
8480 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8481
ee1d5a02
JJ
84822013-11-01 Jakub Jelinek <jakub@redhat.com>
8483
8484 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8485 check_dup_generic at the end, unless remove is true.
8486 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8487 remove = true;.
8488 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8489
5a9785fb
JJ
84902013-10-31 Jakub Jelinek <jakub@redhat.com>
8491
8492 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8493 with decl that is not pointer nor array.
8494
939b37da
BI
84952013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8496
8497 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8498 a spawning function is found.
8499 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8500 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8501 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8502 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8503 case.
8504 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8505 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8506 expr.
8507 (c_finish_return): Added a check to reject _Cilk_spawn in return
8508 expression.
8509 (build_cilk_spawn): New function.
8510 (build_cilk_sync): Likewise.
8511 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 8512
d4af74d4
TB
85132013-10-27 Tobias Burnus <burnus@net-b.de>
8514
8515 PR other/33426
8516 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8517 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8518 (c_parser_statement_after_labels): Update calls.
8519
d73749df 85202013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8521
8522 PR other/33426
8523 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8524 Handle PRAGMA_IVDEP.
8525 (c_parser_statement_after_labels): Update call.
8526
f28aa681
MP
85272013-10-24 Marek Polacek <polacek@redhat.com>
8528
8529 * c-parser.c (c_parser_struct_declaration): Add a comment.
8530 (c_parser_declarator): Don't allow _Alignas here.
8531
0645c1a2
AM
85322013-10-17 Andrew MacLeod <amacleod@redhat.com>
8533
8534 * c-parser.c: Include omp-low.h.
8535 * c-typeck.c: Likewise.
8536
568a31f2
MP
85372013-10-17 Marek Polacek <polacek@redhat.com>
8538
8539 PR c/58267
8540 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8541 Document syntax of the array-declarator.
8542 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8543 are not permitted.
8544 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8545 (c_parser_struct_declaration): Likewise.
8546 (c_parser_declarator): Likewise.
8547 (c_parser_direct_declarator_inner): Likewise.
8548 (c_parser_parameter_declaration): Likewise.
8549 (c_parser_type_name): Likewise.
8550
acf0174b
JJ
85512013-10-11 Jakub Jelinek <jakub@redhat.com>
8552
8553 * c-lang.h (current_omp_declare_target_attribute): New extern
8554 decl.
8555 * c-parser.c: Include c-lang.h.
8556 (struct c_parser): Change tokens to c_token *.
8557 Add tokens_buf field. Change tokens_avail type to unsigned int.
8558 (c_parser_consume_token): If parser->tokens isn't
8559 &parser->tokens_buf[0], increment parser->tokens.
8560 (c_parser_consume_pragma): Likewise.
8561 (enum pragma_context): Add pragma_struct and pragma_param.
8562 (c_parser_external_declaration): Adjust
8563 c_parser_declaration_or_fndef caller.
8564 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8565 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8566 Adjust recursive call.
8567 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8568 of pragma_external.
8569 (c_parser_parameter_declaration): Use pragma_param instead of
8570 pragma_external.
8571 (c_parser_compound_statement_nostart, c_parser_label,
8572 c_parser_for_statement): Adjust
8573 c_parser_declaration_or_fndef callers.
8574 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8575 it through to c_parser_conditional_expression.
8576 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8577 pass it through to c_parser_binary_expression. Adjust recursive
8578 call.
8579 (c_parser_binary_expression): Remove prec argument, add
8580 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8581 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8582 binop matches it, use build2 instead of parser_build_binary_op.
8583 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8584 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8585 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8586 Handle pragma_struct and pragma_param the same as pragma_external.
8587 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8588 (c_parser_omp_variable_list): Parse array sections for
8589 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8590 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8591 (c_parser_omp_clause_reduction): Handle user defined reductions.
8592 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8593 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8594 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8595 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8596 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8597 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8598 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8599 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8600 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8601 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8602 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8603 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8604 (c_parser_omp_for_loop): Add CODE argument, pass it through
8605 to c_finish_omp_for. Change last argument to cclauses,
8606 and adjust uses to grab parallel clauses from the array of all
8607 the split clauses. Adjust c_parser_binary_expression,
8608 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8609 (omp_split_clauses): New function.
8610 (c_parser_omp_simd): New function.
8611 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8612 Allow the function to be called also when parsing combined constructs,
8613 and call c_parser_omp_simd when parsing for simd.
8614 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8615 #pragma omp section, require exactly one structured-block instead of
8616 sequence of statements.
8617 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8618 Allow the function to be called also when parsing combined constructs.
8619 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8620 Allow the function to be called also when parsing combined
8621 constructs.
8622 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8623 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8624 c_parser_omp_teams, c_parser_omp_target_data,
8625 c_parser_omp_target_update, c_parser_omp_target,
8626 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8627 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8628 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8629 (c_parser_omp_construct): Add p_name and mask vars. Handle
8630 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8631 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8632 and c_parser_omp_sections callers.
8633 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8634 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8635 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8636 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8637 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8638 OMP_CLAUSE_DEPEND.
8639 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8640 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8641 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8642 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8643 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8644 * c-typeck.c: Include tree-inline.h.
8645 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8646 handle_omp_array_sections_1, handle_omp_array_sections,
8647 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8648 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8649 user defined reductions.
8650 (c_tree_equal): New function.
8651 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8652 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8653 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8654 c_check_omp_declare_reduction_r): New prototypes.
8655 * c-decl.c (current_omp_declare_target_attribute): New variable.
8656 (c_decl_attributes): New function.
8657 (start_decl, start_function): Use it instead of decl_attributes.
8658 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8659 c_omp_reduction_decl, c_omp_reduction_lookup,
8660 c_check_omp_declare_reduction_r): New functions.
8661
0a6c2227
TT
86622013-09-25 Tom Tromey <tromey@redhat.com>
8663
8664 * Make-lang.in (c/gccspec.o): Remove.
8665 (CFLAGS-c/gccspec.o): New variable.
8666 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8667 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8668 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8669
f3bc55f0
TT
86702013-09-25 Tom Tromey <tromey@redhat.com>
8671
8672 * Make-lang.in (c/gccspec.o): Don't use subshell.
8673
a24d975c
MP
86742013-09-18 Marek Polacek <polacek@redhat.com>
8675
8676 PR sanitize/58443
8677 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8678 Remove unnecessary check.
8679
ce6923c5
MP
86802013-09-18 Marek Polacek <polacek@redhat.com>
8681
8682 PR sanitizer/58411
8683 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8684 no_sanitize_undefined attribute.
8685
a1e51df9
KT
86862013-09-13 Kai Tietz <ktietz@redhat.com>
8687
8688 PR target/57848
8689 * c-decl.c (c_builtin_function_ext_scope): Remove
8690 wrong assumption that it is never called on prexisting
8691 symbol.
8692
0af94e6f
JR
86932013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8694
8695 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8696
20059c8b
GDR
86972013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8698
8699 * c-objc-common.c (c_tree_printer): Tidy.
8700
de5a5fa1
MP
87012013-08-30 Marek Polacek <polacek@redhat.com>
8702
8703 * c-typeck.c (build_binary_op): Add division by zero and shift
8704 instrumentation.
8705
2531a1d9 87062013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8707 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8708
6e2bcc98 8709 PR c/35649
2531a1d9
JR
8710 * c-typeck.c (c_common_type): Prefer double_type_node over
8711 other REAL_TYPE types with the same precision.
8712 (convert_arguments): Likewise.
8713
025311c4
GDR
87142013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8715
8716 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8717 (c_initialize_diagnostics): Call a destructor for the early printer.
8718
da6ca2b5
GDR
87192013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8720
8721 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8722 printer initialization.
8723
318cda85 87242013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8725
318cda85
BI
8726 PR c/57490
8727 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8728 check for truth values.
8729 (expand_array_notation_exprs): Added truth values case. Removed an
8730 unwanted else. Added for-loop to walk through subtrees in default
8731 case.
8732
b066401f
GDR
87332013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8734
8735 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8736
fb48aadc
JM
87372013-07-23 Joseph Myers <joseph@codesourcery.com>
8738
8739 * c-parser.c (struct c_generic_association): Fix typo.
8740
433cc7b0
TT
87412013-07-23 Tom Tromey <tromey@redhat.com>
8742 Joseph Myers <joseph@codesourcery.com>
8743
8744 * c-parser.c (struct c_generic_association): New.
8745 (c_generic_association_d): New typedef.
8746 (c_parser_generic_selection): New function.
8747 (c_parser_postfix_expression): Handle RID_GENERIC.
8748
26d40c3d
JM
87492013-07-13 Jason Merrill <jason@redhat.com>
8750
8751 PR c++/57793
8752 * c-decl.c (finish_struct): Check for too-large class.
8753
ecdbd01a 87542013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8755
8756 PR c/57821
8757 * c-typeck.c (set_init_index): When folding, check for index overflow.
8758
1141ed3f
BI
87592013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8760
8761 * c-parser.c (c_parser_array_notation): Removed rejection of array
8762 notations in an array of function pointers.
8763
713b46fa
BI
87642013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8765
8766 * c-array-notation.c (make_triplet_val_inv): New function.
8767 (create_cmp_incr): Likewise.
8768 (create_array_refs): Likewise.
8769 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8770 Also modularized common parts between functions and called the function.
8771 (build_array_notation_expr): Likewise.
8772 (fix_conditional_array_notations_1): Likewise.
8773 (fix_array_notation_expr): Likewise.
8774 (fix_array_notation_call_expr): Likewise.
8775
92f20202
MP
87762013-06-18 Marek Polacek <polacek@redhat.com>
8777
8778 PR c/57630
8779 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8780
73a23b06
BI
87812013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8782
8783 * c-array-notation.c (build_array_notation_expr): Reject array notation
8784 mismatch between LHS and RHS even inside a call_expr. Also, removed
8785 a couple while statements that were dead code.
8786
00b8517d
BI
87872013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8788
8789 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8790 excessive precision expressions in function parameters. Also removed
8791 couple unwanted while statements.
8792
1509bdda
BI
87932013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8794
8795 * c-array-notation.c (expand_array_notation_exprs): Added
8796 ARRAY_NOTATION_REF case.
ab20d992 8797
d60f1706
BI
87982013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8799
8800 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8801 function to c-family/array-notation-common.c.
8802 (is_cilkplus_reduce_builtin): Likewise.
8803 (find_rank): Likewise.
8804 (extract_array_notation_exprs): Likewise.
8805 (replace_array_notations): Likewise.
8806 (find_inv_trees): Likewise.
8807 (replace_inv_trees): Likewise.
8808 (contains_array_notation_expr): Likewise.
8809 (find_correct_array_notation_type): Likewise.
8810 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8811 (struct inv_list): Moved this to c-family/array-notation-common.c.
8812 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8813
6d6efbb3
BI
88142013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8815
8816 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8817 reduction functions outside the for-loop. Added a check if the fundecl
8818 is non-NULL. Finally, removed an unwanted if-statement, and made the
8819 body unconditional.
8820
25c22937
BI
88212013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8822
8823 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8824 condition of the if-statement matches the rank of else-block and then-
8825 block when array notations are used.
8826 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8827 expression after the entire function body is parsed.
8828 (c_parser_expr_no_commas): Delayed creating array notation expressions
8829 to the end of function parsing.
8830 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8831 whole if-statement instead of just the condition.
ab20d992 8832 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8833
edd25645
BI
88342013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8835
8836 PR c/57474
8837 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8838 array to NULL_TREE if they are unused. Also added a check for the
8839 field to be NULL before its fields are used in future.
ab20d992 8840
065ce7f1
RO
88412013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8842
8843 PR bootstrap/57450
8844 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8845 (build_array_notation_expr): Likewise.
8846
36536d79
BI
88472013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8848
8849 * c-typeck.c (build_array_ref): Added a check to see if array's
8850 index is greater than one. If true, then emit an error.
8851 (build_function_call_vec): Exclude error reporting and checking
8852 for builtin array-notation functions.
8853 (convert_arguments): Likewise.
8854 (c_finish_return): Added a check for array notations as a return
8855 expression. If true, then emit an error.
8856 (c_finish_loop): Added a check for array notations in a loop
8857 condition. If true then emit an error.
8858 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8859 (build_binary_op): Added a check for array notation expr inside
8860 op1 and op0. If present, we call another function to find correct
8861 type.
8862 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8863 * c-parser.c (c_parser_compound_statement): Check if array
8864 notation code is used in tree, if so, then transform them into
8865 appropriate C code.
8866 (c_parser_expr_no_commas): Check if array notation is used in LHS
8867 or RHS, if so, then build array notation expression instead of
8868 regular modify.
8869 (c_parser_postfix_expression_after_primary): Added a check for
8870 colon(s) after square braces, if so then handle it like an array
8871 notation. Also, break up array notations in unary op if found.
8872 (c_parser_direct_declarator_inner): Added a check for array
8873 notation.
8874 (c_parser_compound_statement): Added a check for array notation in
8875 a stmt. If one is present, then expand array notation expr.
8876 (c_parser_if_statement): Likewise.
8877 (c_parser_switch_statement): Added a check for array notations in
8878 a switch statement's condition. If true, then output an error.
8879 (c_parser_while_statement): Similarly, but for a while.
8880 (c_parser_do_statement): Similarly, but for a do-while.
8881 (c_parser_for_statement): Similarly, but for a for-loop.
8882 (c_parser_unary_expression): Check if array notation is used in a
8883 pre-increment or pre-decrement expression. If true, then expand
8884 them.
8885 (c_parser_array_notation): New function.
8886 * c-array-notation.c: New file.
8887 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8888
cd192ccc
MS
88892013-05-23 Mike Stump <mikestump@comcast.net>
8890
8891 * c-typeck.c (convert_for_assignment): Handle references to memory
8892 spaces better.
8893
427b248d
JM
88942013-05-16 Jason Merrill <jason@redhat.com>
8895
8896 * Make-lang.in (cc1$(exeext)): Use link mutex.
8897
44d90fe1
PC
88982013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8899
8900 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8901 to simply use OPT_Wpointer_arith.
8902 (build_unary_op): Likewise.
8903
4e7d7b3d
JJ
89042013-04-03 Jakub Jelinek <jakub@redhat.com>
8905
8906 PR c/19449
8907 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8908 argument. If set, or it temporarily for parsing of the first
8909 argument into force_folding_builtin_constant_p.
8910 (c_parser_postfix_expression): Adjust callers.
8911
839b422f
RB
89122013-03-21 Richard Biener <rguenther@suse.de>
8913
8914 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8915 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8916
2ee028f1
MP
89172013-02-12 Marek Polacek <polacek@redhat.com>
8918
8919 PR c/44938
8920 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8921 origtypes to NULL.
8922
8824edff
JJ
89232013-01-24 Jakub Jelinek <jakub@redhat.com>
8924
8925 PR c/56078
8926 * c-typeck.c (set_nonincremental_init_from_string): If
8927 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8928 returned false.
8929 (process_init_element): Likewise.
8930
eadd3d0d
JJ
89312012-12-20 Jakub Jelinek <jakub@redhat.com>
8932
8933 PR c++/55619
8934 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8935 argument, don't call default_function_array_conversion
8936 nor c_fully_fold here.
8937 (c_parser_asm_statement): Adjust callers.
8938 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8939 and outputs here, and call default_function_array_conversion
8940 on inputs that don't need to be addressable.
8941
f8a93a2e
JJ
89422012-12-18 Jakub Jelinek <jakub@redhat.com>
8943
8944 PR c/39464
8945 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8946 warning require that both c_common_unsigned_type as well as
8947 c_common_signed_type is the same for both mvl and mvr types.
8948
9771b263
DN
89492012-11-16 Diego Novillo <dnovillo@google.com>
8950
8951 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8952
8953 * c-common.c: Use new vec API in vec.h.
8954 * c-common.h: Likewise.
8955 * c-gimplify.c: Likewise.
8956 * c-pragma.c: Likewise.
8957 * c-pretty-print.c: Likewise.
8958 * c-pretty-print.h: Likewise.
8959 * c-semantics.c: Likewise.
8960 * c-decl.c: Likewise.
8961 * c-parser.c: Likewise.
8962 * c-tree.h: Likewise.
8963 * c-typeck.c: Likewise.
8964
880661a4
JW
89652012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8966
8967 PR c++/54930
8968 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8969
077d1abe
MLI
89702012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8971
8972 PR c/53066
8973 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8974 shadows a function, unless the variable is a function or a
8975 pointer-to-function.
8976
3a785c97
JJ
89772012-10-12 Jakub Jelinek <jakub@redhat.com>
8978
8979 PR c/54381
8980 * c-parser.c (struct c_tree_loc_pair): Removed.
8981 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8982 add location_t * and tree * arguments, fill in array of 3
8983 sizeof_arg trees and corresponding locs.
8984 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8985 c_parser_expr_list callers.
8986 (c_parser_postfix_expression_after_primary): Likewise. Pass
8987 array of 3 sizeof_arg trees and locs (corresponding to first
8988 3 arguments) to sizeof_pointer_memaccess_warning.
8989
703c8606
LC
89902012-10-09 Lawrence Crowl <crowl@google.com>
8991
8992 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8993 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8994 hash table.
8995
5d9de0d0
PC
89962012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8997
8998 PR c++/54194
8999 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9000 call.
9001
a212e43f
MG
90022012-10-09 Marc Glisse <marc.glisse@inria.fr>
9003
9004 PR c++/54427
9005 * c-typeck.c: Include c-common.h.
9006 (enum stv_conv): Moved to c-common.h.
9007 (scalar_to_vector): Moved to c-common.c.
9008 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9009 * Make-lang.in: c-typeck.c depends on c-common.h.
9010
3b78de56
AC
90112012-10-04 Arnaud Charlet <charlet@adacore.com>
9012
9013 * c-decl.c (c_write_global_declarations): Fix handling of
9014 -fdump-ada-spec*.
9015
78c60e3d
SS
90162012-09-30 Sharad Singhai <singhai@google.com>
9017
9018 * c-decl.c (c_write_global_declarations): Use a different method
9019 to determine if the dump has ben initialized.
9020
9f33203d
JM
90212012-09-14 Joseph Myers <joseph@codesourcery.com>
9022
9023 PR c/54552
9024 * c-typeck.c (c_cast_expr): When casting to a type requiring
9025 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9026 c_fully_fold first.
9027
a27d595d
JM
90282012-09-14 Joseph Myers <joseph@codesourcery.com>
9029
9030 PR c/54103
9031 * c-typeck.c (build_unary_op): Pass original argument of
9032 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9033 any C_MAYBE_CONST_EXPR, if it has integer operands.
9034 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9035 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9036 to c_objc_common_truthvalue_conversion, then remove any
9037 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9038 c_objc_common_truthvalue_conversion not
9039 c_common_truthvalue_conversion.
9040 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9041 call note_integer_operands for arguments with integer operands
9042 that are not integer constants.
9043
9feb29df
JJ
90442012-09-13 Jakub Jelinek <jakub@redhat.com>
9045
9046 PR c/54559
9047 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9048 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9049
d409320c
JJ
90502012-08-31 Jakub Jelinek <jakub@redhat.com>
9051
9052 PR c/54428
9053 * c-convert.c (convert): Don't call fold_convert_loc if
9054 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9055 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9056 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9057
6265d07c
JJ
90582012-08-24 Jakub Jelinek <jakub@redhat.com>
9059
9060 PR c/54355
9061 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9062 for nested and empty_ok arguments in the call to
9063 c_parser_declaration_or_fndef.
9064
1a4049e7
JJ
90652012-08-17 Jakub Jelinek <jakub@redhat.com>
9066
9067 * c-tree.h (c_last_sizeof_arg): Declare.
9068 * c-parser.c (struct c_tree_loc_pair): New type.
9069 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9070 non-NULL.
9071 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9072 (c_parser_postfix_expression_after_primary): Likewise. Call
9073 sizeof_pointer_memaccess_warning if needed.
9074 (sizeof_ptr_memacc_comptypes): New function.
9075 * c-typeck.c (c_last_sizeof_arg): New global variable.
9076 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9077
0229aee9
UB
90782012-07-24 Uros Bizjak <ubizjak@gmail.com>
9079
9080 * c-lang.h (lang_decl): Add variable_size GTY option.
9081
7ee2468b
SB
90822012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9083
9084 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9085 * Make-lang.in: Fix dependencies.
9086
d4a10d0a
SB
90872012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9088
9089 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9090 and add language Makefile hooks.
9091 * config-lang.in: New file.
9092 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9093 add the required "normal" config-lang.in rules.
9094 * c-lang.h: Moved from gcc/ to here.
9095 * c-tree.h: Likewise.
9096 * c-objc-common.c: Likewise.
9097 * c-objc-common.h: Likewise.
9098 * c-typeck.c: Likewise.
9099 * c-convert.c: Likewise.
9100 * c-lang.c: Likewise.
9101 * c-aux-info.c: Likewise.
9102 * c-errors.c: Likewise.
9103 * gccspec.c: Likewise.
9104 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9105 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9106\f
68127a8e 9107Copyright (C) 2012-2023 Free Software Foundation, Inc.
d4a10d0a
SB
9108
9109Copying and distribution of this file, with or without modification,
9110are permitted in any medium without royalty provided the copyright
9111notice and this notice are preserved.