]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR modula2/110189 Using an unknown TYPE as argument to VAL gives ICE
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
4f0d4825
GA
12023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
2 Tobias Burnus <tobias@codesourcery.com>
3
4 * c-parser.cc (c_parser_omp_clause_defaultmap,
5 c_parser_omp_clause_map): Parse 'present'.
6 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
7 (c_parser_omp_clause_from_to): New; parse to/from clauses with
8 optional present modifer.
9 (c_parser_omp_all_clauses): Update call.
10 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
11 c_parser_omp_target_exit_data): Handle new map enum values
12 for 'present' mapping.
13
df2762ac
GA
142023-05-30 Tobias Burnus <tobias@codesourcery.com>
15
16 PR c/109999
17 * c-parser.cc (c_parser_oacc_all_clauses,
18 c_parser_omp_all_clauses): Improve error wording.
19
03c7c418
GA
202023-05-23 Martin Uecker <uecker@tugraz.at>
21
22 PR c/109450
23 * c-decl.cc (add_decl_expr): New function.
24 (grokdeclarator): Add decl expr for size expression in
25 types pointed to by parameters declared as arrays.
26
272023-05-23 Martin Uecker <uecker@tugraz.at>
28
29 PR c/70418
30 PR c/106465
31 PR c/107557
32 PR c/108423
33 * c-decl.cc (start_decl): Make sure size expression are
34 evaluated only in correct context.
35 (grokdeclarator): Size expression in fields may need a bind
36 expression, make sure DECL_EXPR is always created.
37 (grokfield, declspecs_add_type): Pass along size expressions.
38 (finish_struct): Remove unneeded DECL_EXPR.
39 (start_function): Evaluate size expressions for nested functions.
40 * c-parser.cc (c_parser_struct_declarations,
41 c_parser_struct_or_union_specifier): Pass along size expressions.
42 (c_parser_declaration_or_fndef): Evaluate size expression.
43 (c_parser_objc_at_property_declaration,
44 c_parser_objc_class_instance_variables): Adapt.
45 * c-tree.h (grokfield): Adapt declaration.
46
5df01f89
GA
472023-05-19 Martin Uecker <uecker@tugraz.at>
48
49 * c-decl.cc (set_type_context): Remove.
50 (pop_scope, diagnose_mismatched_decls, pushdecl):
51 Remove dead code.
52 * c-typeck.cc (comptypes_internal): Remove dead code.
53 (same_translation_unit_p): Remove.
54 (tagged_types_tu_compatible_p): Some fixes.
55
562023-05-19 Joseph Myers <joseph@codesourcery.com>
57
58 * c-decl.cc (diagnose_mismatched_decls): Do not handle
59 thread-local declarations as tentative definitions for C2x.
60 (finish_decl): Do not allow thread-local definition with
61 incomplete type for C2x.
62
b2776076
GA
632023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
64
65 * c-convert.cc (c_convert): Ditto.
66 * c-decl.cc (merge_decls): Ditto.
67 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
68 (c_parser_omp_declare_reduction): Ditto.
69 * c-typeck.cc (build_component_ref): Ditto.
70 (convert_argument): Ditto.
71 (pointer_diff): Ditto.
72 (build_unary_op): Ditto.
73 (build_c_cast): Ditto.
74 (build_modify_expr): Ditto.
75 (store_init_value): Ditto.
76 (constexpr_init_fits_real_type): Ditto.
77 (check_constexpr_init): Ditto.
78 (c_finish_return): Ditto.
79 (handle_omp_array_sections_1): Ditto.
80 (c_finish_omp_clauses): Ditto.
81 * gimple-parser.cc (c_finish_gimple_return): Ditto.
82
0d566057
GA
832023-05-16 Joseph Myers <joseph@codesourcery.com>
84
85 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
86 diagnostics.
87
3427b51b
GA
882023-05-15 Joseph Myers <joseph@codesourcery.com>
89
90 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
91 type for C2x.
92
4d68c7f7
GA
932023-04-30 Andrew Pinski <apinski@marvell.com>
94
95 * c-typeck.cc (process_init_element): Print out array type
96 for excessive elements.
97
982023-04-30 Andrew Pinski <apinski@marvell.com>
99
100 PR c/107926
101 * c-typeck.cc (process_init_element): Move the check
102 for string cst until after the error message.
103
50205195
GA
1042023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
105
106 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
107
32a98ccd
GA
1082023-04-27 Jakub Jelinek <jakub@redhat.com>
109
110 PR c/109409
111 * c-parser.cc (c_parser_initializer): Move diagnostics about
112 initialization of variable sized object with non-empty initializer
113 after c_parser_expr_no_commas call and ret.set_error (); after it.
114
1152023-04-27 Jakub Jelinek <jakub@redhat.com>
116
117 PR c/107682
118 PR c/109412
119 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
120 reject empty initializer as invalid.
121
4a3dbcbd
GA
1222023-04-26 Richard Biener <rguenther@suse.de>
123
124 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
125 last_stmt.
126
49cea02d
GA
1272023-04-25 Tobias Burnus <tobias@codesourcery.com>
128
129 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
130 zero exec statements before/after 'omp scan'.
131
ce4e4f37
GA
1322023-04-20 Jakub Jelinek <jakub@redhat.com>
133
134 PR c/107041
135 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
136 warning on acc_on_device declaration.
137
579cdc1e
GA
1382023-03-28 David Malcolm <dmalcolm@redhat.com>
139
140 PR c/107002
141 * c-typeck.cc (parser_build_binary_op): Update for new param of
142 check_for_xor_used_as_pow.
143
c8065441
GA
1442023-03-10 Jakub Jelinek <jakub@redhat.com>
145
146 PR c/108079
147 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
148 after diagnosing it.
149
6f9e2f14
GA
1502023-02-28 Jakub Jelinek <jakub@redhat.com>
151
152 PR sanitizer/108894
153 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
154 and rename to c_strict_flex_array_level_of.
155 (is_flexible_array_member_p): Adjust caller.
156
0263e9d5
GA
1572023-02-18 Martin Uecker <uecker@tugraz.at>
158
159 PR c/108375
160 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
161 (diagnose_mismatched_decl): Dito.
162 (warn_about_goto): Dito:
163 (c_check_switch_jump_warnings): Dito.
164 (finish_decl): Dito.
165 (finish_struct): Dito.
166 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
167 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
168 * c-objc-common.cc (c_var_mod_p): New function.
169 (c_var_unspec_p): Remove.
170 * c-objc-common.h: Set lang hook.
171 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
172 (c_parser_typeof_specifier): Dito.
173 (c_parser_has_attribute_expression): Dito.
174 (c_parser_generic_selection): Dito.
175 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
176 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
177
88cc4495
GA
1782023-02-16 Patrick Palka <ppalka@redhat.com>
179
180 * c-parser.h: Mechanically drop static from static inline
181 functions via s/^static inline/inline/g.
182
d7a47ed1
GA
1832023-02-10 Joseph Myers <joseph@codesourcery.com>
184
185 * c-convert.cc (c_convert): Allow conversion of a null pointer
186 constant to nullptr_t.
187 * c-typeck.cc (null_pointer_constant_p): Remove static.
188 (convert_for_assignment): Allow conversion of a null pointer
189 constant to nullptr_t.
190 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
191 * c-tree.h (null_pointer_constant_p): Declare.
192
e92e2c96
GA
1932023-02-09 Tobias Burnus <tobias@codesourcery.com>
194
195 * c-parser.cc (c_parser_omp_allocate): Parse align
196 clause and check for restrictions.
197
f6fc79d0
GA
1982023-02-08 Joseph Myers <joseph@codesourcery.com>
199
200 * c-typeck.cc (check_constexpr_init): Remove argument
201 null_pointer_constant. Only check pointer initializers for being
202 null.
203 (digest_init): Update calls to check_constexpr_init.
204
a37a0cb3
GA
2052023-02-02 Joseph Myers <joseph@codesourcery.com>
206
207 * c-typeck.cc (build_binary_op): Allow comparisons between
208 pointers and nullptr_t values that are not null pointer constants.
209
2102023-02-02 Joseph Myers <joseph@codesourcery.com>
211
212 * c-typeck.cc: Include "realmpfr.h".
213 (constexpr_init_fits_real_type): Do not allow signaling NaN
214 conversions to different types with the same mode. Handle
215 conversions from binary to decimal types.
216 (check_constexpr_init): Do not disallow real initializers for
217 complex types. Do not disallow binary initializers for decimal
218 floating types.
219
317525b0
GA
2202023-01-31 Marek Polacek <polacek@redhat.com>
221
222 PR c++/107593
223 PR c++/108597
224 * c-objc-common.cc (instantiation_dependent_expression_p): New.
225
338eb0f0
GA
2262023-01-27 Joseph Myers <joseph@codesourcery.com>
227
228 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
229 around auto initializer.
230
f457a62e
GA
2312023-01-16 Jakub Jelinek <jakub@redhat.com>
232
233 PR c++/105593
234 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
235 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
236 of warn_init_self.
237
5013c3bb
GA
2382023-01-14 Jakub Jelinek <jakub@redhat.com>
239
240 PR c++/108365
241 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
242 division or modulo.
243
2442023-01-13 Qing Zhao <qing.zhao@oracle.com>
245
246 * c-decl.cc (strict_flex_array_level_of): ... here.
247
81ed98bc
GA
2482023-01-11 Jakub Jelinek <jakub@redhat.com>
249
250 PR c/105972
251 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
252 markers for K&R function parameter declarations of nested functions.
253
84723aca
GA
2542023-01-09 Joseph Myers <joseph@codesourcery.com>
255
256 * c-decl.cc (build_compound_literal): Call record_inline_static.
257
d808db1f
GA
2582023-01-06 Joseph Myers <joseph@codesourcery.com>
259
260 * c-parser.cc (c_parser_postfix_expression): Handle integer
261 generic arguments to functions passed to __builtin_tgmath as
262 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
263 Do not handle integer arguments to some narrowing functions as
264 _Float64.
265
d2ef2327
GA
2662022-12-19 Jakub Jelinek <jakub@redhat.com>
267
268 PR c/108043
269 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
270 compound literals with function type.
271
4bc2d9f6
GA
2722022-12-07 Joseph Myers <joseph@codesourcery.com>
273
274 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
275 auto, constexpr and a type used together.
276
3fe66f7f
GA
2772022-12-06 Qing Zhao <qing.zhao@oracle.com>
278
279 * c-decl.cc (is_flexible_array_member_p): Call new function
280 strict_flex_array_level_of.
281
9a1b4f1d
GA
2822022-11-24 Florian Weimer <fweimer@redhat.com>
283
284 PR c/107805
285 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
286 from type to specs.
287
add89840
GA
2882022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
289
290 * c-decl.cc (start_function): Set the result decl source
291 location to the location of the typespec.
292
2932022-11-17 David Malcolm <dmalcolm@redhat.com>
294
295 PR analyzer/107711
296 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
297 to cpp_create_reader, rather than ident_hash, so that the new
298 reader gets its own hash table.
299
cdc34229
GA
3002022-11-15 David Malcolm <dmalcolm@redhat.com>
301
302 PR analyzer/106302
303 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
304 (class ana::c_translation_unit): New.
305 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
306
30d77d49
GA
3072022-11-12 Joseph Myers <joseph@codesourcery.com>
308
309 * c-decl.cc (start_underspecified_init)
310 (finish_underspecified_init): Handle name == NULL_TREE for
311 compound literals.
312 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
313 (shadow_tag_warned): Check for constexpr.
314 (start_decl): Add parameter do_push.
315 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
316 (grokdeclarator): Handle constexpr.
317 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
318 (declspecs_add_scspec): Handle constexpr.
319 * c-parser.cc (c_token_starts_compound_literal)
320 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
321 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
322 (c_parser_compound_literal_scspecs)
323 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
324 Update calls to start_init.
325 (c_parser_declaration_or_fndef, c_parser_initializer)
326 (c_parser_initval): Pass true for new argument of
327 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
328 constexpr compound literals.
329 (c_parser_static_assert_declaration_no_semi)
330 (c_parser_enum_specifier, c_parser_struct_declaration)
331 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
332 Call convert_lvalue_to_rvalue on expressions required to be
333 integer constant expressions.
334 (c_parser_omp_declare_reduction): Update call to start_init.
335 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
336 (C_DECL_DECLARED_CONSTEXPR): New macros.
337 (struct c_declspecs): Add constexpr_p.
338 (start_decl, convert_lvalue_to_rvalue, start_init): Update
339 prototypes.
340 * c-typeck.cc (require_constant_value, require_constant_elements):
341 Change to bool.
342 (require_constexpr_value, maybe_get_constexpr_init)
343 (constexpr_init_fits_real_type, check_constexpr_init): New.
344 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
345 maybe_get_constexpr_init.
346 (store_init_value): Update call to digest_init.
347 (digest_init): Add parameters int_const_expr, arith_const_expr and
348 require_constexpr. Check constexpr initializers.
349 (constructor_top_level): Remove.
350 (struct initializer_stack): Remove top_level. Add
351 require_constexpr_value.
352 (start_init): Remove parameter top_level. Add parameters
353 init_require_constant and init_require_constexpr. Save
354 require_constexpr_value on stack.
355 (pop_init_level): Use a null pointer constant for zero initializer
356 of pointer initialized with {}.
357 (output_init_element): Update call to digest_init. Avoid passing
358 null pointer constants of pointer type through digest_init a
359 second time when initializing a constexpr object.
360
d29260ce
GA
3612022-11-03 Joseph Myers <joseph@codesourcery.com>
362
363 * c-decl.cc (in_underspecified_init, start_underspecified_init)
364 (finish_underspecified_init): New.
365 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
366 Give errors inside initializers of underspecified declarations.
367 (grokdeclarator): Handle (erroneous) case of C2X auto on a
368 parameter.
369 (declspecs_add_type): Handle c2x_auto_p case.
370 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
371 C2X mode.
372 (finish_declspecs): Handle c2x_auto_p.
373 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
374 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
375 (struct c_declspecs): Add c2x_auto_p.
376 (start_underspecified_init, finish_underspecified_init): New
377 prototypes.
378 * c-typeck.cc (build_external_ref): Give error for underspecified
379 declaration referenced in its initializer.
380
3055829a
GA
3812022-10-28 Joseph Myers <joseph@codesourcery.com>
382
383 * c-decl.cc (grokdeclarator): Pass
384 arg_info->no_named_args_stdarg_p to build_function_type.
385 (grokparms): Check arg_info->no_named_args_stdarg_p before
386 converting () to (void).
387 (build_arg_info): Initialize no_named_args_stdarg_p.
388 (get_parm_info): Set no_named_args_stdarg_p.
389 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
390 build_function_type.
391 (store_parm_decls): Count (...) functions as prototyped.
392 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
393 parenthesis to start parameter list.
394 (c_parser_parms_list_declarator): Always allow '...' with no
395 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
396 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
397 * c-typeck.cc (composite_type): Handle
398 TYPE_NO_NAMED_ARGS_STDARG_P.
399 (function_types_compatible_p): Compare
400 TYPE_NO_NAMED_ARGS_STDARG_P.
401
4022022-10-28 Jakub Jelinek <jakub@redhat.com>
403
404 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
405 comma before the first clause.
406 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
407 c_parser_omp_flush, c_parser_omp_scan_loop_body,
408 c_parser_omp_ordered, c_finish_omp_declare_variant,
409 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
410 c_parser_omp_requires, c_parser_omp_error,
411 c_parser_omp_assumption_clauses): Likewise.
412
4132022-10-28 Joseph Myers <joseph@codesourcery.com>
414
415 PR c/61469
416 * c-convert.cc (c_convert): Handle enums with underlying boolean
417 type like bool.
418 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
419 enums with enum type specifier, but give errors for storage class
420 specifiers, qualifiers or alignment specifiers in non-definition
421 declarations of such enums.
422 (grokdeclarator): Give error for non-definition use of type
423 specifier with an enum type specifier.
424 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
425 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
426 (xref_tag): Update call to parser_xref_tag.
427 (start_enum): Add argument fixed_underlying_type. Complete enum
428 type with a fixed underlying type given in the definition. Give
429 error for defining without a fixed underlying type in the
430 definition if one was given in a prior declaration. Do not mark
431 enums with fixed underlying type as packed for -fshort-enums.
432 Store the enum type in the_enum.
433 (finish_enum): Do not adjust types of values or check their range
434 for an enum with a fixed underlying type. Set underlying type of
435 enum and variants.
436 (build_enumerator): Check enumeration constants for enum with
437 fixed underlying type against that type and convert to that type.
438 Increment in the underlying integer type, with handling for bool.
439 (c_simulate_enum_decl): Update call to start_enum.
440 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
441 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
442 rather than recomputing an underlying type based on size.
443 * c-parser.cc (c_parser_declspecs)
444 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
445 Set has_enum_type_specifier for type specifiers.
446 (c_parser_enum_specifier): Handle enum type specifiers.
447 (c_parser_struct_or_union_specifier): Update call to
448 parser_xref_tag.
449 (c_parser_omp_atomic): Check for boolean increment or decrement
450 using C_BOOLEAN_TYPE_P.
451 * c-tree.h (C_BOOLEAN_TYPE_P): New.
452 (struct c_typespec): Add has_enum_type_specifier.
453 (struct c_declspecs): Add enum_type_specifier_ref_p.
454 (struct c_enum_contents): Add enum_type.
455 (start_enum, parser_xref_tag): Update prototypes.
456 * c-typeck.cc (composite_type): Allow for enumerated types
457 compatible with bool.
458 (common_type, comptypes_internal, perform_integral_promotions):
459 Use ENUM_UNDERLYING_TYPE.
460 (parser_build_binary_op, build_unary_op, convert_for_assignment)
461 (c_finish_return, c_start_switch, build_binary_op): Check for
462 boolean types using C_BOOLEAN_TYPE_P.
463
4e939ae1
GA
4642022-10-24 Jakub Jelinek <jakub@redhat.com>
465
466 PR c++/107358
467 * c-typeck.cc (build_binary_op): Pass operands before excess precision
468 promotions to scalar_to_vector call.
469
4702022-10-24 Arsen Arsenović <arsen@aarsen.me>
471
472 * c-decl.cc (finish_function): Ignore hosted when deciding
473 whether to implicitly return zero, but check noreturn.
474 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
475 requirements to just MAIN_NAME_P when hosted, or `int main'
476 otherwise.
477
47a6ae56
GA
4782022-10-20 Richard Biener <rguenther@suse.de>
479
480 PR c/107305
481 PR c/107306
482 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
483 the parsed IL and zap the body on error.
484
21de009f
GA
4852022-10-18 Joseph Myers <joseph@codesourcery.com>
486
487 PR c/107164
488 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
489 with previous declaration visible.
490
4912022-10-18 Joseph Myers <joseph@codesourcery.com>
492
493 PR c/36113
494 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
495 convert all to the type of the enumeration. pedwarn if no integer
496 type fits all enumerators and default to
497 widest_integer_literal_type_node in that case. Otherwise pedwarn
498 for type wider than intmax_t.
499 (build_enumerator): pedwarn for enumerators outside the range of
500 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
501 enumerators outside the range of int. On overflow, attempt to
502 find a wider type that can hold the value of the next enumerator.
503 Do not convert value to type determined with
504 c_common_type_for_size.
505
baeec7cc
GA
5062022-10-14 Jakub Jelinek <jakub@redhat.com>
507
508 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
509 double.
510
5112022-10-14 Joseph Myers <joseph@codesourcery.com>
512
513 * c-decl.cc (build_compound_literal): Add parameter scspecs.
514 Handle storage class specifiers.
515 * c-parser.cc (c_token_starts_compound_literal)
516 (c_parser_compound_literal_scspecs): New.
517 (c_parser_postfix_expression_after_paren_type): Add parameter
518 scspecs. Call pedwarn_c11 for use of storage class specifiers.
519 Update call to build_compound_literal.
520 (c_parser_cast_expression, c_parser_sizeof_expression)
521 (c_parser_alignof_expression): Handle storage class specifiers for
522 compound literals. Update calls to
523 c_parser_postfix_expression_after_paren_type.
524 (c_parser_postfix_expression): Update syntax comment.
525 * c-tree.h (build_compound_literal): Update prototype.
526 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
527 register compound literal.
528
9ff6c33e
GA
5292022-10-07 Qing Zhao <qing.zhao@oracle.com>
530
531 * c-decl.cc (flexible_array_member_type_p): New function.
532 (one_element_array_type_p): Likewise.
533 (zero_length_array_type_p): Likewise.
534 (add_flexible_array_elts_to_size): Call new utility
535 routine flexible_array_member_type_p.
536 (is_flexible_array_member_p): New function.
537 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
538
629d04d3
GA
5392022-10-06 Joseph Myers <joseph@codesourcery.com>
540
541 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
542 and not C2x.
543 (c_keyword_starts_typename, c_token_starts_declspecs)
544 (c_parser_declspecs, c_parser_objc_selector): Handle
545 RID_TYPEOF_UNQUAL.
546 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
547 Distinguish typeof for C2x from __typeof__ for all standard
548 versions and typeof before C2x.
549 * c-typeck.cc (build_function_call_vec): Use unqualified version
550 of non-void return type.
551 (build_unary_op): Use unqualified type for increment and
552 decrement.
553
5542022-10-06 Jakub Jelinek <jakub@redhat.com>
555
556 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
557 call for holds clause on assume construct.
558
5592022-10-06 Jakub Jelinek <jakub@redhat.com>
560
561 PR c++/106654
562 * c-parser.cc (handle_assume_attribute): New function.
563 (c_parser_declaration_or_fndef): Handle assume attribute.
564 (c_parser_attribute_arguments): Add assume_attr argument,
565 if true, parse first argument as conditional expression.
566 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
567 c_parser_attribute_arguments callers.
568 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
569 assume attribute.
570
85872a69
GA
5712022-10-04 Jakub Jelinek <jakub@redhat.com>
572
573 * c-lang.h (struct c_omp_declare_target_attr): New type.
574 (current_omp_declare_target_attribute): Change type from
575 int to vec<c_omp_declare_target_attr, va_gc> *.
576 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
577 If last pushed directive was begin declare target, use different
578 wording and simplify format strings for easier translations.
579 (c_parser_omp_clause_device_type): Uncomment
580 check_no_duplicate_clause call.
581 (c_parser_omp_declare_target): Adjust for the
582 current_omp_declare_target_attribute type change, push { -1 }.
583 Use error_at rather than warning_at for declare target with
584 only device_type clauses.
585 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
586 (c_parser_omp_begin): Add begin declare target support.
587 (c_parser_omp_end): Adjust for the
588 current_omp_declare_target_attribute type change, adjust
589 diagnostics wording and simplify format strings for easier
590 translations.
591 * c-decl.cc (current_omp_declare_target_attribute): Change type from
592 int to vec<c_omp_declare_target_attr, va_gc> *.
593 (c_decl_attributes): Adjust for the
594 current_omp_declare_target_attribute type change. If device_type
595 was present on begin declare target, add "omp declare target host"
596 and/or "omp declare target nohost" attributes.
597
bbdcdf5c
GA
5982022-09-29 Joseph Myers <joseph@codesourcery.com>
599
600 * c-decl.cc (handle_std_noreturn_attribute): New function.
601 (std_attribute_table): Add _Noreturn and noreturn.
602
1f16a020
GA
6032022-09-27 Jakub Jelinek <jakub@redhat.com>
604
605 * c-lang.h (current_omp_begin_assumes): Declare.
606 * c-parser.cc: Include bitmap.h.
607 (c_parser_omp_end_declare_target): Rename to ...
608 (c_parser_omp_end): ... this. Handle also end assumes.
609 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
610 c_parser_omp_assumes, c_parser_omp_assume): New functions.
611 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
612 without corresponding #pragma omp end assumes.
613 (c_parser_pragma): Use %s in may only be used at file scope
614 diagnostics to decrease number of translatable messages. Handle
615 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
616 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
617 for it rather than c_parser_omp_end_declare_target.
618 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
619 * c-decl.cc (current_omp_begin_assumes): Define.
620
28a61ecd
GA
6212022-09-24 Jakub Jelinek <jakub@redhat.com>
622
623 PR c/106981
624 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
625 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
626 t2 have different types.
627
279c6715
GA
6282022-09-22 David Malcolm <dmalcolm@redhat.com>
629
630 PR c/106830
631 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
632 (c_parser_cast_expression): Likewise.
633 (c_parser_alignof_expression): Likewise.
634 (c_parser_postfix_expression_after_paren_type): Likewise.
635 (c_parser_postfix_expression_after_primary): Likewise.
636 (c_parser_expression): Likewise.
637 (c_parser_omp_variable_list): Likewise.
638 (c_parser_transaction_expression): Likewise.
639 * c-tree.h (c_expr::set_error): Likewise.
640 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
641 (parser_build_unary_op): Likewise.
642 (parser_build_binary_op): Likewise.
643 (digest_init): Likewise.
644 (pop_init_level): Likewise.
645 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
646
43be56c4
GA
6472022-09-19 Marek Polacek <polacek@redhat.com>
648
649 PR c/106947
650 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
651 notes.
652
d0fc05e8
GA
6532022-09-15 Richard Biener <rguenther@suse.de>
654
655 * c-decl.cc (build_void_list_node): Remove.
656
ff822367
GA
6572022-09-14 Julian Brown <julian@codesourcery.com>
658
659 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
660 on error.
661
fe2a8ce9
GA
6622022-09-07 Joseph Myers <joseph@codesourcery.com>
663
664 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
665 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
666 for C2x spellings of keywords.
667 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
668
25aeb922
GA
6692022-09-06 Jakub Jelinek <jakub@redhat.com>
670
671 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
672 in omp_cur_iteration - 1 has integer_type_node type.
673
83f2f228
GA
6742022-09-03 Jakub Jelinek <jakub@redhat.com>
675
676 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
677 (c_parser_omp_clause_depend_sink): Renamed to ...
678 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
679 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
680 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
681 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
682 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
683 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
684 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
685 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
686 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
687 (c_parser_omp_clause_doacross): New function.
688 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
689 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
690 OMP_CLAUSE_DEPEND_SOURCE.
691 (c_parser_omp_for_loop): Don't diagnose here linear clause together
692 with ordered with argument.
693 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
694 for simd.
695 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
696 (c_parser_omp_ordered): Handle also doacross and adjust for it
697 diagnostic wording.
698 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
699 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
700
c64b0947
GA
7012022-09-02 David Malcolm <dmalcolm@redhat.com>
702
703 PR c/90885
704 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
705 (c_parser_expr_no_commas): Likewise.
706 (c_parser_conditional_expression): Likewise.
707 (c_parser_binary_expression): Clear m_decimal when popping the
708 stack.
709 (c_parser_unary_expression): Clear ret.m_decimal.
710 (c_parser_has_attribute_expression): Likewise for result.
711 (c_parser_predefined_identifier): Likewise for expr.
712 (c_parser_postfix_expression): Likewise for expr.
713 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
714 token.
715 * c-tree.h (c_expr::m_decimal): New bitfield.
716 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
717 (parser_build_binary_op): Call check_for_xor_used_as_pow.
718
bb0a1556
GA
7192022-09-01 Joseph Myers <joseph@codesourcery.com>
720
721 * c-decl.cc (grokparms): Handle () in a function declaration the
722 same as (void) for C2X.
723
542c60c4
GA
7242022-08-31 Joseph Myers <joseph@codesourcery.com>
725
726 * c-parser.cc (c_parser_label): Pass attributes to do_case.
727 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
728 c_add_case_label.
729
16f542d6
GA
7302022-08-26 Jakub Jelinek <jakub@redhat.com>
731
732 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
733
5d4389dc
GA
7342022-08-25 Marek Polacek <polacek@redhat.com>
735
736 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
737 Give a better diagnostic when converting to nullptr_t.
738 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
739 initialization.
740 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
741 (c_parser_postfix_expression): Handle RID_NULLPTR.
742 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
743 nullptr_node.
744 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
745 (build_conditional_expr): Handle the case when the second/third operand
746 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
747 (convert_for_assignment): Handle converting an expression of type
748 nullptr_t to pointer/bool.
749 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
750 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
751
7522022-08-25 Joseph Myers <joseph@codesourcery.com>
753
754 * c-decl.cc (start_decl): Do not diagnose initialization of
755 variable-sized objects here.
756 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
757 callers changed.
758 (c_parser_initializer): Diagnose initialization of variable-sized
759 objects other than with braced initializer.
760 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
761 braces and update diagnostic text. Diagnose initialization of
762 variable-sized objects with nonempty braces.
763 * c-typeck.cc (digest_init): Update diagnostic for initialization
764 of variable-sized objects.
765 (really_start_incremental_init, set_designator)
766 (process_init_element): Update comments.
767 (pop_init_level): Allow scalar empty initializers.
768
0342f034
GA
7692022-08-17 Tobias Burnus <tobias@codesourcery.com>
770 Chung-Lin Tang <cltang@codesourcery.com>
771
772 PR c++/104493
773 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
774 instead of removed langhook.
775 * c-typeck.cc (c_finish_omp_clauses): Likewise.
776
5cd525f0
GA
7772022-08-11 Marek Polacek <polacek@redhat.com>
778
779 PR middle-end/102633
780 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
781 Call suppress_warning.
782 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
783 (c_parser_omp_declare_reduction): Pass omp_priv down to
784 c_parser_initializer.
785
5f17badb
GA
7862022-08-08 Tom Honermann <tom@honermann.net>
787
788 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
789 of CPP_UTF8STRING when char8_t support is enabled.
790 * c-typeck.cc (digest_init): Allow initialization of an array
791 of character type by a string literal with type array of
792 char8_t.
793
32510382
GA
7942022-08-01 David Malcolm <dmalcolm@redhat.com>
795
796 * c-typeck.cc (build_c_cast): Quote names of address spaces in
797 diagnostics.
798 (convert_for_assignment): Add a note to address space mismatch
799 diagnostics, specifying the expected and actual types.
800
b53ebbc5
GA
8012022-07-10 Lewis Hyatt <lhyatt@gmail.com>
802
803 PR preprocessor/97498
804 * c-parser.cc (c_parser_pragma): Set input_location to the
805 location of the pragma, rather than the start of the line.
806
8467574d
GA
8072022-07-04 Tobias Burnus <tobias@codesourcery.com>
808 Chung-Lin Tang <cltang@codesourcery.com>
809 Thomas Schwinge <thomas@codesourcery.com>
810
811 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
812 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
813 OMP_REQUIRES_TARGET_USED.
814 (c_parser_omp_requires): Remove sorry.
815
ed974488
GA
8162022-07-01 Tobias Burnus <tobias@codesourcery.com>
817
818 * c-parser.cc (c_parser_omp_target_enter_data,
819 c_parser_omp_target_exit_data): Accept tofrom
820 map-type modifier but use 'to' / 'from' internally.
821
bc7e9f76
GA
8222022-06-16 David Malcolm <dmalcolm@redhat.com>
823
824 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
825 group the warning with any note.
826 (warn_about_goto): Likewise to group error or warning with note.
827 Bail out if the warning wasn't emitted, to avoid emitting orphan
828 notes.
829 (lookup_label_for_goto): Add auto_diagnostic_group to
830 group the error with the note.
831 (check_earlier_gotos): Likewise.
832 (c_check_switch_jump_warnings): Likewise for any error/warning.
833 Conditionalize emission of the notes.
834 (diagnose_uninitialized_cst_member): Likewise for warning,
835 conditionalizing emission of the note.
836 (grokdeclarator): Add auto_diagnostic_group to group the "array
837 type has incomplete element type" error with any note.
838 (parser_xref_tag): Add auto_diagnostic_group to group warnings
839 with their notes. Conditionalize emission of notes.
840 (start_struct): Add auto_diagnostic_group to group the
841 "redefinition of" errors with any note.
842 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
843 (check_for_loop_decls): Likewise for pre-C99 error.
844
445ba599
GA
8452022-06-07 Jakub Jelinek <jakub@redhat.com>
846
847 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
848 style linear clause modifiers. Set
849 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
850 old style modifiers are used.
851 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
852 with val modifier on simd or for if the old style modifiers are
853 used.
854
b168441c
GA
8552022-06-02 David Malcolm <dmalcolm@redhat.com>
856
857 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
858 (c_get_sarif_source_language): New.
859 * c-tree.h (c_get_sarif_source_language): New decl.
860
820ead45
GA
8612022-05-31 Jason Merrill <jason@redhat.com>
862
863 * Make-lang.in (c.tags): Look at *.cc.
864
8652022-05-31 Jakub Jelinek <jakub@redhat.com>
866
867 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
868 clauses.
869
37b3b5da
GA
8702022-05-28 Jakub Jelinek <jakub@redhat.com>
871
872 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
873 seen first, use "%<to%>" or "%<enter%>" depending on
874 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
875 "%<to%> or %<enter%>" wording.
876
d9176e64
GA
8772022-05-27 Jakub Jelinek <jakub@redhat.com>
878
879 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
880 (c_parser_omp_all_clauses): For to clause on declare target, use
881 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
882 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
883 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
884 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
885 OMP_CLAUSE_TO_DECLARE.
886 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
887 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
888 name in diagnostics instead of
889 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
890
3dff965c
GA
8912022-05-25 Jakub Jelinek <jakub@redhat.com>
892
893 PR c/91134
894 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
895 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
896 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
897 diagnostic and fixit hint if DATUM has pointer type.
898 * c-parser.cc (c_parser_postfix_expression,
899 c_parser_omp_variable_list): Adjust build_component_ref callers.
900 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
901 Likewise.
902
768f49a2
GA
9032022-05-24 Jakub Jelinek <jakub@redhat.com>
904
905 PR c/105378
906 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
907
1cda629f
GA
9082022-05-18 Marek Polacek <polacek@redhat.com>
909
910 PR c/105131
911 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
912 mismatches.
913 * c-tree.h (comptypes_check_enum_int): Declare.
914 * c-typeck.cc (comptypes): No longer static.
915
3d9439b1
GA
9162022-05-17 Marek Polacek <polacek@redhat.com>
917
918 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
919 its value.
920
9212022-05-17 Jakub Jelinek <jakub@redhat.com>
922
923 * c-parser.cc (c_parser_omp_clause_depend): Parse
924 inoutset depend-kind.
925 (c_parser_omp_depobj): Likewise.
926
702bd11f
GA
9272022-05-16 Martin Liska <mliska@suse.cz>
928
929 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
930
49ace834
GA
9312022-05-12 Jakub Jelinek <jakub@redhat.com>
932
933 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
934 if flag_openmp.
935 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
936 in postfix expressions.
937 (c_parser_omp_variable_list): Handle omp_all_memory in depend
938 clause.
939 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
940 keyword in depend clause as null_pointer_node, diagnose invalid
941 uses.
942
bd022ff9
GA
9432022-05-09 Martin Liska <mliska@suse.cz>
944
945 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
946 macros.
947 (c_parser_binary_expression): Likewise.
948
a1947c92
GA
9492022-05-07 Marek Polacek <polacek@redhat.com>
950
951 PR c++/101833
952 PR c++/47634
953 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
954
405eda0d
GA
9552022-04-08 Jakub Jelinek <jakub@redhat.com>
956
957 PR c/105149
958 * c-typeck.cc (c_build_va_arg): Reject function types.
959
a2287813
GA
9602022-03-22 Marek Polacek <polacek@redhat.com>
961
962 PR c/82283
963 PR c/84685
964 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
965 (start_init): Set it.
966 (finish_init): Restore constructor_designated.
967 (push_init_level): Set constructor_designated to the value of
968 constructor_designated in the upper constructor_stack.
969
57eeedda
GA
9702022-03-12 Thomas Schwinge <thomas@codesourcery.com>
971
972 PR other/65095
973 * c-typeck.cc (handle_omp_array_sections_1)
974 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
975 instead of 'c_omp_map_clause_name'.
976
8cc4f9cd
GA
9772022-03-09 Joseph Myers <joseph@codesourcery.com>
978
979 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
980 differently from earlier standards for unprototyped function type
981 compatibility.
982
9832022-03-09 Jakub Jelinek <jakub@redhat.com>
984
985 PR c/104711
986 * c-fold.cc (c_fully_fold_internal): Don't emit
987 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
988 * c-typeck.cc (build_binary_op): Likewise.
989
e6533e2e
GA
9902022-03-07 Jakub Jelinek <jakub@redhat.com>
991
992 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
993 literal.
994
4bf3bac1
GA
9952022-02-23 Richard Biener <rguenther@suse.de>
996
997 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
998 SSA names without definition.
999 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1000
0bdb0498
GA
10012022-02-17 Jakub Jelinek <jakub@redhat.com>
1002
1003 PR c/104532
1004 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1005 convert_lvalue_to_rvalue and build_indirect_ref instead of
1006 build_simple_mem_ref.
1007
e8d68f0a
GA
10082022-02-11 Richard Biener <rguenther@suse.de>
1009
1010 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1011 VEC_COND_EXPRs.
1012
a645583d
GA
10132022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1014
1015 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1016 clause.
1017 (c_parser_omp_variable_list): Handle array sections.
1018 (c_parser_omp_clause_has_device_addr): Added.
1019 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1020 case.
1021 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1022 OMP_CLAUSE_MASK.
1023 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1024 (c_finish_omp_clauses): Handle array sections.
1025
3adf509f
GA
10262022-02-09 Jakub Jelinek <jakub@redhat.com>
1027
1028 PR c/104427
1029 * c-parser.cc (c_parser_postfix_expression)
1030 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1031 instead of build1_loc to build PAREN_EXPR.
1032 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1033 * c-fold.cc (c_fully_fold_internal): Likewise.
1034
fc829782
GA
10352022-01-17 Martin Liska <mliska@suse.cz>
1036
1037 * Make-lang.in: Rename .c names to .cc.
1038 * c-convert.cc: Likewise.
1039 * c-decl.cc (struct lang_identifier): Likewise.
1040 (pop_scope): Likewise.
1041 (finish_decl): Likewise.
1042 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1043 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1044 * c-parser.h (GCC_C_PARSER_H): Likewise.
1045 * c-tree.h (c_keyword_starts_typename): Likewise.
1046 (finish_declspecs): Likewise.
1047 (c_get_alias_set): Likewise.
1048 (enum c_oracle_request): Likewise.
1049 (tag_exists_p): Likewise.
1050 (set_c_expr_source_range): Likewise.
1051 * c-typeck.cc (c_common_type): Likewise.
1052 (c_finish_omp_clauses): Likewise.
1053 * config-lang.in: Likewise.
1054
10552022-01-17 Martin Liska <mliska@suse.cz>
1056
1057 * c-aux-info.c: Moved to...
1058 * c-aux-info.cc: ...here.
1059 * c-convert.c: Moved to...
1060 * c-convert.cc: ...here.
1061 * c-decl.c: Moved to...
1062 * c-decl.cc: ...here.
1063 * c-errors.c: Moved to...
1064 * c-errors.cc: ...here.
1065 * c-fold.c: Moved to...
1066 * c-fold.cc: ...here.
1067 * c-lang.c: Moved to...
1068 * c-lang.cc: ...here.
1069 * c-objc-common.c: Moved to...
1070 * c-objc-common.cc: ...here.
1071 * c-parser.c: Moved to...
1072 * c-parser.cc: ...here.
1073 * c-typeck.c: Moved to...
1074 * c-typeck.cc: ...here.
1075 * gccspec.c: Moved to...
1076 * gccspec.cc: ...here.
1077 * gimple-parser.c: Moved to...
1078 * gimple-parser.cc: ...here.
1079
10802022-01-17 Andrew Stubbs <ams@codesourcery.com>
1081
1082 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1083
617db51d
GA
10842022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1085
1086 PR c++/103705
1087 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1088 outer node for ARRAY_REFs.
1089
62eb5308
GA
10902022-01-01 Jakub Jelinek <jakub@redhat.com>
1091
1092 PR objc/103639
1093 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1094 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1095
2554e2da
GA
10962021-12-17 Marek Polacek <polacek@redhat.com>
1097
1098 PR c/103649
1099 * c-decl.c (c_warn_unused_attributes): Don't warn for
1100 attribute_ignored_p.
1101 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1102 arguments when the attribute is ignored.
1103
9c6586bc
GA
11042021-12-14 Jakub Jelinek <jakub@redhat.com>
1105
1106 PR c/103587
1107 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1108 consume the pragma and silently skip to the pragma eol.
1109
c8dcf64b
GA
11102021-12-12 Jonathan Wakely <jwakely@redhat.com>
1111
1112 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1113 * c-parser.c: Likewise.
1114
4b4839e3
GA
11152021-12-09 Jakub Jelinek <jakub@redhat.com>
1116
1117 PR pch/71934
1118 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1119 to resort_data.new_value.
1120
641ff219
GA
11212021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1122
1123 * c-parser.c (struct omp_dim): New struct type for use inside
1124 c_parser_omp_variable_list.
1125 (c_parser_omp_variable_list): Allow multiple levels of array and
1126 component accesses in array section base-pointer expression.
1127 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1128 c_parser_omp_var_list_parens.
1129 (c_parser_omp_clause_from): Likewise.
1130 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1131 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1132 POINTER_PLUS_EXPR.
1133 (c_finish_omp_clauses): Extend allowed ranged of expressions
1134 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1135
11362021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1137
1138 PR middle-end/92120
1139 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1140 call to c_parser_omp_variable_list to 'true'.
1141 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1142 array base handling.
1143 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1144
c177e806
GA
11452021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1146
1147 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1148 orphan loop" checking.
1149
11502021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1151 Thomas Schwinge <thomas@codesourcery.com>
1152
1153 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1154 OpenACC gang reductions.
1155
11562021-11-30 Richard Biener <rguenther@suse.de>
1157
1158 * gimple-parser.c (c_parser_gimple_postfix_expression):
1159 avoid unreachable code after break.
1160
87cd82c8
GA
11612021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1162
1163 PR other/103021
1164 * Make-lang.in: Use ETAGS variable in TAGS target.
1165
11662021-11-29 Richard Biener <rguenther@suse.de>
1167
1168 * c-typeck.c (c_tree_equal): Remove unreachable return.
1169 * c-parser.c (get_matching_symbol): Likewise.
1170
e1d43592
GA
11712021-11-23 Jakub Jelinek <jakub@redhat.com>
1172
1173 * c-typeck.c (c_clone_omp_udr): Don't initialize
1174 id.transform_lang_insert_block.
1175
9c077398
GA
11762021-11-19 Martin Sebor <msebor@redhat.com>
1177
1178 PR c++/33925
1179 PR c/102867
1180 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1181 code resulting from macro expansion.
1182
11832021-11-19 Martin Liska <mliska@suse.cz>
1184
1185 Revert:
1186 2021-11-19 Martin Liska <mliska@suse.cz>
1187
1188 * c-parser.c (add_debug_begin_stmt): Use option directly.
1189
483092d3
GA
11902021-11-18 Matthias Kretz <m.kretz@gsi.de>
1191
1192 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1193 * c-parser.c (c_parser_postfix_expression): Likewise.
1194
11952021-11-18 Martin Liska <mliska@suse.cz>
1196
1197 * c-parser.c (add_debug_begin_stmt): Use option directly.
1198
280d2838
GA
11992021-11-17 Martin Sebor <msebor@redhat.com>
1200
1201 PR c/101702
1202 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1203 bounds before deciding if they're constant.
1204
e2b57363
GA
12052021-11-15 Jakub Jelinek <jakub@redhat.com>
1206
1207 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1208 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1209
b39265d4
GA
12102021-11-11 Jakub Jelinek <jakub@redhat.com>
1211
1212 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1213 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1214 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1215 OMP_CLAUSE_NUM_TEAMS_EXPR.
1216 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1217 combined target teams even lower-bound expression.
1218
12192021-11-11 Richard Biener <rguenther@suse.de>
1220
1221 * gimple-parser.c: Shuffle bitmap.h include.
1222
18ae471f
GA
12232021-11-03 Joseph Myers <joseph@codesourcery.com>
1224
1225 PR c/103031
1226 * c-convert.c (c_convert): New function, based on convert.
1227 (convert): Make into wrapper of c_convert.
1228 (convert_init): New function.
1229 * c-typeck.c (enum impl_conv): Add ic_init_const.
1230 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1231 new argument to convert_and_check call.
1232 (digest_init): Pass ic_init_const to convert_for_assignment for
1233 initializers required to be constant.
1234
b4df2dd3
GA
12352021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1236
1237 * c-tree.h (c_simulate_record_decl): Declare.
1238 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1239 * c-decl.c (c_simulate_record_decl): New function.
1240
c2bd5d8a
GA
12412021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1242
1243 PR other/102663
1244 * Make-lang.in: Add dummy c.install-dvi target.
1245
93d183a5
GA
12462021-10-15 Richard Biener <rguenther@suse.de>
1247
1248 PR c/102763
1249 * gimple-parser.c
1250 (c_parser_gimple_postfix_expression_after_primary): Check
1251 for a pointer do be dereferenced by ->.
1252
5d5885c9
GA
12532021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1254
1255 * c-parser.c (c_finish_omp_declare_variant): Change call from
1256 c_omp_check_context_selector to omp_check_context_selector. Change
1257 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1258
c9db17b8
GA
12592021-10-09 Jakub Jelinek <jakub@redhat.com>
1260
1261 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1262 (c_parser_omp_scan_loop_body): Use it.
1263 (c_parser_omp_sections_scope): Likewise.
1264
50e20ee6
GA
12652021-10-07 Richard Biener <rguenther@suse.de>
1266
1267 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1268
bb6194e0
GA
12692021-10-05 Richard Biener <rguenther@suse.de>
1270
1271 PR c/102605
1272 * gimple-parser.c (c_parser_gimple_postfix_expression):
1273 Accept more address _Literals.
1274
da9c5f78
GA
12752021-10-04 Marek Polacek <polacek@redhat.com>
1276
1277 PR c++/97573
1278 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1279
9d116bcc
GA
12802021-10-01 Martin Sebor <msebor@redhat.com>
1281
1282 PR c/102103
1283 * c-typeck.c (maybe_warn_for_null_address): New function.
1284 (build_binary_op): Call it.
1285
12862021-10-01 Jakub Jelinek <jakub@redhat.com>
1287 Richard Biener <rguenther@suse.de>
1288
1289 PR sanitizer/102515
1290 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1291 for division even for SANITIZE_SI_OVERFLOW.
1292
12932021-10-01 Jakub Jelinek <jakub@redhat.com>
1294
1295 * c-parser.c (c_parser_omp_clause_order): Set
1296 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1297
fd133479
GA
12982021-09-28 Andrew Pinski <apinski@marvell.com>
1299
1300 PR c/32122
1301 * c-parser.c (c_parser_statement_after_labels): Pass
1302 the c_expr instead of the tree to c_finish_goto_ptr.
1303 * c-typeck.c (c_finish_goto_ptr): Change the second
1304 argument type to c_expr.
1305 * c-tree.h (c_finish_goto_ptr): Likewise.
1306 Error out if the expression was not of a pointer type.
1307
e4777439
GA
13082021-09-22 Jakub Jelinek <jakub@redhat.com>
1309
1310 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1311 modifiers.
1312
cf74e7b5
GA
13132021-09-18 Jakub Jelinek <jakub@redhat.com>
1314
1315 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1316 and reproducible modifiers.
1317 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1318
13192021-09-18 Jakub Jelinek <jakub@redhat.com>
1320
1321 * c-parser.c (c_parser_omp_clause_default): Handle private and
1322 firstprivate arguments, adjust diagnostics on unknown argument.
1323
0a4cb439
GA
13242021-09-17 Jakub Jelinek <jakub@redhat.com>
1325
1326 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1327 is true.
1328
a26206ec
GA
13292021-09-10 Jakub Jelinek <jakub@redhat.com>
1330
1331 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1332 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1333 don't call build_conditional_expr, instead build a COND_EXPR directly.
1334 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1335 if omp_atomic_lhs even in more cases for >, < or ==.
1336 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1337 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1338 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1339 * c-typeck.c (build_binary_op): For flag_openmp only handle
1340 MIN_EXPR/MAX_EXPR.
1341
b2748138
GA
13422021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1343
1344 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1345 directive.
1346
e11c6046
GA
13472021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1348
1349 * c-decl.c (enum deprecated_states): Add unavailable state.
1350 (merge_decls): Copy unavailability.
1351 (quals_from_declspecs): Handle unavailable case.
1352 (start_decl): Amend the logic handling suppression of nested
1353 deprecation states to include unavailability.
1354 (smallest_type_quals_location): Amend comment.
1355 (grokdeclarator): Handle the unavailable deprecation state.
1356 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1357 * c-tree.h (struct c_declspecs): Add unavailable_p.
1358 * c-typeck.c (build_component_ref): Handle unavailability.
1359 (build_external_ref): Likewise.
1360
13612021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1362 Joseph Myers <joseph@codesourcery.com>
1363
1364 PR c/79412
1365 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1366 types of both (non-function) decls as error_mark_node, so that the
1367 middle-end can see the code is malformed.
1368 (free_attr_access_data): Don't process if the type has been set to
1369 error_mark_node.
1370
6d51ee43
GA
13712021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1372
1373 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1374 and 'ancestor' in 'target device' clauses.
1375
38b19c5b
GA
13762021-08-23 Jakub Jelinek <jakub@redhat.com>
1377
1378 * c-parser.c (c_parser_omp_clause_num_tasks,
1379 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1380
5b2876f9
GA
13812021-08-22 Martin Uecker <muecker@gwdg.de>
1382
1383 PR c/98397
1384 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1385 for pointers to arrays with qualifiers.
1386 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1387 to arrays when the other pointer is a void pointer. Update warnings.
1388 (convert_for_assignment): Update warnings for C2X when converting from
1389 void* with qualifiers to a pointer to array with the same qualifiers.
1390
7c9e1645
GA
13912021-08-20 Jakub Jelinek <jakub@redhat.com>
1392
1393 * c-parser.c (c_parser_omp_error): New function.
1394 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1395
13962021-08-20 Jakub Jelinek <jakub@redhat.com>
1397
1398 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1399 comma at the end of list.
1400 (c_parser_omp_requires): Likewise.
1401
b57fba5e
GA
14022021-08-19 Jakub Jelinek <jakub@redhat.com>
1403
1404 * c-parser.c (c_parser_omp_requires): Don't call
1405 c_parser_peek_2nd_token and optionally consume token if current
1406 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1407
6e529985
GA
14082021-08-18 Jakub Jelinek <jakub@redhat.com>
1409
1410 * c-parser.c (c_parser_omp_nothing): New function.
1411 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1412
14132021-08-18 Jakub Jelinek <jakub@redhat.com>
1414
1415 * c-parser.c (c_parser_statement_after_labels): Add restart label
1416 near the start of the function. If c_parser_pragma returns false,
1417 goto restart.
1418 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1419 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1420 return what c_parser_omp_declare returned. Return true instead of
1421 false after emitting errors that the directive is not allowed in
1422 pragma_stmt context.
1423 (c_parser_omp_ordered): Return true instead of
1424 false after emitting errors that the directive is not allowed in
1425 pragma_stmt context.
1426 (c_parser_omp_target_update): Likewise.
1427 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1428 Change return type from tree to bool, return false if the
1429 directive should be ignored in pragma_stmt contexts.
1430 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1431 return their result directly.
1432 (c_parser_omp_cancellation_point): Change return type from void to
1433 bool, return false if the directive should be ignored in pragma_stmt
1434 contexts.
1435 (c_parser_omp_declare): Likewise.
1436
2d14d64b
GA
14372021-08-17 Jakub Jelinek <jakub@redhat.com>
1438
1439 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1440 (c_parser_omp_scope): New function.
1441 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1442
72be20e2
GA
14432021-08-12 Jakub Jelinek <jakub@redhat.com>
1444
1445 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1446 (c_parser_omp_clause_filter): New function.
1447 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1448 (OMP_MASKED_CLAUSE_MASK): Define.
1449 (c_parser_omp_masked): New function.
1450 (c_parser_omp_parallel): Handle parallel masked.
1451 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1452 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1453
14542021-08-12 Martin Uecker <muecker@gwdg.de>
1455
1456 PR c/101838
1457 PR c/29970
1458 * c-typeck.c (c_expr_sizeof_type): Evaluate
1459 size expressions for structs of variable size.
1460
14612021-08-12 Tobias Burnus <tobias@codesourcery.com>
1462
1463 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1464 'primary' as alias for 'master'.
1465
3ae564ea
GA
14662021-08-10 Martin Uecker <muecker@gwdg.de>
1467
1468 PR c/29970
1469 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1470 size expressions for structs of variable size.
1471
f92f4778
GA
14722021-08-06 Tamar Christina <tamar.christina@arm.com>
1473
1474 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1475 * c-tree.h (c_simulate_enum_decl): Likewise.
1476
14772021-08-06 Martin Sebor <msebor@redhat.com>
1478
1479 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1480 vec arguments to by-reference.
1481 (c_finish_omp_declare_simd): Same.
1482 (c_parser_compound_statement_nostart): Same.
1483 (c_parser_for_statement): Same.
1484 (c_parser_objc_methodprotolist): Same.
1485 (c_parser_oacc_routine): Same.
1486 (c_parser_omp_for_loop): Same.
1487 (c_parser_omp_declare_simd): Same.
1488
419c6c68
GA
14892021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1490 Joseph Myers <joseph@codesourcery.com>
1491 Cesar Philippidis <cesar@codesourcery.com>
1492
1493 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1494 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1495 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1496 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1497
92d45509
GA
14982021-07-20 Martin Sebor <msebor@redhat.com>
1499
1500 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1501 by-const-reference.
1502 * c-typeck.c (c_build_function_call_vec): Same.
1503
d97d71a1
GA
15042021-07-15 Martin Sebor <msebor@redhat.com>
1505
1506 PR c/101289
1507 PR c/97548
1508 * c-decl.c (get_parm_array_spec): Strip nops.
1509
6fba0eea
GA
15102021-07-06 Martin Sebor <msebor@redhat.com>
1511
1512 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1513
7a60a6e8
GA
15142021-07-02 Jakub Jelinek <jakub@redhat.com>
1515
1516 PR c/101297
1517 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1518 appears before a CPP_NAME.
1519
90708f87
GA
15202021-06-25 Martin Sebor <msebor@redhat.com>
1521
1522 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1523 warning_suppressed_p, suppress_warning, and copy_no_warning.
1524 (diagnose_mismatched_decls): Same.
1525 (duplicate_decls): Same.
1526 (grokdeclarator): Same.
1527 (finish_function): Same.
1528 (c_write_global_declarations_1): Same.
1529 * c-fold.c (c_fully_fold_internal): Same.
1530 * c-parser.c (c_parser_expr_no_commas): Same.
1531 (c_parser_postfix_expression): Same.
1532 * c-typeck.c (array_to_pointer_conversion): Same.
1533 (function_to_pointer_conversion): Same.
1534 (default_function_array_conversion): Same.
1535 (convert_lvalue_to_rvalue): Same.
1536 (default_conversion): Same.
1537 (build_indirect_ref): Same.
1538 (build_function_call_vec): Same.
1539 (build_atomic_assign): Same.
1540 (build_unary_op): Same.
1541 (c_finish_return): Same.
1542 (emit_side_effect_warnings): Same.
1543 (c_finish_stmt_expr): Same.
1544 (c_omp_clause_copy_ctor): Same.
1545
9aa8327e
GA
15462021-06-24 Jakub Jelinek <jakub@redhat.com>
1547
1548 PR c/101176
1549 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1550 the result.
1551
15522021-06-24 Jakub Jelinek <jakub@redhat.com>
1553
1554 PR c/101171
1555 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1556 error_mark_node.
1557
15582021-06-24 Jakub Jelinek <jakub@redhat.com>
1559
1560 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1561 C_ORT_OMP for clauses on target construct.
1562 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1563 (c_parser_omp_target): For non-combined target add
1564 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1565 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1566 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1567 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1568 never present on C_ORT_*DECLARE_SIMD.
1569 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1570 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1571 corresponding map clauses.
1572
2f080224
GA
15732021-06-21 Jakub Jelinek <jakub@redhat.com>
1574
1575 PR inline-asm/100785
1576 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1577 bit-fields addressable.
1578
ede6c356
GA
15792021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1580
1581 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1582 similar.
1583
8dc48181
GA
15842021-06-14 Tobias Burnus <tobias@codesourcery.com>
1585
1586 PR c/100913
1587 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1588 var in the error case.
1589
438aac59
GA
15902021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1591
1592 PR c/100920
1593 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1594 spot built-in functions.
1595
7d6987e9
GA
15962021-06-06 Jakub Jelinek <jakub@redhat.com>
1597
1598 PR c/100902
1599 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1600 even when target is combined with other constructs.
1601
16022021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1603
1604 PR c/100920
1605 * c-decl.c (finish_struct): Fix thinko in previous change.
1606 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1607 assignment and initialization for storage order purposes if the
1608 RHS is a call to a DECL_IS_MALLOC function.
1609
600f90cb
GA
16102021-06-04 Martin Sebor <msebor@redhat.com>
1611
1612 PR c/100783
1613 * c-objc-common.c (print_type): Handle erroneous types.
1614
440c8a0a
GA
16152021-06-03 Jakub Jelinek <jakub@redhat.com>
1616
1617 PR c++/100859
1618 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1619 after depend only cases.
1620
ee682192
GA
16212021-05-31 Richard Biener <rguenther@suse.de>
1622
1623 PR c++/88601
1624 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1625 * c-parser.c (c_parser_postfix_expression): Likewise.
1626
48166757
GA
16272021-05-28 Richard Biener <rguenther@suse.de>
1628
1629 PR c/100803
1630 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1631 invalid if conditions.
1632
16332021-05-28 Jakub Jelinek <jakub@redhat.com>
1634
1635 PR middle-end/99928
1636 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1637 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1638 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1639 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1640 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1641 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1642 if present in map_head, map_field_head or map_firstprivate_head
1643 bitmaps.
1644
16452021-05-28 Tobias Burnus <tobias@codesourcery.com>
1646
1647 * c-parser.c (c_parser_omp_clause_affinity): New.
1648 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1649 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1650 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1651 c_finish_omp_clauses): Likewise.
1652
01c59ef2
GA
16532021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1654
1655 PR c/100653
1656 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1657 field with a differing scalar storage order.
1658
2832d51b
GA
16592021-05-21 Jakub Jelinek <jakub@redhat.com>
1660
1661 PR middle-end/99928
1662 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1663 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1664 if a decl is mentioned both in map clause and in such firstprivate
1665 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1666
65f32e5d
GA
16672021-05-19 Jakub Jelinek <jakub@redhat.com>
1668
1669 PR middle-end/99928
1670 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1671 master when combined with taskloop.
1672 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1673 parallel master when not combined with taskloop.
1674
a8daf9a1
GA
16752021-05-18 Richard Biener <rguenther@suse.de>
1676
1677 PR c/100522
1678 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1679 Diagnose calls to non-functions.
1680 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1681
a7ffc1ef
GA
16822021-05-17 Richard Biener <rguenther@suse.de>
1683
1684 PR c/100625
1685 * gimple-parser.c (c_parser_gimple_label): Avoid building
1686 a GIMPLE label with NULL label decl.
1687
f9af11c7
GA
16882021-05-13 Martin Sebor <msebor@redhat.com>
1689
1690 PR c/100550
1691 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1692
0ff3a0f2
GA
16932021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1694
1695 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1696 'close'.
1697
aa891c56
GA
16982021-05-10 Martin Liska <mliska@suse.cz>
1699
1700 * c-aux-info.c (affix_data_type): Use startswith
1701 function instead of strncmp.
1702 * c-typeck.c (build_function_call_vec): Likewise.
1703 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1704
62d87a32
GA
17052021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1706
1707 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1708 on the address of a pointer field in a record with reverse SSO.
1709
99e8df7a
GA
17102021-05-04 Tobias Burnus <tobias@codesourcery.com>
1711
1712 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1713 for || and && reductions.
1714
3c8e539d
GA
17152021-04-29 Joseph Myers <joseph@codesourcery.com>
1716
1717 * c-typeck.c (function_types_compatible_p): For C2X, treat
1718 unprototyped function as compatible with non-variadic prototyped
1719 function even if some argument types are changed by the default
1720 argument promotions.
1721
ee351f7f
GA
17222021-04-15 Martin Sebor <msebor@redhat.com>
1723
1724 PR c/99420
1725 PR c/99972
1726 * c-decl.c (pushdecl): Always propagate type attribute.
1727
17282021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1729
1730 PR c/98852
1731 * c-typeck.c (c_common_type): Do not drop attributes that
1732 affect type identity.
1733
1d54b138
GA
17342021-04-10 Jakub Jelinek <jakub@redhat.com>
1735
1736 PR c/99990
1737 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1738 error_mark_node.
1739
4493b1c1
GA
17402021-03-25 Jakub Jelinek <jakub@redhat.com>
1741
1742 PR c++/99565
1743 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1744 to operand_equal_p.
1745
5f256a70
GA
17462021-03-19 Jakub Jelinek <jakub@redhat.com>
1747
1748 PR c/99588
1749 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1750 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1751 if found.
1752 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1753 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1754 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1755
3c5b6d24
GA
17562021-03-15 Tobias Burnus <tobias@codesourcery.com>
1757
1758 PR c++/99509
1759 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1760 ensure that the varpool node is marked as offloadable.
1761
ceae9533
GA
17622021-03-05 Tobias Burnus <tobias@codesourcery.com>
1763
1764 PR c/99137
1765 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1766
4028d01a
GA
17672021-02-24 Martin Sebor <msebor@redhat.com>
1768
1769 PR middle-end/97172
1770 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1771
bf81237e
GA
17722021-02-18 Jakub Jelinek <jakub@redhat.com>
1773
1774 PR c/99136
1775 * c-typeck.c (c_finish_return): Don't wrap retval into
1776 EXCESS_PRECISION_EXPR in functions that return void.
1777
0c5cdb31
GA
17782021-02-11 Marek Polacek <polacek@redhat.com>
1779
1780 * c-parser.c (c_parser_if_statement): Use vec_free.
1781
a19dd5e6
GA
17822021-02-04 Martin Sebor <msebor@redhat.com>
1783
1784 PR c/97882
1785 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1786 (diagnose_mismatched_decls): Same.
1787 (start_function): Introduce temporaries for better readability.
1788 * c-typeck.c (comptypes_internal): Only consider complete enum
1789 types in comparisons with integers.
1790
f7884fb1
GA
17912021-02-01 Martin Sebor <msebor@redhat.com>
1792
1793 PR middle-end/97172
1794 * c-decl.c (free_attr_access_data): New function.
1795 (c_parse_final_cleanups): Call free_attr_access_data.
1796
59cf67d1
GA
17972021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1798
1799 * c-parser.c (c_parser_omp_clause_detach): New.
1800 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1801 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1802 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1803 clause. Prevent use of detach with mergeable and overriding the
1804 data sharing mode of the event handle.
1805
2f7f0d32
GA
18062021-01-15 Jakub Jelinek <jakub@redhat.com>
1807
1808 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1809 unqualified element type and then call c_build_qualified_type on the
1810 ARRAY_TYPE.
1811
7d187e4f
GA
18122021-01-07 Richard Biener <rguenther@suse.de>
1813
1814 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1815 reallocate loop array if it is too small.
1816
eefe499f
GA
18172020-12-16 Martin Uecker <muecker@gwdg.de>
1818
1819 PR c/98047
1820 * c-typeck.c (build_modify_expr): Drop qualifiers.
1821
18222020-12-16 Martin Uecker <muecker@gwdg.de>
1823
1824 PR c/98260
1825 * c-parser.c (c_parser_expression): Look into
1826 nop expression when marking expressions as read.
1827
d52945ce
GA
18282020-12-14 Martin Liska <mliska@suse.cz>
1829
1830 PR sanitizer/98204
1831 * c-typeck.c (pointer_diff): Do not emit a top-level
1832 sanitization.
1833 (build_binary_op): Likewise.
1834
ca2bd949
GA
18352020-12-09 Tobias Burnus <tobias@codesourcery.com>
1836
1837 * c-parser.c (c_parser_omp_allocate): New.
1838 (c_parser_omp_construct): Call it.
1839
18402020-12-09 Richard Biener <rguenther@suse.de>
1841
1842 PR c/98200
1843 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1844 early on error.
1845
bc8a7013
GA
18462020-12-07 Martin Uecker <muecker@gwdg.de>
1847
1848 PR c/97981
1849 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1850 that drops qualifiers to the end of the function.
1851
d48df6f2
GA
18522020-11-26 Martin Uecker <muecker@gwdg.de>
1853
1854 PR c/65455
1855 PR c/92935
1856 * c-parser.c (c_parser_declaration_or_fndef): Remove
1857 redundant code to drop qualifiers of _Atomic types for __auto_type.
1858 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1859 types for __typeof__.
1860
1e2c9a27
GA
18612020-11-24 Jakub Jelinek <jakub@redhat.com>
1862
1863 PR c/97958
1864 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1865 expressions, use make_node instead of build2 to avoid checking build2
1866 performs.
1867
8e6198d0
GA
18682020-11-23 Joseph Myers <joseph@codesourcery.com>
1869
1870 PR c/95630
1871 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1872 for comparisons of complete and incomplete pointers.
1873
7a97e2fc
GA
18742020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1875
1876 * c-aux-info.c (gen_type): Support opaque types.
1877
82e5048e
GA
18782020-11-20 Martin Sebor <msebor@redhat.com>
1879
1880 PR middle-end/97879
1881 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1882
18832020-11-20 Jakub Jelinek <jakub@redhat.com>
1884
1885 PR other/97911
1886 * Make-lang.in (c.serial): Change from goal to a variable.
1887 (.PHONY): Drop c.serial.
1888
18892020-11-20 Martin Uecker <muecker@gwdg.de>
1890
1891 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1892
d62586ee
GA
18932020-11-19 Jakub Jelinek <jakub@redhat.com>
1894
1895 PR c/97860
1896 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1897 error_operand_p.
1898
25bb75f8
GA
18992020-11-18 Jakub Jelinek <jakub@redhat.com>
1900
1901 * Make-lang.in (c.serial): New goal.
1902 (.PHONY): Add c.serial c.prev.
1903 (cc1$(exeext)): Call LINK_PROGRESS.
1904
77f67db2
GA
19052020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1906
1907 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1908 goto too.
1909 * c-typeck.c (build_asm_expr): Remove an assert checking output
1910 absence for asm goto.
1911
19122020-11-13 Jakub Jelinek <jakub@redhat.com>
1913
1914 * c-typeck.c (c_finish_omp_clauses): Don't clear
1915 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1916
19172020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1918
1919 PR objc/77404
1920 * c-parser.c (c_parser_objc_class_definition): Pass the
1921 location of the class name to the interface declaration.
1922
bb622641
GA
19232020-11-10 Strager Neds <strager.nds@gmail.com>
1924
1925 * c-decl.c (merge_decls): Use new overload of
1926 set_decl_section_name.
1927
19282020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1929
1930 * c-parser.c (c_parser_omp_target_data): Add use of
1931 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1932 handled map clause kind.
1933 (c_parser_omp_target_enter_data): Likewise.
1934 (c_parser_omp_target_exit_data): Likewise.
1935 (c_parser_omp_target): Likewise.
1936 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1937 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1938 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1939 same struct field access to co-exist on OpenMP construct.
1940
2da7ee05
GA
19412020-11-07 Martin Uecker <muecker@gwdg.de>
1942
1943 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1944 (c_parser_all_labels): Likewise.
1945
44cab2d8
GA
19462020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1947
1948 * c-parser.c (c_parser_objc_at_property_declaration):
1949 Improve parsing fidelity. Associate better location info
1950 with @property attributes. Clean up the interface to
1951 objc_add_property_declaration ().
1952
19532020-11-06 Nathan Sidwell <nathan@acm.org>
1954
1955 * c-decl.c (diagnose_mismatched_decls): Rename
1956 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1957 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1958 (collect_source_refs): Likewise.
1959 * c-typeck.c (inform_declaration, inform_for_arg)
1960 (convert_for_assignment): Likewise.
1961
19622020-11-06 Tobias Burnus <tobias@codesourcery.com>
1963
1964 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1965 OpenACC matching.
1966 (c_parser_omp_construct): Update call.
1967
35c125cb
GA
19682020-11-04 Jakub Jelinek <jakub@redhat.com>
1969
1970 PR c++/97670
1971 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1972 find underlying decl to clear in the aligned_head bitmap.
1973
19742020-11-04 Joseph Myers <joseph@codesourcery.com>
1975
1976 * c-decl.c (handle_nodiscard_attribute): New.
1977 (std_attribute_table): Add nodiscard.
1978 * c-parser.c (c_parser_std_attribute): Expect argument to
1979 nodiscard attribute to be a string. Do not special-case ignoring
1980 nodiscard.
1981 * c-typeck.c (maybe_warn_nodiscard): New.
1982 (build_compound_expr, emit_side_effect_warnings): Call
1983 maybe_warn_nodiscard.
1984 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1985 emit_side_effect_warnings if warn_unused_result.
1986
4f0606fe
GA
19872020-10-29 Asher Gordon <AsDaGo@posteo.net>
1988
1989 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1990 with XDELETE.
1991 (finish_init): Likewise.
1992 (pop_init_level): Likewise.
1993
e93aae4a
GA
19942020-10-28 Joseph Myers <joseph@codesourcery.com>
1995
1996 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1997 error_at for omitted parameter name.
1998
19992020-10-28 Jakub Jelinek <jakub@redhat.com>
2000
2001 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2002 (c_parser_omp_clause_allocate): New function.
2003 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2004 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2005 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2006 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2007 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2008 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2009 PRAGMA_OMP_CLAUSE_ALLOCATE.
2010 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2011
89bb01e7
GA
20122020-10-27 Joseph Myers <joseph@codesourcery.com>
2013
2014 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2015 standard attributes.
2016
efe71fcc
GA
20172020-10-23 Marek Polacek <polacek@redhat.com>
2018
2019 PR c++/91741
2020 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2021 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2022 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2023 * c-tree.h (char_type_p): Declare.
2024 * c-typeck.c (char_type_p): No longer static.
2025
20262020-10-23 Martin Sebor <msebor@redhat.com>
2027
2028 PR middle-end/97552
2029 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2030
2fe5b7d1
GA
20312020-09-19 Martin Sebor <msebor@redhat.com>
2032
2033 PR c/50584
2034 * c-decl.c (lookup_last_decl): Define new function.
2035 (c_decl_attributes): Call it.
2036 (start_decl): Add argument and use it.
2037 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2038 (get_parm_array_spec): Define new function.
2039 (push_parm_decl): Call get_parm_array_spec.
2040 (start_function): Call warn_parm_array_mismatch. Build attribute
2041 access and add it to current function.
2042 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2043 in forms of array parameters.
2044 * c-tree.h (start_decl): Add argument.
2045
20462020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2047
2048 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2049 with...
2050 (in_statement): New.
2051 (start_function): Adjust for above change.
2052 (c_push_function_context, c_pop_function_context): Likewise.
2053 * c-lang.h (struct language_function): Likewise.
2054 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2055 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2056 New.
2057 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2058 (c_parser_switch_statement): Adjust break/switch context handling
2059 and calls to renamed functions.
2060 (c_parser_while_statement): Adjust break/switch context handling and
2061 build a WHILE_STMT.
2062 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2063 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2064 (c_parser_omp_for_loop): Adjust break/switch context handling.
2065 * c-tree.h (c_break_label, c_cont_label): Delete.
2066 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2067 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2068 (in_statement, switch_statement_break_seen_p): Declare.
2069 (c_start_case, c_finish_case): Renamed to...
2070 (c_start_switch, c_finish_switch).
2071 (c_finish_bc_stmt): Adjust arguments.
2072 * c-typeck.c (build_function_call_vec): Don't try to print
2073 statements with %qE format.
2074 (struct c_switch): Rename switch_expr field to switch_stmt.
2075 Add break_stmt_seen_p field.
2076 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2077 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2078 (do_case): Update for changes to struct c_switch.
2079 (c_finish_case): Rename to c_finish_switch. Update for changes to
2080 struct c_switch and change of representation from SWITCH_EXPR to
2081 SWITCH_STMT.
2082 (c_finish_loop): Delete.
2083 (c_finish_bc_stmt): Update to reflect changes to break/continue
2084 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2085 of a GOTO_EXPR except for objc foreach loops.
2086
e1a4a8a0
GA
20872020-09-01 Jakub Jelinek <jakub@redhat.com>
2088
2089 PR c++/96867
2090 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2091 only on PARM_DECLs.
2092
8f7ea26a
GA
20932020-08-28 Martin Sebor <msebor@redhat.com>
2094
2095 PR c/96596
2096 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2097 argument type.
2098
8b394f01
GA
20992020-08-27 Martin Liska <mliska@suse.cz>
2100
2101 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2102 growth function to true.
2103
db0f6efe
GA
21042020-08-25 Tobias Burnus <tobias@codesourcery.com>
2105
2106 PR c/96678
2107 * c-typeck.c (handle_omp_array_sections_1): Talk about
2108 array function parameter in the error message.
2109
5c265693
GA
21102020-08-18 Jakub Jelinek <jakub@redhat.com>
2111
2112 PR c/96571
2113 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2114 to int, holding index of the match. Call mark_exp_read on the selector
2115 expression and on expressions other than the selected one.
2116
4967ca2f
GA
21172020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2118
2119 PR c/96377
2120 * c-typeck.c (process_init_element): Split test for whether to
2121 recurse into a record, union or array into...
2122 (initialize_elementwise_p): ...this new function. Don't recurse
2123 into a vector type if the initialization value is also a vector.
2124
48cc2e46
GA
21252020-07-31 Richard Biener <rguenther@suse.de>
2126
2127 PR debug/96383
2128 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2129 Define to c_common_finalize_early_debug.
2130
3ea9abca
GA
21312020-07-22 Tobias Burnus <tobias@codesourcery.com>
2132
2133 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2134 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2135 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2136
30430061
GA
21372020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2138
2139 PR target/95237
2140 * c-decl.c (finish_decl): Call target hook
2141 lower_local_decl_alignment to lower local decl alignment.
2142
3f8ca9cb
GA
21432020-07-09 Julian Brown <julian@codesourcery.com>
2144 Thomas Schwinge <thomas@codesourcery.com>
2145
2146 PR middle-end/95270
2147 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2148 for standalone attach/detach clauses.
2149
a82c4c4c 21502020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2151
2152 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2153 set, warn for conversion between pointers that point to incompatible
2154 scalar storage orders.
2155
f60ee68d
GA
21562020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2157
2158 * c-parser.c (c_parser_statement_after_labels): Pass correct
2159 parameters to c_parser_do_statement.
2160
56638b9b
GA
21612020-06-16 Jakub Jelinek <jakub@redhat.com>
2162
2163 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2164 c_in_omp_for.
2165 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2166 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2167 c_finish_omp_for.
2168 * c-tree.h (c_in_omp_for): Declare.
2169 * c-typeck.c (c_in_omp_for): Define.
2170 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2171 (digest_init): Likewise.
2172 (build_binary_op): Likewise.
2173
21742020-06-16 Jakub Jelinek <jakub@redhat.com>
2175
2176 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2177 from kind by comma rather than colon.
2178
1a59f3db
GA
21792020-06-05 Mark Wielaard <mark@klomp.org>
2180
2181 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2182 an undeclared builtin, then add a fixit header hint, if found.
2183 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2184 warning_at about implicit builtin declaration type mismatch.
2185
9a5b7438
GA
21862020-06-03 Mark Wielaard <mark@klomp.org>
2187
2188 * c-parser.c (struct c_parser): Add seen_string_literal
2189 bitfield.
2190 (c_parser_consume_token): Reset seen_string_literal.
2191 (c_parser_error_richloc): Add name_hint if seen_string_literal
2192 and next token is a CPP_NAME and we have a missing header
2193 suggestion for the name.
2194 (c_parser_string_literal): Set seen_string_literal.
2195
21962020-06-03 Mark Wielaard <mark@klomp.org>
2197
2198 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2199 scope with matching_parens after CPP_OPEN_PAREN.
2200
22012020-06-03 Tobias Burnus <tobias@codesourcery.com>
2202
2203 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2204
53ffb43a
GA
22052020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2206
2207 * Make-lang.in: Remove extra slash.
2208
8f66f175
ML
22092020-05-19 Martin Liska <mliska@suse.cz>
2210
2211 * c-parser.c: Fix typo.
2212
49ddde69
JJ
22132020-05-14 Jakub Jelinek <jakub@redhat.com>
2214
2215 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2216
eb72dc66
RB
22172020-05-07 Richard Biener <rguenther@suse.de>
2218
2219 PR middle-end/94703
2220 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2221 DECL_GIMPLE_REG_P.
2222
bf915591
JJ
22232020-04-30 Jakub Jelinek <jakub@redhat.com>
2224
2225 PR c/94842
2226 * c-decl.c (set_labels_context_r): In addition to context-less
2227 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2228 parent function if any.
2229 (store_parm_decls): Adjust comment.
2230
e1113ffb
JJ
22312020-04-19 Jakub Jelinek <jakub@redhat.com>
2232
2233 PR objc/94637
2234 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2235 two CPP_COLON tokens.
2236
2e389749
JJ
22372020-04-17 Jakub Jelinek <jakub@redhat.com>
2238
2239 PR other/94629
2240 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2241 to data.clauses.
2242
2dc9294c
JJ
22432020-04-15 Jakub Jelinek <jakub@redhat.com>
2244
2245 PR c/94593
2246 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2247 requires directive when not at file scope.
2248
13e41d8b
TB
22492020-04-08 Tobias Burnus <tobias@codesourcery.com>
2250
2251 PR middle-end/94120
2252 * c-decl.c (c_check_in_current_scope): New function.
2253 * c-tree.h (c_check_in_current_scope): Declare it.
2254 * c-parser.c (c_parser_oacc_declare): Add check that variables
2255 are declared in the same scope as the directive. Fix handling
2256 of namespace vars.
2257
4df50a05
JJ
22582020-04-07 Jakub Jelinek <jakub@redhat.com>
2259
2260 PR c++/94512
2261 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2262 if c_parser_omp_master succeeded.
2263
5db9e893
JJ
22642020-03-23 Jakub Jelinek <jakub@redhat.com>
2265
2266 PR gcov-profile/94029
2267 PR c/94239
2268 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2269 the function_start_locus location. Don't do that afterwards for the
2270 __GIMPLE body parsing.
2271
9def91e9
JJ
22722020-03-19 Jakub Jelinek <jakub@redhat.com>
2273
2274 PR gcov-profile/94029
2275 * c-tree.h (finish_function): Add location_t argument defaulted to
2276 input_location.
2277 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2278 set it to the locus of closing } if non-NULL.
2279 (c_parser_compound_statement_nostart): Return locus of closing }.
2280 (c_parser_parse_rtl_body): Likewise.
2281 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2282 finish_function.
2283 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2284 input_location to set function_end_locus.
2285
046c5890
JJ
22862020-03-17 Jakub Jelinek <jakub@redhat.com>
2287
2288 PR c/94172
2289 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2290 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2291 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2292 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2293 ENUMERAL_TYPEs.
2294 (finish_incomplete_vars): New function, moved from finish_struct. Use
2295 relayout_decl instead of layout_decl.
2296 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2297 being TYPE_VFIELD. Use finish_incomplete_vars.
2298 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2299 finish_incomplete_vars.
2300 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2301 also on ENUMERAL_TYPEs.
2302
c015ff8c
JJ
23032020-03-16 Jakub Jelinek <jakub@redhat.com>
2304
2305 PR c/94179
2306 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2307
f2e9fe5f
MS
23082020-03-13 Martin Sebor <msebor@redhat.com>
2309
2310 PR c/94040
2311 * c-decl.c (builtin_structptr_type_count): New constant.
2312 (match_builtin_function_types): Reject decls that are incompatible
2313 in types pointed to by pointers.
2314 (diagnose_mismatched_decls): Adjust comments.
2315
c9d70946
JM
23162020-03-05 Joseph Myers <joseph@codesourcery.com>
2317
2318 PR c/93577
2319 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2320 empty when initialized type is error_mark_node.
2321 (set_designator, process_init_element): Ignore initializers for
2322 elements of a variable-size type or of error_mark_node.
2323
726e292d
MS
23242020-03-01 Martin Sebor <msebor@redhat.com>
2325
2326 PR middle-end/93926
2327 * c-decl.c (types_close_enough_to_match): New function.
2328 (match_builtin_function_types):
2329 (diagnose_mismatched_decls): Add missing inform call to a warning.
2330
a499c2f8
MS
23312020-03-01 Martin Sebor <msebor@redhat.com>
2332
2333 PR c/93812
2334 * c-typeck.c (build_functype_attribute_variant): New function.
2335 (composite_type): Call it.
2336
9c3da8cc
JJ
23372020-02-25 Jakub Jelinek <jakub@redhat.com>
2338
2339 PR other/93912
2340 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2341 Rename last argument from probablity to probability.
2342
bacdd5e9
JJ
23432020-02-13 Jakub Jelinek <jakub@redhat.com>
2344
2345 PR c/93576
2346 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2347 *expr if it has side effects.
2348
f9eb0973
JL
23492020-01-30 Jeff Law <law@redhat.com>
2350
2351 PR c/88660
2352 * c-parser.c (c_parser_switch_statement): Make sure to request
2353 marking the switch expr as used.
2354
ac68e287
JM
23552020-01-22 Joseph Myers <joseph@codesourcery.com>
2356
2357 PR c/93348
2358 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2359 argument with integer operands.
2360
852f0ae8
KK
23612020-01-16 Kerem Kat <keremkat@gmail.com>
2362
2363 PR c/92833
2364 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2365 to support 4 available tokens.
2366
e2346a33
JM
23672020-01-15 Joseph Myers <joseph@codesourcery.com>
2368
2369 PR c/93072
2370 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2371 determine whether to set DECL_CONTEXT.
2372
3d77686d
JM
23732020-01-13 Joseph Myers <joseph@codesourcery.com>
2374
2375 PR c/93241
2376 * c-typeck.c (build_c_cast): Check for expressions with integer
2377 operands that can occur in an unevaluated part of an integer
2378 constant expression and call note_integer_operands as needed.
2379
f74c4b2c
RB
23802019-01-08 Richard Biener <rguenther@suse.de>
2381
2382 PR middle-end/93199
2383 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2384 permanently.
2385
8d9254fc
JJ
23862020-01-01 Jakub Jelinek <jakub@redhat.com>
2387
2388 Update copyright years.
2389
39292e25
EB
23902019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2391
2392 * c-decl.c (collect_source_ref_cb): Delete.
2393 (for_each_global_decl): Rename into...
2394 (collect_source_refs): ...this. Call collect_source_ref directly.
2395 (c_parse_final_cleanups): Always call collect_source_ref on the main
2396 input filename.
2397
519d7496
JB
23982019-12-19 Julian Brown <julian@codesourcery.com>
2399 Cesar Philippidis <cesar@codesourcery.com>
2400
2401 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2402 detach clauses.
2403 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2404 Allow deref (->) in variable lists if true.
2405 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2406 Pass to c_parser_omp_variable_list.
2407 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2408 call to c_parser_omp_variable_list.
2409 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2410 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2411 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2412 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2413 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2414 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2415 and detach. Support deref.
2416 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2417 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2418 (c_oacc_check_attachments): New function.
2419 (c_finish_omp_clauses): Check attach/detach arguments for being
2420 pointers using above. Support deref.
2421
a6163563
JB
24222019-12-19 Julian Brown <julian@codesourcery.com>
2423 Maciej W. Rozycki <macro@codesourcery.com>
2424 Tobias Burnus <tobias@codesourcery.com>
2425 Thomas Schwinge <thomas@codesourcery.com>
2426
2427 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2428 (c_parser_oacc_data_clause): Likewise.
2429 (c_parser_oacc_all_clauses): Likewise.
2430 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2431 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2432 PRAGMA_OACC_CLAUSE_NO_CREATE.
2433 * c-typeck.c (handle_omp_array_sections): Support
2434 GOMP_MAP_NO_ALLOC.
2435
d68f5d45
DM
24362019-12-09 David Malcolm <dmalcolm@redhat.com>
2437
2438 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2439 Replace label_text ctor calls.
2440
4691bf46
JM
24412019-12-04 Joseph Myers <joseph@codesourcery.com>
2442
2443 PR c/36941
2444 PR c/88827
2445 * c-typeck.c (convert_lvalue_to_rvalue): Call
2446 require_complete_type for arguments not of void types.
2447 (build_indirect_ref): Do not diagnose dereferencing pointers to
2448 incomplete types.
2449 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2450
85d11957
JM
24512019-12-03 Joseph Myers <joseph@codesourcery.com>
2452
2453 PR c/88704
2454 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2455 old-style parameter definitions.
2456
4569f8b3
SL
24572019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2458
2459 PR target/92499
2460
2461 * c-decl.c (flexible_array_type_p): Move to common code.
2462
65ef05d0
RS
24632019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2464
2465 * c-decl.c (start_decl): Allow initialization of variables whose
2466 size is a POLY_INT_CST.
2467 (finish_decl): Use verify_type_context to check whether the target
2468 allows variables with a particular type to have static or thread-local
2469 storage duration. Don't raise a second error if such variables do
2470 not have a constant size.
2471 (grokdeclarator): Use verify_type_context to check whether the
2472 target allows fields or array elements to have a particular type.
2473 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2474 the target allows pointer difference for the types involved.
2475 (build_unary_op): Likewise for pointer increment and decrement.
2476
34b43828
JM
24772019-11-29 Joseph Myers <joseph@codesourcery.com>
2478
2479 * c-parser.c (struct c_parser): Add members raw_tokens and
2480 raw_tokens_used.
2481 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2482 using previously-lexed raw tokens.
2483 (c_parser_peek_nth_token_raw)
2484 (c_parser_check_balanced_raw_token_sequence): New functions.
2485 (c_parser_nth_token_starts_std_attributes): Use
2486 c_parser_check_balanced_raw_token_sequence for Objective-C.
2487
5b8d9367
JM
24882019-11-25 Joseph Myers <joseph@codesourcery.com>
2489
2490 PR c/91985
2491 * c-decl.c (finish_declspecs): Use int instead of decimal
2492 floating-point types if decimal floating-point not supported.
2493
1723e1be
JM
24942019-11-25 Joseph Myers <joseph@codesourcery.com>
2495
2496 * c-tree.h (struct c_declarator): Use a structure for id member.
2497 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2498 declarators at the start, not when handling individual declarators
2499 later. Use u.id.id instead of u.id.
2500 (grokfield): Use u.id.id instead of u.id.
2501 (build_id_declarator): Set u.id.id and u.id.attrs.
2502 (finish_declspecs): Handle postfix attributes in case of typedef
2503 name or typeof used.
2504 * c-parser.c (c_parser_direct_declarator)
2505 (c_parser_direct_declarator_inner): Place declarator for
2506 attributes inside that for function or array, not outside. Set
2507 u.id.attrs for identifiers.
2508 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2509 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2510 instead of u.id.
2511
bdaf8be1
JJ
25122019-11-22 Jakub Jelinek <jakub@redhat.com>
2513
2514 PR c/90677
2515 * c-decl.c (identifier_global_tag): Define.
2516
3e00ba47
RB
25172019-11-20 Richard Biener <rguenther@suse.de>
2518
2519 PR c/92088
2520 * c-decl.c (grokdeclarator): Prevent inlining of nested
2521 function with VLA arguments.
2522
8c5b727a
JM
25232019-11-20 Joseph Myers <joseph@codesourcery.com>
2524
2525 * c-decl.c (c_warn_type_attributes): New function.
2526 (groktypename, grokdeclarator, finish_declspecs): Call
2527 c_warn_type_attributes before applying attributes to types.
2528 * c-tree.h (c_warn_type_attributes): Declare.
2529
192961ff
JM
25302019-11-19 Joseph Myers <joseph@codesourcery.com>
2531
2532 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2533 standard attributes.
2534 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2535 pedwarn for unknown standard attributes and return error_mark_node
2536 for them.
2537
20a38017
MM
25382019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2539
2540 * c-parser.c (c_parser_parse_rtl_body): Always call
2541 run_rtl_passes, even if startwith pass is not provided.
2542
d5fbe5e0
JM
25432019-11-15 Joseph Myers <joseph@codesourcery.com>
2544
2545 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2546 duplicate standard attributes.
2547
97cc1187
JM
25482019-11-15 Joseph Myers <joseph@codesourcery.com>
2549
2550 * c-decl.c (std_attribute_table): Add maybe_unused.
2551
f8aea5e3
JM
25522019-11-15 Joseph Myers <joseph@codesourcery.com>
2553
2554 * c-decl.c (std_attribute_table): Add fallthrough.
2555 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2556 attribute at top level.
2557
2cc94aa8
JM
25582019-11-15 Joseph Myers <joseph@codesourcery.com>
2559
2560 * c-decl.c (std_attribute_table): New.
2561 (c_init_decl_processing): Register attributes from
2562 std_attribute_table.
2563 * c-parser.c (c_parser_attribute_arguments): Add arguments
2564 require_string and allow_empty_args. All callers changed.
2565 (c_parser_std_attribute): Set require_string argument for
2566 "deprecated" attribute.
2567
7c5890cc
JM
25682019-11-14 Joseph Myers <joseph@codesourcery.com>
2569
2570 * c-parser.c (c_parser_postfix_expression)
2571 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2572 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2573
e8738f4e
RS
25742019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2575
2576 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2577 of build_same_sized_truth_vector_type.
2578 (build_vec_cmp): Likewise.
2579
b2417b59
JJ
25802019-11-14 Jakub Jelinek <jakub@redhat.com>
2581
bedb7f04
JJ
2582 * c-parser.c (c_parser_omp_context_selector): Don't require score
2583 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2584 negative score.
2585
b2417b59
JJ
2586 * c-parser.c (c_parser_omp_context_selector): Rename
2587 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2588 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2589 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2590 and string literals.
2591
4e03c3a7
JM
25922019-11-14 Joseph Myers <joseph@codesourcery.com>
2593
2594 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2595 ctsk_tagfirstref_attrs.
2596 (struct c_declspecs): Update description of attrs. Add
2597 postfix_attrs and non_std_attrs_seen_p. Increase size of
2598 typespec_kind bit-field.
2599 (c_warn_unused_attributes): New declaration.
2600 (parser_xref_tag): Update prototype.
2601 * c-decl.c (c_warn_unused_attributes): New function.
2602 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2603 ctsk_tagref_attrs. Handle attribute declarations.
2604 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2605 (grokdeclarator): Handle standard attributes.
2606 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2607 attributes to incomplete type reference.
2608 (xref_tag): Update call to parser_xref_tag.
2609 (declspecs_add_addrspace, declspecs_add_type)
2610 (declspecs_add_scspec, declspecs_add_attrs): Set
2611 non_std_attrs_seen_p.
2612 (finish_declspecs): Apply postfix standard attributes to type.
2613 * c-parser.c (c_token_starts_declspecs)
2614 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2615 (c_parser_next_tokens_start_declaration): Update comments.
2616 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2617 parser->tokens[2] to parser->tokens[1].
2618 (c_parser_nth_token_starts_std_attributes)
2619 (c_parser_std_attribute_specifier_sequence): New functions.
2620 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2621 attrs. All callers changed. Handle standard attributes.
2622 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2623 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2624 All callers changed.
2625 (c_parser_declspecs): Add arguments start_std_attr_ok and
2626 end_std_attr_ok. All callers changed. Handle standard
2627 attributes.
2628 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2629 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2630 (c_parser_compound_statement_nostart, c_parser_all_labels)
2631 (c_parser_label, c_parser_statement, c_parser_for_statement):
2632 Handle standard attributes.
2633 * c-parser.h (c_parser_declspecs): Update prototype.
2634 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2635 c_parser_declspecs.
2636
0c29cac4
ML
26372019-11-12 Martin Liska <mliska@suse.cz>
2638
2639 * gimple-parser.c: Do not include params.h.
2640
028d4092
ML
26412019-11-12 Martin Liska <mliska@suse.cz>
2642
2643 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2644 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2645 macro.
2646
62aee289
MR
26472019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2648 Frederik Harwath <frederik@codesourcery.com>
2649
2650 gcc/c/
2651 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2652 (c_parser_oacc_kernels_parallel): Rename function to...
2653 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2654 (c_parser_omp_construct): Update accordingly.
2655
2656
7cec9588
JJ
26572019-11-11 Jakub Jelinek <jakub@redhat.com>
2658
2659 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2660 without corresponding end declare target.
2661
f486280c
RS
26622019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2663
2664 * c-convert.c (convert): Only handle vector conversions if one of
2665 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2666 allows it.
2667 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2668 vectors satisfy gnu_vector_type_p.
2669 (build_unary_op): Only allow unary operators to be applied to
2670 vectors if they satisfy gnu_vector_type_p.
2671 (digest_init): Only allow by-element initialization of vectors
2672 if they satisfy gnu_vector_type_p.
2673 (really_start_incremental_init): Likewise.
2674 (push_init_level): Likewise.
2675 (pop_init_level): Likewise.
2676 (process_init_element): Likewise.
2677 (build_binary_op): Only allow binary operators to be applied to
2678 vectors if they satisfy gnu_vector_type_p.
2679
017c6491
JM
26802019-11-08 Joseph Myers <joseph@codesourcery.com>
2681
2682 * c-decl.c (grokparms): Convert () in a function definition to
2683 (void) for C2x.
2684 (store_parm_decls_oldstyle): Pedwarn for C2x.
2685 (store_parm_decls): Update comment about () not generating a
2686 prototype.
2687
c01bd174
JM
26882019-11-07 Joseph Myers <joseph@codesourcery.com>
2689
2690 * c-parser.c (c_parser_attribute_arguments): New function.
2691 Factored out of c_parser_gnu_attribute.
2692 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2693 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2694 (c_parser_std_attribute_specifier): New functions.
2695 (c_parser_transaction_attributes): Use
2696 c_parser_std_attribute_specifier.
2697
471c5330
JM
26982019-11-07 Joseph Myers <joseph@codesourcery.com>
2699
2700 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2701 lex_joined_string and translate_strings_p.
2702 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2703 c_lex_with_flags.
2704 (c_parser_string_literal): New function.
2705 (c_parser_static_assert_declaration_no_semi): Use
2706 c_parser_string_literal. Do not set lex_untranslated_string.
2707 (c_parser_asm_string_literal): Use c_parser_string_literal.
2708 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2709 (c_parser_gnu_attributes): Set and restore translate_strings_p
2710 instead of lex_untranslated_string.
2711 (c_parser_asm_statement): Do not set lex_untranslated_string.
2712 (c_parser_asm_operands): Likewise.
2713 (c_parser_has_attribute_expression): Set and restore
2714 translate_strings_p instead of lex_untranslated_string.
2715 (c_parser_postfix_expression): Use c_parser_string_literal.
2716 (pragma_lex): Likewise.
2717 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2718 (c_parse_file): Set translate_strings_p.
2719 * gimple-parser.c (c_parser_gimple_postfix_expression)
2720 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2721 * c-parser.c (c_parser_string_literal): Declare function.
2722
d0c464d2
JJ
27232019-11-02 Jakub Jelinek <jakub@redhat.com>
2724
2725 * c-parser.c (c_finish_omp_declare_variant): Use
2726 omp_get_context_selector instead of c_omp_get_context_selector.
2727
ac2cfa6c
RS
27282019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2729
2730 * c-tree.h (c_simulate_enum_decl): Declare.
2731 * c-decl.c (c_simulate_enum_decl): New function.
2732 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2733
74078538
RS
27342019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2735
2736 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2737 * c-decl.c (c_simulate_builtin_function_decl): New function.
2738 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2739 to the above.
2740
ad1539d5
MS
27412019-10-28 Martin Sebor <msebor@redhat.com>
2742
2743 PR c/66970
2744 * c-decl.c (names_builtin_p): Define a new function.
2745
cb73e4e7
RB
27462019-10-28 Richard Biener <rguenther@suse.de>
2747
2748 PR c/92249
2749 * gimple-parser.c (c_parser_parse_gimple_body): Make
2750 current_bb the entry block initially to easier recover
2751 from errors.
2752 (c_parser_gimple_compound_statement): Adjust.
2753
135df52c
JJ
27542019-10-24 Jakub Jelinek <jakub@redhat.com>
2755
2756 * c-parser.c (c_finish_omp_declare_variant): Use
2757 omp_context_selector_matches instead of
2758 c_omp_context_selector_matches.
2759 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2760 attribute in between declare target and end declare target
2761 pragmas.
2762
783bfe5e
JM
27632019-10-15 Joseph Myers <joseph@codesourcery.com>
2764
2765 * c-parser.c (c_parser_attribute_any_word): Rename to
2766 c_parser_gnu_attribute_any_word. All callers changed.
2767 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2768 callers changed.
2769 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2770 callers changed.
2771 (c_parser_declaration_or_fndef, c_parser_declspecs)
2772 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2773 (c_parser_struct_declaration, c_parser_declarator)
2774 (c_parser_gnu_attribute, c_parser_compound_statement)
2775 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2776 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2777 attribute-related syntax productions.
2778
56898e43
RS
27792019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2780
2781 * c-objc-common.c (useful_aka_type_p): Replace with...
2782 (get_aka_type): ...this new function. Given the original type,
2783 decide which aka type to print (if any). Only look through typedefs
2784 if user_facing_original_type_p.
2785 (print_type): Update accordingly.
2786
b9424661
JJ
27872019-10-14 Jakub Jelinek <jakub@redhat.com>
2788
2789 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2790 into int NESTED, if it is 2, diagnose missing commas in between
2791 clauses.
2792 (c_parser_omp_context_selector): Pass 2 as last argument to
2793 c_parser_omp_all_clauses.
2794
20de9568
JJ
27952019-10-12 Jakub Jelinek <jakub@redhat.com>
2796
2797 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2798 For simd properties, put them directly into TREE_VALUE.
2799 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2800 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2801 add "omp declare variant base" attribute rather than
2802 "omp declare variant".
2803
fe2bc27c
JM
28042019-10-11 Joseph Myers <joseph@codesourcery.com>
2805
2806 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2807
94e7f906
JJ
28082019-10-10 Jakub Jelinek <jakub@redhat.com>
2809
2810 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2811 true, terminate processing on closing paren and don't skip to end of
2812 pragma line.
2813 (c_parser_omp_declare_simd): Handle also declare variant.
2814 (omp_construct_selectors, omp_device_selectors,
2815 omp_implementation_selectors, omp_user_selectors): New variables.
2816 (c_parser_omp_context_selector,
2817 c_parser_omp_context_selector_specification,
2818 c_finish_omp_declare_variant): New functions.
2819 (c_finish_omp_declare_simd): Handle both declare simd and
2820 declare variant.
2821 (c_parser_omp_declare): Handle declare variant.
2822
93313b94
JM
28232019-10-02 Joseph Myers <joseph@codesourcery.com>
2824
2825 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2826 CPP_COLON tokens.
2827
55879815
RS
28282019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2829
2830 * c-objc-common.c (useful_aka_type_p): New function.
2831 (print_type): Use it to decide whether an aka type is worth printing.
2832
59bc434a
JJ
28332019-09-27 Jakub Jelinek <jakub@redhat.com>
2834
2835 PR c++/88203
2836 * c-parser.c (c_parser_predefined_identifier): New function.
2837 (c_parser_postfix_expression): Use it.
2838 (c_parser_omp_variable_list): Parse predefined identifiers.
2839 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2840 in shared and firstprivate clauses, even when they are predetermined
2841 shared.
2842
c6447c20
RS
28432019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2844
2845 * c-typeck.c (build_function_call_vec): Take the original function
2846 decl as an optional final parameter. Pass all built-in calls to
2847 check_builtin_function_arguments.
2848
522da4c2
EB
28492019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2850
2851 PR c/91815
2852 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2853 of identifiers in the external scope only for variables and functions.
2854
68e2c199
PK
28552019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2856
2857 PR c/78736
2858 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2859
22f8849d
IS
28602019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2861
2862 PR pch/61250
2863 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2864 after determining that the first token is not
2865 PRAGMA_GCC_PCH_PREPROCESS.
2866
db376f45
EB
28672019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2868
2869 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2870 FUNCTION_DECL to the right value in the presence of nested declarators.
2871
4d732405
RS
28722019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2873
2874 PR middle-end/91421
2875 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2876
cb1180d5
RS
28772019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2878
2879 PR middle-end/91421
2880 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2881 of a built_in_function.
2882 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2883
77eb117f
JJ
28842019-08-10 Jakub Jelinek <jakub@redhat.com>
2885
2886 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2887 (c_parser_omp_clause_device_type): New function.
2888 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2889 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2890 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2891 diagnostics for declare target with clauses nested in clause-less
2892 declare target declaration-definition-seq.
2893 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2894
2c3b8bad
JJ
28952019-08-09 Jakub Jelinek <jakub@redhat.com>
2896
bb522e2e
JJ
2897 * c-parser.c (check_no_duplicate_clause): Simplify using
2898 omp_find_clause.
2899 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2900 directive name modifiers.
2901 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2902
2c3b8bad
JJ
2903 PR c/91401
2904 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2905 check_no_duplicate_clause call. Comment it out, instead emit a
2906 warning for duplicate dist_schedule clauses.
2907
99769e7f
RS
29082019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2909
2910 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2911
8860d270
JJ
29122019-08-08 Jakub Jelinek <jakub@redhat.com>
2913
2914 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2915 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2916 instead of generic_head to track duplicates.
2917
398e3feb
JJ
29182019-08-07 Jakub Jelinek <jakub@redhat.com>
2919
2920 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2921 (c_parser_omp_clause_use_device_addr): New function.
2922 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2923 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2924 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2925 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2926 map or use_device_* clauses.
2927 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2928 in OpenMP, require pointer type rather than pointer or array type.
2929 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2930
a28351e7
JJ
29312019-07-31 Jakub Jelinek <jakub@redhat.com>
2932
2933 PR c/91192
2934 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2935 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2936 case.
2937
6343b6bf
ML
29382019-07-25 Martin Liska <mliska@suse.cz>
2939 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2940
2941 PR c++/23383
2942 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2943
cb50701e
ML
29442019-07-25 Martin Liska <mliska@suse.cz>
2945
2946 * c-decl.c (merge_decls): Use new macros
2947 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2948
62e3e66f
RB
29492019-07-23 Richard Biener <rguenther@suse.de>
2950
2951 PR tree-optimization/83518
2952 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2953 a CFG also rebuild cgraph edges.
2954
554a530f
JJ
29552019-07-20 Jakub Jelinek <jakub@redhat.com>
2956
2957 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2958 (c_parser_omp_clause_bind): New function.
2959 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2960 (OMP_LOOP_CLAUSE_MASK): Define.
2961 (c_parser_omp_loop): New function.
2962 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2963 loop combined with parallel or teams.
2964 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2965 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2966
d119bf79
RS
29672019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2968
2969 PR c/53633
2970 * c-decl.c (finish_function): Check targetm.warn_func_return
2971 before issuing a -Wreturn-type warning.
2972
ab20d992 29732019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2974
2975 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2976 (c_parser_compound_statement): Call it.
2977
1fdd6f04
JJ
29782019-07-12 Jakub Jelinek <jakub@redhat.com>
2979
2980 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2981 (c_parser_omp_clause_order): New function.
2982 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2983 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2984 PRAGMA_OMP_CLAUSE_ORDER.
2985 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2986
8389386c
RB
29872019-07-10 Richard Biener <rguenther@suse.de>
2988
2989 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2990 _Literal (int *) &x for address literals.
2991
99b1c316
MS
29922019-07-09 Martin Sebor <msebor@redhat.com>
2993
2994 PR c++/61339
2995 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2996 to class.
2997 (field_decl_cmp): Same.
2998 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2999 * c-tree.h: Same.
3000 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3001
6c1dae73
MS
30022019-07-09 Martin Sebor <msebor@redhat.com>
3003
3004 PR c++/61339
3005 * c-decl.c: Change class-key from class to struct and vice versa
3006 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3007 * gimple-parser.c: Same.
3008
69b5279e
RB
30092019-07-01 Richard Biener <rguenther@suse.de>
3010
3011 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3012 _Literal (char *) &"foo" for address literals pointing to
3013 STRING_CSTs.
3014
ab20d992
JJ
30152019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3016
3017 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3018 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3019 C incompatibility if alternate "__intN__" form is used.
3020
1e3d475e
MS
30212019-06-24 Martin Sebor <msebor@redhat.com>
3022
3023 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3024
bf38f7e9
JJ
30252019-06-10 Jakub Jelinek <jakub@redhat.com>
3026
3027 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3028 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3029 (c_parser_omp_scan_loop_body): New function.
3030 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3031 inscan reduction clauses.
3032 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3033 non-inscan reductions on the same construct, or inscan reductions with
3034 ordered or schedule clauses, or inscan array reductions.
3035
65985d78
MS
30362019-06-05 Martin Sebor <msebor@redhat.com>
3037
3038 PR c/90737
3039 * c-typeck.c (c_finish_return): Only consider functions returning
3040 pointers as candidates for -Wreturn-local-addr.
3041
0ecf545c
MS
30422019-06-05 Martin Sebor <msebor@redhat.com>
3043
3044 * c-decl.c (start_decl): Adjust quoting and hyphenation
3045 in diagnostics.
3046 (finish_decl): Same.
3047 (finish_enum): Same.
3048 (start_function): Same.
3049 (declspecs_add_type): Same.
3050 * c-parser.c (warn_for_abs): Same.
3051 * c-typeck.c (build_binary_op): Same.
3052
e03436e7
TS
30532019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3054
b48f44bf
TS
3055 PR c/89433
3056 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3057 marked with an OpenACC 'routine' directive.
3058
5bf04509
TS
3059 PR c/89433
3060 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3061 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3062
e03436e7
TS
3063 PR c/89433
3064 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3065 clauses from "omp declare target" attribute.
3066
a9c697b8
MS
30672019-05-16 Martin Sebor <msebor@redhat.com>
3068
ab20d992
JJ
3069 * c-decl.c (start_decl): Quote keywords, operators, and
3070 types in diagnostics.
3071 (finish_decl): Same.
3072 * c-parser.c (c_parser_asm_statement): Same.
3073 (c_parser_conditional_expression): Same.
3074 (c_parser_transaction_cancel): Same.
3075 * c-typeck.c (c_common_type): Same.
3076 (build_conditional_expr): Same.
3077 (digest_init): Same.
3078 (process_init_element): Same.
3079 (build_binary_op): Same.
a9c697b8 3080
c4499192
RB
30812019-05-17 Richard Biener <rguenther@suse.de>
3082
3083 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3084 (c_parser_gimple_unary_expression): Likewise.
3085 (c_parser_gimple_parentized_ternary_expression): New function.
3086
adfe6e4b
RB
30872019-05-16 Richard Biener <rguenther@suse.de>
3088
3089 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3090 (c_parser_gimple_unary_expression): Likewise.
3091
186dabf2
RB
30922019-05-15 Richard Biener <rguenther@suse.de>
3093
3094 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3095 __BIT_FIELD_REF.
3096
1158c5b4
RB
30972019-05-14 Richard Biener <rguenther@suse.de>
3098
3099 * gimple-parser.c (c_parser_gimple_statement): Remove
3100 questionable auto-promotion to VIEW_CONVERT_EXPR.
3101 (c_parser_gimple_typespec): Split out from __MEM parsing.
3102 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3103 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3104 as __VIEW_CONVERT with -gimple.
3105
fd4485aa
ML
31062019-05-09 Martin Liska <mliska@suse.cz>
3107
3108 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3109 __MAX.
3110 (c_parser_gimple_unary_expression): Parse also binary expression
3111 __MIN and __MAX.
3112 (c_parser_gimple_parentized_binary_expression): New function.
3113
d276406a
ML
31142019-05-09 Martin Liska <mliska@suse.cz>
3115
3116 * gimple-parser.c (struct gimple_parser): Add probability.
3117 for gimple_parser_edge.
3118 (gimple_parser::push_edge): Add new argument probability.
3119 (c_parser_gimple_parse_bb_spec): Parse also probability
3120 if present.
3121 (c_parser_parse_gimple_body): Set edge probability.
3122 (c_parser_gimple_compound_statement): Consume token
3123 before calling c_parser_gimple_goto_stmt.
3124 Parse BB counts.
3125 (c_parser_gimple_statement): Pass new argument.
3126 (c_parser_gimple_goto_stmt): Likewise.
3127 (c_parser_gimple_if_stmt): Likewise.
3128 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3129 * c-parser.c (c_parser_declaration_or_fndef): Pass
3130 hot_bb_threshold argument.
3131 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3132 field.
3133 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3134
f179b64e
JJ
31352019-04-26 Jakub Jelinek <jakub@redhat.com>
3136
3137 PR debug/90197
3138 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3139 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3140 (c_parser_do_statement): Likewise.
3141 (c_parser_for_statement): Likewise. Formatting fixes.
3142 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3143 emit DEBUG_BEGIN_STMTs if needed.
3144
e7178413
JJ
31452019-04-19 Jakub Jelinek <jakub@redhat.com>
3146
c280b7ee
JJ
3147 PR c/89888
3148 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3149 (c_start_case): Don't clear it.
3150 (do_case): Adjust c_add_case_label caller.
3151 (c_finish_case): Adjust c_do_switch_warnings caller.
3152
e7178413
JJ
3153 PR c++/90108
3154 * c-decl.c (merge_decls): If remove is main variant and
3155 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3156 variant that has newdecl as TYPE_NAME if any.
3157
60a2c645
JJ
31582019-04-12 Jakub Jelinek <jakub@redhat.com>
3159
3160 PR c/89933
3161 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3162 don't try to remove it from the variant list, but instead assert
3163 it has no variants.
3164
2a82beaa
RB
31652019-04-01 Richard Biener <rguenther@suse.de>
3166
3167 PR c/71598
3168 * c-tree.h (c_get_alias_set): Declare.
3169 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3170 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3171 as the underlying integer type.
3172
bec1da64
MS
31732019-03-19 Martin Sebor <msebor@redhat.com>
3174
3175 PR tree-optimization/89688
3176 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3177 kinds of initializers.
3178
855cd9b1
JJ
31792019-03-19 Jakub Jelinek <jakub@redhat.com>
3180
3181 PR c/89734
3182 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3183 return type even if quals_used is 0. Formatting fixes.
3184
baa09dc5
RB
31852019-03-14 Richard Biener <rguenther@suse.de>
3186
3187 * c-tree.h (enum c_declspec_il): New.
3188 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3189 enum bitfield.
3190 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3191 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3192 (c_parser_declspecs): Adjust.
3193 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3194 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3195 and bitmap.h.
3196 (struct gimple_parser): New.
3197 (gimple_parser::push_edge): New method.
3198 (c_parser_gimple_parse_bb_spec): New helper.
3199 (c_parser_parse_gimple_body): Get start pass and IL specification.
3200 Initialize SSA and CFG.
3201 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3202 Build a gimple_parser parsing state and pass it along.
3203 (c_parser_gimple_statement): Change intermittend __PHI internal
3204 function argument for the edge.
3205 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3206 (c_parser_gimple_goto_stmt): Record edges to build.
3207 (c_parser_gimple_if_stmt): Likewise.
3208 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3209 (c_parser_gimple_or_rtl_pass_list): Likewise.
3210
a3f9f006
ML
32112019-03-11 Martin Liska <mliska@suse.cz>
3212
3213 * c-decl.c (check_for_loop_decls): Wrap an option name
3214 in a string format message and fix GNU coding style.
3215 * c-parser.c (c_parser_declspecs): Likewise.
3216
1db01ff9
JJ
32172019-03-08 Jakub Jelinek <jakub@redhat.com>
3218
3219 PR tree-optimization/89550
3220 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3221 returned true.
3222 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3223 or warning returned true.
3224
66dcb747
JJ
32252019-02-28 Jakub Jelinek <jakub@redhat.com>
3226
3227 PR c/89525
3228 * c-typeck.c (convert_arguments): Call inform_declaration only if
3229 the previous warning_at call returned true.
3230
2263c9f2
TS
32312019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3232
3233 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3234 parameter. Adjust all users.
3235 (c_parser_oacc_simple_clause): Replace parser with loc formal
3236 parameter. Adjust all users.
3237
ab20d992 32382019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
3239
3240 PR c/87924
3241 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3242 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3243
5f88ba10
JJ
32442019-02-15 Jakub Jelinek <jakub@redhat.com>
3245
3246 PR c/89340
3247 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3248 before c_decl_attributes rather than after it.
3249
cfc30fd1
JJ
32502019-02-06 Jakub Jelinek <jakub@redhat.com>
3251
3252 PR c/89211
3253 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3254 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3255 instead of 3 nested ifs.
3256
fbe83e6b
JM
32572019-02-06 Joseph Myers <joseph@codesourcery.com>
3258
3259 PR c/88584
3260 * c-decl.c (finish_decl): Do not complete array types for arrays
3261 with external linkage not at file scope.
3262
f461f938
RB
32632019-02-05 Richard Biener <rguenther@suse.de>
3264
3265 PR c/88606
3266 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3267 all type variants when not supported.
3268
fe509359
JJ
32692019-01-30 Jakub Jelinek <jakub@redhat.com>
3270
3271 PR c/89061
3272 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3273 * c-decl.c (decl_jump_unsafe): Return false for
3274 C_DECL_COMPOUND_LITERAL_P decls.
3275 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3276
6a335b96
JJ
32772019-01-29 Jakub Jelinek <jakub@redhat.com>
3278
f4b7e754
JJ
3279 PR c/89045
3280 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3281 scope.
3282
6a335b96
JJ
3283 PR c/86125
3284 * c-decl.c (last_fileptr_type): Remove.
3285 (last_structptr_types): New variable.
3286 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3287 {old,new}rettype instead of the types themselves. Assert
3288 last_structptr_types array has the same number of elements
3289 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3290 argument oldtype and newtype. Instead of handling
3291 just fileptr_type_node specially, handle all builtin_structptr_types
3292 pointer nodes. Formatting fix.
3293
d8b5a1a0
MS
32942019-01-24 Martin Sebor <msebor@redhat.com>
3295
3296 PR c/86125
3297 PR c/88886
3298 PR middle-end/86308
3299 * c-decl.c (match_builtin_function_types): Add arguments.
3300 (diagnose_mismatched_decls): Diagnose mismatched declarations
3301 of built-ins more strictly.
3302
e21c4491
JJ
33032019-01-24 Jakub Jelinek <jakub@redhat.com>
3304
3305 PR c++/88976
3306 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3307 on #pragma omp cancel with different modifiers.
3308
420183d9
L
33092019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3310
3311 PR c/51628
3312 PR c/88664
3313 * c-typeck.c (convert_for_assignment): Upate the
3314 warn_for_address_or_pointer_of_packed_member call.
3315
17ad43dd
TH
33162019-01-16 Tom Honermann <tom@honermann.net>
3317 Jason Merrill <jason@redhat.com>
3318
3319 * c-typeck.c (digest_init): Revised the error message produced for
3320 ill-formed cases of array initialization with a string literal.
3321 (error_init): Make variadic.
3322
5f07d78a
JJ
33232019-01-12 Jakub Jelinek <jakub@redhat.com>
3324
3325 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3326
c4581bbf
JJ
33272019-01-07 Jakub Jelinek <jakub@redhat.com>
3328
3329 PR c/88701
3330 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3331 if current_function_decl is non-NULL.
3332
65c5b1eb
JM
33332019-01-07 Joseph Myers <joseph@codesourcery.com>
3334
3335 PR c/88720
3336 PR c/88726
3337 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3338 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3339 functions declared but never defined only for external scope, not
3340 for other scopes.
3341
d8fcab68
JJ
33422019-01-07 Jakub Jelinek <jakub@redhat.com>
3343
3344 PR c++/85052
3345 * c-parser.c (c_parser_postfix_expression): Parse
3346 __builtin_convertvector.
3347
a5544970
JJ
33482019-01-01 Jakub Jelinek <jakub@redhat.com>
3349
3350 Update copyright years.
3351
da77eace
L
33522018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3353
3354 PR c/51628
3355 * c-typeck.c (convert_for_assignment): Call
3356 warn_for_address_or_pointer_of_packed_member.
3357
1edf8866
SB
33582018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3359
3360 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3361 a more specific error message (instead of just falling through).
3362
db4fd626
SB
33632018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3364
3365 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3366 asm qualifier is first seen; use that to give nicer "duplicate asm
3367 qualifier" messages. Delete 'quals" variable, instead pass the
3368 "is_volatile_ flag to build_asm_stmt directly.
3369 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3370 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3371
9c9cfcbb
SB
33722018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3373
3374 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3375 "done" boolean variable.
3376
a14feb3c
DM
33772018-12-19 David Malcolm <dmalcolm@redhat.com>
3378
3379 PR c++/87504
3380 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3381 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3382 (build_binary_op): Use struct op_location_t and
3383 class binary_op_rich_location.
3384
6d939173
JJ
33852018-12-11 Jakub Jelinek <jakub@redhat.com>
3386
3387 PR sanitizer/88426
3388 * c-convert.c (convert): Call c_fully_fold before calling
3389 ubsan_instrument_float_cast.
3390
b7055028
SB
33912018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3392
3393 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3394 setting "quals".
3395
5b76e75f
SB
33962018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3397
3398 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3399 after asm. Pass a flag for it to build_asm_expr.
3400 * c-tree.h (build_asm_expr): Update declaration.
3401 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3402 set ASM_INLINE_P.
3403
30bd42b9
SB
34042018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3405
3406 PR inline-asm/55681
3407 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3408 combination of volatile and goto, in any order, without repetitions.
3409
9df6c0e4
JB
34102018-12-04 James Norris <jnorris@codesourcery.com>
3411 Cesar Philippidis <cesar@codesourcery.com>
3412 Julian Brown <julian@codesourcery.com>
3413
3414 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3415 code.
3416
f44697b7
RB
34172018-11-30 Richard Biener <rguenther@suse.de>
3418
3419 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3420 _Literal (type) { ... } as empty aggregate or vector constructor.
3421
550dfbdc
MS
34222018-11-29 Martin Sebor <msebor@redhat.com>
3423
3424 PR c/88091
3425 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3426 (convert_arguments): Add comments. Pass additional argument to
3427 the function above.
3428
673670da
MS
34292018-11-29 Martin Sebor <msebor@redhat.com>
3430
3431 PR c/88172
3432 PR testsuite/88208
3433 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3434
db1d09b0
MS
34352018-11-23 Martin Sebor <msebor@redhat.com>
3436
3437 PR testsuite/88098
3438 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3439 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3440
98f08eb8
MS
34412018-11-20 Martin Sebor <msebor@redhat.com>
3442
3443 * c-parser.c (c_parser_has_attribute_expression): New function.
3444 (c_parser_attribute): New function.
3445 (c_parser_attributes): Move code into c_parser_attribute.
3446 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3447
cd5da983
MS
34482018-11-15 Martin Sebor <msebor@redhat.com>
3449
3450 PR c/83656
3451 * c-decl.c (header_for_builtin_fn): Declare.
3452 (diagnose_mismatched_decls): Diagnose declarations of built-in
3453 functions without a prototype.
3454 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3455 (convert_argument): Same.
3456 (convert_arguments): Factor code out into convert_argument.
3457 Detect mismatches between built-in formal arguments in calls
3458 to built-in without prototype.
3459 (build_conditional_expr): Same.
3460 (type_or_builtin_type): New function.
3461 (convert_for_assignment): Add argument. Conditionally issue
3462 warnings instead of errors for mismatches.
3463
620e594b
DM
34642018-11-13 David Malcolm <dmalcolm@redhat.com>
3465
3466 * c-decl.c: Replace "source_location" with "location_t".
3467 * c-tree.h: Likewise.
3468 * c-typeck.c: Likewise.
3469 * gimple-parser.c: Likewise.
3470
3179ebae
JJ
34712018-11-09 Jakub Jelinek <jakub@redhat.com>
3472
81a227c6
JJ
3473 * c-parser.c (c_parser_omp_clause_final): Use
3474 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3475 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3476 parsing instead of c_parser_paren_condition.
3477 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3478 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3479 c_fully_fold instead of c_parser_condition.
3480 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3481 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3482 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3483 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3484 c_parser_expr_no_commas instead of c_parser_expression.
3485
98c91c56
JJ
3486 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3487 reduction clause with inscan modifier.
3488
3179ebae
JJ
3489 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3490 clauses other than atomic_default_mem_order.
3491
28567c40
JJ
34922018-11-08 Jakub Jelinek <jakub@redhat.com>
3493
3494 * c-parser.c: Include memmode.h.
3495 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3496 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3497 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3498 task_reduction clauses.
3499 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3500 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3501 section, or lvalue assignment expression.
3502 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3503 (c_parser_omp_clause_lastprivate): Parse optional
3504 conditional: modifier.
3505 (c_parser_omp_clause_hint): Require constant integer expression rather
3506 than just integer expression.
3507 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3508 clause.
3509 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3510 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3511 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3512 functions.
3513 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3514 iterators. Parse mutexinoutset and depobj kinds.
3515 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3516 callers.
3517 (c_parser_omp_all_clauses): Likewise. Handle
3518 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3519 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3520 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3521 default memory order from requires directive if any. Adjust
3522 c_finish_omp_atomic caller.
3523 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3524 (c_parser_omp_flush): Parse flush with memory-order-clause.
3525 (c_parser_omp_for_loop): Allow NE_EXPR even in
3526 OpenMP loops, adjust c_finish_omp_for caller.
3527 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3528 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3529 Allow to be called while parsing combined parallel master.
3530 Parse combined master taskloop{, simd}.
3531 (c_parser_omp_parallel): Parse combined
3532 parallel master{, taskloop{, simd}} constructs.
3533 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3534 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3535 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3536 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3537 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3538 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3539 around teams body. Use SET_EXPR_LOCATION.
3540 (c_parser_omp_target_data): Allow target data
3541 with only use_device_ptr clauses.
3542 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3543 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3544 (c_parser_omp_requires): New function.
3545 (c_finish_taskloop_clauses): New function.
3546 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3547 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3548 declaration. Disallow in_reduction clause when combined with parallel
3549 master.
3550 (c_parser_omp_construct): Adjust c_parser_omp_master and
3551 c_parser_omp_taskgroup callers.
3552 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3553 other than cancel.
3554 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3555 like OMP_CLAUSE_REDUCTION.
3556 (handle_omp_array_sections): Likewise. Call save_expr on array
3557 reductions before calling build_index_type. Handle depend clauses
3558 with iterators.
3559 (struct c_find_omp_var_s): New type.
3560 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3561 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3562 with static, runtime or auto schedule kinds. Call save_expr for whole
3563 array reduction sizes. Diagnose reductions with zero sized elements
3564 or variable length structures. Diagnose nogroup clause used with
3565 reduction clause(s). Handle depend clause with
3566 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3567 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3568 some different type for other kinds. Use build_unary_op with
3569 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3570 Handle depend clauses with iterators. Remove no longer needed special
3571 case that predetermined const qualified vars may be specified in
3572 firstprivate clause. Complain if const qualified vars are mentioned
3573 in data-sharing clauses other than firstprivate or shared. Use
3574 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3575 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3576 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3577 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3578
7e2de6df
DM
35792018-10-29 David Malcolm <dmalcolm@redhat.com>
3580
3581 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3582 logic for change to name_hint::operator bool.
3583 (undeclared_variable): Likewise.
3584 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3585 (c_parser_parameter_declaration): Likewise.
3586
9f936c86
JM
35872018-10-17 Joseph Myers <joseph@codesourcery.com>
3588
3589 * c-errors.c (pedwarn_c11): New function.
3590 * c-parser.c (disable_extension_diagnostics): Save
3591 warn_c11_c2x_compat and set it to 0.
3592 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3593 (c_parser_static_assert_declaration_no_semi): Handle
3594 _Static_assert without string constant.
3595 * c-tree.h (pedwarn_c11): New prototype.
3596
033eb567
DM
35972018-10-17 David Malcolm <dmalcolm@redhat.com>
3598
3599 * Make-lang.in (selftest-c): New.
3600 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3601 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3602 from gcc/Makefile.in.
3603
0edf3afe
RB
36042018-10-02 Richard Biener <rguenther@suse.de>
3605
3606 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3607
8313a764
JM
36082018-09-26 Joseph Myers <joseph@codesourcery.com>
3609
3610 PR c/87390
3611 * c-typeck.c (build_binary_op): Use excess precision for
3612 comparisons of integers and floating-point for C11 and later.
3613
ce6f0888
MJ
36142018-09-26 Martin Jambor <mjambor@suse.cz>
3615
3616 PR c/87347
3617 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 3618 comment.
ce6f0888 3619
9c4a4b3c
DM
36202018-09-17 David Malcolm <dmalcolm@redhat.com>
3621
3622 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3623 Update for new param.
3624 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3625 Likewise.
3626
80c6d1f4
MJ
36272018-09-17 Martin Jambor <mjambor@suse.cz>
3628
3629 PR c/63886
3630 * c-parser.c: (warn_for_abs): New function.
3631 (c_parser_postfix_expression_after_primary): Call it.
3632
4a426e36
BE
36332018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3634
3635 * c-typeck.c (digest_init): Shorten overlength strings.
3636
6d900107
BE
36372018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3638
3639 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3640
b5764229
BE
36412018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3642
3643 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3644 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3645
22eea6b2
AM
36462018-08-30 Alexander Monakov <amonakov@ispras.ru>
3647
3648 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3649 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3650
85204e23
DM
36512018-08-27 David Malcolm <dmalcolm@redhat.com>
3652
3653 PR 87091
3654 * c-decl.c (implicitly_declare): Update call to
3655 maybe_add_include_fixit to suggest overriding the location, as it
3656 is for a note.
3657 * c-objc-common.c (c_tree_printer): Update for conversion of
3658 show_caret_p to a tri-state.
3659
3d78e008
ML
36602018-08-27 Martin Liska <mliska@suse.cz>
3661
3662 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
3663 fndecl_built_in_p and remove check for FUNCTION_DECL if
3664 possible.
3d78e008
ML
3665 (diagnose_mismatched_decls): Likewise.
3666 (merge_decls): Likewise.
3667 (warn_if_shadowing): Likewise.
3668 (pushdecl): Likewise.
3669 (implicitly_declare): Likewise.
3670 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3671 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3672 * c-typeck.c (build_function_call_vec): Likewise.
3673 (convert_arguments): Likewise.
3674
097f82ec
DM
36752018-08-20 David Malcolm <dmalcolm@redhat.com>
3676
3677 PR other/84889
3678 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3679 (diagnose_mismatched_decls): Likewise, in various places.
3680 (warn_if_shadowing): Likewise.
3681 (implicit_decl_warning): Likewise.
3682 (implicitly_declare): Likewise.
3683 (undeclared_variable): Likewise.
3684 (declare_label): Likewise.
3685 (grokdeclarator): Likewise.
3686 (start_function): Likewise.
3687 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3688 (c_parser_parameter_declaration): Likewise.
3689 (c_parser_binary_expression): Likewise.
3690 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3691 (parser_build_binary_op): Likewise.
3692 (build_unary_op): Likewise.
3693 (error_init): Likewise.
3694 (pedwarn_init): Likewise.
3695 (warning_init): Likewise.
3696 (convert_for_assignment): Likewise.
3697
96e6ae57
DM
36982018-08-15 David Malcolm <dmalcolm@redhat.com>
3699
3700 * c-objc-common.c: Include "gcc-rich-location.h".
3701 (c_tree_printer): Move implemenation of '%T' to...
3702 (print_type): ...this new function.
3703 (range_label_for_type_mismatch::get_text): New function.
3704 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3705 range for the various ic_argpass cases.
3706 (class maybe_range_label_for_tree_type_mismatch): New class.
3707 (build_binary_op): Use it when calling binary_op_error.
3708
0cd020ae 37092018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3710
0cd020ae
PK
3711 * c-decl.c (start_decl): Do not warn if variables is named as main
3712 and is a local variable.
3713
72733314
IS
37142018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3715
3716 PR c/19315
3717 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3718 objects of unknown size.
3719
23aa9f7c
MS
37202018-08-13 Martin Sebor <msebor@redhat.com>
3721
3722 PR tree-optimization/71625
3723 * c-parser.c (c_parser_declaration_or_fndef): Call
3724 braced_list_to_string.
3725
e5e7e50d
BH
37262018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3727
3728 PR c/86690
3729 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3730 errors.
3731
8a45b051
MS
37322018-08-01 Martin Sebor <msebor@redhat.com>
3733
3734 PR tree-optimization/86650
3735 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3736 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3737
5922dcb5
JJ
37382018-08-01 Jakub Jelinek <jakub@redhat.com>
3739
3740 PR c/85704
3741 * c-typeck.c (init_field_decl_cmp): New function.
3742 (output_pending_init_elements): Use it for field comparisons
3743 instead of pure bit_position comparisons.
3744
9b452033
JJ
37452018-07-12 Jakub Jelinek <jakub@redhat.com>
3746
3747 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3748 type here, instead add "omp declare target implicit" attribute.
3749 (finish_decl): Diagnose vars without mappable type here.
3750
ab20d992
JJ
37512018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3752 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3753 Cesar Philippidis <cesar@codesourcery.com>
3754
3755 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3756 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3757 to their non-present_or_* counterparts. Make 'self' an alias to
3758 PRAGMA_OACC_CLAUSE_HOST.
3759 (c_parser_oacc_data_clause): Update GOMP mappings for
3760 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3761 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3762 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3763 Remove support for present_or_* clauses.
3764 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3765 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3766 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3767 (OACC_DATA_CLAUSE_MASK): Likewise.
3768 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3769 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3770 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3771 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3772 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3773
e197e64e
KV
37742018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3775
3776 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3777 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3778 (c_parser_gimple_unary_expression): Likewise.
3779
487f2f61
JJ
37802018-06-15 Jakub Jelinek <jakub@redhat.com>
3781
3782 PR c/86093
3783 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3784 before doing POINTER_DIFF_EXPR.
3785
e4d44a37
MP
37862018-06-07 Marek Polacek <polacek@redhat.com>
3787
3788 PR c/85318
3789 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3790 for loop initial declarations.
3791
b67b9225
DP
37922018-05-30 David Pagan <dave.pagan@oracle.com>
3793
3794 PR c/55976
3795 * c-decl.c (grokdeclarator): Update check for return type warnings.
3796 (start_function): Likewise.
3797 (finish_function): Likewise.
3798 * c-typeck.c (c_finish_return): Update check for return type warnings.
3799 Pass OPT_Wreturn_type to pedwarn when appropriate.
3800
c566cc9f
RS
38012018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3802
3803 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3804 __FMA_EXPR handlng.
3805
e4f81565
RS
38062018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3807
3808 * gimple-parser.c: Include internal-fn.h.
3809 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3810 (c_parser_gimple_call_internal): New function.
3811 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3812 Fix typos in comment.
3813
79e7b1fe
JJ
38142018-05-10 Jakub Jelinek <jakub@redhat.com>
3815
3816 PR c++/85662
3817 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3818 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3819 fold_convert_loc.
3820 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3821 fold_offsetof_1, pass argtype as TYPE to it and drop the
3822 fold_convert_loc.
3823
f7584c81
DP
38242018-05-02 David Pagan <dave.pagan@oracle.com>
3825
3826 PR c/30552
3827 * c-decl.c (old_style_parameter_scope): New function.
3828 * c-parser.c (c_parser_postfix_expression): Check for statement
3829 expressions in old-style function parameter list declarations.
3830 * c-parser.h (old_style_parameter_scope): New extern declaration.
3831
b33a0cb3
JJ
38322018-04-25 Jakub Jelinek <jakub@redhat.com>
3833
3834 PR sanitizer/84307
3835 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3836 it is not TREE_STATIC.
3837 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3838 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3839 its COMPOUND_LITERAL_EXPR_DECL.
3840
c5c5822a
JM
38412018-03-21 Joseph Myers <joseph@codesourcery.com>
3842
3843 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3844 where all functions return the same _FloatN or _FloatNx type,
3845 treat integer types as _Float64 instead of double.
3846
aa1c9429
JJ
38472018-03-21 Jakub Jelinek <jakub@redhat.com>
3848
3849 PR c/84999
3850 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3851 building vector comparison, diagnose it and return error_mark_node.
3852
9bb45a95
JJ
38532018-03-15 Jakub Jelinek <jakub@redhat.com>
3854
3855 PR c/84853
3856 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3857 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3858 INTEGER_TYPE element type.
3859
ada6bad9
DP
38602018-03-13 David Pagan <dave.pagan@oracle.com>
3861
3862 PR c/46921
3863 * c-typeck.c (output_init_element): Ensure field initializer
3864 expression is always evaluated if there are side effects.
3865
849bbdb9
JJ
38662018-03-06 Jakub Jelinek <jakub@redhat.com>
3867
3868 PR c/84721
3869 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3870 !building_stmt_list_p ().
3871
d74641bd
RS
38722018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3873
3874 PR c/84305
3875 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3876 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3877 and include the BIND_EXPR in the list of things that need to be
3878 pre-evaluated.
3879
0444aa9c
NS
38802018-02-09 Nathan Sidwell <nathan@acm.org>
3881
3882 PR c/84293
3883 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3884 to strict_aliasing_warning.
3885
7c30b12a
PC
38862018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3887
3888 * c-typeck.c (really_start_incremental_init, push_init_level,
3889 set_nonincremental_init, output_init_element, process_init_element):
3890 Use DECL_UNNAMED_BIT_FIELD.
3891
2be4dfcb
MP
38922018-01-31 Marek Polacek <polacek@redhat.com>
3893
3894 PR c/81779
3895 * c-parser.c (c_parser_compound_statement_nostart): Call
3896 expansion_point_location_if_in_system_header.
3897
bb9869d5
DM
38982018-01-17 David Malcolm <dmalcolm@redhat.com>
3899
3900 PR c++/83814
3901 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3902 the C part.
3903
b4923738
JJ
39042018-01-13 Jakub Jelinek <jakub@redhat.com>
3905
3906 PR c/83801
3907 * c-tree.h (decl_constant_value_1): Add a bool argument.
3908 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3909 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3910 (decl_constant_value): Adjust caller.
3911 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3912 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3913 decl_constant_value returns initializer that has BLKmode or
3914 array type.
3915 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3916
928686b1
RS
39172018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3918 Alan Hayward <alan.hayward@arm.com>
3919 David Sherwood <david.sherwood@arm.com>
3920
3921 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3922 TYPE_VECTOR_SUBPARTS.
3923
85ec4feb
JJ
39242018-01-03 Jakub Jelinek <jakub@redhat.com>
3925
3926 Update copyright years.
3927
913884f7
JJ
39282018-01-01 Jakub Jelinek <jakub@redhat.com>
3929
3930 PR c/83595
3931 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3932 c_parser_conditional_expression, c_parser_cast_expression,
3933 c_parser_sizeof_expression, c_parser_alignof_expression,
3934 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3935 c_parser_transaction_expression): Use set_error () method instead
3936 of setting value member to error_mark_node.
3937
c6cfa2bf
MM
39382017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3939
3940 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3941 and _Float<N>X built-in functions.
3942
11d29d63
JJ
39432017-12-22 Jakub Jelinek <jakub@redhat.com>
3944
14ec014e
JJ
3945 PR debug/83550
3946 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3947 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3948 incomplete vars rather than after it.
3949
11d29d63
JJ
3950 PR debug/83547
3951 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3952 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3953 and consider empty ones if there are no other stmts. For
3954 -Wunused-value walk all statements before the one only followed by
3955 DEBUG_BEGIN_STMTs.
3956
170a8bd6 39572017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3958 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3959
3960 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3961 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3962 (c_parser_do_statement): Likewise.
3963 (c_parser_for_statement): Likewise.
3964 (c_parser_statement_after_labels): Adjust calls to above.
3965 (c_parse_pragma_ivdep): New static function.
3966 (c_parser_pragma_unroll): Likewise.
3967 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3968 <PRAGMA_UNROLL>: New case.
3969
01512446
JJ
39702017-12-19 Jakub Jelinek <jakub@redhat.com>
3971
3972 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3973 perform_integral_promotions, digest_init): Replace Yoda conditions
3974 with typical order conditions.
3975 * c-decl.c (check_bitfield_type_and_width): Likewise.
3976
c65e18d3
BE
39772017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3978
3979 * c-typeck.c (c_safe_arg_type_equiv_p,
3980 c_safe_function_type_cast_p): New function.
3981 (build_c_cast): Implement -Wcast-function-type.
3982
b7280579
RB
39832017-12-14 Richard Biener <rguenther@suse.de>
3984
3985 PR c/83415
3986 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3987 like REALPART_EXPR for the behavior of whether its operand
3988 is an lvalue.
3989
49e6a6c0
MP
39902017-12-12 Marek Polacek <polacek@redhat.com>
3991
3992 PR c/82679
3993 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3994
ab20d992 39952017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3996
3997 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3998 * c-parser.c (add_debug_begin_stmt): New.
3999 (c_parser_declaration_or_fndef): Call it.
4000 (c_parser_compound_statement_nostart): Likewise.
4001 (c_parser_statement_after_labels): Likewise.
4002 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4003
4b2b493f
JM
40042017-12-07 Joseph Myers <joseph@codesourcery.com>
4005
4006 * c-decl.c (build_compound_literal): Add parameter alignas_align
4007 and set alignment of decl if nonzero.
4008 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4009 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4010 qualifier.
4011 (c_parser_struct_declaration): Update syntax comment.
4012 (c_parser_type_name): Add alignas_ok argument and pass it to
4013 c_parser_declspecs.
4014 (c_parser_cast_expression): Pass true to c_parser_type_name and
4015 give error if a cast used an _Alignas specifier.
4016 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4017 give error if sizeof (type-name) used an _Alignas specifier.
4018 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4019 give error if _Alignof (type-name) used an _Alignas specifier.
4020 (c_parser_postfix_expression_after_paren_type): Check specified
4021 alignment for a compound literal and pass it to
4022 build_compound_literal.
4023 * c-parser.h (c_parser_type_name): Update prototype.
4024 * c-tree.h (build_compound_literal): Update prototype.
4025
5d9ae53d
MS
40262017-12-07 Martin Sebor <msebor@redhat.com>
4027
4028 PR c/81544
4029 * c-decl.c (c_decl_attributes): Look up existing declaration and
4030 pass it to decl_attributes.
4031
c79144f8
DM
40322017-12-06 David Malcolm <dmalcolm@redhat.com>
4033
4034 PR c/83236
4035 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4036 reserved for use by the implementation.
4037
613bc14f
DM
40382017-12-06 David Malcolm <dmalcolm@redhat.com>
4039
4040 * c-decl.c: Include "c-family/c-spellcheck.h".
4041
05abad4c
ML
40422017-12-05 Martin Liska <mliska@suse.cz>
4043 Jakub Jelinek <jakub@redhat.com>
4044
4045 * c-typeck.c (pointer_diff): Add new argument and instrument
4046 pointer subtraction.
4047 (build_binary_op): Similar for pointer comparison.
4048
cc6534d4
JJ
40492017-12-01 Jakub Jelinek <jakub@redhat.com>
4050
65791f42
JJ
4051 PR c/79153
4052 * c-parser.c: Include tree-iterator.h.
4053 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4054 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4055 on it.
4056
cc6534d4
JJ
4057 PR c/83222
4058 * c-tree.h (decl_constant_value_1): Declare.
4059 * c-typeck.c (decl_constant_value_1): New function.
4060 (decl_constant_value): Use it.
4061 * c-fold.c (c_fully_fold_internal): If in_init, use
4062 decl_constant_value_1 instead of decl_constant_value.
4063
5de73c05
JJ
40642017-11-30 Jakub Jelinek <jakub@redhat.com>
4065
4066 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4067
058f0b9e
JJ
40682017-11-28 Jakub Jelinek <jakub@redhat.com>
4069
4070 PR sanitizer/81275
4071 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4072 c_switch_covers_all_cases_p returns true.
4073
5e9d6aa4 40742017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4075 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4076
4077 * Make-lang.in (c/c-array-notation.o): Remove.
4078 * c-array-notation.c: Delete.
4079 * c-decl.c: Remove cilkplus condition.
4080 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4081 c_parser_cilk_verify_simd, c_parser_array_notation,
4082 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4083 c_parser_cilk_simd_fn_vector_attrs,
4084 c_finish_cilk_simd_fn_tokens): Delete.
4085 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4086 (c_parser_direct_declarator_inner): Ditto.
4087 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4088 (c_parser_attributes, c_parser_compound_statement,
4089 c_parser_statement_after_labels, c_parser_if_statement,
4090 c_parser_switch_statement, c_parser_while_statement,
4091 c_parser_do_statement, c_parser_for_statement,
4092 c_parser_unary_expression, c_parser_postfix_expression,
4093 c_parser_postfix_expression_after_primary,
4094 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4095 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4096 support.
4097 * c-typeck.c (build_array_ref, build_function_call_vec,
4098 convert_arguments,
4099 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4100 c_finish_loop, build_binary_op): Remove cilkplus support.
4101
9e851845
JJ
41022017-11-28 Jakub Jelinek <jakub@redhat.com>
4103
4104 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4105 of build3.
4106
ab20d992 41072017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
4108
4109 * Make-lang.in (c.install-plugin): Install backend import library.
4110
41521dee
JJ
41112017-11-23 Jakub Jelinek <jakub@redhat.com>
4112
4113 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4114 pragma_stmt context.
4115
ac9effed
EB
41162017-11-23 Mike Stump <mikestump@comcast.net>
4117 Eric Botcazou <ebotcazou@adacore.com>
4118
4119 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4120 ANNOTATE_EXPR.
4121 (c_parser_do_statement): Likewise.
4122 (c_parser_for_statement): Likewise.
4123
ce95abc4
DM
41242017-11-22 David Malcolm <dmalcolm@redhat.com>
4125
4126 PR c++/62170
4127 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4128 bool to bool *. Within '%T' handling, if showing an "aka", use
4129 "quoted" param to add appropriate quoting.
4130
974aedcc
MP
41312017-11-22 Marek Polacek <polacek@redhat.com>
4132
4133 PR c++/60336
4134 PR middle-end/67239
4135 PR target/68355
4136 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4137
d4300cc6
DM
41382017-11-21 David Malcolm <dmalcolm@redhat.com>
4139
4140 PR c/83056
4141 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4142 earlier failed lookups.
4143
1af4ebf5
MG
41442017-11-21 Marc Glisse <marc.glisse@inria.fr>
4145
4146 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4147 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4148
26edace6
DM
41492017-11-20 David Malcolm <dmalcolm@redhat.com>
4150
4151 PR c/81404
4152 * c-decl.c: Include "c-family/known-headers.h".
4153 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4154 to known-headers.cc.
4155 (class suggest_missing_header): Move to known-header.h.
4156 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4157 than get_c_name_hint.
4158
b1212255
DM
41592017-11-20 David Malcolm <dmalcolm@redhat.com>
4160
4161 * c-decl.c (get_c_name_hint): New function.
4162 (class suggest_missing_header): New class.
4163 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4164 suggest missing headers to the user.
4165
6c7a259b
DM
41662017-11-20 David Malcolm <dmalcolm@redhat.com>
4167
4168 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4169 Include "c-family/name-hint.h"
4170 (implicit_decl_warning): Convert "hint" from
4171 const char * to name_hint. Pass location to
4172 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4173 warning was not printed.
4174 (undeclared_variable): Likewise for "guessed_id".
4175 (lookup_name_fuzzy): Convert return type from const char *
4176 to name_hint. Add location_t param.
4177 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4178 Include "c-family/name-hint.h"
4179 (c_parser_declaration_or_fndef): Convert "hint" from
4180 const char * to name_hint. Pass location to lookup_name_fuzzy.
4181 (c_parser_parameter_declaration): Likewise.
4182
f9c59f7e
JJ
41832017-11-19 Jakub Jelinek <jakub@redhat.com>
4184
4185 PR c/66618
4186 PR c/69960
4187 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4188 where needed.
4189 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4190 handle_omp_array_sections): Likewise.
4191 (digest_init): Don't call decl_constant_value_for_optimization.
4192 * c-tree.h (decl_constant_value_for_optimization): Removed.
4193 * c-fold.c (c_fold_array_ref): New function.
4194 (c_fully_fold_internal): Add LVAL argument, propagate it through
4195 recursive calls. For VAR_P call decl_constant_value and
4196 unshare if not LVAL and either optimizing or IN_INIT. Remove
4197 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4198 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4199 (c_fully_fold): Add LVAL argument, pass it through to
4200 c_fully_fold_internal.
4201 (decl_constant_value_for_optimization): Removed.
4202
3ca0dc60
JM
42032017-11-15 Joseph Myers <joseph@codesourcery.com>
4204
4205 PR c/81156
4206 * c-parser.c (check_tgmath_function): New function.
4207 (enum tgmath_parm_kind): New enum.
4208 (c_parser_postfix_expression): Handle __builtin_tgmath.
4209
64a5912c
DM
42102017-10-31 David Malcolm <dmalcolm@redhat.com>
4211
4212 * c-decl.c (implicit_decl_warning): Update for renaming of
4213 pedwarn_at_rich_loc and warning_at_rich_loc.
4214 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4215 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4216 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4217 (c_parser_struct_or_union_specifier): Likewise for renaming of
4218 pedwarn_at_rich_loc.
4219 (c_parser_parameter_declaration): Likewise for renaming of
4220 error_at_rich_loc.
4221 * c-typeck.c (build_component_ref): Likewise.
4222 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4223 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4224 (set_init_label): Likewise for renaming of error_at_rich_loc.
4225
c1136864
RB
42262017-10-30 Richard Biener <rguenther@suse.de>
4227
4228 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4229 stmts.
4230
ee5fd23a
MM
42312017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4232
4233 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4234 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4235
1a59ccf2
DM
42362017-10-25 David Malcolm <dmalcolm@redhat.com>
4237
4238 PR c/7356
4239 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4240 semicolons.
4241
bc1a75dd
JJ
42422017-10-25 Jakub Jelinek <jakub@redhat.com>
4243
4244 PR libstdc++/81706
4245 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4246 newdecl to corresponding __builtin_ if any.
4247
ff1ff960
PC
42482017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4249
4250 PR c++/82466
4251 * c-decl.c (diagnose_mismatched_decls): Use
4252 OPT_Wbuiltin_declaration_mismatch.
4253
62e1c678
DM
42542017-10-12 David Malcolm <dmalcolm@redhat.com>
4255
4256 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4257 use it to guard calls to maybe_suggest_missing_token_insertion.
4258 (c_parser_parms_list_declarator): Override default value of new
4259 "type_is_unique" param to c_parser_require.
4260 (c_parser_asm_statement): Likewise.
4261 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4262 defaulting to true.
4263
a92f6726
NS
42642017-10-11 Nathan Sidwell <nathan@acm.org>
4265
4266 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4267
8e6cdc90
RS
42682017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4269
4270 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4271 operating on trees as wide_ints.
4272 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4273 (c_tree_equal): Likewise.
4274
8139a48e
DM
42752017-10-04 David Malcolm <dmalcolm@redhat.com>
4276
4277 * c-decl.c (push_parm_decl): Store c_parm's location into the
4278 PARAM_DECL.
4279 (build_c_parm): Add "loc" param and store it within the c_parm.
4280 * c-parser.c (struct c_parser): Add "last_token_location" field.
4281 (c_parser_consume_token): Store location of the token into the
4282 new field.
4283 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4284 when handling a FUNCTION_DECL, if it doesn't already have them.
4285 (c_parser_parameter_declaration): Generate a location for the
4286 parameter, and pass it to the call to build_c_parm.
4287 * c-tree.h (struct c_parm): Add field "loc".
4288 (build_c_parm): Add location_t param.
4289 * c-typeck.c (get_fndecl_argument_location): New function.
4290 (inform_for_arg): New function.
4291 (convert_for_assignment): Use inform_for_arg when dealing with
4292 ic_argpass.
4293
2a389958
JJ
42942017-09-29 Jakub Jelinek <jakub@redhat.com>
4295
7d386d45
JJ
4296 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4297 width is non-NULL.
4298 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4299 don't SET_DECL_C_BIT_FIELD here.
4300
2a389958
JJ
4301 PR c/82340
4302 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4303 instead of trying to set just TREE_READONLY manually.
4304
ebc6a85e
TV
43052017-09-16 Tom de Vries <tom@codesourcery.com>
4306
4307 PR c/81875
4308 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4309 cond itself.
4310
bb75facd
JM
43112017-09-15 Joseph Myers <joseph@codesourcery.com>
4312
4313 PR c/82071
4314 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4315 for C11.
4316 (build_conditional_expr): For C11, generate result with excess
4317 precision when one argument is an integer and the other is of a
4318 type using excess precision.
4319
1d933576
BE
43202017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4321
4322 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4323
267bbb6f
MP
43242017-09-13 Marek Polacek <polacek@redhat.com>
4325
4326 PR c/82167
4327 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4328 than expr.original_type.
4329
6836632e
NS
43302017-09-12 Nathan Sidwell <nathan@acm.org>
4331
4332 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4333 resort_sorted_fields): Moved from c-family/c-common.c.
4334 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4335
e035be33
JM
43362017-09-01 Joseph Myers <joseph@codesourcery.com>
4337
4338 PR c/82071
4339 * c-typeck.c (build_atomic_assign): Handle argument with excess
4340 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4341 argument passed to build_binary_op and convert_for_assignment but
4342 not for call to c_fully_fold.
4343 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4344 Ensure build_binary_op is called with argument with original
4345 semantic type. Avoid calling c_fully_fold with an
4346 EXCESS_PRECISION_EXPR from build_binary_op.
4347
d2e05fcb
JJ
43482017-09-01 Jakub Jelinek <jakub@redhat.com>
4349
4350 PR c/81887
4351 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4352
b397965c
RS
43532017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4354 Alan Hayward <alan.hayward@arm.com>
4355 David Sherwood <david.sherwood@arm.com>
4356
4357 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4358 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4359 m1 and m2 to the signed equivalent of a fixed-point
4360 SCALAR_TYPE_MODE.
4361
14e18d71
DM
43622017-08-24 David Malcolm <dmalcolm@redhat.com>
4363
4364 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4365 than CAN_HAVE_LOCATION_P when determining whether to use the
4366 location_t value within "value".
4367
7f204c0f
DM
43682017-08-21 David Malcolm <dmalcolm@redhat.com>
4369
4370 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4371 rather than peeking the location of the first token.
4372 * c-tree.h (c_expr::get_location): New method.
4373
2f687306
DM
43742017-08-21 David Malcolm <dmalcolm@redhat.com>
4375
4376 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4377 to check_function_arguments.
4378
3e7b80d7
MP
43792017-08-18 Marek Polacek <polacek@redhat.com>
4380
4381 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4382 commentary.
4383
00aa1fa2
L
43842017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4385
4386 PR c/53037
4387 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4388 (check_bitfield_type_and_width): Don't allow bit-field with
4389 warn_if_not_aligned type.
4390
da67acb9
MS
43912017-08-14 Martin Sebor <msebor@redhat.com>
4392
4393 PR c/81117
4394 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4395
bb85aa74
MP
43962017-08-11 Marek Polacek <polacek@redhat.com>
4397
4398 PR c/81795
4399 * c-decl.c (pushtag): Only print inform if the warning was printed.
4400 (grokdeclarator): Likewise.
4401
32129a17
DM
44022017-08-10 David Malcolm <dmalcolm@redhat.com>
4403
4404 * c-parser.c (c_parser_error): Rename to...
4405 (c_parser_error_richloc): ...this, making static, and adding
4406 "richloc" parameter, passing it to the c_parse_error call,
4407 rather than calling c_parser_set_source_position_from_token.
4408 (c_parser_error): Reintroduce, reimplementing in terms of the
4409 above, converting return type from void to bool.
4410 (class token_pair): New class.
4411 (struct matching_paren_traits): New struct.
4412 (matching_parens): New typedef.
4413 (struct matching_brace_traits): New struct.
4414 (matching_braces): New typedef.
4415 (get_matching_symbol): New function.
4416 (c_parser_require): Add param MATCHING_LOCATION, using it to
4417 highlight matching "opening" tokens for missing "closing" tokens.
4418 (c_parser_skip_until_found): Likewise.
4419 (c_parser_static_assert_declaration_no_semi): Convert explicit
4420 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4421 class matching_parens, so that the pertinent open parenthesis is
4422 highlighted when there are problems locating the close
4423 parenthesis.
4424 (c_parser_struct_or_union_specifier): Likewise.
4425 (c_parser_typeof_specifier): Likewise.
4426 (c_parser_alignas_specifier): Likewise.
4427 (c_parser_simple_asm_expr): Likewise.
4428 (c_parser_braced_init): Likewise, for matching_braces.
4429 (c_parser_paren_condition): Likewise, for matching_parens.
4430 (c_parser_switch_statement): Likewise.
4431 (c_parser_for_statement): Likewise.
4432 (c_parser_asm_statement): Likewise.
4433 (c_parser_asm_operands): Likewise.
4434 (c_parser_cast_expression): Likewise.
4435 (c_parser_sizeof_expression): Likewise.
4436 (c_parser_alignof_expression): Likewise.
4437 (c_parser_generic_selection): Likewise.
4438 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4439 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4440 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4441 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4442 c_parser_skip_until_found call.
4443 (c_parser_objc_class_definition): Use class matching_parens as
4444 above.
4445 (c_parser_objc_method_decl): Likewise.
4446 (c_parser_objc_try_catch_finally_statement): Likewise.
4447 (c_parser_objc_synchronized_statement): Likewise.
4448 (c_parser_objc_at_property_declaration): Likewise.
4449 (c_parser_oacc_wait_list): Likewise.
4450 (c_parser_omp_var_list_parens): Likewise.
4451 (c_parser_omp_clause_collapse): Likewise.
4452 (c_parser_omp_clause_default): Likewise.
4453 (c_parser_omp_clause_if): Likewise.
4454 (c_parser_omp_clause_num_threads): Likewise.
4455 (c_parser_omp_clause_num_tasks): Likewise.
4456 (c_parser_omp_clause_grainsize): Likewise.
4457 (c_parser_omp_clause_priority): Likewise.
4458 (c_parser_omp_clause_hint): Likewise.
4459 (c_parser_omp_clause_defaultmap): Likewise.
4460 (c_parser_oacc_single_int_clause): Likewise.
4461 (c_parser_omp_clause_ordered): Likewise.
4462 (c_parser_omp_clause_reduction): Likewise.
4463 (c_parser_omp_clause_schedule): Likewise.
4464 (c_parser_omp_clause_num_teams): Likewise.
4465 (c_parser_omp_clause_thread_limit): Likewise.
4466 (c_parser_omp_clause_aligned): Likewise.
4467 (c_parser_omp_clause_linear): Likewise.
4468 (c_parser_omp_clause_safelen): Likewise.
4469 (c_parser_omp_clause_simdlen): Likewise.
4470 (c_parser_omp_clause_depend): Likewise.
4471 (c_parser_omp_clause_map): Likewise.
4472 (c_parser_omp_clause_device): Likewise.
4473 (c_parser_omp_clause_dist_schedule): Likewise.
4474 (c_parser_omp_clause_proc_bind): Likewise.
4475 (c_parser_omp_clause_uniform): Likewise.
4476 (c_parser_omp_for_loop): Likewise.
4477 (c_parser_cilk_clause_vectorlength): Likewise.
4478 (c_parser_cilk_clause_linear): Likewise.
4479 (c_parser_transaction_expression): Likewise.
4480 * c-parser.h (c_parser_require): Add param matching_location with
4481 default UNKNOWN_LOCATION.
4482 (c_parser_error): Convert return type from void to bool.
4483 (c_parser_skip_until_found): Add param matching_location with
4484 default UNKNOWN_LOCATION.
4485
30af3a2b
MP
44862017-08-09 Marek Polacek <polacek@redhat.com>
4487
4488 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4489 * c-tree.h (build_external_ref): Update declaration.
4490 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4491 (build_external_ref): Change the type of a parameter to bool.
4492 (parser_build_binary_op): Use true/false instead of 1/0.
4493 (pointer_diff): Likewise.
4494 (build_modify_expr): Likewise.
4495 (set_designator): Change the type of a parameter to bool.
4496 (set_init_index): Use true/false instead of 1/0.
4497 (set_init_label): Likewise.
4498 (output_init_element): Change the type of a parameter to bool.
4499 (output_pending_init_elements): Use true/false instead of 1/0.
4500 (process_init_element): Likewise.
4501 (build_binary_op): Change the type of a parameter to bool.
4502
296c53ac
MP
45032017-08-09 Marek Polacek <polacek@redhat.com>
4504
4505 PR c/81233
4506 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4507 Call emit_diagnostic_valist instead of pedwarn.
4508 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4509 Print the relevant types in diagnostics.
4510
a32c8316
MP
45112017-08-09 Marek Polacek <polacek@redhat.com>
4512
4513 PR c/81417
4514 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 4515 build_conditional_expr.
a32c8316
MP
4516 * c-parser.c (c_parser_conditional_expression): Create locations for
4517 EXP1 and EXP2 from their source ranges. Pass the locations down to
4518 build_conditional_expr.
4519 * c-tree.h (build_conditional_expr): Update declaration.
4520 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4521 For -Wsign-compare, also print the types.
4522
314e6352
ML
45232017-08-08 Martin Liska <mliska@suse.cz>
4524
4525 * c-convert.c: Include header files.
4526 * c-typeck.c: Likewise.
4527
577eec56
ML
45282017-08-07 Martin Liska <mliska@suse.cz>
4529
4530 * c-parser.c (c_parser_attributes): Canonicalize name of an
4531 attribute.
4532
f7b6353a
MP
45332017-08-02 Marek Polacek <polacek@redhat.com>
4534
4535 PR c/81289
4536 * c-parser.c (c_parser_unary_expression): Use set_error.
4537
8a6eab34
MP
4538 PR c/81448
4539 PR c/81306
4540 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4541 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4542
ab20d992 45432017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
4544 Martin Liska <mliska@suse.cz>
4545
4546 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 4547 statement.
7fef86d3 4548
f34ebeb2
ML
45492017-07-31 Martin Liska <mliska@suse.cz>
4550
4551 PR sanitize/81530
4552 * c-convert.c (convert): Guard condition with flag_sanitize_p
4553 also with current_function_decl non-null equality.
4554 * c-decl.c (grokdeclarator): Likewise.
4555 * c-typeck.c (build_binary_op): Likewise.
4556
8595f67b
MP
45572017-07-25 Marek Polacek <polacek@redhat.com>
4558
4559 * c-decl.c (grokfield): Remove local variable.
4560
d49718d6
MP
45612017-07-25 Marek Polacek <polacek@redhat.com>
4562
4563 PR c/81364
4564 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4565 macro expansion if the body is in { }.
4566 (c_parser_while_statement): Likewise.
4567 (c_parser_for_statement): Likewise.
4568
ff22eb12
NS
45692017-07-18 Nathan Sidwell <nathan@acm.org>
4570
4571 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4572
eea77d1f
DM
45732017-07-14 David Malcolm <dmalcolm@redhat.com>
4574
4575 * c-decl.c (implicitly_declare): When suggesting a missing
4576 #include, provide a fix-it hint.
4577
b6f43128
DM
45782017-07-06 David Malcolm <dmalcolm@redhat.com>
4579
4580 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4581 and call that instead.
4582 * c-tree.h (selftest::run_c_tests): New decl.
4583
3e2becc4
MP
45842017-06-26 Marek Polacek <polacek@redhat.com>
4585
4586 PR c/80116
4587 * c-parser.c (c_parser_if_body): Set the location of the
4588 body of the conditional after parsing all the labels. Call
4589 warn_for_multistatement_macros.
4590 (c_parser_else_body): Likewise.
4591 (c_parser_switch_statement): Likewise.
4592 (c_parser_while_statement): Likewise.
4593 (c_parser_for_statement): Likewise.
4594 (c_parser_statement): Add a default argument. Save the location
4595 after labels have been parsed.
4596 (c_parser_c99_block_statement): Likewise.
4597
343ae898
RB
45982017-06-19 Richard Biener <rguenther@suse.de>
4599
4600 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4601 negated _Literals to parse _Literal (int) -1.
4602
45b2222a
ML
46032017-06-13 Martin Liska <mliska@suse.cz>
4604
4605 PR sanitize/78204
4606 * c-convert.c (convert): Use sanitize_flags_p.
4607 * c-decl.c (grokdeclarator): Likewise.
4608 * c-typeck.c (convert_for_assignment): Likewise.
4609 (c_finish_return): Likewise.
4610 (build_binary_op): Likewise.
4611
8ab7005b
JJ
46122017-06-08 Jakub Jelinek <jakub@redhat.com>
4613
4614 PR c/81006
4615 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4616 to sizetype before size_binop.
4617
363dc72c
JJ
46182017-06-07 Jakub Jelinek <jakub@redhat.com>
4619
4620 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4621 of TDI_generic.
4622
dc949728
MP
46232017-06-06 Marek Polacek <polacek@redhat.com>
4624
4625 PR c/79983
4626 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4627 ref.
4628 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4629
40ffd95f
BE
46302017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4631
4632 * c-parser.c (c_parser_binary_expression): Implement the
4633 -Wsizeof_pointer_div warning.
4634 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4635 from a parenthesized expression.
4636 (c_parser_expr_list): Use c_last_sizeof_loc.
4637 * c-tree.h (c_last_sizeof_loc): New external.
4638 * c-typeck.c (c_last_sizeof_loc): New variable.
4639 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4640
9fc5e7a4
MM
46412017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4642
4643 PR testsuite/80580
4644 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4645
f012c8ef
DM
46462017-05-30 David Malcolm <dmalcolm@redhat.com>
4647
4648 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4649 parameters.
4650
3cd211af
MS
46512017-05-24 Martin Sebor <msebor@redhat.com>
4652
4653 PR c/80731
4654 * c-fold.c (c_fully_fold_internal): Adjust.
4655 * c-typeck.c (parser_build_unary_op): Adjust.
4656
fd71a9a2
TS
46572017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4658
4659 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4660 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4661 "VECTOR_LENGTH".
4662
92fa0f9e
MP
46632017-05-23 Marek Polacek <polacek@redhat.com>
4664
4665 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4666 quotes.
4667
d11c168a
JJ
46682017-05-22 Jakub Jelinek <jakub@redhat.com>
4669
4670 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4671 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4672 it returned invariant. Call tree_invariant_p unconditionally
4673 afterwards to decide whether to return expr or op0.
4674
58aca9d9
NS
46752017-05-22 Nathan Sidwell <nathan@acm.org>
4676
4677 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4678
7fd549d2
TS
46792017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4680
4681 * c-parser.c (c_parser_omp_clause_default): Handle
4682 "OMP_CLAUSE_DEFAULT_PRESENT".
4683
6ecd2339
BE
46842017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4685
4686 * config-lang.in (gtfiles): Add c-family/c-format.c.
4687
8a57ecff
NS
46882017-05-18 Nathan Sidwell <nathan@acm.org>
4689
4690 * c-decl.c (pushdecl_top_level): Delete unused function.
4691
6574d78e
MP
46922017-05-18 Marek Polacek <polacek@redhat.com>
4693
4694 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4695 (check_earlier_gotos): Likewise.
4696 (define_label): Likewise.
4697 (pending_xref_error): Likewise.
4698 (smallest_type_quals_location): Likewise.
4699 (grokdeclarator): Likewise.
4700 (grokparms): Likewise.
4701 (identifier_global_value): Likewise.
4702 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4703 (find_init_member): Likewise.
4704
e3455240
MP
47052017-05-18 Marek Polacek <polacek@redhat.com>
4706
4707 * c-decl.c (start_decl): Use false/true instead of 0/1.
4708 (grokdeclarator): Likewise.
4709 (finish_struct): Likewise.
4710 (start_function): Change the return type to bool. Use false/true
4711 instead of 0/1.
4712 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4713 * c-tree.h (start_function): Update.
4714 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4715 (set_designator): Change the return type to bool. Use false/true
4716 instead of 0/1.
4717
3fa8871b
MP
47182017-05-17 Marek Polacek <polacek@redhat.com>
4719
4720 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4721 * c-typeck.c: Likewise.
4722
142473df
MP
47232017-05-17 Marek Polacek <polacek@redhat.com>
4724
4725 PR sanitizer/80659
4726 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4727 DECL_IGNORED_P even for non-static compound literals.
4728
1a817418
ML
47292017-05-17 Martin Liska <mliska@suse.cz>
4730
4731 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4732 use it instead of int type.
4733
b2fa0a8b
MP
47342017-05-17 Marek Polacek <polacek@redhat.com>
4735
4736 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4737 call c_fully_fold.
4738 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4739 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4740 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4741 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4742 save_expr.
4743 (c_parser_conditional_expression): Likewise.
4744 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4745 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4746 (process_init_element): Likewise.
4747 (build_binary_op): Likewise.
4748 (handle_omp_array_sections_1): Likewise.
4749
1e47f02b
TS
47502017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4751
4752 * c-parser.c (c_parser_omp_clause_num_gangs)
4753 (c_parser_omp_clause_num_workers)
4754 (c_parser_omp_clause_vector_length): Merge functions into...
4755 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4756 all users.
4757
c24e924f
NS
47582017-05-11 Nathan Sidwell <nathan@acm.org>
4759
4760 * gimple-parser.c: Don't #include tree-dump.h.
4761
c587104e
MM
47622017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4763
4764 PR testsuite/80580
4765 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4766
67ac9a9d
MM
47672017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4768
4769 PR testsuite/80580
4770 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4771 incorrect __MEM syntax.
4772
ac4eb40f
MM
47732017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4774
4775 PR testsuite/80580
4776 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4777 type of unary '*'.
4778
641da50a
NS
47792017-05-09 Nathan Sidwell <nathan@acm.org>
4780
4781 * c-tree.h (pushdecl): Declare.
4782
56d35585
DM
47832017-05-05 David Malcolm <dmalcolm@redhat.com>
4784
4785 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4786 with diagnostic_report_diagnostic.
4787 * c-errors.c (pedwarn_c99): Likewise.
4788 (pedwarn_c90): Likewise.
4789
815d9cc6
XR
47902017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4791
92a285c1 4792 PR c++/80038
815d9cc6
XR
4793 * c-gimplify.c (c_gimplify_expr): Remove calls to
4794 cilk_gimplifY_call_params_in_spawned_fn.
4795
1c4ea66f
DM
47962017-04-25 David Malcolm <dmalcolm@redhat.com>
4797
4798 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4799 hint for removing extra semicolon.
4800
666f7903
JJ
48012017-04-21 Jakub Jelinek <jakub@redhat.com>
4802
4803 PR c/80468
4804 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4805 enabled, set specs->type to integer_type_node.
4806
5764ee3c
JW
48072017-04-03 Jonathan Wakely <jwakely@redhat.com>
4808
4809 * c-array-notation.c: Fix typo in comment.
4810
10fa8dfb
MP
48112017-03-29 Marek Polacek <polacek@redhat.com>
4812
4813 PR c/79730
4814 * c-decl.c (finish_decl): Check VAR_P.
4815
a9e4a1a5
JJ
48162017-03-27 Jakub Jelinek <jakub@redhat.com>
4817
4818 PR middle-end/80162
4819 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4820 * c-typeck.c (c_mark_addressable): Likewise. Look through
4821 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4822 to ARRAY_TYPE.
4823 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4824
ee3ff394
MP
48252017-03-23 Marek Polacek <polacek@redhat.com>
4826
4827 * c-tree.h: Remove a C_RID_YYCODE reference.
4828
4d1b8e70
JJ
48292017-03-21 Jakub Jelinek <jakub@redhat.com>
4830
4831 PR c/80097
4832 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4833 optional COMPOUND_EXPR with ubsan instrumentation.
4834
31dc71a8
MP
48352017-03-17 Marek Polacek <polacek@redhat.com>
4836
4837 * c-parser.c: Add C11 references.
4838
d579c385
MP
48392017-03-15 Marek Polacek <polacek@redhat.com>
4840
4841 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4842
85059a38
MP
48432017-03-11 Marek Polacek <polacek@redhat.com>
4844
4845 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4846
2f6f187a
DM
48472017-03-10 David Malcolm <dmalcolm@redhat.com>
4848
4849 PR translation/79848
4850 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4851 "%qs".
4852 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4853
36618428
MP
48542017-03-09 Marek Polacek <polacek@redhat.com>
4855
4856 PR sanitizer/79757
4857 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4858 parameter declarations with initializers.
4859
01e5af5a
JJ
48602017-03-09 Jakub Jelinek <jakub@redhat.com>
4861
4862 PR c/79969
4863 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4864 TYPE_STUB_DECL.
4865
a71dbc63
JJ
48662017-03-07 Jakub Jelinek <jakub@redhat.com>
4867
4868 PR c/79834
4869 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4870 for "may only be used in compound statements" diagnostics, change it
4871 such that the same translatable string is used for all pragmas. For
4872 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4873 diagnostics.
4874 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4875 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4876 "may only be used in compound statements" diagnostics, such that the
4877 same translatable string is used for all pragmas.
4878
1ff4bae6
MP
48792017-03-04 Marek Polacek <polacek@redhat.com>
4880
4881 PR c/79847
4882 * c-decl.c (implicit_decl_warning): Add missing space.
4883
7f5a7d78
MP
48842017-03-03 Marek Polacek <polacek@redhat.com>
4885
4886 PR c/79758
4887 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4888 current_function_prototype_arg_types is error_mark_node. Fix
4889 formatting. Use TREE_VALUE instead of TREE_TYPE.
4890
883c8f06
JJ
48912017-03-03 Jakub Jelinek <jakub@redhat.com>
4892
79c9b7a8
JJ
4893 PR c/79837
4894 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4895 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4896 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4897 diagnostics.
4898
883c8f06
JJ
4899 PR c/79836
4900 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4901 instead of %<_Generic>.
4902 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4903 (c_parser_omp_target_exit_data): Use %<release%> instead of
4904 %<release>.
4905
324ff1a0
JJ
49062017-02-28 Jakub Jelinek <jakub@redhat.com>
4907
4908 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4909 instead of just cond ? "..." : "...".
4910 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4911 for "enter"/"exit" keyword.
4912 (c_finish_oacc_routine): Don't use %s to supply portions of the
4913 message.
4914
4227c9ad
JJ
49152017-02-24 Jakub Jelinek <jakub@redhat.com>
4916
4917 PR c++/79588
4918 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4919 handle -Wrestrict here.
4920 * c-typeck.c (build_function_call_vec): Adjust
4921 check_function_arguments caller.
4922
5d972e66
RB
49232017-02-23 Richard Biener <rguenther@suse.de>
4924
4925 PR c/79684
4926 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4927 to initialize c_exprs to return.
4928 (c_parser_gimple_binary_expression): Likewise.
4929 (c_parser_gimple_unary_expression): Likewise.
4930 (c_parser_gimple_postfix_expression): Likewise.
4931
61ac5ebe
MP
49322017-02-22 Marek Polacek <polacek@redhat.com>
4933
4934 PR c/79662
4935 * c-typeck.c (convert_arguments): Handle error_mark_node.
4936
41d1b0b1
PK
49372017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4938
4939 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4940 value of c_parser_parse_ssa_name against error_mark_node and emit
4941 error if ssa name is anonymous and written as default definition.
4942
eab1f169
PK
49432017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4944
4945 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4946 FMA_EXPR.
4947
bcac0b4d
JJ
49482017-02-16 Jakub Jelinek <jakub@redhat.com>
4949
4950 PR c++/79512
4951 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4952 ignore #pragma omp target even when not followed by identifier.
4953
1be33173
PK
49542017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4955
4956 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4957 (c_parser_gimple_unary_expression): Likewise.
4958
aa326bfb
JJ
49592017-02-13 Jakub Jelinek <jakub@redhat.com>
4960
4961 * c-parser.c (c_parser_oacc_declare): Add missing space in
4962 diagnostics.
4963
8a398bc5
PK
49642017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4965
4966 PR c/79478
4967 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4968 set_c_expr_source_range when parsing ssa-name.
4969
3dcde5ef 49702017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4971 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4972
4973 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4974 building IL when arguments are error_mark_node.
4975 (c_parser_gimple_unary_expression): Likewise.
4976 (c_parser_gimple_if_stmt): Likewise.
4977 (c_parser_gimple_switch_stmt): Likewise.
4978 (c_parser_gimple_return_stmt): Likewise.
4979 (c_parser_parse_ssa_name): When name lookup fails do not build
4980 an SSA name. Use undeclared rather than not declared in error
4981 reporting.
4982
192b048b
MP
49832017-02-09 Marek Polacek <polacek@redhat.com>
4984
4985 PR c/79428
4986 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4987 instead of c_parser_skip_until_found.
4988
56f71478
JJ
49892017-02-09 Jakub Jelinek <jakub@redhat.com>
4990
4991 PR c/79431
4992 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4993 symtab_node::get on automatic variables.
4994
02889d23
CLT
49952016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4996 Chung-Lin Tang <cltang@codesourcery.com>
4997
4998 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4999 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5000 semantic checking.
5001 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5002
7af4b20d
RB
50032017-02-07 Richard Biener <rguenther@suse.de>
5004
5005 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5006 (c_parser_gimple_postfix_expression_after_primary):
5007 Do not use c_build_function_call_vec to avoid folding and promotion.
5008 Simplify.
5009
e5e391d6
MO
50102017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5011
5012 PR lto/79061
5013 * c-decl.c (pop_scope): Pass main_input_filename to
5014 build_translation_unit_decl.
5015
c2e84327
DM
50162017-01-24 David Malcolm <dmalcolm@redhat.com>
5017
5018 * c-parser.c: Include "read-rtl-function.h" and
5019 "run-rtl-passes.h".
5020 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5021 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5022 production. Update for renaming of field "gimple_pass" to
5023 "gimple_or_rtl_pass". If __RTL was seen, call
5024 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5025 to an auto_timevar, to cope with early exit.
5026 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5027 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5028 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5029 Handle RID_RTL.
5030 (c_parser_parse_rtl_body): New function.
5031 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5032 (struct c_declspecs): Rename field "gimple_pass" to
5033 "gimple_or_rtl_pass". Add field "rtl_p".
5034 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5035 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5036 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5037 (c_parser_gimple_or_rtl_pass_list): ...this.
5038
2ebd93e1
MP
50392017-01-20 Marek Polacek <polacek@redhat.com>
5040
5041 PR c/64279
5042 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5043
b1c95bb5
RB
50442017-01-13 Richard Biener <rguenther@suse.de>
5045
5046 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5047 nops.
5048
25329913
RB
50492017-01-13 Richard Biener <rguenther@suse.de>
5050
5051 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5052 _Literal ( type-name ) number.
5053
6bb4ea5c
RB
50542017-01-12 Richard Biener <rguenther@suse.de>
5055
5056 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5057 __MEM.
5058
6b5b4e9c
JJ
50592017-01-11 Jakub Jelinek <jakub@redhat.com>
5060
5061 PR c++/72813
5062 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5063 PCH file.
5064
e3252775
RB
50652017-01-11 Richard Biener <rguenther@suse.de>
5066
5067 PR bootstrap/79052
5068 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5069 returns on parse errors.
5070
a9342885
MP
50712017-01-04 Marek Polacek <polacek@redhat.com>
5072
5073 PR c++/64767
5074 * c-parser.c (c_parser_postfix_expression): Mark zero character
5075 constants by setting original_type in c_expr.
5076 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5077 with a zero character constant.
5078 (char_type_p): New function.
5079
5dd9a9d0
DM
50802017-01-04 David Malcolm <dmalcolm@redhat.com>
5081
5082 * c-parser.c (c_parser_declaration_or_fndef): Create a
5083 rich_location at init_loc and parse it to start_init.
5084 (last_init_list_comma): New global.
5085 (c_parser_braced_init): Update last_init_list_comma when parsing
5086 commas. Pass it to pop_init_level. Pass location of closing
5087 brace to pop_init_level.
5088 (c_parser_postfix_expression_after_paren_type): Create a
5089 rich_location at type_loc and parse it to start_init.
5090 (c_parser_omp_declare_reduction): Likewise for loc.
5091 * c-tree.h (start_init): Add rich_location * param.
5092 (pop_init_level): Add location_t param.
5093 * c-typeck.c (struct initializer_stack): Add field
5094 "missing_brace_richloc".
5095 (start_init): Add richloc param, use it to initialize
5096 the stack node's missing_brace_richloc.
5097 (last_init_list_comma): New decl.
5098 (finish_implicit_inits): Pass last_init_list_comma to
5099 pop_init_level.
5100 (push_init_level): When finding missing open braces, add fix-it
5101 hints to the richloc.
5102 (pop_init_level): Add "insert_before" param and pass it
5103 when calling pop_init_level. Add fixits about missing
5104 close braces to any richloc. Use the richloc for the
5105 -Wmissing-braces warning.
5106 (set_designator): Pass last_init_list_comma to pop_init_level.
5107 (process_init_element): Likewise.
5108
cbe34bb5
JJ
51092017-01-01 Jakub Jelinek <jakub@redhat.com>
5110
5111 Update copyright years.
5112
d17680f3
JJ
51132016-12-21 Jakub Jelinek <jakub@redhat.com>
5114
0dba7960
JJ
5115 PR bootstrap/78817
5116 * c-typeck.c (build_function_call_vec): If check_function_arguments
5117 returns true, set TREE_NO_WARNING on CALL_EXPR.
5118
d17680f3
JJ
5119 PR c/77767
5120 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5121 to *expr instead of overwriting it.
5122
aa90531e
RB
51232016-12-20 Richard Biener <rguenther@suse.de>
5124
5125 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5126 error recovery.
5127 (c_parser_gimple_statement): Only build assigns for non-error
5128 stmts.
5129 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5130
629b3d75
MJ
51312016-12-14 Martin Jambor <mjambor@suse.cz>
5132
5133 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5134 omp-low.h.
5135 (c_finish_oacc_routine): Adjusted call to
5136 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5137 to use their new names.
5138 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5139 use its new name.
5140 (c_parser_oacc_update): Likewise.
5141 (c_parser_omp_simd): Likewise.
5142 (c_parser_omp_target_update): Likewise.
5143 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5144 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5145 name.
5146 (c_finish_omp_cancellation_point): Likewise.
5147 * gimple-parser.c: Do not include omp-low.h
5148
c5af52eb
CP
51492016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5150 James Norris <jnorris@codesourcery.com>
5151
5152 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5153 EXIT_DATA,WAIT} are not used in compound statements.
5154 (c_parser_oacc_enter_exit_data): Update diagnostics.
5155
48330c93
BE
51562016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5157
5158 PR c++/71973
5159 * c-decl.c (diagnose_mismatched_decls): Use
5160 OPT_Wbuiltin_declaration_mismatch here too.
5161
899ca90e 51622016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
5163 Alan Hayward <alan.hayward@arm.com>
5164 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
5165
5166 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5167 (make_label, finish_struct): Likewise.
5168
1ee62b92 51692016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 5170 Richard Biener <rguenther@suse.de>
22b15758 5171
8e745a17
JJ
5172 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5173 * config-lang.in (gtfiles): Add c/c-parser.h.
5174 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5175 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5176 * c-parser.c (enum c_id_kind, struct c_token,
5177 c_parser_next_token_is, c_parser_next_token_is_not,
5178 c_parser_next_token_is_keyword,
5179 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5180 Split out to ...
5181 * c-parser.h: ... new header.
5182 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 5183 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
5184 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5185 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5186 c_parser_error, c_parser_require, c_parser_skip_until_found,
5187 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5188 c_parser_type_name): Export.
5189 (c_parser_tokens_buf): New function.
5190 (c_parser_error): Likewise.
5191 (c_parser_set_error): Likewise.
5192 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
5193 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5194 via c_parser_parse_gimple_body.
8e745a17
JJ
5195 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5196 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5197 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5198 c_parser_error, c_parser_require, c_parser_skip_until_found,
5199 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5200 c_parser_type_name): Declare.
1ee62b92
PG
5201 (struct c_parser): Declare forward.
5202 (c_parser_tokens_buf): Declare.
8e745a17
JJ
5203 (c_parser_error): Likewise.
5204 (c_parser_set_error): Likewise.
5205 * gimple-parser.c: New file.
5206 * gimple-parser.h: Likewise.
1ee62b92 5207
22b15758
UB
52082016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5209
5210 PR c/35503
5211 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5212 warn_for_restrict.
5213
84ff4775
LCW
52142016-09-11 Le-Chun Wu <lcwu@google.com>
5215 Mark Wielaard <mjw@redhat.com>
5216
5217 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5218 to the given -Wshadow= variant.
5219
4d0cdd0c
TP
52202016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5221
5222 * c-typeck.c: Include memmodel.h.
5223
1202f33e
JJ
52242016-10-13 Jakub Jelinek <jakub@redhat.com>
5225
5226 PR target/77957
5227 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5228 instead of lhd_return_null_tree_v.
5229
8a14afd0
BS
52302016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5231
5232 PR c++/69733
5233 * c-decl.c (smallest_type_quals_location): New static function.
5234 (grokdeclarator): Try to find the correct location for an ignored
5235 qualifier.
5236
81fea426
MP
52372016-09-26 Marek Polacek <polacek@redhat.com>
5238
5239 PR c/7652
5240 * c-decl.c (pop_scope): Add gcc_fallthrough.
5241
52422016-09-26 Marek Polacek <polacek@redhat.com>
5243
5244 PR c/7652
5245 * c-parser.c (struct c_token): Add flags field.
5246 (c_lex_one_token): Pass it to c_lex_with_flags.
5247 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5248 into IFN_FALLTHROUGH.
5249 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5250 attribute fallthrough after a case label or default label.
5251 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5252
9a2300e9
MP
52532016-09-24 Marek Polacek <polacek@redhat.com>
5254
5255 PR c/77490
5256 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5257 have boolean value. Warn about ++/-- on booleans.
5258
7de76362
JJ
52592016-09-23 Jakub Jelinek <jakub@redhat.com>
5260
5261 * c-parser.c (incomplete_record_decls): Remove unnecessary
5262 = vNULL initialization of file scope vec.
5263
5b73d2ab
MP
52642016-09-16 Marek Polacek <polacek@redhat.com>
5265
5266 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5267
e51fbec3
MP
52682016-09-14 Marek Polacek <polacek@redhat.com>
5269
5270 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5271 (fix_array_notation_expr): Likewise.
5272 * c-decl.c (finish_decl): Likewise.
5273 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5274 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5275 (function_to_pointer_conversion): Use false instead of 0.
5276 (convert_lvalue_to_rvalue): Likewise.
5277 (parser_build_unary_op): Likewise.
5278 (build_atomic_assign): Likewise.
5279 (build_unary_op): Change nonconvert parameter type to bool, use
5280 true/false instead of 1/0.
5281 (build_binary_op): Use true instead of 1.
5282
254830ba
DM
52832016-09-13 David Malcolm <dmalcolm@redhat.com>
5284
5285 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5286 of add_fixit_insert to add_fixit_insert_before.
5287
4c13ba17
MP
52882016-09-13 Marek Polacek <polacek@redhat.com>
5289
5290 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5291 it.
5292
54dcdb88
BE
52932016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5294
5295 PR c++/77496
5296 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5297 COMPOUND_EXPR to warn_for_omitted_condop.
5298
e5106e27
DM
52992016-09-07 David Malcolm <dmalcolm@redhat.com>
5300
5301 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5302 c_get_substring_location for this new langhook.
5303
9dc5773f
JJ
53042016-09-02 Jakub Jelinek <jakub@redhat.com>
5305
5306 PR c/65467
5307 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5308 flag_openmp.
5309 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5310 instead of mark_exp_read on low_bound/length expression.
5311 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5312 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5313 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5314 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5315 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5316 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5317 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5318 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5319 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5320 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5321 instead of mark_expr_read.
5322 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5323 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5324 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5325 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5326 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5327 array section bases outside of depend clause, for depend clause
5328 use convert_lvalue_to_rvalue on the base.
5329 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5330 linear, aligned, map, to and from clauses.
5331 (c_omp_clause_copy_ctor): New function.
5332
295844f6
MP
53332016-09-01 Marek Polacek <polacek@redhat.com>
5334
5335 PR c/7652
5336 * c-typeck.c (composite_type): Add FALLTHRU comment.
5337
089af25c
DM
53382016-08-31 David Malcolm <dmalcolm@redhat.com>
5339
5340 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5341 to the insertion fixits for "struct", "union", and "enum".
5342
f9087798
DM
53432016-08-30 David Malcolm <dmalcolm@redhat.com>
5344
5345 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5346 rather than add_fixit_misspelled_id.
5347 (undeclared_variable): Likewise.
5348 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5349 now-redundant "here" params from add_fixit_insert method calls.
5350 (c_parser_parameter_declaration): Likewise.
5351 * c-typeck.c (build_component_ref): Remove now-redundant range
5352 param from add_fixit_replace method calls.
5353
ebef225f
MP
53542016-08-25 Marek Polacek <polacek@redhat.com>
5355
5356 * c-typeck.c (parser_build_binary_op): Pass LHS to
5357 warn_logical_not_parentheses.
5358
fe377a48
MP
53592016-08-25 Marek Polacek <polacek@redhat.com>
5360
5361 PR c/77323
5362 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5363 or _FloatN or _FloatNx is not supported.
5364 (finish_declspecs): Set type to integer_type_node when _FloatN or
5365 _FloatNx is not supported.
5366
c65699ef
JM
53672016-08-19 Joseph Myers <joseph@codesourcery.com>
5368
5369 PR c/32187
5370 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5371 (struct c_declspecs): Add field floatn_nx_idx.
5372 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5373 and _FloatNx type specifiers.
5374 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5375 (c_parser_declspecs, c_parser_attribute_any_word)
5376 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5377 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5378 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5379 narrower than double.
5380
2f1364c2
JJ
53812016-08-12 Jakub Jelinek <jakub@redhat.com>
5382 Martin Liska <mliska@suse.cz>
5383
5384 PR c/67410
5385 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5386 % to determine val element to change. Assert that
5387 wchar_bytes * charwidth fits into val array.
5388
191816a3
MP
53892016-08-12 Marek Polacek <polacek@redhat.com>
5390
5391 PR c/7652
5392 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5393 (c_parser_postfix_expression): Likewise.
5394 * c-typeck.c (build_unary_op): Adjust fall through comment.
5395 (c_mark_addressable): Likewise.
5396
b95a64bb
JJ
53972016-08-11 Jakub Jelinek <jakub@redhat.com>
5398
5399 PR c/72816
5400 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5401 array member through typedef, for orig_qual_indirect == 0 clear
5402 orig_qual_type.
5403
895aa8e1
DM
54042016-08-08 David Malcolm <dmalcolm@redhat.com>
5405
5406 PR c/64955
5407 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5408 this up to selftest::run_c_tests.
5409 (selftest::run_c_tests): New function.
5410
0b212d8c
TS
54112016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5412
ae9281fc
TS
5413 * c-parser.c (struct oacc_routine_data): Add error_seen and
5414 fndecl_seen members.
5415 (c_finish_oacc_routine): Use these.
5416 (c_parser_declaration_or_fndef): Adjust.
5417 (c_parser_oacc_routine): Likewise. Support more C language
5418 constructs, and improve diagnostics. Move pragma context
5419 checking...
5420 (c_parser_pragma): ... here.
5421
0b212d8c
TS
5422 * c-parser.c (struct oacc_routine_data): New.
5423 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5424 Simplify code.
5425 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5426 declare target" attribute.
5427
76e2c821
JB
54282016-08-01 Jan Beulich <jbeulich@suse.com>
5429
5430 * c-fold.c (c_fully_fold_internal): Also emit shift count
5431 warnings for vector types.
5432 * c-typeck.c (build_binary_op): Likewise.
5433
f618a472
MP
54342016-07-29 Marek Polacek <polacek@redhat.com>
5435
5436 PR c/71742
5437 * c-decl.c (finish_struct): Rephrase an error message.
5438
efd0786f
MP
5439 PR c/71853
5440 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5441 to error node for invalid code.
5442
e00dceaf
MP
5443 PR c/71573
5444 * c-decl.c (implicitly_declare): Return decl early not only for
5445 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5446
673a107a
JJ
54472016-07-29 Jakub Jelinek <jakub@redhat.com>
5448
5449 PR c/71969
5450 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5451 on GNU extern inline functions.
5452
a5b5c8b6
MP
54532016-07-29 Marek Polacek <polacek@redhat.com>
5454
5455 PR c/71583
5456 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5457 check expr.value.
5458
e3fe09c1
UB
54592016-07-22 Uros Bizjak <ubizjak@gmail.com>
5460
5461 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5462
7c8f7eaa
DM
54632016-07-20 David Malcolm <dmalcolm@redhat.com>
5464
5465 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5466 spellcheck-tree.h
5467 (best_macro_match): Likewise, converting from a typedef to a
5468 subclass.
5469 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5470 (lookup_name_fuzzy): Update for change of best_macro_match to a
5471 subclass with a ctor that calls cpp_forall_identifiers.
5472
de6a69ee
DM
54732016-07-20 David Malcolm <dmalcolm@redhat.com>
5474
5475 * c-decl.c (implicit_decl_warning): Update for conversion of
5476 return type of lookup_name_fuzzy to const char *.
5477 (undeclared_variable): Likewise.
5478 (lookup_name_fuzzy): Convert return type from tree to
5479 const char *.
5480 * c-parser.c (c_parser_declaration_or_fndef): Update for
5481 conversion of return type of lookup_name_fuzzy to const char *.
5482 (c_parser_parameter_declaration): Likewise.
5483
b1c9c068
CP
54842016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5485
5486 * c-parser.c (c_parser_oacc_declare): Don't scan for
5487 GOMP_MAP_POINTER.
5488 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5489 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5490 zero-length subarrays.
5491
ddbbcb19
JJ
54922016-07-15 Jakub Jelinek <jakub@redhat.com>
5493
5494 PR c/71858
5495 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5496 instead of FUZZY_LOOKUP_NAME.
5497 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5498 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5499
dd36b877
JJ
55002016-07-14 Jakub Jelinek <jakub@redhat.com>
5501
5502 PR c/71858
5503 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5504
8c681247
TS
55052016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5506
5507 * c-parser.c (c_parser_generic_selection): Make type of variable
5508 auto_vec.
5509 (c_parser_omp_declare_simd): Likewise.
5510
bf4fa671
TS
55112016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5512
5513 * c-decl.c (struct c_struct_parse_info): Change member types
5514 from vec to auto_vec.
5515 (start_struct): Adjust.
5516 (finish_struct): Likewise.
5517
557e8c49
JJ
55182016-07-02 Jakub Jelinek <jakub@redhat.com>
5519
5520 PR c/71719
5521 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5522
54d19c3b
TS
55232016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5524
5525 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5526 Move pragma context checking into...
5527 (c_parser_omp_cancellation_point): ... here, and improve
5528 diagnostic messages.
5529 * c-typeck.c (c_finish_omp_cancel)
5530 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5531
152ef731
JJ
55322016-06-29 Jakub Jelinek <jakub@redhat.com>
5533
5534 PR c/71685
5535 * c-typeck.c (c_build_qualified_type): Don't clear
5536 C_TYPE_INCOMPLETE_VARS for the main variant.
5537
55382016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
5539
5540 PR c/71552
5541 * c-typeck.c (output_init_element): Diagnose incompatible types
5542 before non-constant initializers.
5543
e9ac1f86
JJ
55442016-06-28 Jakub Jelinek <jakub@redhat.com>
5545
5546 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5547
277d7ee0
AK
55482016-06-23 Andi Kleen <ak@linux.intel.com>
5549
5550 * Make-lang.in: Add support for autofdo.
5551
1a4f11c8
DM
55522016-06-22 David Malcolm <dmalcolm@redhat.com>
5553
5554 PR c/70339
5555 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5556 (implicit_decl_warning): When issuing warnings for implicit
5557 declarations, attempt to provide a suggestion via
5558 lookup_name_fuzzy.
5559 (undeclared_variable): Likewise when issuing errors.
5560 (lookup_name_in_scope): Likewise.
5561 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5562 (best_macro_match): New typedef.
5563 (find_closest_macro_cpp_cb): New function.
5564 (lookup_name_fuzzy): New function.
5565 * c-parser.c: Include gcc-rich-location.h.
5566 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5567 (c_keyword_starts_typename): ...this new function.
5568 (c_parser_declaration_or_fndef): When issuing errors about
5569 missing "struct" etc, add a fixit. For other kinds of errors,
5570 attempt to provide a suggestion via lookup_name_fuzzy.
5571 (c_parser_parms_declarator): When looking ahead to detect typos in
5572 type names, also reject CPP_KEYWORD.
5573 (c_parser_parameter_declaration): When issuing errors about
5574 unknown type names, attempt to provide a suggestion via
5575 lookup_name_fuzzy.
5576 * c-tree.h (c_keyword_starts_typename): New prototype.
5577
5a578671
JM
55782016-06-20 Joseph Myers <joseph@codesourcery.com>
5579
5580 PR c/71601
5581 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5582 c_common_type returns error_mark_node.
5583
3f8257db 55842016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
5585
5586 PR c/69507
5587 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5588 __alignof__ (expression).
5589
6a3f203c
DM
55902016-06-14 David Malcolm <dmalcolm@redhat.com>
5591
5592 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5593
264757fb
DM
55942016-06-14 David Malcolm <dmalcolm@redhat.com>
5595
5596 * c-typeck.c (build_component_ref): Simplify fixit code by
5597 using gcc_rich_location::add_fixit_misspelled_id.
5598 (set_init_label): Likewise.
5599
f7e4f2e3
DM
56002016-06-13 David Malcolm <dmalcolm@redhat.com>
5601
5602 * c-parser.c (c_parser_initelt): Provide location of name for new
5603 location_t param of set_init_label.
5604 * c-tree.h (set_init_label): Add location_t param.
5605 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5606 param and use it when issuing error messages about unrecognized
5607 field names. Attempt to provide a fixit hint if appropriate,
5608 otherwise update the error message to provide the type name.
5609
4b1ffdb1
TS
56102016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5611
5612 PR c/71381
5613 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5614 Loosen checking.
5615
44a845ca
MS
56162016-06-08 Martin Sebor <msebor@redhat.com>
5617 Jakub Jelinek <jakub@redhat.com>
5618
5619 PR c++/70507
5620 PR c/68120
5621 * c-typeck.c (convert_arguments): Don't promote last argument
5622 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5623
92a5f2ba
MP
56242016-06-08 Marek Polacek <polacek@redhat.com>
5625
5626 PR c/71418
5627 * c-decl.c (grokdeclarator): Check TYPE_P.
5628
08203f73
MP
5629 PR c/71426
5630 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5631 code.
5632
6ffd47b7
DM
56332016-06-07 David Malcolm <dmalcolm@redhat.com>
5634
5635 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5636 and structure element reference, capture the location of the
5637 element name token and pass it to build_component_ref.
5638 (c_parser_postfix_expression_after_primary): Likewise for
5639 structure element dereference.
5640 (c_parser_omp_variable_list): Likewise for
5641 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5642 * c-tree.h (build_component_ref): Add location_t param.
5643 * c-typeck.c (build_component_ref): Add location_t param
5644 COMPONENT_LOC. Use it, if available, when issuing hints about
5645 mispelled member names to provide a fixit replacement hint.
5646
1f40cff3
MP
56472016-06-06 Marek Polacek <polacek@redhat.com>
5648
5649 PR c/71362
5650 * c-parser.c (c_parser_direct_declarator): Set location.
5651
5545a907
MP
56522016-06-06 Marek Polacek <polacek@redhat.com>
5653
5654 * c-typeck.c (comptypes_internal): Handle comparisons of
5655 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5656 TYPE_REF_CAN_ALIAS_ALL.
5657
b605f663
CLT
56582016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5659
5660 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5661 arguments as addressable when async clause exists.
5662
00631022
JJ
56632016-05-30 Jakub Jelinek <jakub@redhat.com>
5664
5665 PR c++/71349
5666 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5667 when combined with target construct.
5668
7211a097
JJ
56692016-05-26 Jakub Jelinek <jakub@redhat.com>
5670
5671 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5672 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5673
95efe6b6
MP
56742016-05-25 Marek Polacek <polacek@redhat.com>
5675
5676 PR c/71265
5677 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5678
a23faf7a
MP
5679 PR c/71266
5680 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5681
e46c7770
CP
56822016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5683
5684 * c-parser.c (c_parser_oacc_declare): Add support for
5685 GOMP_MAP_FIRSTPRIVATE_POINTER.
5686 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5687 argument with enum c_omp_region_type ort.
5688 (handle_omp_array_sections): Likewise. Update call to
5689 handle_omp_array_sections_1.
5690 (c_finish_omp_clauses): Add specific errors and warning messages for
5691 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5692 call to handle_omp_array_sections.
5693
a04e69c0
TS
56942016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5695
5696 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5697
f17a223d
RB
56982016-05-24 Richard Biener <rguenther@suse.de>
5699
5700 PR middle-end/70434
5701 PR c/69504
5702 * c-typeck.c (build_array_ref): Do not complain about indexing
5703 non-lvalue vectors. Adjust for function name change.
5704
79063edd
MS
57052016-05-20 Martin Sebor <msebor@redhat.com>
5706
5707 PR c/71115
5708 * c-typeck.c (error_init): Use
5709 expansion_point_location_if_in_system_header.
5710 (warning_init): Same.
5711
8a40fef3
DM
57122016-05-19 David Malcolm <dmalcolm@redhat.com>
5713
5714 PR c/71171
5715 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5716 in error-handling.
5717 (c_parser_postfix_expression): Likewise.
5718 * c-tree.h (c_expr::set_error): New method.
5719 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5720 that result's range is initialized.
5721
e9892350
JG
57222016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5723
5724 * c-typeck.c (parser_build_unary_op): Fix formatting.
5725
8fad45f5
MW
57262016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5727
5728 * c-decl.c (grokdeclarator): Remove errmsg and use of
5729 targetm.invalid_return_type.
5730 (grokparms): Remove errmsg and use of
5731 targetm.invalid_parameter_type.
5732
aa4b467b
JM
57332016-05-13 Joseph Myers <joseph@codesourcery.com>
5734
5735 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5736 function return type.
5737
4f2e1536
MP
57382016-05-12 Marek Polacek <polacek@redhat.com>
5739
5740 PR c/70756
5741 * c-decl.c (build_compound_literal): Pass LOC down to
5742 c_incomplete_type_error.
5743 * c-tree.h (require_complete_type): Adjust declaration.
5744 (c_incomplete_type_error): Likewise.
5745 * c-typeck.c (require_complete_type): Add location parameter, pass it
5746 down to c_incomplete_type_error.
5747 (c_incomplete_type_error): Add location parameter, pass it down to
5748 error_at.
5749 (build_component_ref): Pass location down to c_incomplete_type_error.
5750 (default_conversion): Pass location down to require_complete_type.
5751 (build_array_ref): Likewise.
5752 (build_function_call_vec): Likewise.
5753 (convert_arguments): Likewise.
5754 (build_unary_op): Likewise.
5755 (build_c_cast): Likewise.
5756 (build_modify_expr): Likewise.
5757 (convert_for_assignment): Likewise.
5758 (c_finish_omp_clauses): Likewise.
5759
d6e83a8d
MM
57602016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5761
5762 PR c/43651
5763 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5764 is enabled.
5765 * c-errors.c (pedwarn_c90): Return true if warned.
5766 * c-tree.h (pedwarn_c90): Change return type to bool.
5767 (enum c_declspec_word): Add new enumerator cdw_atomic.
5768
5c3a10fb
MP
57692016-05-11 Marek Polacek <polacek@redhat.com>
5770
5771 PR c++/71024
5772 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5773 diagnose_mismatched_attributes and call it.
5774
cf68d92c
MP
57752016-05-10 Marek Polacek <polacek@redhat.com>
5776
5777 PR c/70255
5778 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5779 on a declaration following the definition.
5780
351f85c5
JJ
57812016-05-05 Jakub Jelinek <jakub@redhat.com>
5782
5783 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5784 parse it through to c_parser_c99_block_statement.
5785 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5786 caller.
5787
deef7113
MP
57882016-05-04 Marek Polacek <polacek@redhat.com>
5789
5790 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5791 OPT_Wdangling_else.
5792
de55efd5
MP
57932016-05-04 Marek Polacek <polacek@redhat.com>
5794
5795 PR c/48778
5796 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5797 for macro expansions.
5798
79ce98bc
MP
57992016-05-03 Marek Polacek <polacek@redhat.com>
5800
5801 PR c/70859
5802 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5803 check_builtin_function_arguments.
5804
fb2647aa
RB
58052016-05-03 Richard Biener <rguenther@suse.de>
5806
5807 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5808 the checksum from the previous stage.
5809
77886428
CP
58102016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5811
5812 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5813 c_finish_omp_clauses.
5814 (c_parser_omp_all_clauses): Likewise.
5815 (c_parser_oacc_cache): Likewise.
5816 (c_parser_oacc_loop): Likewise.
5817 (omp_split_clauses): Likewise.
5818 (c_parser_omp_declare_target): Likewise.
5819 (c_parser_cilk_all_clauses): Likewise.
5820 (c_parser_cilk_for): Likewise.
5821 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5822 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5823
7176a4a0
MP
58242016-05-02 Marek Polacek <polacek@redhat.com>
5825
5826 PR c/70851
5827 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5828 incomplete type.
5829
e7ff0319
CP
58302016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5831
5832 PR middle-end/70626
5833 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5834 OACC_LOOP_CLAUSE_MASK.
5835 (c_parser_oacc_kernels_parallel): Update call to
5836 c_oacc_split_loop_clauses.
5837
9f405ce1
AM
58382016-04-28 Andrew MacLeod <amacleod@redhat.com>
5839
5840 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5841 argument to build_modify_expr in two cases.
5842
c1e1f433
BS
58432016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5844
5845 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5846 warn_for_memset instead of warning directly here.
5847
2448a956
MP
58482016-04-26 Marek Polacek <polacek@redhat.com>
5849
5850 PR c/67784
5851 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5852 out of ...
5853 (c_parser_for_statement): ... here.
5854 (c_parser_if_statement): Use it.
5855 (c_parser_switch_statement): Use it.
5856 (c_parser_while_statement): Use it.
5857
b02a5e26
MP
5858 PR c/70791
5859 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5860
477d4906
IV
58612016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5862
5863 PR c++/69363
5864 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5865 instead of c_finish_cilk_clauses.
5866 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5867 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5868 floating-point variables in the linear clause for Cilk Plus.
5869
fe37c7af
MM
58702016-04-18 Michael Matz <matz@suse.de>
5871
5872 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5873 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5874
949505a9
MP
58752016-04-15 Marek Polacek <polacek@redhat.com>
5876
5877 PR c/70671
5878 * c-typeck.c (build_unary_op): Pass location down to error and
5879 warning call.
5880
dda1bf61
JJ
58812016-04-15 Jakub Jelinek <jakub@redhat.com>
5882
5883 PR c/70436
5884 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5885 where needed.
5886 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5887 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5888 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5889 Adjust c_parser_pragma callers.
5890 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5891 caller.
5892 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5893 c_parser_statement.
5894 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5895 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5896 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5897 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5898 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5899 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5900 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5901 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5902 down where needed.
5903 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5904 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5905 calls.
5906
99cd9857
MP
59072016-04-13 Marek Polacek <polacek@redhat.com>
5908
5909 PR c/70436
5910 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5911 adjust callers.
5912 (c_parser_statement): Likewise.
5913 (c_parser_c99_block_statement): Likewise.
5914 (c_parser_while_statement): Likewise.
5915 (c_parser_for_statement): Likewise.
5916 (c_parser_if_body): Don't set IF_P here.
5917 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5918 about dangling else here.
5919 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5920 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5921 warn about dangling else here.
5922
f13355da
MP
59232016-04-04 Marek Polacek <polacek@redhat.com>
5924
5925 PR c/70307
5926 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5927
5fde6a45
MP
59282016-03-31 Marek Polacek <polacek@redhat.com>
5929
5930 PR c/70297
5931 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5932
4bbf545b
DM
59332016-03-18 David Malcolm <dmalcolm@redhat.com>
5934
5935 PR c/70281
5936 * c-parser.c (c_parser_postfix_expression): Set the source range
5937 for uses of "__builtin_types_compatible_p".
5938
fcc2b74f
JJ
59392016-03-17 Jakub Jelinek <jakub@redhat.com>
5940
5941 PR c/70280
5942 * c-typeck.c (composite_type): Don't count void_list_node
5943 into len, if the list is terminated by void_list_node, start
5944 with void_list_node instead of NULL for newargs. Stop
5945 at void_list_node.
5946
ab4c578f
MP
59472016-03-16 Marek Polacek <polacek@redhat.com>
5948
5949 PR c/70093
5950 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5951 nested functions returning VM types.
5952
96b3c82d
CP
59532016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5954
5955 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5956 when calling c_finish_omp_clauses.
5957
29b9828f
BS
59582016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5959
5960 PR c/69824
5961 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5962 for later.
5963
7ff6ca38
MP
59642016-03-04 Marek Polacek <polacek@redhat.com>
5965
5966 PR c/69798
5967 * c-parser.c (c_parser_postfix_expression): Call
5968 c_parser_cast_expression rather than c_parser_postfix_expression.
5969
686e2237
JJ
59702016-03-01 Jakub Jelinek <jakub@redhat.com>
5971
5972 PR c/69796
5973 PR c/69974
5974 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5975 of incomplete decls to error_mark_node.
5976
0b05329b
MP
59772016-02-24 Marek Polacek <polacek@redhat.com>
5978
5979 PR c/69819
5980 * c-decl.c (finish_decl): Don't update the copy of the type of a
5981 different decl type.
5982
067fbd8b
JJ
59832016-02-23 Jakub Jelinek <jakub@redhat.com>
5984
5985 PR objc/69844
5986 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5987 in id_kind reclassification.
5988
bf14eba2
JJ
59892016-02-16 Jakub Jelinek <jakub@redhat.com>
5990
5991 PR c/69835
5992 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5993
ba539195
JN
59942016-02-16 James Norris <jnorris@codesourcery.com>
5995
5996 PR c/64748
5997 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5998
16595a1f
BS
59992016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6000
f48dfe98
BS
6001 * c-decl.c (build_null_declspecs): Zero the entire struct.
6002
16595a1f
BS
6003 PR c/69522
6004 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6005 callers changed. If nested_p is true, use it to call
6006 finish_implicit_inits.
6007 * c-tree.h (finish_implicit_inits): Declare.
6008 * c-typeck.c (finish_implicit_inits): New function. Move code
6009 from ...
6010 (push_init_level): ... here.
6011 (set_designator, process_init_element): Call finish_implicit_inits.
6012
66756373
JJ
60132016-02-11 Jakub Jelinek <jakub@redhat.com>
6014
6015 PR c/69768
6016 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6017 arguments for -Waddress warning.
6018
1066e9b5
JJ
60192016-02-04 Jakub Jelinek <jakub@redhat.com>
6020
6021 PR c/69669
6022 * c-decl.c (finish_enum): When honoring mode attribute,
6023 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6024
3a5d2ba4
JJ
60252016-01-29 Jakub Jelinek <jakub@redhat.com>
6026
6027 PR debug/69518
6028 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6029 all type variants, not just TYPE_MAIN_VARIANT.
6030
cbdd8ae0
JJ
60312016-01-27 Jakub Jelinek <jakub@redhat.com>
6032
6033 PR debug/66869
6034 * c-decl.c (c_write_global_declarations_1): Warn with
6035 warn_unused_function if static prototype without definition
6036 is not C_DECL_USED.
6037
fa74a4bc
MP
60382016-01-27 Marek Polacek <polacek@redhat.com>
6039
6040 PR c/68062
6041 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6042 to unsigned, if needed. Add -Wsign-compare warning.
6043
13f92e8d
JJ
60442016-01-26 Jakub Jelinek <jakub@redhat.com>
6045
6046 PR tree-optimization/69483
6047 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6048
cd8e73dc 60492016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
6050
6051 PR c/24293
6052 * c-tree.h (incomplete_record_decls): Declare.
6053 * c-parser.c (incomplete_record_decls): Define.
6054 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6055 report error if any decl has zero size.
6056 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6057 or enum type to incomplete_record_decls.
6058
e6d6ec9e
TV
60592016-01-14 Tom de Vries <tom@codesourcery.com>
6060
6061 PR tree-optimization/68773
6062 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6063 set force_output.
6064
00083992
MP
60652016-01-14 Marek Polacek <polacek@redhat.com>
6066
6067 PR c/69262
6068 * c-decl.c (grokdeclarator): Provide more information for invalid
6069 array declarations.
6070
7443cf13
DM
60712016-01-06 David Malcolm <dmalcolm@redhat.com>
6072
6073 * c-parser.c (c_parser_unary_expression): For dereferences, build
6074 a combined location before calling build_indirect_ref, so that
6075 error reports cover the full range, manually updating the c_expr
6076 src_range.
6077
6b131d5b
MP
60782016-01-06 Marek Polacek <polacek@redhat.com>
6079
6080 PR sanitizer/69099
6081 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6082 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6083 NULL.
6084
818ab71a
JJ
60852016-01-04 Jakub Jelinek <jakub@redhat.com>
6086
6087 Update copyright years.
6088
2fe0a208
MP
60892016-01-04 Marek Polacek <polacek@redhat.com>
6090
6091 PR c/68908
6092 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6093 optimization to use __atomic_fetch_* built-in if possible.
6094
c7b48c8a
TS
60952015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6096
6097 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6098 into...
6099 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6100 all users.
6101
fda5652f
MP
61022015-12-22 Marek Polacek <polacek@redhat.com>
6103
6104 PR c/69002
6105 * c-typeck.c (build_component_ref): Warn when acessing elements of
6106 atomic structures or unions.
6107
745e411d
DM
61082015-12-21 David Malcolm <dmalcolm@redhat.com>
6109
6110 * c-typeck.c: Include "gcc-rich-location.h".
6111 (build_binary_op): In the two places that call binary_op_error,
6112 create a gcc_rich_location and populate it with the location of
6113 the binary op and its two operands.
6114
94c40e19
DM
61152015-12-16 David Malcolm <dmalcolm@redhat.com>
6116
6117 * c-parser.c (c_parser_statement_after_labels): When calling
6118 c_finish_return, Use the return expression's location if it has
6119 one, falling back to the location of the first token within it.
6120 * c-typeck.c (c_finish_return): When issuing warnings about
6121 the incorrect presence/absence of a return value, issue a note
6122 showing the declaration of the function.
6123
de67c4c3
DM
61242015-12-16 David Malcolm <dmalcolm@redhat.com>
6125
6126 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6127 to 4.
6128 (c_parser_peek_nth_token): New function.
6129 (c_parser_peek_conflict_marker): New function.
6130 (c_parser_error): Detect conflict markers and report them as such.
6131
a10704e1
DM
61322015-12-16 David Malcolm <dmalcolm@redhat.com>
6133
6134 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6135 to preserve range information for the primary expression
6136 in the call to c_parser_postfix_expression_after_primary.
6137
8062bca6
DM
61382015-12-16 David Malcolm <dmalcolm@redhat.com>
6139
6140 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6141 expression location, falling back on the first token location,
6142 rather than always using the latter.
6143
d06f8b75
MP
61442015-12-16 Marek Polacek <polacek@redhat.com>
6145
6146 PR c/64637
6147 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6148 available.
6149
2994fb91
MP
61502015-12-15 Marek Polacek <polacek@redhat.com>
6151
6152 PR c/68907
6153 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6154 artificial decl.
6155
a1b93f8d
DM
61562015-12-08 David Malcolm <dmalcolm@redhat.com>
6157
6158 * c-parser.c (c_parser_alignof_expression): Capture location of
6159 closing parenthesis (if any), or of end of unary expression, and
6160 use it to build a src_range for the expression.
6161
46c6e1e2
DM
61622015-12-08 David Malcolm <dmalcolm@redhat.com>
6163
6164 PR c/68757
6165 * c-parser.c (c_parser_get_builtin_args): Add
6166 "out_close_paren_loc" param, and write back to it.
6167 (c_parser_postfix_expression): Capture the closing
6168 parenthesis location for RID_CHOOSE_EXPR,
6169 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6170 RID_BUILTIN_SHUFFLE and use it to set the source range
6171 for such expressions; within RID_BUILTIN_COMPLEX set
6172 the underlying location.
6173
66189108
MP
61742015-12-07 Marek Polacek <polacek@redhat.com>
6175
6176 PR c/68668
6177 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6178 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6179
f187980b
EB
61802015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6181
6182 * c-tree.h (c_build_va_arg): Adjust prototype.
6183 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6184 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6185 parameter, adjust throughout and issue an error if EXPR is a component
6186 with reverse storage order.
6187
4250754e
JM
61882015-12-02 Jason Merrill <jason@redhat.com>
6189
6190 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6191 (c_fully_fold_internal, decl_constant_value_for_optimization):
6192 Move from c-common.c.
6193 * c-tree.h: Declare decl_constant_value_for_optimization.
6194 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6195
e9e32ee6
JM
61962015-12-02 Joseph Myers <joseph@codesourcery.com>
6197
6198 PR c/68162
6199 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6200 following link from declarator to next declarator. Track original
6201 qualified type and pass it to c_build_qualified_type.
6202 * c-typeck.c (c_build_qualified_type): Add arguments
6203 orig_qual_type and orig_qual_indirect.
6204
ff7a55bf
TS
62052015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6206
6207 * c-parser.c (c_parser_omp_clause_name)
6208 (c_parser_oacc_all_clauses): Alphabetical sorting.
6209
657e4e47
JJ
62102015-12-02 Jakub Jelinek <jakub@redhat.com>
6211
6212 PR c/68533
6213 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6214 for diagnostics.
6215
37d5ad46
JB
62162015-12-01 Julian Brown <julian@codesourcery.com>
6217 Cesar Philippidis <cesar@codesourcery.com>
6218 James Norris <James_Norris@mentor.com>
6219
6220 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6221 (c_parser_oacc_clause_use_device): New function.
6222 (c_parser_oacc_all_clauses): Add use_device support.
6223 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6224 (c_parser_oacc_host_data): New function.
6225 (c_parser_omp_construct): Add host_data support.
6226 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6227 * c-typeck.c (c_finish_oacc_host_data): New function.
6228 (c_finish_omp_clauses): Add use_device support.
6229
a4850ce9
JH
62302015-11-29 Jan Hubicka <hubicka@ucw.cz>
6231
6232 PR c/67106
6233 * c-decl.c: Set TYPE_PACKED in variants.
6234
b58d3df2
ML
62352015-11-27 Martin Liska <mliska@suse.cz>
6236
6237 PR c++/68312
6238 * c-array-notation.c (fix_builtin_array_notation_fn):
6239 Use release_vec_vec instead of vec::release.
6240 (build_array_notation_expr): Likewise.
6241 (fix_conditional_array_notations_1): Likewise.
6242 (fix_array_notation_expr): Likewise.
6243 (fix_array_notation_call_expr): Likewise.
6244
aec17bfe
JJ
62452015-11-27 Jakub Jelinek <jakub@redhat.com>
6246
6247 PR c/63326
6248 * c-parser.c (c_parser_compound_statement_nostart): If
6249 last_label is true, use pragma_stmt instead of pragma_compound
6250 as second c_parser_pragma argument.
6251 (c_parser_omp_ordered, c_parser_omp_target_update,
6252 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6253 false as second argument to c_parser_skip_to_pragma_eol after
6254 diagnosing standalone directives used in pragma_stmt context.
6255
688c4de0
IV
62562015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6257
6258 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6259 with "if (ENABLE_OFFLOADING)".
6260
cbd03aee
DM
62612015-11-23 David Malcolm <dmalcolm@redhat.com>
6262
6263 PR objc/68438
6264 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6265 for various Objective-C constructs: Class.name syntax,
6266 @selector(), @protocol(), @encode(), and [] message syntax.
6267
a87a86e1
DM
62682015-11-20 David Malcolm <dmalcolm@redhat.com>
6269
6270 PR 62314
6271 * c-typeck.c (should_suggest_deref_p): New function.
6272 (build_component_ref): Special-case POINTER_TYPE when
6273 generating a "not a structure of union" error message, and
6274 suggest a "->" rather than a ".", providing a fix-it hint.
6275
8ece8dfb
DM
62762015-11-19 David Malcolm <dmalcolm@redhat.com>
6277
6278 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6279 candidate into a new function, find_closest_identifier.
6280
433068cc
MP
62812015-11-19 Marek Polacek <polacek@redhat.com>
6282
6283 PR c/68412
6284 * c-typeck.c (parser_build_binary_op): Properly handle
6285 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6286
bef08b71
DM
62872015-11-17 David Malcolm <dmalcolm@redhat.com>
6288
6289 * c-parser.c (set_c_expr_source_range): Bulletproof both
6290 overloaded implementations against NULL expr->value.
6291 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6292 values.
6293 (c_parser_unary_expression): Likewise when handling addresses of
6294 labels.
6295 (c_parser_postfix_expression): Likewise for statement expressions,
6296 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6297 __builtin_va_arg, and for __builtin_offset_of.
6298 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6299 src_range using the range of the braced initializer.
6300 (c_parser_transaction_expression): Set src_range for "ret" to a
6301 sane pair of values.
6302
fff77217
KY
63032015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6304
6305 * c-parser.c (c_finish_omp_declare_simd): Look for
6306 "simd" attribute as well. Update error message.
6307
1d899da2
TS
63082015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6309
6310 * c-parser.c (c_parser_omp_declare_target): Adjust.
6311
e4606348
JJ
63122015-11-14 Jakub Jelinek <jakub@redhat.com>
6313
6314 * c-typeck.c (c_finish_omp_clauses): Don't mark
6315 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6316
3e636daf
MP
63172015-11-14 Marek Polacek <polacek@redhat.com>
6318
6319 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6320 * c-typeck.c: Likewise.
6321
ebedc9a3
DM
63222015-11-13 David Malcolm <dmalcolm@redhat.com>
6323
6324 * c-decl.c (warn_defaults_to): Pass line_table to
6325 rich_location ctor.
6326 * c-errors.c (pedwarn_c99): Likewise.
6327 (pedwarn_c90): Likewise.
6328 * c-parser.c (set_c_expr_source_range): New functions.
6329 (c_token::get_range): New method.
6330 (c_token::get_finish): New method.
6331 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6332 based on the range from the start of the LHS to the end of the
6333 RHS.
6334 (c_parser_conditional_expression): Likewise, based on the range
6335 from the start of the cond.value to the end of exp2.value.
6336 (c_parser_binary_expression): Call set_c_expr_source_range on
6337 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6338 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6339 based on the cast_loc through to the end of the expr.
6340 (c_parser_unary_expression): Likewise, based on the
6341 op_loc through to the end of op.
6342 (c_parser_sizeof_expression) Likewise, based on the start of the
6343 sizeof token through to either the closing paren or the end of
6344 expr.
6345 (c_parser_postfix_expression): Likewise, using the token range,
6346 or from the open paren through to the close paren for
6347 parenthesized expressions.
6348 (c_parser_postfix_expression_after_primary): Likewise, for
6349 various kinds of expression.
6350 * c-tree.h (struct c_expr): Add field "src_range".
6351 (c_expr::get_start): New method.
6352 (c_expr::get_finish): New method.
6353 (set_c_expr_source_range): New decls.
6354 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6355 on ret for prefix unary ops.
6356 (parser_build_binary_op): Likewise, running from the start of
6357 arg1.value through to the end of arg2.value.
6358
ec8b536f
MP
63592015-11-13 Marek Polacek <polacek@redhat.com>
6360
6361 PR c/68320
6362 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6363
277fe616
DM
63642015-11-13 David Malcolm <dmalcolm@redhat.com>
6365
6366 * c-typeck.c: Include spellcheck.h.
6367 (lookup_field_fuzzy_find_candidates): New function.
6368 (lookup_field_fuzzy): New function.
6369 (build_component_ref): If the field was not found, try using
6370 lookup_field_fuzzy and potentially offer a suggestion.
6371
6e232ba4
JN
63722015-11-12 James Norris <jnorris@codesourcery.com>
6373 Joseph Myers <joseph@codesourcery.com>
6374
6375 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6376 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6377 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6378 and PRAGMA_OMP_CLAUSE_LINK.
6379 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6380 and PRAGMA_OACC_CLAUSE_LINK.
6381 (OACC_DECLARE_CLAUSE_MASK): New definition.
6382 (c_parser_oacc_declare): New function.
6383
9be4f715
MP
63842015-11-12 Marek Polacek <polacek@redhat.com>
6385
6386 PR c/67784
6387 * c-parser.c (c_parser_for_statement): Reclassify the token in
6388 a correct scope.
6389
e78bede6
MP
63902015-11-11 Marek Polacek <polacek@redhat.com>
6391
6392 PR c/68107
6393 PR c++/68266
6394 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6395 checking the size of an array.
6396
69f293c9
AM
63972015-11-11 Andrew MacLeod <amacleod@redhat.com>
6398
6399 * c-array-notation.c: Remove unused header files.
6400 * c-aux-info.c: Likewise.
6401 * c-convert.c: Likewise.
6402 * c-decl.c: Likewise.
6403 * c-errors.c: Likewise.
6404 * c-lang.c: Likewise.
6405 * c-objc-common.c: Likewise.
6406 * c-parser.c: Likewise.
6407 * c-typeck.c: Likewise.
6408 * gccspec.c: Likewise.
6409
3a40d81d
NS
64102015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6411 Cesar Philippidis <cesar@codesourcery.com>
6412 James Norris <jnorris@codesourcery.com>
6413 Julian Brown <julian@codesourcery.com>
6414 Nathan Sidwell <nathan@codesourcery.com>
6415
3a40d81d
NS
6416 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6417 routine arg.
6418 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6419 (c_parser_pragma): Parse 'acc routine'.
6420 (OACC_ROUTINE_CLAUSE_MARK): Define.
6421 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6422
fc402eec
AA
64232015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6424
6425 PR debug/67192
6426 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6427 location of the backward-goto to the start of the loop body.
6428
f6b0b3db
AA
64292015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6430
6431 PR debug/67192
6432 * c-parser.c (c_parser_while_statement): Finish the loop before
6433 parsing ahead for misleading indentation.
6434 (c_parser_for_statement): Likewise.
6435
ee45a32d
EB
64362015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6437
6438 * c-decl.c (finish_struct): If the structure has reverse storage
6439 order, rewrite the type of array fields with scalar component. Call
6440 maybe_apply_pragma_scalar_storage_order on entry.
6441 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6442 errors on bit-fields and reverse SSO here and not...
6443 (c_mark_addressable): ...here.
6444 (output_init_element): Adjust call to initializer_constant_valid_p.
6445 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6446
8a645150
DM
64472015-11-06 David Malcolm <dmalcolm@redhat.com>
6448
6449 * c-decl.c (warn_defaults_to): Update for change in signature
6450 of diagnostic_set_info.
6451 * c-errors.c (pedwarn_c99): Likewise.
6452 (pedwarn_c90): Likewise.
6453 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6454 for textinfo::set_location.
6455
7a5e4956
CP
64562015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6457 Thomas Schwinge <thomas@codesourcery.com>
6458 James Norris <jnorris@codesourcery.com>
6459
6460 * c-parser.c (c_parser_omp_clause_name): Add support for
6461 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6462 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6463 default(none) in OpenACC.
6464 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6465 arguments.
6466 (c_parser_oacc_clause_tile): New function.
6467 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6468 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6469 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6470 TILE}.
6471 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6472 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6473 FIRSTPRIVATE}.
6474 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6475 (c_parser_oacc_update): Update the error message for missing clauses.
6476 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6477 and OMP_CLAUSE_INDEPENDENT.
6478
bfcfbfa0
MP
64792015-11-05 Marek Polacek <polacek@redhat.com>
6480
6481 PR c/68090
6482 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6483 deal with pre-evaluation on invalid types.
6484
e01d41e5
JJ
64852015-11-05 Jakub Jelinek <jakub@redhat.com>
6486 Ilya Verbin <ilya.verbin@intel.com>
6487
6488 * c-parser.c: Include context.h and gimple-expr.h.
6489 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6490 monotonic together with nonmonotonic.
6491 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6492 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6493 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6494 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6495 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6496 expressions on combined target teams before the target.
6497 (c_parser_omp_declare_target): If decl has "omp declare target" or
6498 "omp declare target link" attribute, and cgraph or varpool node already
6499 exists, then set corresponding flags. Call c_finish_omp_clauses
6500 in the parenthesized extended-list syntax case.
6501 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6502 declare target.
6503 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6504 on OMP_CLAUSE_REDUCTION array sections.
6505 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6506 into the constant offset, or for variable low-bound using
6507 POINTER_PLUS_EXPR. For structure element based array sections use
6508 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6509 (c_finish_omp_clauses): Drop generic_field_head, structure
6510 elements are now always mapped even as array section bases,
6511 diagnose same var in data sharing and mapping clauses. Diagnose if
6512 linear step on declare simd is neither a constant nor a uniform
6513 parameter. Look through POINTER_PLUS_EXPR for array section
6514 reductions. Diagnose the same var or function appearing multiple
6515 times on the same directive. Fix up wording for the to clause if t
6516 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6517 modifier on kinds other than dynamic or guided or nonmonotonic
6518 modifier together with ordered clause.
6519
4bf9e5a8
TS
65202015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6521 Chung-Lin Tang <cltang@codesourcery.com>
6522
6523 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6524
2adfab87
AM
65252015-10-29 Andrew MacLeod <amacleod@redhat.com>
6526
6527 * c-array-notation.c: Reorder #include's and remove duplicates.
6528 * c-aux-info.c: Likewise.
6529 * c-convert.c: Likewise.
6530 * c-decl.c: Likewise.
6531 * c-errors.c: Likewise.
6532 * c-lang.c: Likewise.
6533 * c-objc-common.c: Likewise.
6534 * c-parser.c: Likewise.
6535 * c-typeck.c: Likewise.
6536
e922069e
JW
65372015-10-26 Jim Wilson <jim.wilson@linaro.org>
6538
6539 PR debug/66068
6540 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6541 after calling build_qualified_type.
6542
765dd391
CP
65432015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6544 Thomas Schwinge <thomas@codesourcery.com>
6545 James Norris <jnorris@codesourcery.com>
6546 Joseph Myers <joseph@codesourcery.com>
6547 Julian Brown <julian@codesourcery.com>
6548 Bernd Schmidt <bschmidt@redhat.com>
6549
6550 * c-parser.c (c_parser_oacc_shape_clause): New.
6551 (c_parser_oacc_simple_clause): New.
6552 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6553 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6554
88bae6f4
TS
65552015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6556 James Norris <jnorris@codesourcery.com>
6557 Cesar Philippidis <cesar@codesourcery.com>
6558
6559 PR c/64765
6560 PR c/64880
6561 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6562 parameters, and handle these. Adjust all users.
6563 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6564 into...
6565 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6566 all users.
6567 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6568 declare functions.
6569 (c_finish_omp_construct): Declare function.
6570 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6571 Merge functions into...
6572 (c_finish_omp_construct): ... this new function.
6573
a8fc2579
RB
65742015-10-22 Richard Biener <rguenther@suse.de>
6575
6576 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6577 before folding a MINUS_EXPR.
6578
e9122ef6
MP
65792015-10-21 Marek Polacek <polacek@redhat.com>
6580
6581 PR c/68024
6582 * c-decl.c (start_function): Warn about vararg functions without
6583 a prototype.
6584
9f47c7e5
IE
65852015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6586
6587 * c-typeck.c (build_conditional_expr): Use boolean vector
6588 type for vector comparison.
6589 (build_vec_cmp): New.
6590 (build_binary_op): Use build_vec_cmp for comparison.
6591
fa60eeb9
MP
65922015-10-20 Marek Polacek <polacek@redhat.com>
6593
6594 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6595
2c7020eb
MP
65962015-10-20 Marek Polacek <polacek@redhat.com>
6597
6598 PR c/67964
6599 * c-parser.c (c_parser_attributes): Break out of the loop if the
6600 token after an attribute isn't a comma.
6601
d9a6bd32
JJ
66022015-10-13 Jakub Jelinek <jakub@redhat.com>
6603 Aldy Hernandez <aldyh@redhat.com>
6604
6605 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6606 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6607 (c_parser_omp_variable_list): Handle structure elements for
6608 map, to and from clauses. Handle array sections in reduction
6609 clause. Formatting fixes.
6610 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6611 if clause modifiers.
6612 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6613 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6614 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6615 c_parser_omp_clause_is_device_ptr): New functions.
6616 (c_parser_omp_clause_ordered): Parse optional parameter.
6617 (c_parser_omp_clause_reduction): Handle array reductions.
6618 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6619 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6620 functions.
6621 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6622 (c_parser_omp_clause_depend_sink): New function.
6623 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6624 (c_parser_omp_clause_map): Parse release/delete map kinds and
6625 optional always modifier.
6626 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6627 and c_finish_omp_clauses callers.
6628 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6629 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6630 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6631 (OMP_CRITICAL_CLAUSE_MASK): Define.
6632 (c_parser_omp_critical): Parse critical clauses.
6633 (c_parser_omp_for_loop): Handle doacross loops, adjust
6634 c_finish_omp_for and c_finish_omp_clauses callers.
6635 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6636 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6637 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6638 (c_parser_omp_for): Disallow ordered clause when combined with
6639 distribute. Disallow linear clause when combined with distribute
6640 and not combined with simd.
6641 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6642 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6643 parse clauses and if depend clause is found, don't parse a body.
6644 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6645 Allow target parallel without for after it.
6646 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6647 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6648 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6649 invalid kinds.
6650 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6651 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6652 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6653 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6654 functions.
6655 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6656 defaultmap and is_device_ptr clauses.
6657 (c_parser_omp_target): Parse target parallel and target simd. Set
6658 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6659 and target exit data. Diagnose invalid map kinds.
6660 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6661 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6662 construct.
6663 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6664 &omp_priv.
6665 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6666 (c_parser_omp_taskloop): New function.
6667 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6668 handle PRAGMA_OMP_TASKLOOP.
6669 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6670 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6671 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6672 Add IS_OMP argument, handle structure element bases, diagnose
6673 bitfields, pass IS_OMP recursively, diagnose known zero length
6674 array sections in depend clauses, handle array sections in reduction
6675 clause, diagnose negative length even for pointers.
6676 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6677 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6678 array sections in reduction clause, set
6679 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6680 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6681 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6682 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6683
21ba0cea
MP
66842015-10-06 Marek Polacek <polacek@redhat.com>
6685
6686 * c-parser.c (c_parser_statement_after_labels): Use
6687 protected_set_expr_location.
6688 (c_parser_omp_clause_num_gangs): Likewise.
6689 (c_parser_omp_clause_num_threads): Likewise.
6690 (c_parser_omp_clause_num_workers): Likewise.
6691 (c_parser_omp_clause_vector_length): Likewise.
6692 (c_parser_omp_clause_num_teams): Likewise.
6693 (c_parser_omp_clause_thread_limit): Likewise.
6694 * c-typeck.c (build_c_cast): Likewise.
6695 (c_cast_expr): Likewise.
6696
624d31fe
RS
66972015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6698
6699 * c-typeck.c (c_tree_equal): Use real_equal instead of
6700 REAL_VALUES_EQUAL.
6701
b8fd7909
JM
67022015-10-04 Jason Merrill <jason@redhat.com>
6703
6704 * c-parser.c (c_lex_one_token): Handle @synchronized.
6705 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6706 can change whether the function is transaction_safe.
6707
1c7485af
MP
67082015-10-02 Marek Polacek <polacek@redhat.com>
6709
6710 PR c/67730
6711 * c-typeck.c (convert_for_assignment): Use the expansion point
6712 location throughout.
6713
3e3b8d63
MP
67142015-10-02 Marek Polacek <polacek@redhat.com>
6715
6716 PR c/64249
6717 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6718 and pass it down to c_parser_if_statement.
6719 (c_parser_else_body): Add CHAIN parameter and pass it down to
6720 c_parser_statement_after_labels.
6721 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6722 duplicated if-else-if conditions.
6723
aabef2de
MP
67242015-10-01 Marek Polacek <polacek@redhat.com>
6725
6726 * c-typeck.c (convert_for_assignment): Improve commentary.
6727
de8ddd5f
MP
67282015-09-30 Marek Polacek <polacek@redhat.com>
6729
6730 PR c/67730
6731 * c-typeck.c (c_finish_return): Use the expansion point location for
6732 certain "return with value" warnings.
6733
c4914de6
MLI
67342015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6735
6736 * c-parser.c (pragma_lex): Add loc argument.
6737
0e36f5c7
MP
67382015-09-15 Marek Polacek <polacek@redhat.com>
6739
6740 PR c/67580
6741 * c-decl.c (tag_exists_p): New function.
6742 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6743 struct/union/enum keywords are missing.
6744 * c-tree.h (tag_exists_p): Declare.
6745
2f3bb934
MP
67462015-09-15 Marek Polacek <polacek@redhat.com>
6747
6748 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6749 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6750 Return NULL_TREE instead of 0.
6751 (lookup_name): Return NULL_TREE instead of 0.
6752 (lookup_name_in_scope): Likewise.
6753 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6754 (parser_xref_tag): Use false instead of 0.
6755 (start_struct): Use true instead of 1.
6756 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6757
aa256c4a
MP
67582015-09-14 Marek Polacek <polacek@redhat.com>
6759
6760 * c-typeck.c (set_nonincremental_init_from_string): Use
6761 HOST_WIDE_INT_M1U when shifting a negative value.
6762
dbb68221
MW
67632015-09-09 Mark Wielaard <mjw@redhat.com>
6764
6765 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6766 parm against NULL.
6767
a8a098ac
JJ
67682015-09-10 Jakub Jelinek <jakub@redhat.com>
6769
6770 PR c/67502
6771 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6772 into OMP_FOR_PRE_BODY rather than before the loop.
6773
f4b189d5
JJ
67742015-09-09 Jakub Jelinek <jakub@redhat.com>
6775
0bb99c11
JJ
6776 PR c/67501
6777 * c-parser.c (c_parser_oacc_all_clauses,
6778 c_parser_omp_all_clauses): Remove invalid clause from
6779 list of clauses even if parser->error is set.
6780
fce5e5e3
JJ
6781 PR c/67500
6782 * c-parser.c (c_parser_omp_clause_aligned,
6783 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6784 test for errors.
6785 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6786 error_mark_node.
6787
f4b189d5
JJ
6788 PR c/67495
6789 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6790 instead of c_parser_unary_expression. If the result is !lvalue_p,
6791 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6792
b2aaf235
MP
67932015-09-04 Marek Polacek <polacek@redhat.com>
6794
6795 PR sanitizer/67279
6796 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6797
1807ffc1
MS
67982015-09-03 Martin Sebor <msebor@redhat.com>
6799
6800 PR c/66516
8b652e65
JJ
6801 * c-typeck.c (convert_arguments, parser_build_unary_op,
6802 build_conditional_expr, c_cast_expr, convert_for_assignment,
6803 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6804 reject_gcc_builtin.
6805 (c_decl_implicit): Define.
6806
d04ff417
MP
68072015-09-02 Marek Polacek <polacek@redhat.com>
6808
6809 PR c/67432
6810 * c-parser.c (c_parser_enum_specifier): Give a better error for
6811 an empty enum.
6812
a79683d5
TS
68132015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6814
6815 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6816
191a6b94
MP
68172015-08-12 Marek Polacek <polacek@redhat.com>
6818
6819 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6820 LOC to it.
6821
420a9d9b
MP
68222015-08-03 Marek Polacek <polacek@redhat.com>
6823
6824 PR c/67088
6825 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6826 Use it.
6827 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6828
992118a1
PP
68292015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6830
6831 * c-parser.c (c_parser_if_body): Take token_indent_info
6832 argument. Call warn_for_misleading_indentation even when the
6833 body is a semicolon. Extract token_indent_infos corresponding
6834 to the guard, body and next tokens. Adjust call to
6835 warn_for_misleading_indentation accordingly.
6836 (c_parser_else_body): Likewise.
6837 (c_parser_if_statement): Likewise.
6838 (c_parser_while_statement): Likewise.
6839 (c_parser_for_statement): Likewise.
6840
46308474
LFSM
68412015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6842 Manuel López-Ibáñez <manu@gcc.gnu.org>
6843
6844 * c-decl.c (get_parm_info): Remove static var. Update warning
6845 message.
6846
05b28fd6
MP
68472015-07-27 Marek Polacek <polacek@redhat.com>
6848
6849 PR c++/66555
6850 PR c/54979
6851 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6852
451b5e48
MP
68532015-07-20 Marek Polacek <polacek@redhat.com>
6854
6855 PR c++/55095
6856 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6857 (build_binary_op): Warn about left shift overflows.
6858
1916bcb5
AM
68592015-07-09 Andrew MacLeod <amacleod@redhat.com>
6860
6861 * c-array-notation.c: Adjust includes for flags.h changes.
6862 * c-objc-common.c: Likewise.
6863
c7131fb2
AM
68642015-07-07 Andrew MacLeod <amacleod@redhat.com>
6865
6866 * c-array-notation.c: Adjust includes.
6867 * c-aux-info.c: Likewise.
6868 * c-convert.c: Likewise.
6869 * c-decl.c: Likewise.
6870 * c-errors.c: Likewise.
6871 * c-lang.c: Likewise.
6872 * c-objc-common.c: Likewise.
6873 * c-parser.c: Likewise.
6874 * c-typeck.c: Likewise.
6875
da2e71c9
MLI
68762015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6877
6878 PR fortran/66605
6879 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6880
b155cfd9
MP
68812015-06-29 Marek Polacek <polacek@redhat.com>
6882
6883 PR c/66322
6884 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6885 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6886 about -Wswitch-bool here.
6887 (do_case): Update c_add_case_label call.
6888 (c_finish_case): Update c_do_switch_warnings call.
6889
31521951
MP
68902015-06-27 Marek Polacek <polacek@redhat.com>
6891
6892 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6893
22d03525
MP
68942015-06-26 Marek Polacek <polacek@redhat.com>
6895
6896 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6897 INDIRECT_REF_P.
6898 * c-typeck.c (array_to_pointer_conversion): Likewise.
6899 (build_unary_op): Likewise.
6900 (c_finish_return): Likewise.
6901
f0889939
AM
69022015-06-25 Andrew MacLeod <amacleod@redhat.com>
6903
6904 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6905 * c-parser.c: Likewise.
6906
8d67ee55
RS
69072015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6908
6909 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6910 instead of pointer_hash.
6911 (detect_field_duplicates): Likewise.
6912
0ae9bd27
MP
69132015-06-25 Marek Polacek <polacek@redhat.com>
6914
6915 * c-array-notation.c: Use VAR_P throughout.
6916 * c-decl.c: Likewise.
6917 * c-objc-common.c: Likewise.
6918 * c-parser.c: Likewise.
6919 * c-typeck.c: Likewise.
6920
62f9079a
MP
69212015-06-25 Marek Polacek <polacek@redhat.com>
6922
6923 * c-decl.c: Use is_global_var throughout.
6924 * c-parser.c: Likewise.
6925 * c-typeck.c: Likewise.
6926
abb226c9
AM
69272015-06-17 Andrew MacLeod <amacleod@redhat.com>
6928
6929 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6930 * c-aux-info.c: Likewise.
6931 * c-convert.c: Likewise.
6932 * c-decl.c: Likewise.
6933 * c-errors.c: Likewise.
6934 * c-lang.c: Likewise.
6935 * c-objc-common.c: Likewise.
6936 * c-parser.c: Likewise.
6937 * c-typeck.c: Likewise.
6938
8cbababc
JH
69392015-06-11 Jan Hubicka <hubicka@ucw.cz>
6940
6941 PR middle-end/66325
6942 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6943 variants.
6944
a0349665
PMR
69452015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6946
6947 * c-decl.c (pop_scope): Register the main translation unit
6948 through the new debug hook.
6949
13fdf2e2
AM
69502015-06-08 Andrew MacLeod <amacleod@redhat.com>
6951
6952 * c-array-notation.c : Adjust include files.
6953 * c-aux-info.c : Likewise.
6954 * c-convert.c : Likewise.
6955 * c-decl.c : Likewise.
6956 * c-errors.c : Likewise.
6957 * c-lang.c : Likewise.
6958 * c-lang.h : Likewise.
6959 * c-objc-common.c : Likewise.
6960 * c-parser.c : Likewise.
6961 * c-typeck.c : Likewise.
6962
d7438551
AH
69632015-06-05 Aldy Hernandez <aldyh@redhat.com>
6964
6965 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6966 immediately clobber it.
6967 (c_write_global_declarations_1): Remove call to
6968 check_global_declaration_1.
6969 (c_write_global_declarations_2): Remove.
6970 (c_write_final_cleanups): Rename from c_write_global_declarations.
6971 Remove call to finalize_compilation_unit.
6972 Remove calls to debugging hooks.
6973 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6974 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6975 * c-tree.h: Remove c_write_global_declarations.
6976
ecb9f223
AM
69772015-06-04 Andrew MacLeod <amacleod@redhat.com>
6978
6979 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6980 * c-aux-info.c: Likewise.
6981 * c-convert.c: Likewise.
6982 * c-decl.c: Likewise.
6983 * c-errors.c: Likewise.
6984 * c-lang.c: Likewise.
6985 * c-objc-common.c: Likewise.
6986 * c-parser.c: Likewise.
6987 * c-typeck.c: Likewise.
6988
9482b620
MP
69892015-06-04 Marek Polacek <polacek@redhat.com>
6990
6991 PR c/66341
6992 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6993 it is a lvalue.
6994
bc51ace3
PK
69952015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6996
6997 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6998 Warn for empty struct.
6999 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7000
ea5b45b6
AT
70012015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7002
7003 * c-decl.c (start_function): Call plugin before parsing.
7004 (finish_function): Call plugin after parsing.
7005
c2d47482
PK
70062015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7007
7008 PR c/49551
7009 * c-decl.c (merge_decls): Merge DECL_COMMON.
7010
a95492ab
JW
70112015-05-22 Jim Wilson <jim.wilson@linaro.org>
7012
7013 * Make-lang.in (check_gcc_pallelize): Define.
7014
fd5c817a
MP
70152015-05-22 Marek Polacek <polacek@redhat.com>
7016
7017 PR c/47043
7018 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7019 attributes.
7020
c7b70a3c
MP
70212015-05-21 Marek Polacek <polacek@redhat.com>
7022
7023 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7024 DECL_BUILT_IN.
7025
21b634ae
MP
70262015-05-20 Marek Polacek <polacek@redhat.com>
7027
7028 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7029 * c-typeck.c: Likewise.
7030
296a8c2f
MP
70312015-05-19 Marek Polacek <polacek@redhat.com>
7032
7033 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7034
41b37d5e
JJ
70352015-05-19 Jakub Jelinek <jakub@redhat.com>
7036
7037 PR middle-end/66199
7038 * c-parser.c (c_parser_omp_for_loop): Don't add
7039 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7040 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7041 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7042 constructs.
7043
fab27f52
MM
70442015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7045
7046 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 7047 swaps.
fab27f52 7048
40de31cf
MLI
70492015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7050
7051 PR fortran/44054
7052 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7053 accessor function.
7054
3aa3c9fc
MP
70552015-05-14 Marek Polacek <polacek@redhat.com>
7056
7057 PR c/66066
7058 PR c/66127
7059 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7060 rather than with 0.
7061
c3388e62
DM
70622015-05-12 David Malcolm <dmalcolm@redhat.com>
7063
7064 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7065 to add a call to warn_for_misleading_indentation.
7066 (c_parser_else_body): Likewise, adding param "else_loc".
7067 (c_parser_if_statement): Check for misleading indentation.
7068 (c_parser_while_statement): Likewise.
7069 (c_parser_for_statement): Likewise.
7070
755e528f
MP
70712015-05-08 Marek Polacek <polacek@redhat.com>
7072
7073 PR c/64918
7074 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7075 (output_init_element): Likewise.
7076
0173bd2a
MP
70772015-05-07 Marek Polacek <polacek@redhat.com>
7078
7079 PR c/65179
7080 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7081 value.
7082
9babc352
MP
70832015-04-30 Marek Polacek <polacek@redhat.com>
7084
7085 * c-typeck.c (set_init_label): Call error_at instead of error and
7086 pass LOC to it.
7087
ac9f18db
MP
7088 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7089 the type of a decl.
7090
ec3fba51
MP
7091 * c-typeck.c (c_build_va_arg): Clarify the error message.
7092
b811915d
TS
70932015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7094
7095 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7096 OMP_STANDALONE_CLAUSES.
7097
f3075008
MP
70982015-04-28 Marek Polacek <polacek@redhat.com>
7099
7100 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7101
4e81b788
MP
71022015-04-28 Marek Polacek <polacek@redhat.com>
7103
7104 PR c/65901
7105 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7106
6c1db78e
MP
71072015-04-25 Marek Polacek <polacek@redhat.com>
7108
7109 PR c/52085
7110 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7111 attribute.
7112
5c4abbb8
MP
71132015-04-23 Marek Polacek <polacek@redhat.com>
7114
7115 PR c/65345
7116 * c-decl.c (set_labels_context_r): New function.
7117 (store_parm_decls): Call it via walk_tree_without_duplicates.
7118 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7119 instead of create_tmp_var. Build TARGET_EXPR instead of
7120 COMPOUND_EXPR.
7121 (build_atomic_assign): Use create_tmp_var_raw instead of
7122 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7123
06aca1d5
IV
71242015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7125
7126 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7127 (c_parser_omp_target_update): Add missed %> to error_at ().
7128
8fba1830
BRF
71292015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7130
7131 PR target/55143
7132 * c-decl.c (c_default_pointer_mode): Remove definition.
7133 * c-tree.h (c_default_pointer_mode): Remove declaration.
7134
62021f64
TB
71352015-03-27 Tobias Burnus <burnus@net-b.de>
7136
7137 PR c/65586
7138 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7139 error out.
7140 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7141 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7142 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7143
9b65e171
JJ
71442015-03-19 Jakub Jelinek <jakub@redhat.com>
7145
7146 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7147 attribute for DECL_EXTERNAL VAR_DECLs.
7148
17958621
JJ
71492015-03-11 Jakub Jelinek <jakub@redhat.com>
7150
7151 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7152 argument.
7153
7ccb1a11
JJ
71542015-03-10 Jakub Jelinek <jakub@redhat.com>
7155
7156 PR c/65120
7157 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7158 before preparing arguments to warn_logical_not_parentheses.
7159
01177669
JJ
71602015-03-09 Jakub Jelinek <jakub@redhat.com>
7161
7162 PR c/65120
7163 * c-typeck.c (parser_build_binary_op): Don't warn for
7164 !!x == y or !b == y where b is _Bool.
7165
802ac282
MP
71662015-03-09 Marek Polacek <polacek@redhat.com>
7167
7168 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7169 * c-decl.c (grokdeclarator): Likewise.
7170 * c-typeck.c (build_binary_op): Likewise.
7171
e5165b60
MP
71722015-02-27 Marek Polacek <polacek@redhat.com>
7173
7174 PR c/65228
7175 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7176
065d214c
MP
71772015-02-14 Marek Polacek <polacek@redhat.com>
7178
7179 PR c/64768
7180 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7181 declared through a typedef name.
7182
e5d9235b
MP
71832015-02-13 Marek Polacek <polacek@redhat.com>
7184
7185 PR c/65050
7186 * c-decl.c (grokdeclarator): Print also the type when giving
7187 the error message about array's incomplete element type.
7188
fa01ffcc
JJ
71892015-02-11 Jakub Jelinek <jakub@redhat.com>
7190
7191 PR c/64824
7192 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7193 check in the POP macro.
7194
c3e38a03
MP
71952015-02-09 Marek Polacek <polacek@redhat.com>
7196
7197 PR c/64856
7198 * c-typeck.c (process_init_element): Don't always wrap
7199 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7200 initializing a range of elements.
7201
4886ec8e
JJ
72022015-02-04 Jakub Jelinek <jakub@redhat.com>
7203
7204 PR c/64824
7205 PR c/64868
7206 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7207
c3e38a03 72082015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
7209
7210 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7211 processing enum declaration.
7212
7b33f0c8
MP
72132015-01-29 Marek Polacek <polacek@redhat.com>
7214
7215 PR c/64709
7216 * c-typeck.c (pop_init_level): If constructor_elements has
7217 exactly one element with integer_zerop value, set constructor_zeroinit
7218 to 1. Remove braces around warning_init call.
7219
dea63e49
JJ
72202015-01-27 Jakub Jelinek <jakub@redhat.com>
7221
7222 PR c/64766
7223 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7224 of FUNCTION_DECLs with error_mark_node.
7225
d38f7dce
JJ
72262015-01-26 Jakub Jelinek <jakub@redhat.com>
7227
7228 PR c/64778
7229 * c-typeck.c (convert_arguments): Return -1 if there are
7230 error_args, even if we've diagnosed too many arguments.
7231
cbf5d0e7
RB
72322015-01-21 Richard Biener <rguenther@suse.de>
7233
7234 PR middle-end/64313
7235 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7236 for builtins the user declared correctly.
7237
41dbbb37
TS
72382015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7239 Bernd Schmidt <bernds@codesourcery.com>
7240 Cesar Philippidis <cesar@codesourcery.com>
7241 James Norris <jnorris@codesourcery.com>
7242 Jakub Jelinek <jakub@redhat.com>
7243 Ilmir Usmanov <i.usmanov@samsung.com>
7244
7245 * c-parser.c: Include "gomp-constants.h".
7246 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7247 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7248 Use OMP_CLAUSE_SET_MAP_KIND.
7249 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7250 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7251 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7252 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7253 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7254 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7255 "copyout", "create", "delete", "deviceptr", "gang", "host",
7256 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7257 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7258 "present_or_create", "pcreate", "seq", "self", "vector",
7259 "vector_length", "wait", "worker".
7260 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7261 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7262 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7263 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7264 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7265 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7266 (c_parser_oacc_data_clause_deviceptr)
7267 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7268 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7269 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7270 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7271 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7272 (c_parser_oacc_parallel, c_parser_oacc_update)
7273 (c_parser_oacc_wait): New functions.
7274 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7275 (c_finish_oacc_data): New prototypes.
7276 * c-typeck.c: Include "gomp-constants.h".
7277 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7278 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7279 OMP_CLAUSE_SET_MAP_KIND.
7280 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7281 (c_finish_oacc_data): New functions.
7282 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7283 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7284 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7285 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7286 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7287 GOMP_MAP_FORCE_DEVICEPTR.
7288
adfac8df
JJ
72892015-01-09 Michael Collison <michael.collison@linaro.org>
7290
7291 * c-array-notation.c: Include hash-set.h, machmode.h,
7292 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7293 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7294 * c-aux-info.c: Ditto.
7295 * c-convert.c: Ditto.
7296 * c-decl.c: Ditto.
7297 * c-errors.c: Ditto.
7298 * c-lang.c: Dittoxs.
7299 * c-objc-common.c: Ditto.
7300 * c-parser.c: Ditto.
7301 * c-typeck.c: Include hash-set.h, machmode.h,
7302 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7303 fold-const.h, wide-int.h, inchash.h, real.h and
7304 fixed-value.h due to flattening of tree.h.
7305
2cc901dc
MP
73062015-01-07 Marek Polacek <polacek@redhat.com>
7307
7308 PR c/64417
7309 * c-typeck.c (process_init_element): Disallow initialization of
7310 a flexible array member with a string constant if the structure
7311 is in an array.
7312
5624e564
JJ
73132015-01-05 Jakub Jelinek <jakub@redhat.com>
7314
e5341100
JJ
7315 PR sanitizer/64344
7316 * c-typeck.c (convert_for_assignment, c_finish_return): For
7317 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7318 types also set in_late_binary_op around convert call.
7319 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7320 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7321 result on expr as last argument to ubsan_instrument_float_cast,
7322 if in_late_binary_op, don't use c_save_expr but save_expr.
7323
5624e564
JJ
7324 Update copyright years.
7325
5bd012f8
MP
73262015-01-05 Marek Polacek <polacek@redhat.com>
7327
7328 PR c/64423
7329 * c-typeck.c (build_array_ref): Pass loc down to
7330 warn_array_subscript_with_type_char.
7331
3f8257db 73322014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7333
7334 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 7335 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 7336 element type.
8e745a17 7337 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 7338 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 7339 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 7340 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 7341 to PEDWARN_FOR_QUALIFIERS.
768952be 7342
8f94a8c4
JJ
73432014-12-17 Jakub Jelinek <jakub@redhat.com>
7344
7345 PR sanitizer/64289
7346 * c-convert.c: Include ubsan.h.
7347 (convert): For real -> integral casts and
7348 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7349 instead instrument the float cast directly.
7350
b731b390
JJ
73512014-11-29 Jakub Jelinek <jakub@redhat.com>
7352
7353 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7354 c_finish_stmt_expr): Remove NULL last argument from
7355 create_tmp_var_raw and create_tmp_var calls.
7356 * c-array-notation.c (fix_builtin_array_notation_fn,
7357 build_array_notation_expr, fix_conditional_array_notations_1,
7358 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7359
541e35a6
MP
73602014-11-28 Marek Polacek <polacek@redhat.com>
7361
7362 PR c/63862
7363 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7364 convert the right operand to integer type.
7365
b286be94
MP
73662014-11-25 Marek Polacek <polacek@redhat.com>
7367
7368 PR c/63877
7369 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7370 for inline functions.
7371
aa7da51a
JJ
73722014-11-21 Jakub Jelinek <jakub@redhat.com>
7373
7374 PR target/63764
7375 * c-typeck.c (build_array_ref): Adjust
7376 convert_vector_to_pointer_for_subscript caller. If it returns true,
7377 call non_lvalue_loc on the result.
7378
d876207f
RB
73792014-11-11 Richard Biener <rguenther@suse.de>
7380
7381 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7382 to true.
7383
e5e44252
AK
73842014-11-10 Andi Kleen <ak@linux.intel.com>
7385
7386 PR c/60804
7387 * c-parser.c (c_parser_statement_after_labels): Call
7388 check_no_cilk.
7389 (c_parser_if_statement): Dito.
7390 (c_parser_switch_statement): Dito.
7391 (c_parser_while_statement): Dito.
7392 (c_parser_do_statement): Dito.
7393 (c_parser_for_statement): Dito.
7394 * c-typeck.c (c_finish_loop): Dito.
7395
13c21655
PC
73962014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7397
7398 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7399 OPT_Wshift_count_overflow in the warnings.
7400
2d51fcef
MP
74012014-10-30 Marek Polacek <polacek@redhat.com>
7402
7403 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7404 print the stripped version as well, if they're not the same.
7405
ef4bddc2
RS
74062014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7407
7408 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7409 machine_mode.
7410
c582198b
AM
74112014-10-28 Andrew MacLeod <amacleod@redhat.com>
7412
7413 * c-decl.c: Adjust include files.
7414 * c-parser.c: Ditto.
7415
ddc8de03
PM
74162014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7417 Tom Tromey <tromey@redhat.com>
7418
7419 * c-tree.h (enum c_oracle_request): New.
7420 (c_binding_oracle_function): New typedef.
7421 (c_binding_oracle, c_pushtag, c_bind): Declare.
7422 * c-decl.c (c_binding_oracle): New global.
7423 (I_SYMBOL_CHECKED): New macro.
7424 (i_symbol_binding): New function.
7425 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7426 (I_TAG_CHECKED): New macro.
7427 (i_tag_binding): New function.
7428 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7429 (I_LABEL_CHECKED): New macro.
7430 (i_label_binding): New function.
7431 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7432 (c_print_identifier): Save and restore c_binding_oracle.
7433 (c_pushtag, c_bind): New functions.
7434
60393bbc
AM
74352014-10-27 Andrew MacLeod <amacleod@redhat.com>
7436
7437 * c-typeck.c: Adjust include files.
7438
d723bb7c
MLI
74392014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7440
7441 PR c++/53061
7442 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7443 initialization here...
7444 (c_initialize_diagnostics): ... but here. Set defaults after
7445 building pretty-printer.
7446
1bc5a451
MP
74472014-10-23 Marek Polacek <polacek@redhat.com>
7448
7449 PR c/63626
7450 * c-decl.c (pop_scope): Don't print warning in external_scope.
7451
4435bb92
MP
74522014-10-19 Marek Polacek <polacek@redhat.com>
7453
7454 PR c/63567
7455 * c-typeck.c (output_init_element): Allow initializing objects with
7456 static storage duration with compound literals even in C99 and add
7457 pedwarn for it.
7458
7278465e
MP
74592014-10-17 Marek Polacek <polacek@redhat.com>
7460
7461 PR c/63567
7462 * c-typeck.c (digest_init): Allow initializing objects with static
7463 storage duration with compound literals even in C99 and add pedwarn
7464 for it.
7465
d9b7be2e
MP
74662014-10-17 Marek Polacek <polacek@redhat.com>
7467
7468 PR c/63543
7469 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7470 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7471 error multiple times. Print the type.
7472
f406ae1f
MP
74732014-10-17 Marek Polacek <polacek@redhat.com>
7474
7475 PR c/63549
7476 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7477 type.
7478
92574c7c
MP
74792014-10-17 Marek Polacek <polacek@redhat.com>
7480
7481 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7482 (start_function): Use OPT_Wimplicit_int instead of 0.
7483 (store_parm_decls_oldstyle): Likewise.
7484
1bc4a978
MT
74852014-10-17 Alan Modra <amodra@gmail.com>
7486
7487 PR middle-end/61848
7488 * c-decl.c (merge_decls): Don't merge section name or tls model
7489 to newdecl symtab node, instead merge to olddecl. Override
7490 existing olddecl section name. Set tls_model for all thread-local
7491 vars, not just OMP thread-private ones. Remove incorrect comment.
7492
83685514
AM
74932014-10-16 Andrew MacLeod <amacleod@redhat.com>
7494
7495 * c-decl.c: Adjust include files.
7496
78a7c317
DD
74972014-10-14 DJ Delorie <dj@redhat.com>
7498
7499 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7500 (c_token_starts_typename): Check all __intN, not just __int128.
7501 (c_token_starts_declspecs): Likewise.
7502 (c_parser_declspecs): Likewise.
7503 (c_parser_attribute_any_word): Likewise.
7504 (c_parser_objc_selector): Likewise.
7505 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7506 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7507 is specified.
7508 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7509 __int128.
7510 (finish_declspecs): Likewise.
7511
74d98c1e
AB
75122014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7513
8e745a17 7514 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 7515 the duplicate code.
8e745a17 7516 (c_parser_statement): Call the new function.
74d98c1e 7517
84937de2
MP
75182014-10-09 Marek Polacek <polacek@redhat.com>
7519
7520 PR c/63480
7521 * c-typeck.c (pop_init_level): Don't warn about initializing
7522 with { }.
7523
0382aaa0
MP
75242014-10-07 Marek Polacek <polacek@redhat.com>
7525
7526 PR c/59717
7527 * c-decl.c (header_for_builtin_fn): New function.
7528 (implicitly_declare): Suggest which header to include.
7529
7a0ca710
MP
75302014-10-07 Marek Polacek <polacek@redhat.com>
7531
7532 * c-convert.c (convert): Use error_operand_p.
7533 * c-typeck.c (require_complete_type): Likewise.
7534 (really_atomic_lvalue): Likewise.
7535 (digest_init): Likewise.
7536 (handle_omp_array_sections_1): Likewise.
7537
6bc8a126
MP
75382014-10-03 Marek Polacek <polacek@redhat.com>
7539
7540 PR c/63453
7541 * c-decl.c (pop_scope): Don't warn about "inline function declared
7542 but never defined" for functions marked with gnu_inline attribute.
7543
d90c0a59
JJ
75442014-09-25 Jakub Jelinek <jakub@redhat.com>
7545
7546 PR c++/63249
7547 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7548 on low_bound and length.
7549
083e891e
MP
75502014-09-24 Marek Polacek <polacek@redhat.com>
7551
7552 PR c/61405
7553 PR c/53874
7554 * c-parser.c: Don't define CPP_KEYWORD.
7555 (c_parser_switch_statement): Pass original type to c_finish_case.
7556 * c-tree.h (c_finish_case): Update declaration.
7557 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7558 conditionally to c_do_switch_warnings.
7559
8d95fe25
MP
75602014-09-03 Marek Polacek <polacek@redhat.com>
7561
7562 PR c/62024
7563 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7564 conversions.
7565
9a771876
JJ
75662014-09-02 Jakub Jelinek <jakub@redhat.com>
7567 Balaji V. Iyer <balaji.v.iyer@intel.com>
7568 Igor Zamyatin <igor.zamyatin@intel.com>
7569
7570 * c-parser.c (c_parser_cilk_for): New function.
7571 (c_parser_cilk_grainsize): Likewise.
7572 (c_get_temp_regvar): Likewise.
7573 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7574 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7575 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7576 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7577 case.
7578
b7679d96
CG
75792014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7580
7581 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7582 with using HOST_WIDE_INT without truncation to 'int'
7583
59ea0364
MP
75842014-08-22 Marek Polacek <polacek@redhat.com>
7585
7586 PR c++/62199
7587 * c-typeck.c (parser_build_binary_op): Adjust call to
7588 warn_logical_not_parentheses.
7589
671a475e
IZ
75902014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7591
7592 PR other/62008
7593 * c-parser.c (c_parser_array_notation): Check for correct
7594 type of an array added.
7595
04159acf
MP
75962014-08-19 Marek Polacek <polacek@redhat.com>
7597
7598 PR c++/62153
7599 * c-typeck.c (build_binary_op): If either operand of a comparison
7600 is a boolean expression, call maybe_warn_bool_compare.
7601
c77935ee
PP
76022014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7603
7604 PR c/45584
7605 * c-typeck.c (build_c_cast): Do a conversion even when the
7606 TYPE_MAIN_VARIANTs are the same.
7607
35aff4fb
MP
76082014-08-19 Marek Polacek <polacek@redhat.com>
7609
7610 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7611 pedwarn_c99 instead of pedwarn.
7612 (grokfield): Likewise.
7613 (warn_defaults_to): New function.
7614 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7615 Unconditionally call pedwarn_c99 instead of pedwarn.
7616 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7617 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7618 check flag_isoc11 before.
7619 * c-errors.c (pedwarn_c99): Change the return type to bool.
7620 Handle -Wc99-c11-compat.
7621 * c-parser.c (disable_extension_diagnostics): Handle
7622 warn_c99_c11_compat.
7623 (restore_extension_diagnostics): Likewise.
7624 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7625 instead of pedwarn, don't check flag_isoc11 before.
7626 (c_parser_declspecs): Likewise.
7627 (c_parser_alignas_specifier): Likewise.
7628 (c_parser_alignof_expression): Likewise.
7629 (c_parser_generic_selection): Likewise.
7630 * c-tree.h (pedwarn_c99): Update declaration.
7631 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7632 of pedwarn_c99.
7633
177cce46
MP
76342014-08-19 Marek Polacek <polacek@redhat.com>
7635
7636 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7637 to pedwarn_c90.
7638 * c-errors.c: Include "opts.h".
7639 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7640 * c-parser.c (disable_extension_diagnostics): Handle negative value
7641 of warn_c90_c99_compat, too.
7642 (restore_extension_diagnostics): Likewise.
7643 (c_parser_compound_statement_nostart): Pass
7644 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7645
6dc99c33
MP
76462014-08-12 Marek Polacek <polacek@redhat.com>
7647
7648 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7649 Add pedwarn.
7650 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7651 Likewise.
7652 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7653
3f8257db 76542014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
7655
7656 PR c/51849
7657 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7658 Call pedwarn_c90 instead of pedwarn.
7659 (check_bitfield_type_and_width): Likewise.
7660 (declspecs_add_qual): Likewise.
7661 (declspecs_add_type): Likewise.
7662 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7663 Adjust to only call pedwarn_c90.
7664 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7665 pedwarn_c90 instead of pedwarn.
7666 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7667 * c-parser.c (disable_extension_diagnostics): Handle
7668 warn_c90_c99_compat.
7669 (restore_extension_diagnostics): Likewise.
7670 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7671 pedwarn_c90 instead of pedwarn.
7672 (c_parser_initelt): Likewise.
7673 (c_parser_postfix_expression): Likewise.
7674 (c_parser_postfix_expression_after_paren_type): Likewise.
7675 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7676 * c-tree.h: Fix formatting.
7677 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7678 pedwarn_c90 instead of pedwarn.
7679
9f25a338
TS
76802014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7681
7682 * c-typeck.c: Remove include of pointer-set.h.
7683
044331a8
MP
76842014-08-07 Marek Polacek <polacek@redhat.com>
7685
7686 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7687
b787e7a2
TS
76882014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7689
7690 * c-typeck.c: Use hash_map instead of pointer_map.
7691
6e2830c3
TS
76922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7693
7694 * c-decl.c: Use hash_set instead of pointer_set.
7695
a7ee52fb
IZ
76962014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7697
7698 PR middle-end/61455
7699 * c-array-notation.c (expand_array_notations): Handling
7700 of DECL_EXPR added.
7701
b4dfdc11
MG
77022014-07-31 Marc Glisse <marc.glisse@inria.fr>
7703
7704 PR c++/60517
7705 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7706 a local variable.
7707
976d5a22
TT
77082014-07-30 Tom Tromey <tromey@redhat.com>
7709
7710 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7711 field.
7712 (really_start_incremental_init, push_init_level): Initialize
7713 designator_depth.
7714 (pop_init_level): Set global designator_depth.
7715 (process_init_element): Check for designated_init attribute.
7716
30281de2
MP
77172014-07-20 Marek Polacek <polacek@redhat.com>
7718
7719 PR c/61852
7720 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7721 (implicitly_declare): Pass location to implicit_decl_warning.
7722
b108f48f
JJ
77232014-07-14 Jakub Jelinek <jakub@redhat.com>
7724
7725 PR middle-end/61294
7726 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7727 If non-NULL, call c_parser_check_literal_zero.
7728 (c_parser_check_literal_zero): New function.
7729 (c_parser_postfix_expression_after_primary): Adjust
7730 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7731
773ec47f
MP
77322014-07-06 Marek Polacek <polacek@redhat.com>
7733
7734 PR c/6940
7735 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7736 * c-tree.h (C_ARRAY_PARAMETER): Define.
7737 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7738 function parameter.
7739
22e1cf1c 77402014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7741 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7742
7743 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7744 releasing symbol.
7745
52ec0ea3
MP
77462014-07-01 Marek Polacek <polacek@redhat.com>
7747
7748 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7749 instead of 0 to WARN_FOR_ASSIGNMENT.
7750
d5c3d343
MP
77512014-07-01 Marek Polacek <polacek@redhat.com>
7752
7753 PR c/58286
7754 * c-typeck.c (convert_for_assignment): Pass
7755 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7756
6a7253a4
MP
77572014-06-30 Marek Polacek <polacek@redhat.com>
7758
7759 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7760 has no_sanitize_undefined attribute.
7761
5e88a8f4
IZ
77622014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7763
7764 PR middle-end/57541
7765 * c-array-notation.c (fix_builtin_array_notation_fn):
7766 Check for 0 arguments in builtin call. Check that bultin argument is
7767 correct.
7768 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7769 index.
7770
9698b078
SH
77712014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7772
7773 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7774 qualifiers in __auto_type for atomic types.
7775 (c_parser_typeof_specifier): Discard all type qualifiers in
7776 __typeof__ for atomic types.
7777
6e07c515
MP
77782014-06-25 Marek Polacek <polacek@redhat.com>
7779
7780 PR c/61162
7781 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7782 the return expression to c_finish_return.
7783
da6f124d
JJ
77842014-06-25 Jakub Jelinek <jakub@redhat.com>
7785
7786 * c-typeck.c (c_finish_omp_clauses): Make sure
7787 OMP_CLAUSE_LINEAR_STEP has correct type.
7788
c203e8a7
TS
77892014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7790
7791 * c-decl.c: Adjust.
7792
56ad0e38
JJ
77932014-06-24 Jakub Jelinek <jakub@redhat.com>
7794
7795 * c-parser.c (c_parser_omp_for_loop): For
7796 #pragma omp parallel for simd move lastprivate clause from parallel
7797 to for rather than simd.
7798
47c2554f
MP
77992014-06-23 Marek Polacek <polacek@redhat.com>
7800
7801 * c-typeck.c (parser_build_binary_op): Don't call
7802 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7803
56363ffd
JH
78042014-06-15 Jan Hubicka <hubicka@ucw.cz>
7805
7806 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7807 * c-decl.c (merge_decls): Likewise.
7808
d7ff7ae5
MP
78092014-06-09 Marek Polacek <polacek@redhat.com>
7810
7811 PR c/36446
7812 * c-typeck.c (error_init): Call inform instead of error_at.
7813 (pedwarn_init): Call inform instead of pedwarn.
7814 (warning_init): Call inform instead of warning_at.
7815
24d047a3
JH
78162014-06-07 Jan Hubicka <hubicka@ucw.cz>
7817
7818 * c-decl.c (merge_decls): Use set_decl_section_name.
7819 (duplicate_decls): Remove node if it exists.
7820
9bac5cbb
G
78212014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7822
7823 PR c/53119
7824 * c-typeck.c (push_init_level, process_init_element,
7825 pop_init_level): Correct check for zero initialization, move
7826 missing brace warning to respect zero initialization.
7827
8ffcdea8
MP
78282014-06-05 Marek Polacek <polacek@redhat.com>
7829
7830 PR c/56724
7831 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7832
742938c9
MP
78332014-06-05 Marek Polacek <polacek@redhat.com>
7834
7835 PR c/49706
7836 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7837 on the left hand side operand of a comparison.
742938c9 7838
6447c55d
MP
78392014-06-05 Marek Polacek <polacek@redhat.com>
7840
7841 PR c/48062
7842 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7843 Print note only if the warning was printed.
7844
9dc7743c
IZ
78452014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7846
7847 PR c/58942
7848 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7849 with a pointer.
7850
fedfecef
MP
78512014-06-03 Marek Polacek <polacek@redhat.com>
7852
7853 PR c/60439
7854 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7855 c_start_case.
7856 * c-tree.h (c_start_case): Update.
7857 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7858 switch condition has boolean value.
7859
9b2b7279
AM
78602014-06-02 Andrew MacLeod <amacleod@redhat.com>
7861
7862 * c-decl.c: Include builtins.h.
7863 * c-parser.c: Likewise.
7864
5c1bc275
MP
78652014-05-27 Marek Polacek <polacek@redhat.com>
7866
7867 PR c/56724
7868 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7869 error and warning calls to error_at and warning_at. Pass location of
7870 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7871 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7872 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7873
97563bc8
IZ
78742014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7875
7876 PR c/61191
7877 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7878 function parameters.
7879
aede2c10
JH
78802014-05-23 Jan Hubicka <hubicka@ucw.cz>
7881
7882 * c-decl.c (merge_decls): Preserve symtab node pointers.
7883 (duplicate_decls): Free new decl.
7884
edbba2ce
TS
78852014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7886
f3316c6d
TS
7887 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7888 initialization.
7889
edbba2ce
TS
7890 * c-parser.c (c_parser_omp_target): Return bool values.
7891
68c81f24
TS
78922014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7893
7894 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7895 num_teams_loc variable to num_thread_limit_loc.
7896
632f2871
RS
78972014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7898
7899 * c-array-notation.c (expand_array_notations): Use void_node
7900 instead of void_zero_node.
7901
766090c2
TS
79022014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7903
7904 * c-decl.c (finish_struct): Adjust.
7905 (finish_enum): Likewise.
7906 (bind): Adjust.
7907 (record_inline_static): Likewise.
7908 (push_scope): Likewise.
7909 (make_label): Likewise.
7910 (lookup_label_for_goto): Likewise.
7911 (finish_struct): Likewise.
7912 (finish_enum): Likewise.
7913 (store_parm_decls): Likewise.
7914 (c_push_function_context): Likewise.
7915 * c-lang.h: Remove usage of variable_size gty attribute.
7916 * c-parser.c (c_parse_init): Adjust.
7917 (c_parse_file): Likewise.
7918
2b107f6b
MP
79192014-05-13 Marek Polacek <polacek@redhat.com>
7920
7921 PR c/61162
7922 * c-typeck.c (convert_for_assignment): Pass location to
7923 WARN_FOR_ASSIGNMENT instead of input_location.
7924
d033409e
MP
79252014-05-10 Marek Polacek <polacek@redhat.com>
7926
7927 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7928 maybe_warn_string_init.
7929 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7930 maybe_warn_string_init.
7931 * c-tree.h (maybe_warn_string_init): Update declaration.
7932 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7933 Call pedwarn_init with loc instead of with input_location.
7934 (digest_init): Pass init_loc to maybe_warn_string_init.
7935 (pop_init_level): Call pedwarn_init with loc instead of with
7936 input_location.
7937 (set_init_index): Likewise.
7938 (process_init_element): Likewise.
7939
ea58ef42
MP
79402014-05-09 Marek Polacek <polacek@redhat.com>
7941
7942 PR c/61096
7943 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7944 (c_parser_initelt): Pass location to set_init_label. Pass array index
7945 location to set_init_index.
7946 * c-tree.h (push_init_level): Update declaration.
7947 (pop_init_level): Likewise.
7948 (set_init_index): Likewise.
7949 (set_init_label): Likewise.
7950 * c-typeck.c (error_init): Add location parameter. Call error_at
7951 instead of error.
7952 (digest_init): Pass init_loc to error_init.
7953 (really_start_incremental_init):
7954 (push_init_level): Add location parameter. Pass loc to pop_init_level
7955 and error_init.
7956 (pop_init_level): Likewise.
7957 (set_designator): Add location parameter. Pass loc to pop_init_level,
7958 push_init_level, and error_init.
7959 (set_init_index): Add location parameter. Pass loc to error_init and
7960 set_designator.
7961 (set_init_label): Likewise.
7962 (output_init_element): Pass loc to error_init.
7963 (process_init_element): Pass loc to error_init, pop_init_level,
7964 pedwarn_init, and push_init_level.
7965
661a0813
MP
79662014-05-09 Marek Polacek <polacek@redhat.com>
7967
7968 PR c/50459
7969 * c-parser.c (c_parser_attributes): Parse the arguments as an
7970 expression-list if the attribute takes identifier.
7971
2793eeab
MP
79722014-05-08 Marek Polacek <polacek@redhat.com>
7973
7974 PR c/61053
7975 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7976 TYPE_ALIGN_UNIT.
7977
f827930a
MP
79782014-05-08 Marek Polacek <polacek@redhat.com>
7979
7980 PR c/61077
7981 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7982 of main.
7983
1d60af08
KZ
79842014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7985 Mike Stump <mikestump@comcast.net>
7986 Richard Sandiford <rdsandiford@googlemail.com>
7987
7988 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7989 (finish_enum): Use wide-int interfaces.
7990 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7991 * c-typeck.c (build_c_cast): Likewise.
7992 (set_nonincremental_init_from_string): Likewise.
7993 (c_tree_equal): Likewise.
7994
a0e24419
MP
79952014-05-02 Marek Polacek <polacek@redhat.com>
7996
7997 PR c/25801
7998 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7999 Return size_one_node when the type is not complete.
8000 (pointer_diff): Remove comment.
8001 (build_unary_op): Improve error messages.
8002
19fc9faa
MP
80032014-05-02 Marek Polacek <polacek@redhat.com>
8004
8005 * c-typeck.c (c_finish_return): Separate warning_at calls.
8006
63bc4e87
MP
80072014-05-02 Marek Polacek <polacek@redhat.com>
8008
8009 * c-tree.h (error_init): Remove declaration.
8010 (pedwarn_init): Likewise.
8011 * c-typeck.c (error_init): Make static and move above.
8012 (pedwarn_init): Likewise.
8013 (warning_init): Move above.
8014 (maybe_warn_string_init): Likewise.
8015
4bd2511b
JL
80162014-05-01 Jeff Law <law@redhat.com>
8017
8018 Revert:
8019
8020 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8021 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8022 avoid goto.
8023
6a358dcb
MP
80242014-05-02 Marek Polacek <polacek@redhat.com>
8025
8026 PR c/60784
8027 * c-typeck.c (push_init_level): Set constructor_designated to
8028 p->designated for structures.
8029
ae5ebda4
MP
80302014-05-01 Marek Polacek <polacek@redhat.com>
8031
8032 PR c/60915
8033 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8034 function-definition has an attribute after the declarator.
8035
96b40f8d
MP
80362014-05-01 Marek Polacek <polacek@redhat.com>
8037
8038 PR c/60257
8039 * c-typeck.c (warning_init): Add location_t parameter. Call
8040 warning_at instead of warning.
8041 (push_init_level): Pass input_location to warning_init.
8042 (add_pending_init): Add location_t parameter. Pass loc to
8043 warning_init.
8044 (set_nonincremental_init): Pass input_location to add_pending_init.
8045 (set_nonincremental_init_from_string): Likewise.
8046 (output_init_element): Pass loc to warning_init and to
8047 add_pending_init.
8048
32e00768
MP
80492014-05-01 Marek Polacek <polacek@redhat.com>
8050
8051 PR c/43395
8052 * c-typeck.c (c_finish_return): Distinguish between label and variable
8053 when warning about returning local address.
8054
c9379ce2
MP
80552014-05-01 Marek Polacek <polacek@redhat.com>
8056
8057 PR c/29467
8058 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8059 in C89 mode.
8060
d00887e8
MP
80612014-05-01 Marek Polacek <polacek@redhat.com>
8062
8063 PR c/43245
8064 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8065 instead of 0 to WARN_FOR_QUALIFIERS.
8066
5436fa2e
MP
80672014-05-01 Marek Polacek <polacek@redhat.com>
8068
8069 PR c/56989
8070 * c-typeck.c (default_conversion): Use better location for
8071 error call.
8072
f8ed5150
MP
80732014-04-30 Marek Polacek <polacek@redhat.com>
8074
8075 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8076 also when SANITIZE_FLOAT_DIVIDE is on.
8077
8337d1db
MP
80782014-04-30 Marek Polacek <polacek@redhat.com>
8079
8080 PR c/60139
8081 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8082 and pedwarn_init. Use loc insted of input_location.
8083
c4bdc42f
MP
80842014-04-30 Marek Polacek <polacek@redhat.com>
8085
8086 PR c/60351
8087 * c-typeck.c (build_binary_op): Use location when warning about
8088 shift count.
8089
45484dcf
MP
80902014-04-25 Marek Polacek <polacek@redhat.com>
8091
8092 PR c/18079
8093 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8094 always_inline/noinline and hot/cold attributes.
8095
34cf811f
MP
80962014-04-25 Marek Polacek <polacek@redhat.com>
8097
8098 PR c/60114
8099 * c-parser.c (c_parser_initelt): Pass input_location to
8100 process_init_element.
8101 (c_parser_initval): Pass loc to process_init_element.
8102 * c-tree.h (process_init_element): Adjust declaration.
8103 * c-typeck.c (push_init_level): Pass input_location to
8104 process_init_element.
8105 (pop_init_level): Likewise.
8106 (set_designator): Likewise.
8107 (output_init_element): Add location_t parameter. Pass loc to
8108 digest_init.
8109 (output_pending_init_elements): Pass input_location to
8110 output_init_element.
8111 (process_init_element): Add location_t parameter. Pass loc to
8112 output_init_element.
8113
42056eac
JJ
81142014-04-24 Jakub Jelinek <jakub@redhat.com>
8115
8116 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8117 atomic-clause, allow comma in between atomic-clause and
8118 seq_cst.
8119
e162a134
JJ
81202014-04-22 Jakub Jelinek <jakub@redhat.com>
8121
8122 PR c/59073
8123 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8124 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8125
2f6babac
IZ
81262014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8127
8128 PR middle-end/60469
8129 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8130 create_tmp_var instead build_decl for creating temps.
8131 (build_array_notation_expr): Likewise.
8132 (fix_conditional_array_notations_1): Likewise.
8133 (fix_array_notation_expr): Likewise.
8134 (fix_array_notation_call_expr): Likewise.
8135
8edbfaa6
JJ
81362014-03-28 Jakub Jelinek <jakub@redhat.com>
8137
8138 PR c++/60689
8139 * c-tree.h (c_build_function_call_vec): New prototype.
8140 * c-typeck.c (build_function_call_vec): Don't call
8141 resolve_overloaded_builtin here.
8142 (c_build_function_call_vec): New wrapper function around
8143 build_function_call_vec. Call resolve_overloaded_builtin here.
8144 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8145 Call c_build_function_call_vec instead of build_function_call_vec.
8146 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8147 * c-decl.c (finish_decl): Likewise.
8148
7485aeea
MLI
81492014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8150
8151 PR c/55383
8152 * c-typeck.c: Use correct format string in cast-qual warning
8153
b17a8b07
TS
81542014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8155
8156 * c-decl.c (c_decl_attributes): Use
8157 lang_hooks.types.omp_mappable_type.
8158 * c-typeck.c (c_finish_omp_clauses): Likewise.
8159
3af9c5e9
MP
81602014-03-06 Marek Polacek <polacek@redhat.com>
8161
8162 PR c/60197
8163 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8164 of checking tree code.
8165
1c9f5f33
PK
81662014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8167
8168 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8169 (c_parser_parameter_declaration): Likewise.
8170
cc28fc7f
MP
81712014-02-19 Marek Polacek <polacek@redhat.com>
8172
8173 PR c/60195
8174 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8175 Call mark_exp_read on exp.value.
8176 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8177 TREE_ADDRESSABLE on old instead of val.
8178 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8179
b581c05c
PK
81802014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8181
8182 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8183 C_EXPR_APPEND by vec_safe_push.
8184 * c-tree.h (C_EXPR_APPEND): Remove.
8185
81e5eca8
MP
81862014-01-31 Marek Polacek <polacek@redhat.com>
8187
8188 PR c/59963
8189 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8190 build_function_call_vec.
8191 (build_function_call): Likewise.
8192 (build_atomic_assign): Likewise.
8193 (build_function_call_vec): Add arg_loc parameter. Use it.
8194 (convert_arguments): Likewise.
8195 (convert_for_assignment): Rename rhs_loc to expr_loc.
8196 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8197 (c_parser_objc_keywordexpr): Likewise.
8198 (c_parser_postfix_expression_after_primary): Call
8199 build_function_call_vec with expr_loc rather than op_loc.
8200 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8201 build_function_call_vec.
8202 (c_parser_expr_list): Add locations parameter. Fill it with locations
8203 of function arguments.
8204 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8205
68fca595
MP
82062014-01-30 Marek Polacek <polacek@redhat.com>
8207
8208 PR c/59940
8209 * c-typeck.c (build_function_call_vec): Use loc parameter.
8210 (convert_arguments): Add location parameter. Use it.
8211 (ep_convert_and_check): Likewise.
8212 (build_atomic_assign): Adjust convert_for_assignment call.
8213 (build_modify_expr): Likewise.
8214 (digest_init): Likewise.
8215 (c_finish_return): Likewise.
8216 (build_conditional_expr): Adjust ep_convert_and_check calls.
8217 (convert_for_assignment): Add rhs_loc parameter. Use it.
8218 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8219 calls.
8220
fa337f3a
RB
82212014-01-30 Richard Biener <rguenther@suse.de>
8222
8223 PR c/59905
8224 * c-typeck.c (build_function_call_vec): Do not replace calls
8225 to a function via an incompatible type with a runtime abort.
8226
b72271b9
BI
82272014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8228
8229 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8230 flag_enable_cilkplus with flag_cilkplus.
8231 (c_parser_direct_declarator_inner): Likewise.
8232 (c_parser_attribute_any_word): Likewise.
8233 (c_parser_attributes): Likewise.
8234 (c_parser_compound_statement): Likewise.
8235 (c_parser_statement_after_labels): Likewise.
8236 (c_parser_if_statement): Likewise.
8237 (c_parser_switch_statement): Likewise.
8238 (c_parser_do_statement): Likewise.
8239 (c_parser_for_statement): Likewise.
8240 (c_parser_unary_expression): Likewise.
8241 (c_parser_postfix_expression): Likewise.
8242 (c_parser_postfix_expression_after_primary): Likewise.
8243 (c_parser_postfix_expression_after_primary): Likewise.
8244 (c_parser_omp_clause_name): Likewise.
8245 (c_finish_omp_declare_simd): Likewise.
8246 (c_parser_cilk_verify_simd): Likewise.
8247 * c-typeck.c (build_array_ref): Likewise.
8248 (build_function_call_vec): Likewise.
8249 (convert_arguments): Likewise.
8250 (build_compound_expr): Likewise.
8251 (c_finish_return): Likewise.
8252 (c_finish_if_stmt): Likewise.
8253 (c_finish_loop): Likewise.
8254 (build_binary_op): Likewise.
8255
393e8e8b
MP
82562014-01-23 Marek Polacek <polacek@redhat.com>
8257
8258 PR c/59846
8259 * c-typeck.c (parser_build_binary_op): Use location instead of
8260 input_location.
8261 (build_binary_op): Pass location to shorten_compare.
8262
f04dda30
MP
82632014-01-23 Marek Polacek <polacek@redhat.com>
8264
8265 PR c/58346
8266 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8267 an empty aggregate.
8268
789eadcd
MP
82692014-01-23 Marek Polacek <polacek@redhat.com>
8270
8271 PR c/59871
8272 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8273 of a comma expression.
8274 (emit_side_effect_warnings): Likewise.
8275
40f14e9f
BI
82762014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8277
8278 PR c/59825
8279 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8280 function to use walk_tree and moved a lot of its functionality to
8281 expand_array_notations.
8282 (expand_array_notations): New function.
8283
74558dd9
BI
82842014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8285
8286 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8287 attribute an attribute without value.
8288
652fea39
JJ
82892014-01-23 Jakub Jelinek <jakub@redhat.com>
8290
8291 PR middle-end/58809
8292 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8293 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8294
f34f1c87
MP
82952014-01-22 Marek Polacek <polacek@redhat.com>
8296
8297 PR c/59891
8298 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8299 of remove_c_maybe_const_expr on op1 and op2.
8300
241f845a
JJ
83012014-01-15 Jakub Jelinek <jakub@redhat.com>
8302
8303 PR c/58943
8304 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8305 effects, preevaluate rhs using SAVE_EXPR first.
8306
9a74f20c
BI
83072014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8308
8309 PR c++/59631
8310 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8311 statements with if-elseif statements.
8312
96066ce1
MP
83132014-01-06 Marek Polacek <polacek@redhat.com>
8314
8315 PR c/57773
8316 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8317 defined bit-field types only in ISO C.
8318
23a5b65a
RS
83192014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8320
8321 Update copyright years
8322
f9030485
RS
83232014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8324
8325 * c-array-notation.c: Use the standard form for the copyright notice.
8326
41958c28
BI
83272013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8328
8329 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8330 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8331 field in parser is not empty. If not-empty, call the function
8332 c_parser_finish_omp_declare_simd.
8333 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8334 between SIMD-enabled functions and #pragma simd. Added new parameter.
8335 (c_parser_cilk_all_clauses): Modified the usage of the function
8336 c_parser_cilk_clause_vectorlength as mentioned above.
8337 (c_parser_cilk_simd_fn_vector_attrs): New function.
8338 (c_finish_cilk_simd_fn_tokens): Likewise.
8339 (is_cilkplus_vector_p): Likewise.
8340 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8341 "nomask," and "mask" strings in clause name.
8342 (c_parser_omp_all_clauses): Added 3 new case statements:
8343 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8344 PRAGMA_CILK_CLAUSE_NOMASK.
8345 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8346 check for vector attribute and if so call the function
8347 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8348 called the function c_finish_cilk_simd_fn_tokens.
8349 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8350 parser field is non-empty. If so, parse them as you would parse
8351 the omp declare simd pragma.
8352 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8353 Added a check when step is a parameter and flag it as error.
8354 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8355 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8356 pragma_omp_clause.
8357
cef0fd0e
TS
83582013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8359
8360 * c-parser.c (c_parser_omp_parallel): Fix description.
8361
12893402
BI
83622013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8363
8364 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8365 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8366 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8367 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8368
296674db
JM
83692013-12-04 Joseph Myers <joseph@codesourcery.com>
8370
8371 PR c/52023
8372 * c-parser.c (c_parser_alignas_specifier): Use
8373 c_sizeof_or_alignof_type instead of c_alignof.
8374 (c_parser_alignof_expression): Likewise, with min_alignof
8375 parameter depending on alignof spelling used.
8376
edd28054
MP
83772013-12-04 Marek Polacek <polacek@redhat.com>
8378
8379 PR c/54113
8380 * c-decl.c (start_function): Don't warn for missing prototype for
8381 inline functions.
8382
da0fc454
MP
83832013-12-03 Marek Polacek <polacek@redhat.com>
8384
8385 PR c/59351
8386 * c-decl.c (build_compound_literal): Allow compound literals with
8387 empty initial value.
8388
4c2ecab0
JM
83892013-12-02 Joseph Myers <joseph@codesourcery.com>
8390
8391 PR c/58235
8392 * c-typeck.c (build_modify_expr): Diagnose assignment to
8393 expression with array type.
8394
340baef7
JM
83952013-11-29 Joseph Myers <joseph@codesourcery.com>
8396
8397 PR c/42262
8398 * c-typeck.c (process_init_element): Do not treat a string as
8399 initializing a whole array when used with a designator for an
8400 individual element.
8401
6763b9f7
JM
84022013-11-29 Joseph Myers <joseph@codesourcery.com>
8403
8404 PR c/57574
8405 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8406 an inline function following a static declaration.
8407
e7bd1de1
JJ
84082013-11-28 Jakub Jelinek <jakub@redhat.com>
8409
8410 PR c/59310
8411 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8412 to p_name before calling c_parser_omp_teams instead of after.
8413 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8414 argument. Remove unused p_name variable.
8415
0136f8f0
AH
84162013-11-27 Aldy Hernandez <aldyh@redhat.com>
8417 Jakub Jelinek <jakub@redhat.com>
8418
8419 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8420 external_scope is NULL.
8421
241b71bb
TV
84222013-11-27 Tom de Vries <tom@codesourcery.com>
8423 Marc Glisse <marc.glisse@inria.fr>
8424
8425 PR c++/59032
8426 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8427
2fb9a547
AM
84282013-11-22 Andrew MacLeod <amacleod@redhat.com>
8429
8430 * c-typeck.c: Add required include files from gimple.h.
8431
8400e75e
DM
84322013-11-22 David Malcolm <dmalcolm@redhat.com>
8433
8434 * c-decl.c (define_label, shadow_tag_warned)
8435 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8436 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8437 (declspecs_add_type): Remove use of in_system_header macro.
8438 * c-parser.c (c_parser_unary_expression): Likewise.
8439 * c-typeck.c (store_init_value, process_init_element)
8440 (c_start_case): Likewise.
8441
8442 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8443 macro.
8444
8445 * c-parser.c (c_parser_set_source_position_from_token): Remove
8446 reference to in_system_header from comment.
8447
386b1f1f
RS
84482013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8449
8450 * c-decl.c (grokdeclarator): Update comment to refer to
8451 tree_to_[su]hwi rather than tree_low_cst.
8452
ae7e9ddd
RS
84532013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8454
8455 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8456 tree_to_uhwi throughout.
8457
9439e9a1
RS
84582013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8459
8460 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8461 throughout.
8462
9541ffee
RS
84632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8464
8465 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8466 throughout.
8467
c02065fc
AH
84682013-11-15 Aldy Hernandez <aldyh@redhat.com>
8469
8470 * c-parser.c (c_parser_cilk_simd): New.
8471 (c_parser_cilk_verify_simd): New.
8472 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8473 (c_parser_omp_for_loop): Add case for NE_EXPR.
8474 Set c_break_label for CILK_SIMD.
8475 (c_parser_cilk_clause_vectorlength): New.
8476 (c_parser_cilk_clause_linear): New.
8477 (c_parser_cilk_clause_name): New.
8478 (c_parser_cilk_all_clauses): New.
8479 * c-typeck.c (build_unary_op): Pass location argument to
8480 readonly_error.
8481 (build_modify_expr): Same.
8482 (build_asm_expr): Same.
8483 (c_finish_bc_stmt): Error on break/continue in loops.
8484
18f429e2
AM
84852013-11-14 Andrew MacLeod <amacleod@redhat.com>
8486
8487 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8488
d8a2d370
DN
84892013-11-14 Diego Novillo <dnovillo@google.com>
8490
8491 * c-decl.c: Include print-tree.h.
8492 Include stor-layout.h.
8493 Include varasm.h.
8494 Include attribs.h.
8495 Include stringpool.h.
8496 * c-lang.c: Include fold-const.h.
8497 * c-parser.c: Include stringpool.h.
8498 Include attribs.h.
8499 Include stor-layout.h.
8500 Include varasm.h.
8501 Include trans-mem.h.
8502 * c-typeck.c: Include stor-layout.h.
8503 Include trans-mem.h.
8504 Include varasm.h.
8505 Include stmt.h.
8506
38b7bc7f
JM
85072013-11-13 Joseph Myers <joseph@codesourcery.com>
8508
8509 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8510 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8511 __auto_type.
8512 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8513 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8514 RID_AUTO_TYPE.
8515 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8516 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8517 (c_parser_declarator, c_parser_direct_declarator_inner)
8518 (c_parser_parameter_declaration, c_parser_type_name): All callers
8519 changed.
8520 (c_parser_declaration_or_fndef): Handle declarations with type
8521 determined from the initializer.
8522
45b0be94
AM
85232013-11-12 Andrew MacLeod <amacleod@redhat.com>
8524
18f429e2 8525 * c-typeck.c: Include gimplify.h.
45b0be94 8526
582d9b50
JM
85272013-11-12 Joseph Myers <joseph@codesourcery.com>
8528
8529 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8530 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8531 comment.
8532 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8533 or _Thread_local as appropriate in diagnostics.
8534 (build_null_declspecs): Initialize ret->thread_gnu_p.
8535 (declspecs_add_scspec): Handle either __thread or _Thread_local
8536 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8537 pedantic. Do not disallow _Thread_local extern and _Thread_local
8538 static.
8539
267bac10
JM
85402013-11-07 Joseph Myers <joseph@codesourcery.com>
8541 Andrew MacLeod <amacleod@redhat.com>
8542
8543 * c-aux-info.c (gen_type): Handle atomic qualifier.
8544 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8545 qualifiers when compating types.
8546 (shadow_tag_warned): Handle atomic_p in declspecs.
8547 (quals_from_declspecs): Likewise.
8548 (start_decl): Use c_type_promotes_to when promoting argument
8549 types.
8550 (grokdeclarator): Handle _Atomic.
8551 (get_parm_info): Diagnose any qualifier on "void" as only
8552 parameter.
8553 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8554 comparing types. Use c_type_promotes_to when promoting argument
8555 types.
8556 (finish_function): Use c_type_promotes_to when promoting argument
8557 types.
8558 (build_null_declspecs): Handle atomic_p in declspecs.
8559 (declspecs_add_qual): Handle RID_ATOMIC.
8560 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8561 (c_token_starts_declspecs): Handle RID_ATOMIC.
8562 (c_parser_declspecs): Handle atomic type specifiers and
8563 qualifiers.
8564 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8565 from types of expressions with atomic type.
8566 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8567 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8568 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8569 (c_parser_statement_after_labels, c_parser_switch_statement)
8570 (c_parser_for_statement, c_parser_expr_no_commas)
8571 (c_parser_conditional_expression, c_parser_binary_expression)
8572 (c_parser_cast_expression, c_parser_unary_expression)
8573 (c_parser_postfix_expression)
8574 (c_parser_postfix_expression_after_primary, c_parser_expression):
8575 Use convert_lvalue_to_rvalue.
8576 (c_parser_expression_conv, c_parser_expr_list): Document
8577 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8578 (c_parser_objc_synchronized_statement): Use
8579 convert_lvalue_to_rvalue.
8580 (c_parser_objc_selector): Handle RID_ATOMIC.
8581 (c_parser_objc_receiver, c_parser_array_notation): Use
8582 convert_lvalue_to_rvalue.
8583 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8584 _Atomic (type-name).
8585 (struct c_declspecs): Add atomic_p field.
8586 (convert_lvalue_to_rvalue): Declare.
8587 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8588 corresponding atomic types.
8589 (qualify_type): Don't add _Atomic qualifiers from second argument.
8590 (comp_target_types): Do not allow _Atomic mismatches.
8591 (type_lists_compatible_p): Do not remove atomic qualifiers when
8592 comparing types.
8593 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8594 (build_atomic_assign): New functions.
8595 (build_unary_op): Use build_atomic_assign for atomic increment and
8596 decrement.
8597 (build_conditional_expr): Do not treat _Atomic void as a qualified
8598 version of void.
8599 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8600 (find_anonymous_field_with_type, convert_to_anonymous_field)
8601 (convert_for_assignment): Do not remove atomic qualifiers when
8602 comparing types.
8603 (digest_init): Do not accept initialization of arrays of atomic
8604 elements by string constants.
8605 (build_asm_expr): Use convert_lvalue_to_rvalue.
8606 (build_binary_op): Do not treat _Atomic void as a qualified
8607 version of void.
8608
0c249d4b
DD
86092013-11-06 DJ Delorie <dj@redhat.com>
8610
8611 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8612 both explicit and builtin, print the location of the explicit one.
8613
6d7f7e0a
TB
86142013-11-05 Tobias Burnus <burnus@net-b.de>
8615
8616 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8617 c_parser_omp_distribute, c_parser_omp_teams,
8618 c_parser_omp_target, c_parser_omp_declare): Handle
8619 -fopenmp-simd.
8620
b906f4ca
MP
86212013-11-03 Marek Polacek <polacek@redhat.com>
8622
8623 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8624
ee1d5a02
JJ
86252013-11-01 Jakub Jelinek <jakub@redhat.com>
8626
8627 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8628 check_dup_generic at the end, unless remove is true.
8629 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8630 remove = true;.
8631 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8632
5a9785fb
JJ
86332013-10-31 Jakub Jelinek <jakub@redhat.com>
8634
8635 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8636 with decl that is not pointer nor array.
8637
939b37da
BI
86382013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8639
8640 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8641 a spawning function is found.
8642 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8643 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8644 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8645 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8646 case.
8647 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8648 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8649 expr.
8650 (c_finish_return): Added a check to reject _Cilk_spawn in return
8651 expression.
8652 (build_cilk_spawn): New function.
8653 (build_cilk_sync): Likewise.
8654 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 8655
d4af74d4
TB
86562013-10-27 Tobias Burnus <burnus@net-b.de>
8657
8658 PR other/33426
8659 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8660 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8661 (c_parser_statement_after_labels): Update calls.
8662
d73749df 86632013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8664
8665 PR other/33426
8666 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8667 Handle PRAGMA_IVDEP.
8668 (c_parser_statement_after_labels): Update call.
8669
f28aa681
MP
86702013-10-24 Marek Polacek <polacek@redhat.com>
8671
8672 * c-parser.c (c_parser_struct_declaration): Add a comment.
8673 (c_parser_declarator): Don't allow _Alignas here.
8674
0645c1a2
AM
86752013-10-17 Andrew MacLeod <amacleod@redhat.com>
8676
8677 * c-parser.c: Include omp-low.h.
8678 * c-typeck.c: Likewise.
8679
568a31f2
MP
86802013-10-17 Marek Polacek <polacek@redhat.com>
8681
8682 PR c/58267
8683 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8684 Document syntax of the array-declarator.
8685 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8686 are not permitted.
8687 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8688 (c_parser_struct_declaration): Likewise.
8689 (c_parser_declarator): Likewise.
8690 (c_parser_direct_declarator_inner): Likewise.
8691 (c_parser_parameter_declaration): Likewise.
8692 (c_parser_type_name): Likewise.
8693
acf0174b
JJ
86942013-10-11 Jakub Jelinek <jakub@redhat.com>
8695
8696 * c-lang.h (current_omp_declare_target_attribute): New extern
8697 decl.
8698 * c-parser.c: Include c-lang.h.
8699 (struct c_parser): Change tokens to c_token *.
8700 Add tokens_buf field. Change tokens_avail type to unsigned int.
8701 (c_parser_consume_token): If parser->tokens isn't
8702 &parser->tokens_buf[0], increment parser->tokens.
8703 (c_parser_consume_pragma): Likewise.
8704 (enum pragma_context): Add pragma_struct and pragma_param.
8705 (c_parser_external_declaration): Adjust
8706 c_parser_declaration_or_fndef caller.
8707 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8708 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8709 Adjust recursive call.
8710 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8711 of pragma_external.
8712 (c_parser_parameter_declaration): Use pragma_param instead of
8713 pragma_external.
8714 (c_parser_compound_statement_nostart, c_parser_label,
8715 c_parser_for_statement): Adjust
8716 c_parser_declaration_or_fndef callers.
8717 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8718 it through to c_parser_conditional_expression.
8719 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8720 pass it through to c_parser_binary_expression. Adjust recursive
8721 call.
8722 (c_parser_binary_expression): Remove prec argument, add
8723 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8724 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8725 binop matches it, use build2 instead of parser_build_binary_op.
8726 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8727 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8728 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8729 Handle pragma_struct and pragma_param the same as pragma_external.
8730 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8731 (c_parser_omp_variable_list): Parse array sections for
8732 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8733 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8734 (c_parser_omp_clause_reduction): Handle user defined reductions.
8735 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8736 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8737 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8738 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8739 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8740 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8741 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8742 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8743 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8744 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8745 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8746 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8747 (c_parser_omp_for_loop): Add CODE argument, pass it through
8748 to c_finish_omp_for. Change last argument to cclauses,
8749 and adjust uses to grab parallel clauses from the array of all
8750 the split clauses. Adjust c_parser_binary_expression,
8751 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8752 (omp_split_clauses): New function.
8753 (c_parser_omp_simd): New function.
8754 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8755 Allow the function to be called also when parsing combined constructs,
8756 and call c_parser_omp_simd when parsing for simd.
8757 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8758 #pragma omp section, require exactly one structured-block instead of
8759 sequence of statements.
8760 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8761 Allow the function to be called also when parsing combined constructs.
8762 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8763 Allow the function to be called also when parsing combined
8764 constructs.
8765 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8766 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8767 c_parser_omp_teams, c_parser_omp_target_data,
8768 c_parser_omp_target_update, c_parser_omp_target,
8769 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8770 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8771 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8772 (c_parser_omp_construct): Add p_name and mask vars. Handle
8773 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8774 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8775 and c_parser_omp_sections callers.
8776 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8777 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8778 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8779 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8780 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8781 OMP_CLAUSE_DEPEND.
8782 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8783 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8784 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8785 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8786 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8787 * c-typeck.c: Include tree-inline.h.
8788 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8789 handle_omp_array_sections_1, handle_omp_array_sections,
8790 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8791 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8792 user defined reductions.
8793 (c_tree_equal): New function.
8794 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8795 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8796 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8797 c_check_omp_declare_reduction_r): New prototypes.
8798 * c-decl.c (current_omp_declare_target_attribute): New variable.
8799 (c_decl_attributes): New function.
8800 (start_decl, start_function): Use it instead of decl_attributes.
8801 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8802 c_omp_reduction_decl, c_omp_reduction_lookup,
8803 c_check_omp_declare_reduction_r): New functions.
8804
0a6c2227
TT
88052013-09-25 Tom Tromey <tromey@redhat.com>
8806
8807 * Make-lang.in (c/gccspec.o): Remove.
8808 (CFLAGS-c/gccspec.o): New variable.
8809 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8810 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8811 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8812
f3bc55f0
TT
88132013-09-25 Tom Tromey <tromey@redhat.com>
8814
8815 * Make-lang.in (c/gccspec.o): Don't use subshell.
8816
a24d975c
MP
88172013-09-18 Marek Polacek <polacek@redhat.com>
8818
8819 PR sanitize/58443
8820 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8821 Remove unnecessary check.
8822
ce6923c5
MP
88232013-09-18 Marek Polacek <polacek@redhat.com>
8824
8825 PR sanitizer/58411
8826 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8827 no_sanitize_undefined attribute.
8828
a1e51df9
KT
88292013-09-13 Kai Tietz <ktietz@redhat.com>
8830
8831 PR target/57848
8832 * c-decl.c (c_builtin_function_ext_scope): Remove
8833 wrong assumption that it is never called on prexisting
8834 symbol.
8835
0af94e6f
JR
88362013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8837
8838 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8839
20059c8b
GDR
88402013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8841
8842 * c-objc-common.c (c_tree_printer): Tidy.
8843
de5a5fa1
MP
88442013-08-30 Marek Polacek <polacek@redhat.com>
8845
8846 * c-typeck.c (build_binary_op): Add division by zero and shift
8847 instrumentation.
8848
2531a1d9 88492013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8850 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8851
6e2bcc98 8852 PR c/35649
2531a1d9
JR
8853 * c-typeck.c (c_common_type): Prefer double_type_node over
8854 other REAL_TYPE types with the same precision.
8855 (convert_arguments): Likewise.
8856
025311c4
GDR
88572013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8858
8859 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8860 (c_initialize_diagnostics): Call a destructor for the early printer.
8861
da6ca2b5
GDR
88622013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8863
8864 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8865 printer initialization.
8866
318cda85 88672013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8868
318cda85
BI
8869 PR c/57490
8870 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8871 check for truth values.
8872 (expand_array_notation_exprs): Added truth values case. Removed an
8873 unwanted else. Added for-loop to walk through subtrees in default
8874 case.
8875
b066401f
GDR
88762013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8877
8878 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8879
fb48aadc
JM
88802013-07-23 Joseph Myers <joseph@codesourcery.com>
8881
8882 * c-parser.c (struct c_generic_association): Fix typo.
8883
433cc7b0
TT
88842013-07-23 Tom Tromey <tromey@redhat.com>
8885 Joseph Myers <joseph@codesourcery.com>
8886
8887 * c-parser.c (struct c_generic_association): New.
8888 (c_generic_association_d): New typedef.
8889 (c_parser_generic_selection): New function.
8890 (c_parser_postfix_expression): Handle RID_GENERIC.
8891
26d40c3d
JM
88922013-07-13 Jason Merrill <jason@redhat.com>
8893
8894 PR c++/57793
8895 * c-decl.c (finish_struct): Check for too-large class.
8896
ecdbd01a 88972013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8898
8899 PR c/57821
8900 * c-typeck.c (set_init_index): When folding, check for index overflow.
8901
1141ed3f
BI
89022013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8903
8904 * c-parser.c (c_parser_array_notation): Removed rejection of array
8905 notations in an array of function pointers.
8906
713b46fa
BI
89072013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8908
8909 * c-array-notation.c (make_triplet_val_inv): New function.
8910 (create_cmp_incr): Likewise.
8911 (create_array_refs): Likewise.
8912 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8913 Also modularized common parts between functions and called the function.
8914 (build_array_notation_expr): Likewise.
8915 (fix_conditional_array_notations_1): Likewise.
8916 (fix_array_notation_expr): Likewise.
8917 (fix_array_notation_call_expr): Likewise.
8918
92f20202
MP
89192013-06-18 Marek Polacek <polacek@redhat.com>
8920
8921 PR c/57630
8922 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8923
73a23b06
BI
89242013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8925
8926 * c-array-notation.c (build_array_notation_expr): Reject array notation
8927 mismatch between LHS and RHS even inside a call_expr. Also, removed
8928 a couple while statements that were dead code.
8929
00b8517d
BI
89302013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8931
8932 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8933 excessive precision expressions in function parameters. Also removed
8934 couple unwanted while statements.
8935
1509bdda
BI
89362013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8937
8938 * c-array-notation.c (expand_array_notation_exprs): Added
8939 ARRAY_NOTATION_REF case.
ab20d992 8940
d60f1706
BI
89412013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8942
8943 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8944 function to c-family/array-notation-common.c.
8945 (is_cilkplus_reduce_builtin): Likewise.
8946 (find_rank): Likewise.
8947 (extract_array_notation_exprs): Likewise.
8948 (replace_array_notations): Likewise.
8949 (find_inv_trees): Likewise.
8950 (replace_inv_trees): Likewise.
8951 (contains_array_notation_expr): Likewise.
8952 (find_correct_array_notation_type): Likewise.
8953 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8954 (struct inv_list): Moved this to c-family/array-notation-common.c.
8955 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8956
6d6efbb3
BI
89572013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8958
8959 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8960 reduction functions outside the for-loop. Added a check if the fundecl
8961 is non-NULL. Finally, removed an unwanted if-statement, and made the
8962 body unconditional.
8963
25c22937
BI
89642013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8965
8966 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8967 condition of the if-statement matches the rank of else-block and then-
8968 block when array notations are used.
8969 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8970 expression after the entire function body is parsed.
8971 (c_parser_expr_no_commas): Delayed creating array notation expressions
8972 to the end of function parsing.
8973 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8974 whole if-statement instead of just the condition.
ab20d992 8975 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8976
edd25645
BI
89772013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8978
8979 PR c/57474
8980 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8981 array to NULL_TREE if they are unused. Also added a check for the
8982 field to be NULL before its fields are used in future.
ab20d992 8983
065ce7f1
RO
89842013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8985
8986 PR bootstrap/57450
8987 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8988 (build_array_notation_expr): Likewise.
8989
36536d79
BI
89902013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8991
8992 * c-typeck.c (build_array_ref): Added a check to see if array's
8993 index is greater than one. If true, then emit an error.
8994 (build_function_call_vec): Exclude error reporting and checking
8995 for builtin array-notation functions.
8996 (convert_arguments): Likewise.
8997 (c_finish_return): Added a check for array notations as a return
8998 expression. If true, then emit an error.
8999 (c_finish_loop): Added a check for array notations in a loop
9000 condition. If true then emit an error.
9001 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9002 (build_binary_op): Added a check for array notation expr inside
9003 op1 and op0. If present, we call another function to find correct
9004 type.
9005 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9006 * c-parser.c (c_parser_compound_statement): Check if array
9007 notation code is used in tree, if so, then transform them into
9008 appropriate C code.
9009 (c_parser_expr_no_commas): Check if array notation is used in LHS
9010 or RHS, if so, then build array notation expression instead of
9011 regular modify.
9012 (c_parser_postfix_expression_after_primary): Added a check for
9013 colon(s) after square braces, if so then handle it like an array
9014 notation. Also, break up array notations in unary op if found.
9015 (c_parser_direct_declarator_inner): Added a check for array
9016 notation.
9017 (c_parser_compound_statement): Added a check for array notation in
9018 a stmt. If one is present, then expand array notation expr.
9019 (c_parser_if_statement): Likewise.
9020 (c_parser_switch_statement): Added a check for array notations in
9021 a switch statement's condition. If true, then output an error.
9022 (c_parser_while_statement): Similarly, but for a while.
9023 (c_parser_do_statement): Similarly, but for a do-while.
9024 (c_parser_for_statement): Similarly, but for a for-loop.
9025 (c_parser_unary_expression): Check if array notation is used in a
9026 pre-increment or pre-decrement expression. If true, then expand
9027 them.
9028 (c_parser_array_notation): New function.
9029 * c-array-notation.c: New file.
9030 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 9031
cd192ccc
MS
90322013-05-23 Mike Stump <mikestump@comcast.net>
9033
9034 * c-typeck.c (convert_for_assignment): Handle references to memory
9035 spaces better.
9036
427b248d
JM
90372013-05-16 Jason Merrill <jason@redhat.com>
9038
9039 * Make-lang.in (cc1$(exeext)): Use link mutex.
9040
44d90fe1
PC
90412013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9042
9043 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9044 to simply use OPT_Wpointer_arith.
9045 (build_unary_op): Likewise.
9046
4e7d7b3d
JJ
90472013-04-03 Jakub Jelinek <jakub@redhat.com>
9048
9049 PR c/19449
9050 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9051 argument. If set, or it temporarily for parsing of the first
9052 argument into force_folding_builtin_constant_p.
9053 (c_parser_postfix_expression): Adjust callers.
9054
839b422f
RB
90552013-03-21 Richard Biener <rguenther@suse.de>
9056
9057 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9058 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9059
2ee028f1
MP
90602013-02-12 Marek Polacek <polacek@redhat.com>
9061
9062 PR c/44938
9063 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9064 origtypes to NULL.
9065
8824edff
JJ
90662013-01-24 Jakub Jelinek <jakub@redhat.com>
9067
9068 PR c/56078
9069 * c-typeck.c (set_nonincremental_init_from_string): If
9070 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9071 returned false.
9072 (process_init_element): Likewise.
9073
eadd3d0d
JJ
90742012-12-20 Jakub Jelinek <jakub@redhat.com>
9075
9076 PR c++/55619
9077 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9078 argument, don't call default_function_array_conversion
9079 nor c_fully_fold here.
9080 (c_parser_asm_statement): Adjust callers.
9081 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9082 and outputs here, and call default_function_array_conversion
9083 on inputs that don't need to be addressable.
9084
f8a93a2e
JJ
90852012-12-18 Jakub Jelinek <jakub@redhat.com>
9086
9087 PR c/39464
9088 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9089 warning require that both c_common_unsigned_type as well as
9090 c_common_signed_type is the same for both mvl and mvr types.
9091
9771b263
DN
90922012-11-16 Diego Novillo <dnovillo@google.com>
9093
9094 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9095
9096 * c-common.c: Use new vec API in vec.h.
9097 * c-common.h: Likewise.
9098 * c-gimplify.c: Likewise.
9099 * c-pragma.c: Likewise.
9100 * c-pretty-print.c: Likewise.
9101 * c-pretty-print.h: Likewise.
9102 * c-semantics.c: Likewise.
9103 * c-decl.c: Likewise.
9104 * c-parser.c: Likewise.
9105 * c-tree.h: Likewise.
9106 * c-typeck.c: Likewise.
9107
880661a4
JW
91082012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9109
9110 PR c++/54930
9111 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9112
077d1abe
MLI
91132012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9114
9115 PR c/53066
9116 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9117 shadows a function, unless the variable is a function or a
9118 pointer-to-function.
9119
3a785c97
JJ
91202012-10-12 Jakub Jelinek <jakub@redhat.com>
9121
9122 PR c/54381
9123 * c-parser.c (struct c_tree_loc_pair): Removed.
9124 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9125 add location_t * and tree * arguments, fill in array of 3
9126 sizeof_arg trees and corresponding locs.
9127 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9128 c_parser_expr_list callers.
9129 (c_parser_postfix_expression_after_primary): Likewise. Pass
9130 array of 3 sizeof_arg trees and locs (corresponding to first
9131 3 arguments) to sizeof_pointer_memaccess_warning.
9132
703c8606
LC
91332012-10-09 Lawrence Crowl <crowl@google.com>
9134
9135 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9136 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9137 hash table.
9138
5d9de0d0
PC
91392012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9140
9141 PR c++/54194
9142 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9143 call.
9144
a212e43f
MG
91452012-10-09 Marc Glisse <marc.glisse@inria.fr>
9146
9147 PR c++/54427
9148 * c-typeck.c: Include c-common.h.
9149 (enum stv_conv): Moved to c-common.h.
9150 (scalar_to_vector): Moved to c-common.c.
9151 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9152 * Make-lang.in: c-typeck.c depends on c-common.h.
9153
3b78de56
AC
91542012-10-04 Arnaud Charlet <charlet@adacore.com>
9155
9156 * c-decl.c (c_write_global_declarations): Fix handling of
9157 -fdump-ada-spec*.
9158
78c60e3d
SS
91592012-09-30 Sharad Singhai <singhai@google.com>
9160
9161 * c-decl.c (c_write_global_declarations): Use a different method
9162 to determine if the dump has ben initialized.
9163
9f33203d
JM
91642012-09-14 Joseph Myers <joseph@codesourcery.com>
9165
9166 PR c/54552
9167 * c-typeck.c (c_cast_expr): When casting to a type requiring
9168 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9169 c_fully_fold first.
9170
a27d595d
JM
91712012-09-14 Joseph Myers <joseph@codesourcery.com>
9172
9173 PR c/54103
9174 * c-typeck.c (build_unary_op): Pass original argument of
9175 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9176 any C_MAYBE_CONST_EXPR, if it has integer operands.
9177 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9178 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9179 to c_objc_common_truthvalue_conversion, then remove any
9180 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9181 c_objc_common_truthvalue_conversion not
9182 c_common_truthvalue_conversion.
9183 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9184 call note_integer_operands for arguments with integer operands
9185 that are not integer constants.
9186
9feb29df
JJ
91872012-09-13 Jakub Jelinek <jakub@redhat.com>
9188
9189 PR c/54559
9190 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9191 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9192
d409320c
JJ
91932012-08-31 Jakub Jelinek <jakub@redhat.com>
9194
9195 PR c/54428
9196 * c-convert.c (convert): Don't call fold_convert_loc if
9197 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9198 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9199 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9200
6265d07c
JJ
92012012-08-24 Jakub Jelinek <jakub@redhat.com>
9202
9203 PR c/54355
9204 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9205 for nested and empty_ok arguments in the call to
9206 c_parser_declaration_or_fndef.
9207
1a4049e7
JJ
92082012-08-17 Jakub Jelinek <jakub@redhat.com>
9209
9210 * c-tree.h (c_last_sizeof_arg): Declare.
9211 * c-parser.c (struct c_tree_loc_pair): New type.
9212 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9213 non-NULL.
9214 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9215 (c_parser_postfix_expression_after_primary): Likewise. Call
9216 sizeof_pointer_memaccess_warning if needed.
9217 (sizeof_ptr_memacc_comptypes): New function.
9218 * c-typeck.c (c_last_sizeof_arg): New global variable.
9219 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9220
0229aee9
UB
92212012-07-24 Uros Bizjak <ubizjak@gmail.com>
9222
9223 * c-lang.h (lang_decl): Add variable_size GTY option.
9224
7ee2468b
SB
92252012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9226
9227 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9228 * Make-lang.in: Fix dependencies.
9229
d4a10d0a
SB
92302012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9231
9232 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9233 and add language Makefile hooks.
9234 * config-lang.in: New file.
9235 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9236 add the required "normal" config-lang.in rules.
9237 * c-lang.h: Moved from gcc/ to here.
9238 * c-tree.h: Likewise.
9239 * c-objc-common.c: Likewise.
9240 * c-objc-common.h: Likewise.
9241 * c-typeck.c: Likewise.
9242 * c-convert.c: Likewise.
9243 * c-lang.c: Likewise.
9244 * c-aux-info.c: Likewise.
9245 * c-errors.c: Likewise.
9246 * gccspec.c: Likewise.
9247 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9248 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9249\f
68127a8e 9250Copyright (C) 2012-2023 Free Software Foundation, Inc.
d4a10d0a
SB
9251
9252Copying and distribution of this file, with or without modification,
9253are permitted in any medium without royalty provided the copyright
9254notice and this notice are preserved.